Skip to content
SkillModel-led2,553 tokens in use

threejs-gltf-loading

Load glTF and GLB models into three.js r187 and play their animations: GLTFLoader, Draco, Meshopt and KTX2 decoders, cross-fades and skinned clones.

9,684 stars on the repository Apache License 2.0gamedev-skills/awesome-gamedev-agent-skills · skills/web-engines/threejs-gltf-loading
npx skills add gamedev-skills/awesome-gamedev-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing threejs-gltf-loading costs

96tokens idle
2,553tokens in use
3,783tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples15/15
  • Output15/15
  • Size10/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 123

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity92
  • Maintenance96
  • Community60
  • Maturity24
  • Momentum40

This skill teaches a coding agent to bring .gltf and .glb models into a three.js r187 project and make them move. It starts by inspecting the file for compression extensions and clips, then loads it with GLTFLoader, frames it by its bounding box, and drives clips with one AnimationMixer per animated root.

It covers the failures that eat an afternoon: a model that is invisible or a hundred times too small, decoder files that return 404, animations that never advance, and clones that share one skeleton. A short runtime probe checks mesh count and mixer progress in a running page.

What You Get

  • Six code patterns: load and frame a model, play a clip, cross-fade between clips, set up Draco, KTX2 and Meshopt, find a named part, and shrink a model while keeping named nodes
  • A runtime probe expression that reports mesh count and whether the mixer time advanced
  • A gotcha list for invisible models, undefined results outside callbacks, 404 decoder files, shared skeletons and parts that vanish after optimizing
  • A reference on LoadingManager progress bars, spawning many animated enemies with SkeletonUtils.clone, AnimationAction looping and a Blender export checklist

Common Use Cases

  • Importing a character GLB and playing its idle and run clips
  • Fixing a model that loads but does not appear on screen
  • Adding Draco, Meshopt or KTX2 compression to cut download size
  • Spawning ten animated enemies that each move on their own

What Makes It Unique

The skill pins its patterns to one three.js release and lists what changed around it: Timer replacing Clock, decoder folders found without a path since r185, and the deprecated detectSupportAsync. It also warns that gltf-transform optimize flattens and joins named nodes by default, which silently removes the parts game code looks up, and it gives the flags that keep them.

Under The Hood

The agent loads the SKILL.md and reads the loaders and animation reference only when it needs detail. It edits your game source, runs the project build or type check, and runs npx commands that download and execute the gltf-transform command line tool to inspect, optimize and validate model files; optimize writes a new model file. For the runtime check it exposes objects on window and may install Playwright and a Chromium browser, then evaluates an expression in your local page. It does not call other services, though the example import map points at a public CDN.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers