threejs-loaders
Skill1 starsChanged 8 months agoMITView on GitHub
Three.js asset loading - GLTF, textures, images, models, async patterns. Use when loading 3D models, textures, HDR environments, or managing loading progress.
9 other projects use a version of this, 8 of them edited.
Adopted by
Most recently taken up by
- calesthio/OpenMontageedited, first seen Oct 3, 2026
- codetesla51/skillsedited, first seen Sep 25, 2026
- full-stack-skills/threejs-skillstheir own version, first seen Sep 19, 2026
- ruloCode/hermes-osedited, first seen Jul 9, 2026
- kumaran-is/claude-code-onboardingedited, first seen May 25, 2026
- huangzida/skillsedited, first seen Apr 4, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 8
- calesthio/OpenMontage★ 63k16% same
- CloudAI-X/threejs-skills★ 3.5k16% same
- kumaran-is/claude-code-onboarding★ 3617% same
- ruloCode/hermes-os★ 1516% same
- ai4brands-design/claude-skills★ 216% same
- huangzida/skills★ 216% same
- codetesla51/skills★ 116% same
- patrickcohen/claude-skills-collection★ 116% same
Wrote their own version · 1
- full-stack-skills/threejs-skills★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- threejs-animationSkill
- threejs-fbx-mixamoSkill
- threejs-interactionSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 181
Use Draco compression for large geometry
- Distinctive: line 182
Use KTX2/Basis for textures
- Very specific: line 184
Use loader.setPath() to avoid repeating base paths
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Three.js Loaders
Quick Start
import * as THREE from "three";
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
const loader = new GLTFLoader();
loader.load("model.glb", (gltf) => {
scene.add(gltf.scene);
});
const textureLoader = new THREE.TextureLoader();
const texture = textureLoader.load("texture.jpg");LoadingManager
const manager = new THREE.LoadingManager();
manager.onLoad = () => startGame();
manager.onProgress = (url, loaded, total) => {
updateProgressBar((loaded / total) * 100);
};
manager.onError = (url) => console.error(`Error loading: ${url}`);
const gltfLoader = new GLTFLoader(manager);
const textureLoader = new THREE.TextureLoader(manager);GLTF/GLB Loading
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
const loader = new GLTFLoader();
loader.load("model.glb", (gltf) => {
const model = gltf.scene;
scene.add(model);
// Animations
if (gltf.animations.length > 0) {
const mixer = new THREE.AnimationMixer(model);
gltf.animations.forEach((clip) => mixer.clipAction(clip).play());
}
});With Draco Compression
import { DRACOLoader } from "three/addons/loaders/DRACOLoader.js";
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.6/");
const gltfLoader = new GLTFLoader();
gltfLoader.setDRACOLoader(dracoLoader);
gltfLoader.load("model.glb", (gltf) => scene.add(gltf.scene));FBX Loading
import { FBXLoader } from "three/addons/loaders/FBXLoader.js";
const loader = new FBXLoader();
loader.load("model.fbx", (object) => {
object.scale.setScalar(0.01); // Mixamo exports at 100x scale
const mixer = new THREE.AnimationMixer(object);
object.animations.forEach((clip) => mixer.clipAction(clip).play());
scene.add(object);
});Texture Loading
const loader = new THREE.TextureLoader();
loader.load("texture.jpg", (tex) => {
tex.colorSpace = THREE.SRGBColorSpace; // For albedo/color maps
tex.wrapS = THREE.RepeatWrapping;
tex.wrapT = THREE.RepeatWrapping;
tex.repeat.set(2, 2);
tex.anisotropy = renderer.capabilities.getMaxAnisotropy();
material.map = tex;
material.needsUpdate = true;
});HDR Environment
import { RGBELoader } from "three/addons/loaders/RGBELoader.js";
const pmremGenerator = new THREE.PMREMGenerator(renderer);
pmremGenerator.compileEquirectangularShader();
new RGBELoader().load("environment.hdr", (texture) => {
const envMap = pmremGenerator.fromEquirectangular(texture).texture;
scene.environment = envMap;
scene.background = envMap;
texture.dispose();
pmremGenerator.dispose();
});Async/Promise Patterns
// Promisify any loader
function loadGLTF(url) {
return new Promise((resolve, reject) => {
new GLTFLoader().load(url, resolve, undefined, reject);
});
}
// Load multiple in parallel
async function loadAssets() {
const [model, envTexture] = await Promise.all([
loadGLTF("model.glb"),
loadRGBE("environment.hdr"),
]);
scene.add(model.scene);
scene.environment = envTexture;
}Parse from ArrayBuffer
const response = await fetch("model.glb");
const buffer = await response.arrayBuffer();
new GLTFLoader().parse(buffer, "", (gltf) => {
scene.add(gltf.scene);
});Caching
THREE.Cache.enabled = true; // Enable built-in URL cache
// Manual cache
const modelCache = new Map();
async function loadCached(url) {
if (modelCache.has(url)) return modelCache.get(url).clone();
const gltf = await loadGLTF(url);
modelCache.set(url, gltf.scene);
return gltf.scene.clone();
}Error Handling
async function loadWithRetry(url, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await loadGLTF(url);
} catch (error) {
if (i === maxRetries - 1) throw error;
await new Promise((r) => setTimeout(r, 1000 * (i + 1)));
}
}
}Performance Tips
- Use Draco compression for large geometry
- Use KTX2/Basis for textures
- Enable
THREE.Cache.enabled = true - Use
loader.setPath()to avoid repeating base paths - Load progressively — show placeholder while loading
See Also
threejs-fbx-mixamo— Multi-FBX Mixamo animation loading pipelinethreejs-animation— Playing loaded animations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

