What problem does it solve?
This Skill reduces visual bugs and performance pitfalls caused by incorrect texture loading, color space, UV configuration, and inefficient memory usage in Three.js projects, enabling consistent, high-quality rendering across devices.
Core Features & Use Cases
- Texture Loading & Formats: Guidance for TextureLoader, CubeTextureLoader, RGBELoader/EXRLoader, and KTX2 compressed textures.
- Color Space & Filtering: Best practices for sRGB vs linear data, mipmaps, anisotropic filtering, and min/mag filters to balance quality and performance.
- UVs & Atlases: Techniques for UV mapping, uv2 for AO, atlas selection, and shader UV transforms for sprite selection and tiling.
- Environment & HDR: Converting equirectangular HDR to PMREM cubemaps, setting scene.environment/background, and using CubeCamera for dynamic reflections.
- Memory & Performance: Dispose patterns, texture pooling, render targets, and platform-aware sizing to optimize WebGL memory.
- Use Case: Prepare a PBR material set for a web game, convert HDR environment maps to PMREM, compress textures to KTX2, and configure mipmaps and anisotropy for mobile.
Quick Start
Load and configure color, normal, and roughness maps, set albedo to sRGB, enable mipmaps and anisotropic filtering, assign uv2 for aoMap, and apply them to a MeshStandardMaterial.