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§

animation
Contains animation data for the models.
primitive
Contains model and material

Structs§

Model
Contains primitives of a model.
Primitive
Geometry to be rendered with the given material.

Functions§

load
Load scenes from path to a glTF 2.0.