Registry / other / gltf
library1.4.1rscratesunverified

glTF 2.0 loader for Rust, providing access to glTF scene data.

# Cargo.toml [dependencies] gltf = "1.4.1"
INSTALL
IMPORT
SIG · GLTF
G
gltf
otherrustv1.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Gltf
use gltf::Gltf;

Open a glTF file and iterate over its meshes.

use gltf::Gltf; fn main() -> Result<(), Box<dyn std::error::Error>> { let gltf = Gltf::open("model.gltf")?; for mesh in gltf.meshes() { println!("Mesh: {:?}", mesh.name()); } Ok(()) }
Debug
Known issues
gotchaBinary glTF (.glb) files require the `gltf-utils` crate or manual parsing.
fix
Use `gltf::Gltf::from_slice` with the binary data after extracting the glTF chunk.
affects: >=1.0.0
Upgrade
Version history
1.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Meta
1
Amazon
1
Resources
gltf — cargo add gltf · libregistry