flame-engine / flame-engine/flame
(flame) allow theming `paint`
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Description
# What could be improved
As a flame developer I would like to set all my component paints to `paint.filterQuality = FilterQuality.medium`. However, flame currently doesn't expose an API to achieve so.
Currently the paint is hard coded and can't be changed https://github.com/flame-engine/flame/blob/275ca17d7e780deb9c72c8b439309a1f1413b7a1/packages/flame/lib/src/components/mixins/has_paint.dart#L15
As a developer I would like to specify what the default paint should be.
# Why should this be improved
- Improve developer experience
- Specify how my `HasPaint` components should paint in a single place
# Any risks?
No, as long as the theming defaults are kept to the current defaults.
# More information
Contributor guide
Research direction
Start with packages/flame/lib/src/components/mixins/has_paint.dart at the linked hard-coded paint definition, then trace how HasPaint components obtain their paint defaults. Define how a shared default can be configured while preserving the current defaults. Done means Flame developers can set the default paint behavior for their HasPaint components without changing each component individually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- developer-experience, game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100