# Optimise glTF models for web

> Loads glTF models in three.js with the right decoders and compresses them, so 3D files load fast without errors.

- Page: https://youraiskill.com/skill/nirholas-load-and-optimize-gltf
- What it does: Load glTF/GLB models in three.js with GLTFLoader wired to the Meshopt, KTX2 and Draco decoders, shrink the file first with glTF Transform (`gltf-transform optimize`), and measure what changed (bytes over the wire, decode time, draw calls, triangles, texture memory). Use when a model will not load, loads slowly, is too big for the web, throws a decoder error ("setMeshoptDecoder must be called", "No DRACOLoader instance provided", "KTX2Loader"), or when the user asks how to compress, optimize or load a GLB.
- Niches: frontend, games
- Licence: Apache-2.0
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions and reference files only (1 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
