18 releases (breaking)
0.14.0 | Jul 6, 2024 |
---|---|
0.13.0 | Feb 18, 2024 |
0.12.1 | Feb 15, 2024 |
0.12.0 | Nov 5, 2023 |
0.3.0 | Nov 3, 2020 |
#192 in Game dev
356 downloads per month
Used in 6 crates
(4 directly)
35KB
310 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.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"] }
Dependencies
~29–66MB
~1M SLoC