-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add an example for sprites with a custom shape #2973
Conversation
Could we have a method on This code is not exactly trivial to read. |
I believe this is currently not supported on the new renderer. Should it be? |
I think for regular polygons it's ok, but for stars it's a bit odd, since they're used more rarely. Alternatively, we can make a parametrized primitive shape, just like it has been done for
Sorry if I didn't understand your question, but this example is not presenting any fancy new feature. It just shows how to customize the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visually, it is quite appealing, but the code is kinda complicated.
The code for direct creation of a single shape would look much more appealing, even if (maybe) less eye catching. In that way, it would even be similar to the mesh
example.
I would also prefer using a very simple shape (e.g. a triangle), to focus the attention on the topic of the example rather than the shape.
Yeah I wanted it to be fun to view and not go over shapes that will be added someday in bevyengine/rfcs#12... but all the loops makes it hard to read.
Oh the mesh component has been removed from the new sprite bundle so it won't be as easy to do 😞 bevy/pipelined/bevy_sprite2/src/bundle.rs Lines 11 to 16 in 43e8a15
So I guess that example won't be useful anyway after the new renderer is merged |
Sprites no longer have custom meshes, and now we have |
This is covered by the mesh2d_manual example |
It has come to my attention in #2957 that it may not be common knowledge that this is relatively easy to do.
This shows 4 lines of sprites with custom shapes: