Three.js Skills
Overview
Comprehensive knowledge base for building 3D web experiences with Three.js. This skill provides accurate API references, best practices, and working code examples across all major Three.js domains.
Three.js version: r160+ (January 2024)
Quick Reference
Core Topics
This skill covers 10 essential Three.js domains:
- Fundamentals - Scene setup, cameras, renderer, Object3D hierarchy
- Geometry - Built-in shapes, BufferGeometry, custom geometry, instancing
- Materials - PBR materials, shader materials, material properties
- Lighting - Light types, shadows, environment lighting
- Textures - UV mapping, environment maps, render targets
- Animation - Keyframe animation, skeletal animation, animation mixing
- Loaders - GLTF/GLB loading, async patterns, caching
- Shaders - GLSL basics, ShaderMaterial, custom effects
- Postprocessing - EffectComposer, bloom, DOF, custom passes
- Interaction - Raycasting, camera controls, mouse/touch input
When to Load References
Load detailed reference files based on your current task:
- Basic scene setup, cameras, renderer → Load
references/threejs-fundamentals.md - Creating shapes, custom geometry, instancing → Load
references/threejs-geometry.md - Material properties, PBR, shader materials → Load
references/threejs-materials.md - Adding lights, configuring shadows → Load
references/threejs-lighting.md - Texture loading, UV mapping, environment maps → Load
references/threejs-textures.md - Animating objects, GLTF animations, mixing → Load
references/threejs-animation.md - Loading GLTF/GLB models, Draco compression → Load
references/threejs-loaders.md - Writing GLSL shaders, custom visual effects → Load
references/threejs-shaders.md - Adding bloom, depth of field, screen effects → Load
references/threejs-postprocessing.md - Raycasting, mouse picking, camera controls → Load
references/threejs-interaction.md
Quick Start Examples
1. Fundamentals: Basic Scene
2. Geometry: Creating Shapes
3. Materials: PBR Materials
4. Lighting: Basic Lighting
5. Textures: Loading Textures
6. Animation: Simple Animation
7. Loaders: Loading GLTF Models
8. Shaders: Custom Shader Material
9. Postprocessing: Adding Bloom
10. Interaction: Raycasting
Common Patterns
Proper Disposal
Responsive Rendering
Performance Optimization
- Use instancing for repeated objects (
InstancedMesh) - Enable frustum culling (enabled by default)
- Dispose of unused resources
- Use proper LOD (Level of Detail) for complex scenes
- Minimize draw calls by merging geometries
- Limit active lights (each light adds shader complexity)
- Use texture atlases to reduce texture switches
Version Information
Three.js version: r160+ (January 2024)
Import format: ES6 modules (three, three/addons/*)
Verified: 2024-01
See Also
- Official Documentation: https://threejs.org/docs/
- Examples: https://threejs.org/examples/
- Editor: https://threejs.org/editor/
- Source: Based on CloudAI-X/threejs-skills


