flame_svg: Add support to load SVG files as Path objects for collision purposes
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #4121 của @adario — đã đóng, không merge
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Dart
- Star
- 10.8k
- Fork
- 1.1k
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flame-engine/flame
-
bug
flame-engine/flame#4143 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ShapeHitbox keeps stale bounds if re-added after its ancestors moved; it also grows its ancestors list on every mountCó thể đã có người làm @adario đã nhận hôm nay. Đang mởbug
flame-engine/flame#4141 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
flame-engine/flame#4131 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement v2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
flame-engine/flame#4116 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
flame-engine/flame#4063 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của flame-engine/flame
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] 附近设备权限未申请Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
bggRGjQaUbCoE/PiliPlus#3369 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
[lsp] Remove DartAnalysisServerService.serverReadyForRequest() from EnableDartSupportForModuleĐang mởP1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
flutter/flutter-intellij#9177 ·
Maintainer thường phản hồi trong vòng 1 ngày