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

Abstract the nannou::draw module into the new bevy_nannou_draw crate #955

Open
mitchmindtree opened this issue Jan 18, 2024 · 2 comments · Fixed by #960
Open

Abstract the nannou::draw module into the new bevy_nannou_draw crate #955

mitchmindtree opened this issue Jan 18, 2024 · 2 comments · Fixed by #960
Labels

Comments

@mitchmindtree
Copy link
Member

mitchmindtree commented Jan 18, 2024

See the Rough Plan section of this comment for some context.

In general, the idea is to enable using nannou's Draw abstraction (i.e. draw.circle(), etc) into a bevy plugin so that it can be included conveniently in any bevy application with ease.

The bevy_nannou_draw crate was added in #951.

Note: Depends on #954. A step in #953.

@mitchmindtree mitchmindtree moved this to Backlog in Bevy Plugin Rework Jan 18, 2024
@mitchmindtree mitchmindtree changed the title Abstract the nannou::draw module into the new nannou_bevy_draw crate Abstract the nannou::draw module into the new bevy_nannou_draw crate Jan 18, 2024
@tychedelia
Copy link
Collaborator

One immediately annoying thing is that our Draw instance isn't Send + Sync due to the internal use of Rc<RefCell>>. Nannou has non-send resources, but we'll probably want to use Draw as a component per-camera view to make it easier to query and access.

@tychedelia
Copy link
Collaborator

One extremely annoying thing about bevy assets is that they load asynchronously, which makes sense for enforcing state transitions in a game, but is almost never what we want. Worst case, this leads to polluting a lot of our logic with "this texture might be ready or not", when we'd probably be happy just blocking rendering entirely until the user loads their assets up front. Like all things here, maybe there's some benefits for more advanced use cases, but a bit of friction. For loading something like an image, this should almost always be basically instant, but I'm a bit conflicted about whether it's better to (a). engineer our own wrapper that enforces blocking (see solutions here bevyengine/bevy#1701) or (b). guard against missing textures in our code and deal with a bit of flicker, unsure what this actually looks like in practice.

@tychedelia tychedelia mentioned this issue Feb 3, 2024
6 tasks
@tychedelia tychedelia linked a pull request Feb 3, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants