MCPInstall

threejs-materials

Classic three.js materials (non-Node): MeshStandardMaterial, MeshPhysicalMaterial, Phong/Lambert/Toon/Basic, Line/Points/Sprite materials, MeshMatcapMaterial, MeshNormalMaterial, depth/distance materials, ShaderMaterial and RawShaderMaterial. Use when tuning PBR maps, transparency, depth write, skinning flags, or writing GLSL in ShaderMaterial; for TSL/NodeMaterial/WebGPU shader graphs use threejs-node-tsl instead—not both for the same authoring path unless migrating.

Installs
418
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-materials
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads threejs-materials automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

When to use this skill

ALWAYS use this skill when the user mentions:

  • Choosing among built-in mesh materials, map slots (albedo, normal, roughness, metalness, ao, emissive), envMap
  • Transparency sorting issues, alphaTest, depthWrite, blending modes, side/double-sided rendering
  • ShaderMaterial / RawShaderMaterial uniforms, includes, and compatibility with lights pipeline
  • Line, points, sprite materials for vector overlays and particles

IMPORTANT: classic materials vs node-tsl

NeedSkill
Standard PBR with maps, physical clearcoat/sheenthreejs-materials
TSL nodes, NodeMaterial, WebGPU-first shading, compute-style graphthreejs-node-tsl
Migrating ShaderMaterial → TSLthreejs-node-tsl (conceptual), keep ShaderMaterial here until cutover

Trigger phrases include:

  • "MeshStandardMaterial", "MeshPhysicalMaterial", "ShaderMaterial", "transparent", "alphaTest"
  • "PBR", "物理材质", "透明", "自定义着色器"

How to use this skill

  1. Select class by lighting model: MeshBasic (unlit), Lambert/Phong (legacy lit), Standard/Physical (PBR).
  2. Assign maps and ensure color space correctness for albedo vs data maps (link threejs-textures).
  3. Environment: set envMap from cube or equirect; align metalness/roughness; consider MeshPhysicalMaterial for transmission/IOR when needed.
  4. Transparency: order objects or use alphaTest/depthWrite trade-offs; mention sorting limitations.
  5. ShaderMaterial: minimize re-lit work unless intentional; document required lights and lights: true flag behavior per version docs.
  6. Performance: share materials across meshes; avoid cloning per frame.
  7. Skinning/morph: set skinning/morphTargets where applicable—mesh side in threejs-objects.

See examples/workflow-pbr-transparent.md.

Doc map (official)

Scope

  • In scope: Non-Node materials listed under Core Materials in docs (except *NodeMaterial).
  • Out of scope: Full Nodes catalog (threejs-node-tsl); post pass materials inside composer (threejs-postprocessing).

Common pitfalls and best practices

  • Wrong normal map normalMapType or tangent space breaks lighting; verify geometry has tangents or use appropriate mode.
  • Premultiplied alpha vs straight alpha mismatches cause fringe halos on foliage.
  • MeshPhysicalMaterial transmission needs thickness and good env—combine with threejs-textures / PMREM.
  • Too many unique materials hurts sorting and batching—merge where possible.

Documentation and version

PBR and ShaderMaterial behavior track the Materials section in three.js docs. Color management and default envMap handling changed in modern releases—always pair material answers with renderer/output settings from threejs-renderers when colors look wrong.

Agent response checklist

When answering under this skill, prefer responses that:

  1. Link MeshStandardMaterial, MeshPhysicalMaterial, or ShaderMaterial pages as appropriate.
  2. Force a clear choice vs threejs-node-tsl when the user asks for “shaders” or “nodes”.
  3. Separate map roles (albedo vs roughness vs normal) and colorSpace expectations with threejs-textures.
  4. Call out transparency and depthWrite trade-offs for sorted rendering.
  5. Note that *NodeMaterial types belong to the node skill, not this one.

References

Keywords

English: meshstandardmaterial, meshphysicalmaterial, shadermaterial, pbr, transparency, envmap, materials, three.js

中文: 材质、PBR、MeshStandardMaterial、物理材质、透明、环境贴图、ShaderMaterial、three.js

FAQ

What does the threejs-materials skill do?

