3 releases (breaking)
0.4.0 | Jan 17, 2024 |
---|---|
0.2.1 | Mar 12, 2023 |
0.2.0 |
|
0.1.1 | Nov 18, 2022 |
0.1.0 |
|
#127 in Rendering
27 downloads per month
Used in bevy_more_shapes
22KB
99 lines
Bevy Normal Material
Simple normal material for Bevy.
Usage
System setup
Add the plugin to your app:
use bevy::prelude::*;
use bevy_normal_material::prelude::*;
fn main() {
App::new()
.add_plugins(NormalMaterialPlugin);
}
Apply a component to a MaterialMeshBundle
fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<NormalMaterial>>,
) {
commands.spawn(MaterialMeshBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
material: materials.add(NormalMaterial::default()),
..Default::default()
});
}
Compatibility
bevy | bevy_normal_material |
---|---|
0.9 | 0.1 |
0.10 | 0.2 |
0.11 | 0.3 |
0.12 | 0.4 |
Dependencies
~43–84MB
~1M SLoC