Skip to main content

load

Function load 

Source
pub fn load(path: &Path) -> Result<Document, LoadError>
Expand description

Load a .glb or .gltf file into a core Document, including the scene assets (meshes, skins, materials, and embedded base-color textures) its geometry describes — the symmetric read side of write::write, and the same one-call shape animsmith_fbx::load uses. Consumers that judge only animation (lint, inspect) simply ignore Document::assets. Non-triangle primitives are skipped rather than reinterpreted.

§Errors

Returns LoadError for unreadable files, unsafe or missing external buffers, malformed GLB framing, parser rejection, structurally invalid animation channels, or node graphs that cannot be represented as a skeleton forest.