bevy_sprite_material

Crates.iobevy_sprite_material
lib.rsbevy_sprite_material
version0.2.0
sourcesrc
created_at2022-01-14 15:51:39.329344
updated_at2022-04-22 13:44:24.70518
descriptionPlugin to use materials for sprites
homepage
repositoryhttps://github.com/ManevilleF/bevy_sprite_material
max_upload_size
id513926
size76,124
FĂ©lix Lescaudey de Maneville (ManevilleF)

documentation

http://docs.rs/bevy_sprite_material

README

bevy_sprite_material

Materials for sprites in Bevy

workflow

MIT licensed unsafe forbidden Crates.io Docs.rs dependency status

This bevy plugin changes the bevy_sprite implementation using a material.

You might be interested in bevy_ui_material which is a similar plugin for bevy_ui instead of bevy_sprite.

The new Sprite component is identical to bevy_sprite but without the color field.

The new SpriteBundle component bundle replaces the texture field (Handle<Image>) by a material field (Handle<ColorMaterial>)

Objective

The goal of this plugin is to allow seamless edition of sprites texture and color which was removed with bevy 0.6.

This is very useful if you have many sprites and you have, for example, various themes and don't want to query every sprite to change its color.

If you have a dedicated artist, you probably don't use the sprite color tinting field anyway, so the base implementation is perfect for you. This is specifically if you want to "massively update" the sprite color and maybe the texture as well.

Disclaimer

This plugin is very straightforward, and simply plugs itself in the bevy_sprite render pipeline (in the extraction stage). This system might be slower than the base implementation, because of the extra Handle involved.

Also, there might be compatibility issues, so feel free to open issues or merge requests.

This plugin should work fine if you use both the plugin and the base sprite implementation

Commit count: 13

cargo fmt