james-j-obrien / bevy_vector_shapes

A library for rendering vector shapes using the Bevy game engine
Other
336 stars 21 forks source link

Support Polylines and Polygons #1

Open james-j-obrien opened 1 year ago

james-j-obrien commented 1 year ago

Unique from the other shapes in that they aren't represented by a single quad so will requiring a more complex or unique rendering pipeline.

Droggelbecher commented 1 year ago

Would really love to see polygons as well, or at least arbitrary triangles which I could combine to a polygonal area :)

Droggelbecher commented 1 year ago

I couldn't help looking into triangles (they also happen to solve my immediate problem): https://github.com/james-j-obrien/bevy_vector_shapes/pull/30

mydumpfire commented 10 months ago

Any chance of this getting implemented soon? Would love to have irregular polygons.

james-j-obrien commented 10 months ago

My attention is currently more focused on ECS improvements to bevy itself (see the hooks, dynamic query and observers PRs I have oustanding) so I don't have a timeframe in which I expect to dedicate time to additional feature work.

The implementation is not necessarily that complex so I would be very open to reviewing and merging PRs implementing these shapes. It's mostly a matter of using the new GPU buffer abstractions in bevy to push an array of points alongside the standard shape data. Otherwise I feel it's more pressing to push towards relations in bevy_ecs as that is also a long desired feature and I unfortunately only have so much bandwidth.

I do hope to eventually get to implement these, or see a similar API makes its way into bevy itself and I appreciate the interest, so thank you for that.