What problem does it solve?
Provides clear, practical guidance for selecting, configuring, and optimizing materials in Three.js so developers can achieve the intended visual look while minimizing runtime cost and integration errors.
Core Features & Use Cases
- Material reference: Covers MeshBasic, MeshLambert, MeshPhong, MeshStandard, MeshPhysical, MeshToon, MeshNormal, MeshDepth, Points, Line, ShaderMaterial, and RawShaderMaterial.
- Texture and map guidance: Explains albedo, normal, roughness, metalness, AO, displacement, emissive, clearcoat, transmission, sheen, iridescence, anisotropy, and env maps, plus uv2 requirements.
- Shader and advanced effects: Shows when to use ShaderMaterial/RawShaderMaterial and lists common built-in uniforms and attributes.
- Performance and lifecycle: Reuse and pooling strategies, when to dispose materials, and tips to reduce draw calls and sorting overhead.
- Use Case: Style game assets with PBR for realistic visuals, tune car paint or glass with PhysicalMaterial, or implement stylized toon shading for a cartoon look.
Quick Start
Use the threejs-materials skill to generate or configure appropriate Three.js material settings for a mesh based on its textures and desired visual style.