Classic three.js materials (non-Node): MeshStandardMaterial, MeshPhysicalMaterial, Phong/Lambert/Toon/Basic, Line/Points/Sprite materials, MeshMatcapMaterial, MeshNormalMaterial, depth/distance materials, ShaderMaterial and RawShaderMaterial. Use when tuning PBR maps, transparency, depth write, skinning flags, or writing GLSL in ShaderMaterial; for TSL/NodeMaterial/WebGPU shader graphs use threejs-node-tsl instead—not both for the same authoring path unless migrating.

How do I install threejs-materials?

Run npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-materials in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/threejs-materials/ (personal) or .claude/skills/threejs-materials/ (project).

Which AI agents can use threejs-materials?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is threejs-materials safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains threejs-materials?

It is published by full-stack-skills in full-stack-skills/threejs-skills. It has 418 recorded installs.

More from full-stack-skills/threejs-skills

View all →

threejs-animation

full-stack-skills/threejs-skills

three.js keyframe animation system: AnimationMixer, AnimationClip, AnimationAction, KeyframeTrack variants, PropertyBinding, PropertyMixer, AnimationObjectGroup, AnimationUtils; mixing and crossfading clips, loop modes, timeScale, weight; addon AnimationClipCreator and CCDIKSolver for procedural rigs. Use when playing glTF clips, blending actions, or authoring procedural tracks; for skin deformation rigging on meshes see threejs-objects; for math interpolants without clips see threejs-math only when not tied to AnimationMixer.

Frontend & Design415 installs

threejs-lights

full-stack-skills/threejs-skills

three.js lighting: AmbientLight, HemisphereLight, DirectionalLight, PointLight, SpotLight, RectAreaLight, LightProbe, IESSpotLight, ProjectorLight, shadow subtypes, and addon helpers such as RectAreaLightUniformsLib, RectAreaLightTexturesLib, LightProbeGenerator, TiledLighting. Use when configuring direct/indirect light, shadows, probes, or area lights; for IES file loading use threejs-loaders; for node-based light graphs use threejs-node-tsl; for debug helpers use threejs-helpers.

threejs-camera

full-stack-skills/threejs-skills

three.js cameras: Camera base, PerspectiveCamera, OrthographicCamera, CubeCamera, ArrayCamera, StereoCamera; projection matrices, aspect, FOV, orthographic frustum sizes, near/far planes, and dynamic environment maps with CubeCamera. Use when placing views, rendering reflections, or multi-view splits; for XR projections and eye matrices use threejs-webxr; for post pass camera tricks use threejs-postprocessing alongside threejs-renderers.

410 installs

threejs-postprocessing

full-stack-skills/threejs-skills

Addon screen-space post-processing for three.js using EffectComposer, Pass base class, RenderPass, and stock passes such as UnrealBloomPass, SSAOPass, SSRPass, BokehPass, OutlinePass, FXAAPass/SMAAPass, TAARenderPass, and ShaderPass; references the Shaders addon group for underlying shader modules; contrasts with core PostProcessing class used in node/WebGPU stacks (see threejs-node-tsl and threejs-renderers). Use when building composer chains—not for basic renderer tone mapping alone (threejs-renderers).

Business & Finance404 installs

threejs-scenes

full-stack-skills/threejs-skills

three.js Scene graph root object, linear Fog and exponential FogExp2, Scene.background for solid colors or textures, and high-level environment background concepts that tie to PMREM and loaders in other skills. Use when configuring world container, atmospheric fog, or background; for HDR env map file loading use threejs-loaders; for GPU texture settings after load use threejs-textures; for tone mapping use threejs-renderers.

threejs-geometries

full-stack-skills/threejs-skills

three.js geometry authoring: BufferGeometry, typed BufferAttribute and interleaved layouts, InstancedBufferGeometry, primitive Geometries (box/sphere/torus/etc.), ExtrudeGeometry and Shape/Path/Curve from Extras, WireframeGeometry, and addon geometries such as TextGeometry, DecalGeometry, RoundedBoxGeometry. Covers merged scope of procedural curves and extrusion formerly split as extras-curves; for animation morph targets see threejs-animation; for merging buffers utilities see official BufferGeometryUtils module in docs Utils addons.

Frontend & Design401 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs