Crate minetest_gltf
source ·Expand description
This crate is intended to load glTF 2.0, a file format designed for the efficient transmission of 3D assets.
It’s base on gltf crate but has an easy to use output.
§Installation
[dependencies]
easy-gltf="1.1.1"
§Example
let minetest_gltf = minetest_gltf::load("tests/cube.glb").expect("Failed to load glTF");
match minetest_gltf.model {
Some(model) => {
// We can work with primitives! Yay.
println!("primitives: {}", model.primitives.len());
},
None => {
// Something blew up. Boo.
panic!("No model. :(")
}
}
Modules§
- Contains animation data for the models.
- Contains model and material
Structs§
- Contains primitives of a model.
- Geometry to be rendered with the given material.
Functions§
- Load scenes from path to a glTF 2.0.