bevy_normal_material

Crates.iobevy_normal_material
lib.rsbevy_normal_material
version0.6.0
sourcesrc
created_at2022-11-18 03:05:37.552456
updated_at2024-09-25 05:33:57.187115
descriptionSimple normal material for Bevy
homepagehttps://github.com/mattatz/bevy_normal_material
repositoryhttps://github.com/mattatz/bevy_normal_material
max_upload_size
id717615
size98,080
mattatz (mattatz)

documentation

README

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
Commit count: 23

cargo fmt