14 releases (breaking)
0.11.0 | Jul 10, 2023 |
---|---|
0.10.0 | Mar 6, 2023 |
0.9.1 | Nov 22, 2022 |
0.8.0 | Jul 30, 2022 |
0.3.0 | Nov 3, 2020 |
#210 in Game dev
467 downloads per month
Used in bevy_outline
31KB
372 lines
bevy_obj
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.11"
bevy_obj = "0.11"
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.11"
bevy_obj = { version = "0.11", features = ["scene"] }
Dependencies
~25–67MB
~1M SLoC