# Threejs gltf loading

> Threejs gltf loading is an open-source agent skill for developer tools. Loads glTF/GLB models into three.js with compressed assets and clip animation. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/shinyobjectz/raea-skills/tree/main/skills/threejs/pack/threejs-gltf-loading
- **Repository:** https://github.com/shinyobjectz/raea-skills
- **GitHub stars:** 38
- **License:** Apache-2.0
- **Skill name:** threejs-gltf-loading
- **Collection:** https://github.com/shinyobjectz/raea-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through importing glTF and GLB models into a three.js r187 scene and getting their animations to play. It covers GLTFLoader setup, attaching DRACO, Meshopt and KTX2 decoders for compressed geometry and textures, and driving clips with an AnimationMixer, including cross-fades between actions. It also explains how to frame a loaded model and find named parts so game or app code can control them.

The skill suggests running the gltf-transform CLI to inspect and validate a file before writing loader code, then sets up the matching decoders. It includes a runtime probe that checks for a non-zero mesh count and an advancing mixer, and a troubleshooting list for common failures such as invisible or mis-scaled models, decoder files returning 404, and clones sharing one skeleton.

It expects a JavaScript or TypeScript three.js project and the gltf-transform command-line tool available through npx. Scene setup and lighting are handled by sibling skills, and a reference file covers progress bars, many animated copies and exporter checklists.

## When your agent uses it

> Loads glTF/GLB models into three.js r187 and plays their animations: GLTFLoader, DRACO, Meshopt and KTX2 decoders, AnimationMixer cross-fades and SkeletonUtils clones. Use when a model is invisible or tiny, decoder files 404, animations never play, or clones share one skeleton. Not for scene setup (`threejs-scene-setup`) or lighting (`threejs-materials-lighting`).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/threejs/pack/threejs-gltf-loading)
- [License: Apache-2.0](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/threejs/pack/threejs-gltf-loading)

## Features

- **GLTFLoader setup:** Loads glTF and GLB files and returns the scene graph and animation clips.
- **Compression decoders:** Attaches DRACO, Meshopt and KTX2 decoders for compressed geometry and textures.
- **Animation mixing:** Plays clips with AnimationMixer and cross-fades between actions.
- **File inspection and validation:** Uses gltf-transform to list extensions, clips and texture sizes, and to validate output.
- **Named part lookup:** Finds nodes by name and keeps named parts intact when optimizing models.
- **Troubleshooting guide:** Lists common loader, decoder and skeleton-sharing problems with fixes.

## Good for

- Load a character model and play its run and idle animations
- Add DRACO or Meshopt decoding so a compressed model loads in the browser
- Cross-fade between animation clips when a character changes state
- Fix a model that appears invisible or far too small in the scene
- Spawn many animated enemies that each move independently
- Shrink a glTF file while keeping named parts available for code

## Install

### Claude Code

This skill ships in the `raea` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add shinyobjectz/raea-skills
/plugin install raea@raea
```

Or copy only this skill to `~/.claude/skills/threejs-gltf-loading`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/threejs-gltf-loading &&
cp -R "$tmp/skills/threejs/pack/threejs-gltf-loading" ~/.claude/skills/threejs-gltf-loading &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/threejs-gltf-loading` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/threejs-gltf-loading` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/threejs-gltf-loading &&
cp -R "$tmp/skills/threejs/pack/threejs-gltf-loading" ~/.agents/skills/threejs-gltf-loading &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/threejs-gltf-loading` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/threejs-gltf-loading` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/threejs-gltf-loading &&
cp -R "$tmp/skills/threejs/pack/threejs-gltf-loading" ~/.cursor/skills/threejs-gltf-loading &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/threejs-gltf-loading` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/shinyobjectz/raea-skills.git --path skills/threejs/pack/threejs-gltf-loading
```

Or copy the folder to `~/.gemini/skills/threejs-gltf-loading` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/threejs-gltf-loading`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/threejs-gltf-loading &&
cp -R "$tmp/skills/threejs/pack/threejs-gltf-loading" ~/.copilot/skills/threejs-gltf-loading &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/threejs-gltf-loading` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git
```

Then copy `raea-skills/skills/threejs/pack/threejs-gltf-loading` into your agent's skills folder as `threejs-gltf-loading`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which three.js version does this target?

The patterns target three.js r187, and the skill notes that existing projects keep their pinned release unless the user asks to upgrade.

### What does the skill need before Threejs gltf loading runs?

It expects a JavaScript or TypeScript three.js project. The inspection and optimization steps use the gltf-transform CLI through npx, and the runtime probe may be run through Playwright or the browser console.

### When should I use Threejs gltf loading instead of the scene setup skill?

Use it for importing models, playing clips and fixing models that do not appear. Renderer, camera and loop setup belong to threejs-scene-setup, and lighting and materials belong to threejs-materials-lighting.

### Why do my cloned models animate together?

A plain clone shares the skeleton. The skill recommends SkeletonUtils.clone for skinned meshes and a separate mixer for each clone.

### How do I install Threejs gltf loading in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/threejs-gltf-loading to use it in all your projects, or to .claude/skills/threejs-gltf-loading in one project. Or install the raea plugin, which includes it: /plugin marketplace add shinyobjectz/raea-skills, then /plugin install raea@raea.

### Does Threejs gltf loading run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Threejs gltf loading?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Threejs gltf loading?

The closest alternatives to Threejs gltf loading are Threejs, Threejs scene setup, Threejs materials lighting, Game engine and Bevy animation.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Threejs](https://ai-powered.com/skills/threejs): Threejs is an open-source agent skill for design and media.
- [Threejs scene setup](https://ai-powered.com/skills/threejs-scene-setup): Threejs scene setup is an open-source agent skill for developer tools.
- [Threejs materials lighting](https://ai-powered.com/skills/threejs-materials-lighting): Threejs materials lighting is an open-source agent skill for developer tools.
- [Game engine](https://ai-powered.com/skills/game-engine): Game engine is an open-source agent skill for design and media.
- [Bevy animation](https://ai-powered.com/skills/bevy-animation): Bevy animation is an open-source agent skill for developer tools.
- [Blender export pipelines](https://ai-powered.com/skills/blender-export-pipelines): Blender export pipelines is an open-source agent skill for design and media.
- [Kiln](https://ai-powered.com/skills/kiln-elithril): Kiln is an open-source agent skill for design and media.
- [Bevy assets](https://ai-powered.com/skills/bevy-assets): Bevy assets is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/threejs-gltf-loading
