threejs

Installation
SKILL.md

Three.js

Overview

Guides building high-performance 3D web experiences with Three.js, WebGPU-first rendering, TSL (Three Shader Language), and React Three Fiber. Covers scene architecture, asset compression, draw call budgets, and React 19 / Next.js integration patterns.

When to use: Creating 3D scenes, WebGPU rendering setup, TSL shader authoring, asset optimization (Draco/KTX2), React Three Fiber composition, Next.js streaming for 3D content, loading GLTF models, setting up lighting and shadows, animation playback and blending.

When NOT to use: 2D canvas animations (use Canvas API), simple SVG graphics, server-side rendering without client hydration, projects targeting pre-2022 hardware exclusively.

Quick Reference

Pattern API / Approach Key Points
WebGPU renderer import * as THREE from 'three/webgpu' Must await renderer.init() before first render
R3F canvas <Canvas gl={...}> with Suspense Wrap in <Suspense> for streaming support
Frame updates useFrame((state, delta) => ...) Mutate refs directly; never use setState
TSL shaders import { ... } from 'three/tsl' Node-based; compiles to WGSL or GLSL
Instancing <instancedMesh> with matrix updates Single draw call for repeated geometry
Related skills
Installs
41
GitHub Stars
11
First Seen
Feb 23, 2026