StaticloadFetches and parses a GLB file at url into GPU-ready resources.
Creates GPU vertex/index buffers and textures owned by the returned
model; the caller must invoke model.destroy() to release them.
WebGPU device used to create buffers and textures.
URL of a binary glTF 2.0 (.glb) file.
Optionalopts: { keepData?: boolean; smoothNormals?: boolean }OptionalkeepData?: booleanRetain decoded CPU geometry on each GltfMeshData.cpu (default false).
OptionalsmoothNormals?: booleanParsed meshes, optional skeleton, and animation clips.
StaticloadParses an already-fetched GLB buffer into GPU-ready resources — the same
work as GltfLoader.load without the fetch. Use this when the bytes
arrive by another channel (e.g. an Electron IPC read) or when a Content
Security Policy forbids fetching blob: URLs.
WebGPU device used to create buffers and textures.
Raw bytes of a binary glTF 2.0 (.glb) container.
Optionalopts: { keepData?: boolean; smoothNormals?: boolean }OptionalkeepData?: booleanRetain decoded CPU geometry on each GltfMeshData.cpu (default false).
OptionalsmoothNormals?: booleanFor primitives lacking NORMAL, generate area-weighted smooth normals instead of the spec-default flat (per-face) normals (default false).
StaticloadLoads a GLB as a flat list of static (non-skinned) Mesh primitives.
Skips skin/animation parsing entirely; joints/weights on the source vertices
are ignored, so vertices are read in their authored (bind-pose) frame. Pair
with a MeshRenderer for plain rendering, or pass keepData: true so the
returned meshes can feed SdfVolume.fromMesh (which needs CPU-side vertex
and index data).
Each primitive becomes one entry in meshes; the loader owns the GPU
buffers and textures it allocates — call model.destroy() to release them.
WebGPU device used to create buffers and textures.
URL of a binary glTF 2.0 (.glb) file.
Optionalopts: { keepData?: boolean; storageBuffers?: boolean; smoothNormals?: boolean }OptionalkeepData?: booleanRetain CPU vertex/index arrays on each Mesh (needed for SDF baking). Default false.
OptionalstorageBuffers?: booleanOptionalsmoothNormals?: booleanStaticloadLike GltfLoader.loadStatic but parses pre-fetched GLB bytes instead
of fetching a URL — for environments whose CSP forbids fetch() of the
model (e.g. the editor, which reads asset bytes over IPC).
Optionalopts: {StaticdecodeDevice-free decode of every static primitive in a GLB into packed
StaticPrimitiveGeometry (48-byte vertex layout + indices), in glb
mesh→primitive flat order. Does GLB parsing, Draco/meshopt/quantization
decompression, the tangent solve (skipped when the material has no normal map),
and the vertex pack — but touches no GPUDevice, so it can run in a Worker. The
result feeds GltfLoader.loadStaticFromArrayBuffer via opts.packedGeometry.
Optionalopts: { smoothNormals?: boolean; recenter?: boolean; featureIds?: boolean }
Loader for binary glTF 2.0 (.glb) assets.
Parses the GLB container, decodes accessors/buffer views, computes missing tangents, builds skinned meshes, materials, skeletons, and animation clips, and uploads textures to the GPU.