Agent skill

threejs-textures

three.js textures: Texture, DataTexture, CubeTexture, CompressedTexture variants, DepthTexture, VideoTexture, CanvasTexture, 3D/array textures, Source; sampling parameters, mipmaps, anisotropy, wrap/mag/min filters; PMREMGenerator in Extras for environment map prefiltering. Use when configuring GPU texture objects and PMREM; for Draco/KTX2 transcoder file paths use threejs-loaders; for material map slots use threejs-materials; for output color pipeline use threejs-renderers.

Stars 254
Forks 41

Install this agent skill to your Project

npx add-skill https://github.com/partme-ai/full-stack-skills/tree/main/skills/threejs-skills/threejs-textures

SKILL.md

When to use this skill

ALWAYS use this skill when the user mentions:

  • texture.wrapS / wrapT, minFilter, magFilter, generateMipmaps, anisotropy
  • colorSpace / correct handling of sRGB vs linear data maps
  • Creating DataTexture, CubeTexture, compressed GPU formats, video/canvas driven textures
  • PMREMGenerator from environment maps for IBL

IMPORTANT: textures vs loaders

Step Skill
Decode file / HTTP threejs-loaders
Configure GPU Texture threejs-textures

Trigger phrases include:

  • "Texture", "CubeTexture", "PMREM", "colorSpace", "mipmap", "各向异性"
  • "环境贴图", "数据纹理", "压缩纹理"

How to use this skill

  1. Classify texture dimensionality and format (2D, cube, depth, compressed, data).
  2. Color pipeline: set colorSpace appropriately; normal/roughness maps are non-color data.
  3. Sampling: choose filters; enable mipmaps when minification occurs; consider max anisotropy.
  4. PMREM: feed env map through PMREMGenerator per docs; assign result to scene/env/intensity paths as required.
  5. Video/canvas: understand update needs each frame for VideoTexture / CanvasTexture.
  6. Disposal: dispose() textures when replacing to free GPU memory.
  7. KTX2/Basis: transcoder wiring belongs in threejs-loaders before this step.

See examples/workflow-pmrem-env.md.

Doc map (official)

Docs section Representative links
Textures https://threejs.org/docs/Texture.html
Cube https://threejs.org/docs/CubeTexture.html
Data https://threejs.org/docs/DataTexture.html
PMREM https://threejs.org/docs/PMREMGenerator.html

Scope

  • In scope: Core Textures + PMREMGenerator; sampling and color pipeline at texture level.
  • Out of scope: Loader configuration; post-processing passes that sample buffers (threejs-postprocessing).

Common pitfalls and best practices

  • sRGB albedo in linear workflow without proper colorSpace looks wrong next to renderer output.
  • Non-power-of-two textures have mip/wrap limitations unless padded.
  • Forgetting texture disposal on hot reload leaks VRAM.

Documentation and version

Texture classes and PMREMGenerator are documented under Textures and PMREMGenerator in three.js docs. Compressed and KTX2 paths often depend on threejs-loaders for transcoder setup before this skill applies.

Agent response checklist

When answering under this skill, prefer responses that:

  1. Link Texture, DataTexture, CubeTexture, or PMREMGenerator as appropriate.
  2. Tie colorSpace / filtering to threejs-renderers output and threejs-materials maps.
  3. Send Draco/KTX2 decoder wiring questions to threejs-loaders first.
  4. Emphasize dispose() when replacing env maps or large atlases.
  5. Mention Global constants only when wrapping/filter enums matter.

References

Keywords

English: texture, cubemap, pmrem, mipmap, colorspace, compressed texture, data texture, three.js

中文: 纹理、立方体贴图、PMREM、mipmap、色彩空间、压缩纹理、three.js

Expand your agent's capabilities with these related and highly-rated skills.

partme-ai/full-stack-skills

ocrmypdf-batch

OCRmyPDF batch processing skill — process multiple PDFs, Docker automation, shell scripting, and CI/CD integration. Use when the user needs to OCR many PDFs, set up automated OCR pipelines, or integrate OCR into workflows.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-optimize

OCRmyPDF optimization skill — compress PDFs, configure PDF/A output, JBIG2 encoding, and lossless optimization. Use when the user needs to reduce PDF file size, create archival PDF/A files, or optimize OCR output.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-image

OCRmyPDF image processing skill — deskew, rotate, clean, despeckle, remove border from scanned documents. Use when the user needs to improve scanned PDF quality, fix skewed pages, remove noise, or clean up scanned documents before OCR.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-api

OCRmyPDF Python API and plugin skill — use OCRmyPDF programmatically from Python, integrate with applications, and extend with plugins (EasyOCR, PaddleOCR, AppleOCR). Use when the user needs to call OCRmyPDF from Python code, build OCR pipelines, or use alternative OCR engines.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf

OCRmyPDF core skill — add searchable OCR text layer to scanned PDFs, convert images to searchable PDFs, support 100+ languages via Tesseract. Use when the user needs to OCR a PDF, make a scanned PDF searchable, or extract text from scanned documents.

254 41
Explore
partme-ai/full-stack-skills

svelte

Guides Svelte and SvelteKit development including reactive components, stores, transitions, lifecycle hooks, SSR, file-based routing, and deployment. Use when the user needs to build Svelte components, create SvelteKit applications, implement reactivity patterns, or configure Svelte with Vite.

254 41
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results