Lommix / bevy_aseprite_ultra

The ultimate bevy aseprite binary plugin. Featuring animations and static atlas loading with pivots. Full support for hot reloading!
MIT License
35 stars 10 forks source link

Enabling and disabling visibility of layers in AsepriteAnimationBundle #11

Closed oDHAOSo closed 2 months ago

oDHAOSo commented 2 months ago

I have an aseprite file with many layers. By toggling the visibility of these layers, I'm able to create different images. Could it be possible to mutate the AsepriteAnimationBundle to decide which layers are visible?

Lommix commented 2 months ago

This is currently not possible, When the file gets loaded into a Bevy Asset the layers and frames are already combined to a single image on pixel level.

This would require to split each sprite layer on a different sprite or image and implement a custom blend shader, which would make all the sprite optimizations in bevy useless.

Ether way, would be cool, but not worth the drawbacks.

oDHAOSo commented 2 months ago

Could there be a way to toggle the layer visibility only before it's loaded into bevy? This way I could have a separate AsepriteAnimationBundle for each of the different images.

Lommix commented 2 months ago

For now all you can do is save the same file multiple times with the correct layer state each This cannot be fixed in this crate. The binary parser and layer combining happens in a crate below.