.claude/skills/threejs-materials/SKILL.md
Three.js materials - PBR, basic, phong, shader materials, material properties. Use when styling meshes, working with textures, creating custom shaders, or optimizing material performance.
npx skillsauth add tadams95/kardashev-network threejs-materialsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Material | Use Case | Lighting | |----------|----------|----------| | MeshBasicMaterial | Unlit, flat colors | No | | MeshLambertMaterial | Matte surfaces | Yes (diffuse) | | MeshPhongMaterial | Shiny surfaces | Yes | | MeshStandardMaterial | PBR, realistic | Yes (PBR) | | MeshPhysicalMaterial | Advanced PBR | Yes (PBR+) | | ShaderMaterial | Custom GLSL | Custom |
const material = new THREE.MeshStandardMaterial({
color: 0xffffff,
roughness: 0.5,
metalness: 0.0,
map: colorTexture,
normalMap: normalTexture,
roughnessMap: roughTexture,
metalnessMap: metalTexture,
aoMap: aoTexture,
emissive: 0x000000,
emissiveIntensity: 1,
envMap: envTexture,
envMapIntensity: 1,
});
// AO map requires second UV channel
geometry.setAttribute("uv2", geometry.attributes.uv);
const glass = new THREE.MeshPhysicalMaterial({
transmission: 1,
thickness: 0.5,
ior: 1.5,
roughness: 0,
metalness: 0,
});
const carPaint = new THREE.MeshPhysicalMaterial({
clearcoat: 1,
clearcoatRoughness: 0.1,
metalness: 0.9,
roughness: 0.5,
});
const material = new THREE.ShaderMaterial({
uniforms: {
time: { value: 0 },
color: { value: new THREE.Color(0xff0000) },
},
vertexShader: `
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,
fragmentShader: `
uniform vec3 color;
void main() {
gl_FragColor = vec4(color, 1.0);
}
`,
});
// Update uniform
material.uniforms.time.value = clock.getElapsedTime();
material.transparent = true;
material.opacity = 0.5;
material.side = THREE.DoubleSide;
material.wireframe = true;
material.depthTest = true;
material.depthWrite = true;
import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader.js";
new RGBELoader().load("environment.hdr", (texture) => {
texture.mapping = THREE.EquirectangularReflectionMapping;
scene.environment = texture;
});
development
Web3 integration with wagmi and viem - wallet connection, contract interactions, transactions, RainbowKit. Use when implementing wallet features, reading/writing contracts, or handling blockchain transactions.
content-media
Three.js textures - loading, configuration, UV mapping, environment maps. Use when loading images, configuring texture properties, or working with HDR environments.
data-ai
Three.js shaders - GLSL, ShaderMaterial, uniforms, custom effects. Use when creating custom visual effects, modifying vertices, writing fragment shaders, or extending built-in materials.
testing
Three.js post-processing - EffectComposer, bloom, depth of field, custom passes. Use when adding visual effects, screen-space effects, or enhancing rendered output.