Extract extract to bevy_extract - #22852
Conversation
598daa2 to
0285ca3
Compare
|
You added a new feature but didn't update the readme. Please run |
463d2c8 to
c8866d1
Compare
atlv24
left a comment
There was a problem hiding this comment.
This is skipping a few steps but its roughly the goal. We need a few preparatory steps, each of these should be its own PR:
- The resource marker change to allow orphan rule circumvention on resource impls
- Making ExtractPlugin take the app label (RenderApp) as generic parameter instead of hardcode
- Making ExtractPlugin take a schedule to run and having its own internal extract schedule which handles the pre and post actions, running the user provided systemset/schedule in the middle
- improving the macro situation to hide existing complexity of implementations
- collapse manual implementations of extract into derive macro call or whatever
- Introducing an AppLabel marker to Extract impls to specify that they are RenderApp extract impls and tuck it away neatly into the macro
- Rename test terminology in extract_plugin.rs to not reference rendering
- finally, this PR
c8866d1 to
55d153b
Compare
|
New version, extending https://github.com/atlv24/bevy/tree/ad/extract-label ( #22855 )
|
c496d94 to
061c031
Compare
Placeholder More skeleton Rm extract placeholders squash skeleton squash skeleton squash skeleton cargo Merge migration guides
4cc02a2 to
eec1fd4
Compare
Based-A
left a comment
There was a problem hiding this comment.
Overall the documentation substitutions are good, there's just a couple of points I have around using "processing" as a substitute for "rendering". "Processing" feels too much like a black box, and even though you don't want to nail it down to a specific use case or example, it can still be confusing as to what "processing" actually means for the whole thing. Although some uses of it are fine, especially when the thing being talked about is detailed as a defined part of the "processor"/"processing".
|
@Based-A I've updated based on your feedback, please have another look |
|
Much better, comments look good from my perspective. |
kfc35
left a comment
There was a problem hiding this comment.
my comments are mostly to do with documentation
i can approve after theyre addressed
| )] | ||
| #![expect(unsafe_code, reason = "Unsafe code is used to improve performance.")] | ||
|
|
||
| //! This crate is about everything concerning extract. |
There was a problem hiding this comment.
This probably needs to be fleshed out a little bit more
| //! This crate is about everything concerning extract. | |
| //! This crate provides a way to extract component information from | |
| //! an app’s main world into a sub world. |
I think at least mentioning that the ExtractPlugin is how you mainly set it up, and maybe that extract/sync components to specify exactly how component data may be transformed from the main world to the sub world would also be helpful.
Just mentioning this documentation comment in general since it seems the extract infrastructure isn’t used uniformly by all bevy rendering devs and a little documentation can go a long way to getting this adopted more widely across the rendering codebase
There was a problem hiding this comment.
Okay I've had a go at some crate docs, please have a look
Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>
|
Nice job! Hope it gets merged without a hitch 👍 |
|
I think the only additional docs I might add at the top level are about the difference between the terms |
Objective
bevy_extracttracking #24483 )Solution
bevy_extractcrate, containing "extract/sync" stuff frombevy_renderPlease review commit-by-commit:
bevy_extractcrate skeletonbevy_rendertobevy_extractExtractComponent,ExtractResourcederive macrosL = RenderAppdefault, add compat types inbevy_render, etc.)bevy_extractSimplified by #23377
Testing
cargo run --example animated_mesh