One mesh. One batch. Many transforms.
An InstancedMesh is authored as one draw-friendly object, then exported as the portable
EXT_mesh_gpu_instancing glTF extension. This lab compares the authored batch with the exact
JSON or GLB artifact parsed back by GLTFLoader.
Building a shared geometry, material, transform buffer, and instance-color buffer…
- backend
- —
- source batch
- —
- last artifact
- —
- parsed batch
- —
- frame ms
- —
Export JSON or GLB to create an in-memory artifact; the load buttons then parse that exact artifact through GLTFLoader.
one shared mesh
TRS accessors
binary glTF
loader reconstruction
required + color
The exporter writes translation, rotation, and scale accessors on the node extension. The loader consumes those accessors and rebuilds one InstancedMesh, keeping the draw-batch boundary visible.
This fixture is local evidence for the current Three.js build, not a universal guarantee for every geometry or material.
Derived from the official InstancedMesh, GLTFExporter, GLTFLoader, and glTF instancing example. The extension contract is defined by Khronos EXT_mesh_gpu_instancing. Use ?forceWebGL=1 to inspect the labeled WebGL2 preview.