Open rendaoer opened 3 days ago
I have a branch that compiles here, but is currently hitting a panic due to WindowCreated
events not being registered, not sure exactly why that's happening.
I will try and find some time to work on it when I can, if anyone wants to pick it up where I left off feel free.
Thank you!
but is currently hitting a panic due to
WindowCreated
I had the same problem and I fixed it by adding the bevy_window
feature to the bevy dependency.
Ok great, I fixed that and the depth stencil issue, just checking examples.
Only canvases appear to be broken now.
Ah, it's because of the retained render world changes, I need a way to get the view's entity from it's MainEntity
.
I'm releasing a compatibility patch for 0.15 in #50.
Still needs a refactor to switch to required components, should be pretty straightforward if anyone wants to take a pass at it, otherwise I'll get it to once my schedule is more open.
Thank you for the fast patch!
About required components, I'm also trying to figure out how to re-design ShapeBundle
with required components, but I'm not quite sure how it should look like.
Because we have this ShapeConfig
, whose data will then flow into the ShapeMaterial
, ShapeFill
and Transform
components (using the bundle constructor). I wonder how this should be re-designed around required components while keeping things ergonomic.
The ShapePainter
and ShapeCommands
API surface should be able to stay the same, internally any entities that ShapeCommands
create will just have all of the expected components set even if they aren't technically a bundle.
Components like Transform
that are currently set via SpatialBundle
can be marked as required instead, ShapePainter/Commands
will still set them automatically but if you were to spawn a shape from it's components directly it should become much more ergonomic. For example, theoretically, I should be able to do:
commands.spawn(RectangleComponent { size: Vec2::new(10.0, 10.0) , ..default() });
and get a rectangle rendering. (although to be fair since the API currently doesn't expect you to interact with the components at all they don't have particularly good constructors or names, a good step is just getting rid of deprecation warnings)
Most of the deprecation warnings are about internal usage of bundles which can easily be refactored into setting the correct components, or use of bundles in examples which are also trivial refactors.
Tried to migrate the codebase to
0.15
, but I'm getting:Not sure how to fix this.