
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- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads threejs-materials automatically when relevant.
- 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/RawShaderMaterialuniforms, includes, and compatibility with lights pipeline- Line, points, sprite materials for vector overlays and particles
IMPORTANT: classic materials vs node-tsl
| Need | Skill |
|---|---|
| Standard PBR with maps, physical clearcoat/sheen | threejs-materials |
TSL nodes, NodeMaterial, WebGPU-first shading, compute-style graph | threejs-node-tsl |
| Migrating ShaderMaterial → TSL | threejs-node-tsl (conceptual), keep ShaderMaterial here until cutover |
Trigger phrases include:
- "MeshStandardMaterial", "MeshPhysicalMaterial", "ShaderMaterial", "transparent", "alphaTest"
- "PBR", "物理材质", "透明", "自定义着色器"
How to use this skill
- Select class by lighting model:
MeshBasic(unlit), Lambert/Phong (legacy lit), Standard/Physical (PBR). - Assign maps and ensure color space correctness for albedo vs data maps (link threejs-textures).
- Environment: set
envMapfrom cube or equirect; alignmetalness/roughness; considerMeshPhysicalMaterialfor transmission/IOR when needed. - Transparency: order objects or use
alphaTest/depthWritetrade-offs; mention sorting limitations. - ShaderMaterial: minimize re-lit work unless intentional; document required lights and
lights: trueflag behavior per version docs. - Performance: share materials across meshes; avoid cloning per frame.
- Skinning/morph: set
skinning/morphTargetswhere applicable—mesh side in threejs-objects.
See examples/workflow-pbr-transparent.md.
Doc map (official)
| Docs section | Representative links |
|---|---|
| Materials (core) | https://threejs.org/docs/Material.html |
| PBR | https://threejs.org/docs/MeshStandardMaterial.html |
| Physical | https://threejs.org/docs/MeshPhysicalMaterial.html |
| Custom GLSL | https://threejs.org/docs/ShaderMaterial.html |
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
normalMapTypeor tangent space breaks lighting; verify geometry has tangents or use appropriate mode. - Premultiplied alpha vs straight alpha mismatches cause fringe halos on foliage.
MeshPhysicalMaterialtransmissionneeds 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:
- Link
MeshStandardMaterial,MeshPhysicalMaterial, orShaderMaterialpages as appropriate. - Force a clear choice vs threejs-node-tsl when the user asks for “shaders” or “nodes”.
- Separate map roles (albedo vs roughness vs normal) and
colorSpaceexpectations with threejs-textures. - Call out transparency and
depthWritetrade-offs for sorted rendering. - Note that
*NodeMaterialtypes belong to the node skill, not this one.
References
- https://threejs.org/docs/#Materials
- https://threejs.org/docs/MeshStandardMaterial.html
- https://threejs.org/docs/MeshPhysicalMaterial.html
- https://threejs.org/docs/ShaderMaterial.html
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
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.
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.
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).
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.
Popular docs & writing skills
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.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.