diff options
author | Silas Bartha <[email protected]> | 2024-12-10 14:56:41 -0500 |
---|---|---|
committer | Silas Bartha <[email protected]> | 2024-12-10 14:56:41 -0500 |
commit | 7d084ef6a416204409a166b39e56e4f9987aa025 (patch) | |
tree | ed06046601b7d7cb9e047db3223f9fcd860d8ea7 /README.md | |
parent | 5247e02872d6061d8f0fa68e962959de92fb4d2f (diff) |
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 28 |
1 files changed, 9 insertions, 19 deletions
@@ -14,19 +14,20 @@ Feel free to contribute if you want to improve this, it was thrown together pret | Crate Version | Bevy Version | |--- |--- | | 0.1 | 0.14 | +| 0.2 | 0.15 | ## Installation ### crates.io ```toml [dependencies] -bevy_blacklight_material = "0.1" +bevy_blacklight_material = "0.2" ``` ### Using git URL in Cargo.toml ```toml [dependencies.bevy_rustysynth] -git = "https://github.com/exvacuum/bevy_blacklight_material.git" +git = "https://git.exvacuum.dev/bevy_blacklight_material" ``` ## Usage @@ -47,26 +48,15 @@ fn main() { Then you can create blacklight-emitting spotlights, and reveal-able surfaces, like this: ```rs // Mesh with blacklight material -commands.spawn(MaterialMeshBundle { - material: asset_server.add(BlacklightMaterial { - // base texture, color, etc - ..Default::default() - }), - ..Default::default() -}); +commands.spawn(( + //... + MeshMaterial3d(asset_server.add(BlacklightMaterial::new(&asset_server, None, Color::WHITE))), +)); // Blacklight -commands.spawn(( - Blacklight, // Marker component - SpotLightBundle { - spot_light: SpotLight { - // outer/inner angle, range - ..Default::default() - }, - ..Default::default() - }, -)); +// Requires `SpotLight`, but you might want to add one yourself +commands.spawn(Blacklight); ``` ## License |