Model loading · function
readGlb
Split a .glb into its JSON and its binary chunk.
Explained in Importing models.
function readGlb(buffer: ArrayBuffer):import { readGlb } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
buffer | ArrayBuffer |
In depth
A .glb is the same document as a .gltf with the JSON and the buffer packed into one
file, which is why an asset store hands you both — and why preferring it costs nothing.