[−][src]Function easy_gltf::load
pub fn load<P>(path: P) -> Result<Vec<Scene>, Box<dyn Error>> where
P: AsRef<Path>,
Load scenes from path to a glTF 2.0.
Note: You can use this function with either a Gltf
(standard glTF
) or Glb
(binary glTF).
Example
let scenes = easy_gltf::load("tests/cube.glb")?; println!("Scenes: #{}", scenes.len()); // Output "Scenes: #1" let scene = &scenes[0]; // Retrieve the first and only scene println!("Cameras: #{}", scene.cameras.len()); println!("Lights: #{}", scene.lights.len()); println!("Models: #{}", scene.models.len());