Crates.io | bevy_mod_opacity |
lib.rs | bevy_mod_opacity |
version | |
source | src |
created_at | 2024-10-04 00:07:24.689219 |
updated_at | 2024-12-01 09:24:26.26702 |
description | Hierarchical opacity for bevy. |
homepage | |
repository | https://github.com/mintlu8/bevy_mod_opacity |
max_upload_size | |
id | 1395837 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Hierarchical opacity for bevy.
Opacity
componentWhen Opacity
is inserted to an entity, the entity and all its descendants
will be affected by the opacity value. Unlike bevy components like Visibility
this does not need to be put on every entity in the tree.
Entities with no Opacity
ancestor will not not affected by this crate.
We innately support 2d
, 3d
and ui
, this includes Sprite
, TextColor
, StandardMaterial
,
ColorMaterial
, Image
, BackgroundColor
and ForegroundColor
.
Additionally you can implement OpacityQuery
or derive Opacity
to make your own types
and materials work with this crate. Combining OpacityQuery
with custom QueryData
can
add support for third party types.
FadeIn
and FadeOut
These components adds a quick way to add and remove entities from your scenes smoothly.
You should add a FadeIn
during the spawn
call and use entity.insert(FadeOut)
instead
of entity.despawn_recursive()
Ensure materials are duplicated and unique, since we write to the underlying material directly.
Also make sure AlphaMode
is set to Blend
if applicable.
bevy | bevy_mod_opacity |
---|---|
0.14 | 0.1 |
0.15 | 0.2 |
License under either of
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contributions are welcome!
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.