#bevy #graphics #gamedev

bevy_normal_material

Simple normal material for Bevy

7 releases (4 breaking)

0.6.0 Sep 25, 2024
0.5.2 Apr 25, 2024
0.4.0 Jan 17, 2024
0.2.1 Mar 12, 2023
0.1.1 Nov 18, 2022

#48 in Rendering

Download history 7/week @ 2024-07-15 8/week @ 2024-07-29 10/week @ 2024-08-05 2/week @ 2024-08-19 2/week @ 2024-08-26 183/week @ 2024-09-23 30/week @ 2024-09-30 9/week @ 2024-10-07 10/week @ 2024-10-14 6/week @ 2024-10-21

65 downloads per month
Used in 3 crates

MIT license

25KB
123 lines

Bevy Normal Material

crates.io

Simple normal material for Bevy.

Example

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
0.13 0.5
0.14 0.6

Dependencies

~38–76MB
~1.5M SLoC