Skip to main content

Crate draco_gltf

Crate draco_gltf 

Source
Expand description

Full, lossless glTF 2.0 / pinned 2.1-draft model with Draco geometry.

Document is the public scene model, and all unknown JSON remains part of that model.

Re-exports§

pub use document::Accessor;
pub use document::AccessorIndex;
pub use document::Animation;
pub use document::AnimationIndex;
pub use document::BoundingVolume;
pub use document::Buffer;
pub use document::BufferIndex;
pub use document::BufferView;
pub use document::BufferViewIndex;
pub use document::Camera;
pub use document::CameraIndex;
pub use document::ComponentType;
pub use document::Document;
pub use document::ExternalAsset;
pub use document::ExternalAssetIndex;
pub use document::File;
pub use document::FileIndex;
pub use document::Image;
pub use document::ImageIndex;
pub use document::Material;
pub use document::MaterialIndex;
pub use document::Mesh;
pub use document::MeshIndex;
pub use document::Node;
pub use document::NodeIndex;
pub use document::PrimitiveIndex;
pub use document::PrimitiveRef;
pub use document::Sampler;
pub use document::SamplerIndex;
pub use document::Scene;
pub use document::SceneIndex;
pub use document::Shape;
pub use document::ShapeIndex;
pub use document::Skin;
pub use document::SkinIndex;
pub use document::Texture;
pub use document::TextureIndex;
pub use document::ValidationProfile;
pub use extensions::BinaryFreeExtension;
pub use extensions::DracoExtension;
pub use extensions::ExtensionHandler;
pub use extensions::ExtensionRegistry;
pub use extensions::ExtensionValidationContext;
pub use extensions::MeshGpuInstancingExtension;
pub use extensions::ResourceStore;
pub use extensions::StructuralMetadataExtension;
pub use extensions::BINARY_FREE_EXTENSIONS;
pub use extensions::EXT_MESHOPT_COMPRESSION;
pub use extensions::EXT_MESH_GPU_INSTANCING;
pub use extensions::EXT_STRUCTURAL_METADATA;
pub use extensions::KHR_DRACO_MESH_COMPRESSION;
pub use extensions::KHR_MESHOPT_COMPRESSION;

Modules§

document
Lossless document model and typed views for glTF scenes. Lossless glTF document model and typed object views.
extensions
Extension contracts and resource storage used by document transforms. Extension contracts for the lossless document model.

Structs§

AccessorData
Tightly packed accessor payload for geometry consumers.
CompressionOptions
Controls document-preserving Draco compression.
CompressionReport
Measured result of one Import::compress_primitive operation.
DocumentAccessorSource
Accessor source backed by a Document and its resolved resources.
FileResourceResolver
Filesystem resolver used by convenience file-loading APIs.
GeometryWriteOptions
Options controlling one geometry write operation.
GeometryWriteReport
Measured result of one atomic geometry write.
GlbRangeReader
Seekable, range-backed GLB source.
GltfOutput
A portable JSON glTF document and the companion resources it references.
GltfResource
One companion resource produced by Import::to_gltf_output.
Import
Lossless glTF document plus its resolved resources.
ImportOptions
Options controlling document loading, resource resolution and validation.
PackedAttribute
One materialized, tightly packed vertex attribute.
PackedGeometry
Materialized primitive geometry with contiguous attribute and index buffers.
PackedIndices
One materialized, tightly packed primitive index stream.
ResourceLimits
Optional resource quotas. None means unlimited.

Enums§

CompressionMode
How the exported primitive exposes its Draco payload.
Error
Errors returned by glTF parsing and Draco operations.
ExternalFilePolicy
Policy used by FileResourceResolver.
GeometryEncoding
Storage selected for newly written primitive geometry.
GeometryError
Validation errors for materialized primitive geometry.
GltfContainerFormat
Container used by an input glTF document.
GltfError
Errors that can occur when reading, transforming, or decoding glTF data.
JsonValue
Lossless JSON value used by the document model. Dependency-free JSON value that preserves number lexemes and object order.
OutputFormat
Container representation selected when serializing an import.
PreserveReason
Why source resource bytes were conservatively retained after a write.
PrimitiveMode
glTF primitive topology mode.

Constants§

DEFAULT_EXTERNAL_ASSET_DEPTH
Default maximum explicit nested-asset depth for Import::load_asset.

Traits§

ResourceResolver
Synchronous resolver for non-data resource URIs.

Functions§

import
Opens a glTF or GLB file using the draft validation profile.
import_slice
Parses glTF or GLB bytes using the draft validation profile.
import_slice_with_options
Parses glTF or GLB bytes with explicit loading options.
open
Opens a glTF or GLB file and applies the selected profile’s basic checks.
parse
Parses glTF or GLB bytes and applies the selected profile’s basic checks.
parse_with_options
Parses a container with explicit resource, quota, profile and extension options.
validate
Applies the available checks for the pinned draft profile.

Type Aliases§

Result
Result type returned by this crate.