https://github.com/manevillef/bevy_ui_material
Materials for bevy UI Nodes
https://github.com/manevillef/bevy_ui_material
Last synced: 4 months ago
JSON representation
Materials for bevy UI Nodes
- Host: GitHub
- URL: https://github.com/manevillef/bevy_ui_material
- Owner: ManevilleF
- License: mit
- Created: 2022-01-14T11:08:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-22T10:24:08.000Z (about 3 years ago)
- Last Synced: 2025-06-10T12:54:36.357Z (4 months ago)
- Language: Rust
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# bevy_ui_material
Materials for bevy UI Nodes
[](https://github.com/ManevilleF/bevy_ui_material/actions/workflows/rust.yaml)
[](./LICENSE)
[](https://github.com/rust-secure-code/safety-dance/)
[](https://crates.io/crates/bevy_ui_material)
[](https://docs.rs/bevy_ui_material)
[](https://deps.rs/crate/bevy_ui_material)This [bevy] plugin changes the `bevy_ui` implementation using a material.
> You might be interested in [bevy_sprite_material](https://github.com/ManevilleF/bevy_sprite_material) which is a similar plugin for `bevy_sprite` instead of `bevy_ui`.
This plugin provides new implementation of the following bundles:
- `NodeBundle`
- `ButtonBundle`
- `ImageBundle`The new component bundles replaces the `color` field and the `image` field (`Handle`) by a `material` field (`Handle`)
## Objective
The goal of this plugin is to allow seamless edition of UI nodes `image` **and** `color` which was removed with [bevy] 0.6.
This is very useful if you have many nodes and you have, for example, various themes and don't want to *query* every node to change its color.
If you have a dedicated artist, you probably don't use the `color` tinting field anyway, so the base implementation is perfect for you.
This is specifically if you want to "massively update" the `color` and maybe the `image` as well.## Disclaimer
This plugin is very straightforward, and simply plugs itself in the `bevy_ui` 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 ui implementation
[bevy]: https://github.com/bevyengine/bevy