Skip to content
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

change the ribbon example into a tracer example. #380

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

naasblod
Copy link
Contributor

I think this could be more helpful for people wanting to use the ribbon example. In my mind "tracers" are the most used application for this sort of thing, If you feel it isn't just close it.

run with:
cargo run --example ribbon --features="bevy/bevy_winit bevy/bevy_pbr 3d bevy/bevy_gizmos"

Copy link
Owner

@djeedai djeedai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly you're proposing to replace the purely GPU driven motion with a property-based one, to show how a ribbon can follow a target as a kind of trail, is that it?

I don't have any objection, but if you feel that tracers are common (I don't have an opinion, probably that's correct) then I'd expand a tiny bit the top level documentation to mention that this example shows a "tracer" (so that if someone search that term they find that example) and explain how a property is used to link the particle position to some CPU position (as this is probably a common feature to want).

examples/ribbon.rs Outdated Show resolved Hide resolved
@naasblod
Copy link
Contributor Author

Screen.Recording.2024-10-15.at.21.23.02.mov

@djeedai djeedai added the A - examples Change related to examples label Oct 17, 2024
@naasblod
Copy link
Contributor Author

Is there anything else you'd like me to do with this or should I close it? Maybe move to a separate example?

@pcwalton
Copy link
Contributor

This is fine by me. Note that the little gaps between ribbon segments are something I've been thinking about fixing with the singly linked list experiment (that needs #387 to land first).

@djeedai
Copy link
Owner

djeedai commented Oct 29, 2024

Apology @naasblod I had to prioritize merging the large fix from @pcwalton for ribbons due to its size and criticality, which now makes this change conflict. Please let me know if you have time ideally to fix, otherwise I'll try to find time to do it myself. Thanks for your understanding!

@naasblod
Copy link
Contributor Author

No worries friend ❤️! I'll take care of it!

@naasblod
Copy link
Contributor Author

I think that does it. Could use a final review

@djeedai
Copy link
Owner

djeedai commented Oct 29, 2024

@naasblod the example fails to build:

error[E0412]: cannot find type `Gizmos` in this scope
   --> examples\ribbon.rs:115:17
    |
115 |     mut gizmos: Gizmos,
    |                 ^^^^^^ not found in this scope

@naasblod
Copy link
Contributor Author

naasblod commented Oct 29, 2024

@djeedai should be fixed now.
The example needed to be ran with bevy/bevy_gizmos but I removed the usage instead.

@djeedai
Copy link
Owner

djeedai commented Oct 29, 2024

@naasblod for next time, if you need a dependency for examples and tests only, you can add it to the [dev-dependencies] section in Cargo.toml.

@djeedai djeedai merged commit 003fff3 into djeedai:main Oct 29, 2024
15 checks passed
@naasblod
Copy link
Contributor Author

Ah! Thanks, that's useful to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - examples Change related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants