Use Draco (KHR_draco_mesh_compression) for maximum geometry size reduction, or Meshopt (EXT_meshopt_compression, via gltfpack) for faster decoding with less CPU cost. Both need a matching decoder in your loader; three.js and Babylon.js support each with version-specific setup.
At a glance
| Fact | Value | Source |
|---|---|---|
| Draco extension name in glTF | KHR_draco_mesh_compression | github.com |
| Meshopt extension name in glTF | EXT_meshopt_compression | github.com |
| three.js Meshopt support added in | r122+ | github.com |
Both Draco and Meshopt shrink glTF geometry for faster downloads in the browser, but they trade off differently: Draco typically compresses vertex/index data harder, Meshopt decodes faster and costs less CPU on load. Pick Draco when file size matters most (mobile connections, many models); pick Meshopt when decode speed on lower-end devices matters more, or combine geometry compression with gltfpack’s texture compression to Basis/KTX2.
If you build your game using an AI coding agent, Playgama MCP connects the agent to developer cabinet actions so it can upload a build and publish a sandbox link to playtest.
How do the two extensions work at load time?
- Draco – KHR_draco_mesh_compression stores compressed geometry in a bufferView; GLTFLoader requires a configured DRACOLoader to decompress it before use. If the uncompressed data isn’t also provided, the extension must be listed in extensionsRequired, so any loader without a Draco decoder will fail to render the model.
- Meshopt – produced by gltfpack as EXT_meshopt_compression; three.js needs r122+ and a call to
GLTFLoader.setMeshoptDecoder, Babylon.js 5.0+ needs no extra setup. Files also typically use KHR_mesh_quantization, supported since three.js r111+ and Babylon.js 4.1+.
Pitfall: if you publish the same build to several portals or embed it in an iframe, make sure the decoder WASM files ship alongside the loader – a missing decoder path is a common silent failure. Check your engine’s loader docs before shipping, since supported versions change.
Sources
- KHR_draco_mesh_compression Extension
- google/draco
- filament meshoptimizer gltf README
- DRACOLoader – Three.js Docs
- GLTFLoader – Three.js Docs
- Playgama for developers
Related questions
Can I use Draco and Meshopt together on the same glTF file?
No, Draco and Meshopt compress the same geometry attributes and are mutually exclusive for a given mesh; choose one or the other based on whether file size or decode speed is your priority.
Does compressing geometry with Draco affect texture size?
No, Draco compresses mesh geometry only. For textures, use a separate step like gltfpack’s Basis Universal/KTX2 option with the -tc flag.
Last updated: 30 September 2026