Skip to content

mattatz/bevy_normal_material

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple normal material plugin for Bevy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published