pub fn load_bytes(path: &Path, bytes: &[u8]) -> Result<Document, LoadError>Expand description
Load a .glb or .gltf byte slice into a core Document.
bytes supplies the top-level container exactly as captured by the
caller. path is retained for source provenance and diagnostics only;
captured-byte inputs need an explicit root API before any external
resource may be resolved.
ยงErrors
Returns LoadError for unsafe or missing external buffers, malformed
GLB framing, parser rejection, structurally invalid animation channels,
geometry or animation accessors typed for an element the selected reader
cannot decode or laid out so it cannot walk them, or node graphs that
cannot be represented as a skeleton forest.