threejs-impl-shadows
Installation
SKILL.md
threejs-impl-shadows
Quick Reference
Three-Step Shadow Opt-In
Shadows in Three.js require THREE explicit opt-in steps. Missing ANY step results in no shadows.
import * as THREE from 'three';
// Step 1: Enable shadow maps on the renderer
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
// Step 2: Enable shadow casting on the light
light.castShadow = true;
// Step 3: Enable per-mesh shadow behavior
Related skills