threejs-textures

Configure Three.js textures for color, UV mapping, and environment reflections.

Updated May 18, 2026
One-click install
npx skills add https://github.com/yogaprasetya22/mmorpg --skill threejs-textures-yogaprasetya22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-textures
Source: https://github.com/yogaprasetya22/mmorpg/tree/main/frontend/.agents/skills/threejs-textures
Command: npx skills add https://github.com/yogaprasetya22/mmorpg --skill threejs-textures-yogaprasetya22

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Three.js texture setup can be confusing and error-prone, leading to incorrect colors, broken UVs, blurry or aliased surfaces, and inefficient rendering.

Core Features & Use Cases

  • Texture loading and async workflows: Load image textures safely and efficiently for materials, including Promise-based patterns.
  • Correct texture configuration: Use proper color spaces (sRGB vs data), wrapping, repeat/offset/rotation, filtering, anisotropy, and mipmaps to get the look you expect.
  • Environment mapping and advanced texture types: Apply cube maps, HDR/equirectangular reflections, render targets, compressed textures (KTX2), and video textures for realistic lighting.
  • UV mapping and texture data pipelines: Read/modify UV attributes, manage secondary UVs for AO (uv2), and build texture atlases for batching.
  • Performance and memory management: Dispose textures/material maps and optimize for web delivery constraints (size limits, compression, reuse).

Quick Start

Apply texture images by loading them with a Three.js TextureLoader and assigning the loaded texture to a material map for your mesh.

Frequently Asked Questions about threejs-textures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix incorrect colors when applying textures in Three.js?

To fix incorrect colors in Three.js textures, configure the correct color space by setting sRGB for image maps and linear space for data maps. Proper colorSpace handling ensures PBR materials render with accurate, expected visual output without washout.

How do I set up UV mapping and secondary UVs for ambient occlusion in Three.js?

Setting up UV mapping in Three.js involves reading and modifying UV attributes, while managing secondary UVs (uv2) specifically for ambient occlusion maps. Proper uv2 handling ensures AO maps align correctly with your mesh geometry.

What is the best way to apply HDR environment mapping for reflections in Three.js?

The best way to apply HDR environment mapping in Three.js is using cube maps or equirectangular textures for environment lighting. This technique applies realistic reflections and PBR lighting to materials, requiring correct texture loading and configuration.

Does Three.js support compressed KTX2 textures and video textures for rendering?

Three.js supports multiple advanced texture types, including compressed KTX2 textures and video textures. Using KTX2 optimizes web delivery constraints by reducing file sizes, while video textures enable dynamic media surfaces on 3D meshes.

How do I manage Three.js texture memory and dispose of unused resources?

Managing Three.js texture memory requires safely disposing of textures and material maps when they are no longer needed. Proper resource disposal prevents memory leaks, optimizing rendering performance and web delivery constraints for 3D scenes.

Why do my Three.js textures appear blurry or aliased on mesh surfaces?

Three.js textures appear blurry or aliased when wrapping, filtering, anisotropy, or mipmap settings are configured incorrectly. Adjusting these texture properties ensures sharp, high-quality surface rendering across different viewing distances and angles.