New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Three.js asset loading for glTF, textures, HDR environments, and progress tracking, with compression and caching guidance.

skills.sh installs
18.6K
GitHub stars
4.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers glTF and GLB loading with Draco, meshopt, and KTX2 compression, plus other model formats, textures, and HDR or EXR environments
  • Includes LoadingManager progress and abort handling, texture configuration, CubeTextureLoader skyboxes, and PMREM-generated environments
  • Enforces color space rules: sRGB for color maps, NoColorSpace for scalar maps, and flipY set to false for manually loaded glTF textures
  • Designed for WebGL and WebGPU projects using TSL, targeting three.js r186

Install

$ npx -y skills add cloudai-x/threejs-skills --skill threejs-loaders -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Three.js Loaders

Targets three.js r186. Examples use WebGLRenderer; the WebGPU and TSL section uses WebGPURenderer.

Quick Start

import * as THREE from "three";
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
import { RoomEnvironment } from "three/addons/environments/RoomEnvironment.js";

const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

const scene = new THREE.Scene();
scene.environment = new THREE.PMREMGenerator(renderer).fromScene(new RoomEnvironment(), 0.04).texture; // glTF PBR materials render black without lights or an environment

const camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.1, 100);
camera.position.set(2, 1.5, 3);
camera.lookAt(0, 0, 0);

const gltf = await new GLTFLoader().loadAsync("model.glb");
scene.add(gltf.scene);

function animate() {
  renderer.render(scene, camera);
}

renderer.setAnimationLoop(animate);

LoadingManager

Details

Repository
github.com/cloudai-x/threejs-skills
Categories
3D, CAD & Modeling, Frontend & UI Code

More from cloudai-x/threejs-skills

All 10

Similar to Threejs Loaders

More 3D, CAD & Modeling