[][src]Function gltf::import

pub fn import<P>(path: P) -> Result<(Document, Vec<Data>, Vec<Data>)> where
    P: AsRef<Path>, 

Import some glTF 2.0 from the file system.

let (document, buffers, images) = gltf::import(path)?;

Note

This function is provided as a convenience for loading glTF and associated resources from the file system. It is suitable for real world use but may not be suitable for all real world use cases. More complex import scenarios such downloading from web URLs are not handled by this function. These scenarios are delegated to the user.

You can read glTF without loading resources by constructing the Gltf (standard glTF) or Glb (binary glTF) data structures explicitly.