Skip to content

AmionSky/bevy_obj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_obj

Crates.io

A Wavefront .obj mesh asset loader plugin for the Bevy engine

Usage:

Add the crate as a dependency:

Major and Minor version number should match bevy version

[dependencies]
bevy = "0.13"
bevy_obj = "0.13"

Add the plugin:

use bevy::prelude::*;
use bevy_obj::ObjPlugin;

fn main() {
    App::new()
        .add_plugins((DefaultPlugins, ObjPlugin))
        .run();
}

Load the .obj file as a single mesh:

fn example_startup_system(asset_server: Res<AssetServer>) {
    let mesh_handle = asset_server.load("example.obj");
}

Scene based loading

If you prefer loading .obj files as a scene with (limited) MTL material support, add the scene feature

[dependencies]
bevy = "0.13"
bevy_obj = { version = "0.13", features = ["scene"] }

About

A Wavefront .obj mesh asset loader plugin for the Bevy engine

Resources

License

Stars

Watchers

Forks

Languages