Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

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.

Claude's review

9/10 Tested glTF loading and optimisation recipe with measurements and error table.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

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.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: load-and-optimize-gltf
description: >-
  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.
when_to_use: Any time a .glb or .gltf goes into a three.js page, and before shipping a model larger than about 2 MB.
license: Apache-2.0
metadata:
  author: three.ws
  short-description: GLTFLoader with every decoder, gltf-transform optimize, and how to measure
---

# Load and optimize glTF in three.js

Targets three.js r187 (`three@0.187.0`). Every runnable block below is executed in Chromium
against a real CC0 model before this plugin ships.

The order that works: **optimize the file, then load it with one loader that knows every
decoder, then measure.** A loader without the decoders fails on compressed files, and a
compressed file without measurement is a guess.

## 1. Optimize the file

[glTF Transform](https://gltf-transform.dev/cli) does it in one command. `model.glb` is your
source file; nothing to install beyond Node.

```bash
npx @gltf-transform/cli@4.5.1 inspect model.glb
npx @gltf-transform/cli@4.5.1 optimize model.glb model-optimized.glb --compress meshopt --texture-compress ktx2 --texture-size 2048
```

- `--compress meshopt` compresses geometry and animation. It decodes faster than Draco and
  is the default.
- `--texture-compress ktx2` writes GPU-compressed Basis Universal textures: they stay
  compressed in GPU memory (4 to 8 times smaller than a decoded JPEG or PNG). It needs the
  `ktx` CLI from [KTX-Software](https://github.com/KhronosGroup/KTX-Software/releases) on
  `PATH`. Without it, use `--texture-compress webp`: smaller downloads, same GPU memory as
  the original.
- `--texture-size 2048` caps every texture. Use 1024 for props on mobile.

KTX2 and WebP win on different axes. Measured on a CC0 armchair from the three.ws catalog
...

From nirholas's repository, Apache-2.0 licence.

Related skills

  • Checked

    TinyBase app builder

    Scaffolds and extends local first JavaScript apps with TinyBase, including schemas, persistence and sync.

    by tinyplex 5.2k
    7/101 credit
  • Checked

    ComfyUI custom node UI

    Adds widgets, sidebar tabs, commands and dialogs to ComfyUI custom nodes, so your node feels built in.

    by jtydhr88 325
    8/101 credit
  • Checked

    Scrolling menu upgrade

    Finds outdated react-horizontal-scrolling-menu code and rewrites it for version 8 so the menu works again.

    by asmyshlyaev177 789
    7/101 credit
  • Checked

    Screenshot to React code

    Rebuilds a screenshot or mockup as React, TypeScript and Tailwind code that closely matches the design.

    by buildfastwithai 792
    7/101 credit
  • Checked

    Map location picker

    Adds a map pin picker to a web form, so users can choose and submit one exact spot like a delivery address.

    by cyphercodes 84
    7/101 credit
  • Checked

    Port code to Rust

    Ports C, C++, Python, Go or JavaScript code into idiomatic Rust, with tests that prove it behaves the same.

    by morganlinton 2.2k
    9/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added