flame_svg: Add support to load SVG files as Path objects for collision purposes
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
Direzione di ricerca
The issue describes existing entry points Svg, SvgComponent, PathComponent, PathHitbox, and SpriteAnimationComponent, but gives no target files or tests. Read the flame_svg implementation and the linked PR #4121 first; the PR already has the proposed implementation. Done would include SVG paths that render at arbitrary sizes, support collision detection, and can be used for frame animation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem to solve
Currently, flame_svg supports loading SVG files for rendering purposes only: class Svg keeps the PictureInfo created by the vector graphics compiler, which is rendered offscreen as an Image at the target size, and kept in a MemoryCache mapped by size; class SvgComponent supports rendering the SVG as a PositionComponent subclass. Therefore, an SVG file is essentially treated as a bitmap instead of a vector image.
Proposal
Add classes to load SVG files as a collection of Path objects, which allow:
- rendering at arbitrary sizes, similarly to
PathComponent - collision detection, similarly to
PathHitbox - frame animation, similarly to
SpriteAnimationComponent
More information
I have opened PR #4121 the proposed implementation; there's a couple of new examples in the testbed:
CollidableSvgPathsExampleshows collision detection between SVG filesSvgPathsAnimationExampleshows how to use multiple SVG files as animation frames
Other
- Are you interested in working on a PR for this?
- Lingua principale
- Dart
- Stelle
- 10.8k
- Fork
- 1.1k
- Merge medio
- 1g 15h
- PR unite (30g)
- 50
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di flame-engine/flame
-
SpriteBatch draws item colors differently when not using drawAtlas (useAtlas: false)Forse già presa @ufrshubham l’ha presa 2 giorni fa. Apertabug
flame-engine/flame#4122 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement v2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
flame-engine/flame#4116 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
flame-engine/flame#4063 ·
I maintainer di solito rispondono entro 1 giorno
-
TextComponent shadows are not affected by OpacityEffectForse già presa @spydon l’ha presa 43 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
flame-engine/flame#4013 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
flame-engine/flame#4012 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di flame-engine/flame
Issue simili
-
Standalone dash flashes as its own RSVP step (e.g. Russian dialogue)Forse già presa @bezig01 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
daniel-pimenta-cc/ledor#53 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Iteration CounterApertaenhancement firebase
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
brysonddelozier/scribbles#24 ·
-
bug good first issue P2-Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
basictech01/uniun#305 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
daohoangson/flutter_widget_from_html#1657 ·
I maintainer di solito rispondono entro 3 giorni