What problem does it solve?
Three.js lighting is essential for realistic 3D scenes, but configuring multiple light types, shadows, and environment lighting can be error-prone and time-consuming.
Core Features & Use Cases
- AmbientLight for baseline illumination and soft shadows without directional bias.
- DirectionalLight, PointLight, SpotLight, HemisphereLight, and RectAreaLight with configurable shadows, bias, and camera frustum tuning.
- Environment Lighting (IBL) setup using HDRIs or cube textures for accurate reflections and image-based lighting.
- Common setups like Three-Point Lighting and outdoor/indoor scenarios to accelerate iteration and visual quality.
Quick Start
Install three.js in your project: npm install three
Import THREE in your module and start with basic lights:
- Create an ambient light with color and intensity
- Add a directional light to simulate the sun and enable shadows
- Optionally enable shadow maps and adjust shadow frustum for performance
- Optionally configure environment lighting using an HDR environment map or cube texture