threejs-geometry
Installation
SKILL.md
Three.js Geometry
Work Pattern
- Choose built-in geometry before custom buffers unless the shape or data layout requires full control.
- For custom geometry, define positions, indexes, normals, UVs, bounding volumes, and update flags deliberately.
- Prefer
InstancedMeshfor many repeated meshes andPointsor merged buffers for very dense simple visuals. - Pair with
threejs-materialsfor surface behavior,threejs-shadersfor per-vertex effects, andthreejs-animationfor morph targets.
Quick Start
import * as THREE from "three";
// Built-in geometry
const box = new THREE.BoxGeometry(1, 1, 1);
const sphere = new THREE.SphereGeometry(0.5, 32, 32);
const plane = new THREE.PlaneGeometry(10, 10);