Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

flame_svg: Add support to load SVG files as Path objects for collision purposes

Đã đóng
#4,120 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
dart, flutter
Lĩnh vực
game-dev

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ả

enhancement
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:

  • CollidableSvgPathsExample shows collision detection between SVG files
  • SvgPathsAnimationExample shows 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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flame-engine/flame

Tất cả issue của flame-engine/flame

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.