threejs-loaders

Featured

Three.js asset loading - GLTF, textures, images, models, async patterns. Use when loading 3D models, textures, HDR environments, or managing loading progress.

AI & Automation 49,938 stars 7238 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Three.js Loaders ## When to Use - You need to load models, textures, HDR assets, or other external resources in Three.js. - The task involves `GLTFLoader`, `TextureLoader`, loading progress, or async asset orchestration. - You are managing scene assets rather than authoring geometry or shaders directly. ## Quick Start ```javascript import * as THREE from "three"; import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js"; // Load GLTF model const loader = new GLTFLoader(); loader.load("model.glb", (gltf) => { scene.add(gltf.scene); }); // Load texture const textureLoader = new THREE.TextureLoader(); const texture = textureLoader.load("texture.jpg"); ``` ## LoadingManager Coordinate multiple loaders and track progress. ```javascript const manager = new THREE.LoadingManager(); // Callbacks manager.onStart = (url, loaded, total) => { console.log(`Started loading: ${url}`); }; manager.onLoad = () => { console.log("All assets loaded!"); startGame(); }; manager.onProgress = (url, loaded, total) => { const progress = (loaded / total) * 100; console.log(`Loading: ${progress.toFixed(1)}%`); updateProgressBar(progress); }; manager.onError = (url) => { console.error(`Error loading: ${url}`); }; // Use manager with loaders const textureLoader = new THREE.TextureLoader(manager); const gltfLoader = new GLTFLoader(manager); // Load assets textureLoader.load("texture1.jpg"); textureLoader.load("texture2.jpg"); gltfLoader.load("model.glb"); // onLoad fire...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category