Expand description
Pure-Rust 3D asset interchange, with glTF as the hub.
formats: readers for STL, PLY,MagicaVoxel, OBJ, FBX, 3DS, 3MF, USD, glTF andSketchUp, each behind a cargo feature, producing aDocument.document: that common form, a glTF 2.0 document (JSON and buffers) written out as a GLB as it is, flattened into a posedMeshon demand, and pruned to what aKeepasks for.mesh: the flat triangle-list model, written out as a GLB.assets: how readers find the textures and material libraries a model refers to.images: handles on a document’s images, for those a load found but didn’t read.gltf: GLB packing, and meshopt compression added to or decoded away from a GLB.meshopt: theEXT_meshopt_compressionandKHR_meshopt_compressionbitstreams.
Modules§
- assets
- Finding the files a model refers to (MTL libraries, textures) and turning texture bytes into embeddable images.
- document
- The common form every reader produces: a glTF 2.0 document, its JSON and its buffers’ bytes, carrying whatever the source had (scene graph, animation, skins, morph targets, materials, cameras, lights, names, extras).
- formats
- Model formats read natively: STL (binary and ASCII), PLY (ASCII and binary),
MagicaVoxel.vox, OBJ (with its MTL materials and textures), FBX (binary and ASCII), 3DS, 3MF, USD, glTF (.gltfand.glb) andSketchUp(.skp). Each becomes aDocument: glTF as it is, the others converted; textures are embedded so the document stands on its own. Each format is behind a cargo feature of its name (3dsand3mffor those two). AKeepsays what to keep; by default, everything. - gltf
- glTF 2.0 containers: packing a
.gltfand the files it names into one GLB, and adding or decoding away meshopt compression (EXT_meshopt_compression,KHR_meshopt_compression). - images
- Images a document names without having read them: what a load with
Keep::image_bytesoff leaves, as handles fromDocument::images. - mesh
- A model as plain triangle lists: what the format readers produce, written out as a GLB.
- meshopt
- The
EXT_meshopt_compressionbitstreams: meshoptimizer’s attribute (v0) and triangle (v1) encoders, the octahedral filter’s encoder, and decoders for every mode and filter.
Enums§
- Error
- What can go wrong reading or writing an asset.