gltf library

Pure-data glTF / GLB parsing primitives.

Splits the parsing layer (no engine type dependencies) from the engine-type builders that live in package:flutter_scene. Used by flutter_scene's runtime importer at runtime, and by this package's build hook to convert .glb → .model offline.

Classes

GlbContents
GltfAccessor
GltfAnimation
GltfAnimationChannel
GltfAnimationSampler
GltfBuffer
GltfBufferView
GltfDocument
In-memory representation of the parts of glTF 2.0 that flutter_scene consumes. Field names match the glTF spec (camelCase). Indexes into other arrays are stored as int? and resolved at use time.
GltfImage
GltfMaterial
GltfMesh
GltfMeshPrimitive
GltfNode
GltfPbrMetallicRoughness
GltfSampler
GltfScene
GltfSkin
GltfTexture
GltfTextureInfo

Enums

GltfAccessorType
Accessor "type" enum from spec section 5.1.1.
GltfComponentType
Component types from glTF spec section 5.1.1.

Functions

parseGlb(Uint8List bytes) GlbContents
Parse a GLB (binary glTF) blob into its JSON and embedded binary chunks.
parseGltfJson(Map<String, Object?> json) GltfDocument
readAccessorAsFloat32(GltfAccessor accessor, GltfBufferView bufferView, Uint8List bufferData) Float32List
Resolves a glTF accessor into a flat Float32List of its raw component values. The accessor's component type is normalized to float32 for callers, since flutter_scene's vertex format is uniformly float32.
readAccessorAsUint32(GltfAccessor accessor, GltfBufferView bufferView, Uint8List bufferData) Uint32List
Resolves an integer-typed accessor (used for indices and joint indices) into a Uint32List.