[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EJ21NB20VRQMJ8H2D4SBTS":3,"skill-same:01M7EJ21NB20VRQMJ8H2D4SBTS":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7EJ21NB20VRQMJ8H2D4SBTS","threejs-syntax-materials",null,"Use when choosing or configuring materials, loading textures, or setting up PBR workflows in Three.js. Prevents the common mistake of wrong color space on textures, forgetting material.dispose(), or not calling material.needsUpdate after changes. Covers all 15+ material types, PBR metalness\u002Froughness, MeshPhysicalMaterial, texture maps, color space. Keywords: MeshStandardMaterial, MeshPhysicalMaterial, material, texture, PBR, metalness, roughness, normalMap, color space, SRGBColorSpace, blurry texture, pixelated, texture quality, filtering.","mhyahya854\u002FAI-Second-Brain_Universal-Rules","mhyahya854","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F194078115?v=4","01M7EGSP2M9T858SDHJMXQ257Y","01M7EGSP3N6HN6879SVDPMD4DZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: threejs-syntax-materials\ndescription: >\n  Use when choosing or configuring materials, loading textures, or setting\n  up PBR workflows in Three.js. Prevents the common mistake of wrong\n  color space on textures, forgetting material.dispose(), or not calling\n  material.needsUpdate after changes. Covers all 15+ material types, PBR\n  metalness\u002Froughness, MeshPhysicalMaterial, texture maps, color space.\n  Keywords: MeshStandardMaterial, MeshPhysicalMaterial, material, texture, PBR, metalness, roughness, normalMap, color space, SRGBColorSpace, blurry texture, pixelated, texture quality, filtering.\nlicense: MIT\ncompatibility: \"Designed for Claude Code. Requires Three.js r160+.\"\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# threejs-syntax-materials\n\n## Quick Reference\n\n### Material Type Decision Tree\n\n| Use Case | Material | Why |\n|----------|----------|-----|\n| UI elements, unlit scenes | `MeshBasicMaterial` | Cheapest, no light computation |\n| Matte diffuse (low-end devices) | `MeshLambertMaterial` | Fast diffuse, no specular |\n| Legacy specular highlights | `MeshPhongMaterial` | Blinn-Phong model, not physically correct |\n| General-purpose 3D (recommended) | `MeshStandardMaterial` | PBR metalness\u002Froughness, industry standard |\n| Glass, car paint, fabric, soap bubbles | `MeshPhysicalMaterial` | Advanced PBR (clearcoat, transmission, sheen, iridescence) |\n| Cartoon\u002Fanime style | `MeshToonMaterial` | Discrete cel-shading steps |\n| Sculpting previews, no lights | `MeshMatcapMaterial` | Matcap texture, zero light setup |\n| Debug normals | `MeshNormalMaterial` | RGB = surface normal direction |\n| Invisible shadow receiver | `ShadowMaterial` | Transparent shadow catcher |\n| Solid lines | `LineBasicMaterial` | Simple colored lines |\n| Dashed lines | `LineDashedMaterial` | Requires `line.computeLineDistances()` |\n| Particles | `PointsMaterial` | Point cloud rendering |\n| Billboards | `SpriteMaterial` | Always-facing-camera quads |\n\n### Base Material Properties (All Materials)\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `side` | `number` | `FrontSide` | `FrontSide`, `BackSide`, or `DoubleSide` |\n| `transparent` | `boolean` | `false` | Enable alpha blending |\n| `opacity` | `number` | `1` | Requires `transparent: true` to take effect below 1 |\n| `depthWrite` | `boolean` | `true` | Write to depth buffer |\n| `depthTest` | `boolean` | `true` | Test against depth buffer |\n| `blending` | `number` | `NormalBlending` | `NoBlending`, `AdditiveBlending`, `SubtractiveBlending`, `MultiplyBlending`, `CustomBlending` |\n| `alphaTest` | `number` | `0` | Discard fragments with alpha below this value |\n| `visible` | `boolean` | `true` | Whether to render this material |\n| `wireframe` | `boolean` | `false` | Wireframe rendering mode |\n| `fog` | `boolean` | `true` | Affected by scene fog |\n| `clippingPlanes` | `Plane[]` | `null` | Array of clipping planes |\n| `clipIntersection` | `boolean` | `false` | Clip where ALL planes intersect (vs union) |\n| `needsUpdate` | `boolean` | `false` | Set `true` to trigger shader recompilation |\n| `toneMapped` | `boolean` | `true` | Apply renderer tone mapping |\n\n### Base Material Methods\n\n| Method | Signature | Description |\n|--------|-----------|-------------|\n| `clone` | `(): Material` | Clone the material |\n| `copy` | `(source: Material): Material` | Copy properties from source |\n| `dispose` | `(): void` | Free GPU resources -- ALWAYS call when removing |\n| `onBeforeCompile` | `(shader, renderer): void` | Hook to modify shader before compilation |\n| `setValues` | `(values: Object): void` | Set multiple properties at once |\n\n### Critical Warnings\n\n**NEVER** set `opacity \u003C 1` without `transparent: true` -- the opacity value is silently ignored. ALWAYS pair them together.\n\n**NEVER** use `MeshPhysicalMaterial` when `MeshStandardMaterial` suffices -- Physical compiles a significantly larger shader. ONLY use it when you need clearcoat, transmission, sheen, iridescence, or anisotropy.\n\n**NEVER** set `SRGBColorSpace` on normal maps, roughness maps, metalness maps, or any data texture -- this corrupts the data and causes incorrect lighting. ONLY set `SRGBColorSpace` on diffuse\u002Fcolor\u002Femissive textures.\n\n**NEVER** forget to call `material.dispose()` and `texture.dispose()` when removing objects -- GPU memory leaks accumulate and crash the application.\n\n**NEVER** set `linewidth > 1` on `LineBasicMaterial` -- it is silently ignored on most platforms due to WebGL limitations. ALWAYS use `Line2` + `LineMaterial` from `three\u002Faddons\u002Flines\u002F` for thick lines.\n\n**ALWAYS** set `material.needsUpdate = true` after changing properties that affect shader compilation (e.g., toggling `flatShading`, changing `side`, adding\u002Fremoving texture maps at runtime).\n\n**ALWAYS** set `wrapS` and `wrapT` to `RepeatWrapping` when using `texture.repeat` values other than `(1, 1)` -- the default `ClampToEdgeWrapping` does NOT tile textures.\n\n---\n\n## MeshStandardMaterial (PBR)\n\nThe recommended material for most 3D scenes. Uses physically-based metalness\u002Froughness workflow.\n\n```javascript\nimport { MeshStandardMaterial, TextureLoader, SRGBColorSpace, RepeatWrapping } from 'three';\n\nconst loader = new TextureLoader();\nconst material = new MeshStandardMaterial({\n  color: 0xffffff,\n  roughness: 0.7,           \u002F\u002F 0 = mirror, 1 = fully rough\n  metalness: 0.0,           \u002F\u002F 0 = dielectric, 1 = metal\n  map: null,                \u002F\u002F Diffuse\u002Falbedo texture\n  roughnessMap: null,       \u002F\u002F Per-pixel roughness\n  metalnessMap: null,       \u002F\u002F Per-pixel metalness\n  normalMap: null,          \u002F\u002F Surface normal perturbation\n  normalScale: new Vector2(1, 1),\n  aoMap: null,              \u002F\u002F Ambient occlusion (requires uv2)\n  aoMapIntensity: 1.0,\n  emissive: 0x000000,       \u002F\u002F Emissive color\n  emissiveMap: null,        \u002F\u002F Emissive texture\n  emissiveIntensity: 1.0,\n  envMap: null,             \u002F\u002F Environment reflection map\n  envMapIntensity: 1.0,\n  bumpMap: null,            \u002F\u002F Grayscale height map\n  bumpScale: 1.0,\n  displacementMap: null,    \u002F\u002F Vertex displacement map\n  displacementScale: 1.0,\n  displacementBias: 0.0,\n  alphaMap: null,           \u002F\u002F Per-pixel transparency\n  lightMap: null,           \u002F\u002F Baked lighting (requires uv2)\n  lightMapIntensity: 1.0,\n  flatShading: false,\n  wireframe: false,\n  fog: true\n});\n```\n\n---\n\n## MeshPhysicalMaterial (Advanced PBR)\n\nExtends `MeshStandardMaterial` with ALL its properties, plus:\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `clearcoat` | `float` | `0.0` | Clear coat layer intensity (0-1) |\n| `clearcoatRoughness` | `float` | `0.0` | Clear coat roughness |\n| `clearcoatMap` | `Texture` | `null` | Clear coat intensity map |\n| `clearcoatNormalMap` | `Texture` | `null` | Clear coat normal map |\n| `transmission` | `float` | `0.0` | Physically-based transparency (0-1) |\n| `transmissionMap` | `Texture` | `null` | Transmission map |\n| `thickness` | `float` | `0.0` | Volume thickness for transmission |\n| `thicknessMap` | `Texture` | `null` | Thickness map |\n| `ior` | `float` | `1.5` | Index of refraction (1.0-2.333) |\n| `attenuationDistance` | `float` | `Infinity` | Light attenuation distance in volume |\n| `attenuationColor` | `Color` | `white` | Light attenuation tint |\n| `sheen` | `float` | `0.0` | Sheen layer intensity (fabric-like) |\n| `sheenColor` | `Color` | `0x000000` | Sheen tint color |\n| `sheenRoughness` | `float` | `1.0` | Sheen roughness |\n| `iridescence` | `float` | `0.0` | Thin-film interference (0-1) |\n| `iridescenceIOR` | `float` | `1.3` | Iridescence index of refraction |\n| `iridescenceThicknessRange` | `[float, float]` | `[100, 400]` | Thin-film thickness range (nm) |\n| `anisotropy` | `float` | `0.0` | Anisotropic reflection strength |\n| `anisotropyRotation` | `float` | `0.0` | Anisotropy rotation (radians) |\n| `specularIntensity` | `float` | `1.0` | Specular layer intensity |\n| `specularColor` | `Color` | `white` | Specular tint color |\n| `dispersion` | `float` | `0.0` | Chromatic dispersion (rainbow effect) |\n| `reflectivity` | `float` | `0.5` | Reflectivity at normal incidence |\n\n---\n\n## Texture System\n\n### Color Space Rules (Critical)\n\n| Map Type | Color Space | Channels Used |\n|----------|-------------|---------------|\n| `map` (diffuse\u002Falbedo) | `SRGBColorSpace` | RGB(A) |\n| `emissiveMap` | `SRGBColorSpace` | RGB |\n| `lightMap` | `SRGBColorSpace` | RGB |\n| `envMap` | `SRGBColorSpace` | RGB |\n| `sheenColorMap` | `SRGBColorSpace` | RGB |\n| `specularColorMap` | `SRGBColorSpace` | RGB |\n| `normalMap` | `NoColorSpace` | RGB |\n| `roughnessMap` | `NoColorSpace` | G channel |\n| `metalnessMap` | `NoColorSpace` | B channel |\n| `aoMap` | `NoColorSpace` | R channel |\n| `bumpMap` | `NoColorSpace` | R channel |\n| `displacementMap` | `NoColorSpace` | R channel |\n| `alphaMap` | `NoColorSpace` | R channel |\n| `clearcoatMap` | `NoColorSpace` | R channel |\n| `clearcoatRoughnessMap` | `NoColorSpace` | R channel |\n| `clearcoatNormalMap` | `NoColorSpace` | RGB |\n| `transmissionMap` | `NoColorSpace` | R channel |\n| `thicknessMap` | `NoColorSpace` | R channel |\n| `iridescenceMap` | `NoColorSpace` | R channel |\n| `iridescenceThicknessMap` | `NoColorSpace` | R channel |\n| `sheenRoughnessMap` | `NoColorSpace` | R channel |\n| `anisotropyMap` | `NoColorSpace` | RG channels |\n| `specularIntensityMap` | `NoColorSpace` | A channel |\n\n**Rule**: Diffuse\u002Femissive\u002Fcolor textures = `SRGBColorSpace`. ALL data textures = `NoColorSpace`. Getting this wrong causes washed-out or over-saturated rendering.\n\n### Texture Loaders\n\n| Loader | Format | Import |\n|--------|--------|--------|\n| `TextureLoader` | PNG, JPG, WebP | `three` core |\n| `CubeTextureLoader` | 6x PNG\u002FJPG cube maps | `three` core |\n| `RGBELoader` | .hdr (Radiance HDR) | `three\u002Faddons\u002Floaders\u002FRGBELoader.js` |\n| `EXRLoader` | .exr (OpenEXR HDR) | `three\u002Faddons\u002Floaders\u002FEXRLoader.js` |\n| `KTX2Loader` | .ktx2 (GPU compressed) | `three\u002Faddons\u002Floaders\u002FKTX2Loader.js` |\n\n### Wrapping Modes\n\n| Constant | Description |\n|----------|-------------|\n| `ClampToEdgeWrapping` | Edge texels stretched (default) |\n| `RepeatWrapping` | Texture tiles\u002Frepeats |\n| `MirroredRepeatWrapping` | Tiles with alternating mirror |\n\n### Filter Modes\n\n| Constant | Type | Description |\n|----------|------|-------------|\n| `NearestFilter` | Mag\u002FMin | Pixelated, crisp (retro, toon gradients) |\n| `LinearFilter` | Mag\u002FMin | Smooth interpolation |\n| `LinearMipmapLinearFilter` | Min | Trilinear filtering (default, best quality) |\n\n### Texture Properties\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `wrapS` \u002F `wrapT` | `number` | `ClampToEdgeWrapping` | Wrapping mode |\n| `magFilter` | `number` | `LinearFilter` | Magnification filter |\n| `minFilter` | `number` | `LinearMipmapLinearFilter` | Minification filter |\n| `anisotropy` | `number` | `1` | Anisotropic filtering (max = `renderer.capabilities.getMaxAnisotropy()`) |\n| `repeat` | `Vector2` | `(1, 1)` | UV repeat count |\n| `offset` | `Vector2` | `(0, 0)` | UV offset |\n| `rotation` | `number` | `0` | UV rotation in radians |\n| `center` | `Vector2` | `(0, 0)` | Center of rotation |\n| `flipY` | `boolean` | `true` | Flip vertically on upload |\n| `colorSpace` | `string` | `NoColorSpace` | Color space interpretation |\n| `generateMipmaps` | `boolean` | `true` | Auto-generate mipmaps |\n| `needsUpdate` | `boolean` | `false` | Trigger GPU re-upload |\n\n### flipY Rules\n\n- `flipY = true` (default): Correct for loaded image textures (PNG, JPG)\n- `flipY = false`: ALWAYS use for `WebGLRenderTarget` textures, `DataTexture`, and framebuffer textures\n\n---\n\n## Material Disposal\n\n```javascript\n\u002F\u002F ALWAYS dispose materials and textures when removing objects\nfunction disposeMesh(mesh) {\n  if (mesh.material) {\n    \u002F\u002F Dispose all texture maps\n    for (const key of Object.keys(mesh.material)) {\n      const value = mesh.material[key];\n      if (value && value.isTexture) {\n        value.dispose();\n      }\n    }\n    mesh.material.dispose();\n  }\n  if (mesh.geometry) {\n    mesh.geometry.dispose();\n  }\n}\n```\n\n---\n\n## needsUpdate Flag\n\nALWAYS set `material.needsUpdate = true` after changing these at runtime:\n- Toggling `flatShading`\n- Changing `side` (FrontSide\u002FBackSide\u002FDoubleSide)\n- Adding or removing a texture map (e.g., setting `map` from `null` to a texture)\n- Changing `transparent` or `alphaTest`\n- Toggling `wireframe`\n- Any property that changes the compiled shader variant\n\nNEVER set `needsUpdate = true` every frame -- it forces expensive shader recompilation. ONLY set it once after the property change.\n\nFor textures: set `texture.needsUpdate = true` after modifying `texture.image` data to trigger GPU re-upload.\n\n---\n\n## Toon Material Special Rule\n\nWhen using `MeshToonMaterial`, ALWAYS set `gradientMap.minFilter = NearestFilter` and `gradientMap.magFilter = NearestFilter`. Linear filtering blurs the discrete shading steps into smooth gradients, defeating the toon effect.\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) -- All material types with constructor signatures and key properties\n- [references\u002Fexamples.md](references\u002Fexamples.md) -- Complete working examples (PBR, textures, multi-material)\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) -- What NOT to do, with explanations\n\n### Official Sources\n\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Fmaterials\u002FMaterial\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Fmaterials\u002FMeshStandardMaterial\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Fmaterials\u002FMeshPhysicalMaterial\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Ftextures\u002FTexture\n","# threejs-syntax-materials\n\n## Quick Reference\n\n### Material Type Decision Tree\n\n| Use Case | Material | Why |\n|----------|----------|-----|\n| UI elements, unlit scenes | `MeshBasicMaterial` | Cheapest, no light computation |\n| Matte diffuse (low-end devices) | `MeshLambertMaterial` | Fast diffuse, no specular |\n| Legacy specular highlights | `MeshPhongMaterial` | Blinn-Phong model, not physically correct |\n| General-purpose 3D (recommended) | `MeshStandardMaterial` | PBR metalness\u002Froughness, industry standard |\n| Glass, car paint, fabric, soap bubbles | `MeshPhysicalMaterial` | Advanced PBR (clearcoat, transmission, sheen, iridescence) |\n| Cartoon\u002Fanime style | `MeshToonMaterial` | Discrete cel-shading steps |\n| Sculpting previews, no lights | `MeshMatcapMaterial` | Matcap texture, zero light setup |\n| Debug normals | `MeshNormalMaterial` | RGB = surface normal direction |\n| Invisible shadow receiver | `ShadowMaterial` | Transparent shadow catcher |\n| Solid lines | `LineBasicMaterial` | Simple colored lines |\n| Dashed lines | `LineDashedMaterial` | Requires `line.computeLineDistances()` |\n| Particles | `PointsMaterial` | Point cloud rendering |\n| Billboards | `SpriteMaterial` | Always-facing-camera quads |\n\n### Base Material Properties (All Materials)\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `side` | `number` | `FrontSide` | `FrontSide`, `BackSide`, or `DoubleSide` |\n| `transparent` | `boolean` | `false` | Enable alpha blending |\n| `opacity` | `number` | `1` | Requires `transparent: true` to take effect below 1 |\n| `depthWrite` | `boolean` | `true` | Write to depth buffer |\n| `depthTest` | `boolean` | `true` | Test against depth buffer |\n| `blending` | `number` | `NormalBlending` | `NoBlending`, `AdditiveBlending`, `SubtractiveBlending`, `MultiplyBlending`, `CustomBlending` |\n| `alphaTest` | `number` | `0` | Discard fragments with alpha below this value |\n| `visible` | `boolean` | `true` | Whether to render this material |\n| `wireframe` | `boolean` | `false` | Wireframe rendering mode |\n| `fog` | `boolean` | `true` | Affected by scene fog |\n| `clippingPlanes` | `Plane[]` | `null` | Array of clipping planes |\n| `clipIntersection` | `boolean` | `false` | Clip where ALL planes intersect (vs union) |\n| `needsUpdate` | `boolean` | `false` | Set `true` to trigger shader recompilation |\n| `toneMapped` | `boolean` | `true` | Apply renderer tone mapping |\n\n### Base Material Methods\n\n| Method | Signature | Description |\n|--------|-----------|-------------|\n| `clone` | `(): Material` | Clone the material |\n| `copy` | `(source: Material): Material` | Copy properties from source |\n| `dispose` | `(): void` | Free GPU resources -- ALWAYS call when removing |\n| `onBeforeCompile` | `(shader, renderer): void` | Hook to modify shader before compilation |\n| `setValues` | `(values: Object): void` | Set multiple properties at once |\n\n### Critical Warnings\n\n**NEVER** set `opacity \u003C 1` without `transparent: true` -- the opacity value is silently ignored. ALWAYS pair them together.\n\n**NEVER** use `MeshPhysicalMaterial` when `MeshStandardMaterial` suffices -- Physical compiles a significantly larger shader. ONLY use it when you need clearcoat, transmission, sheen, iridescence, or anisotropy.\n\n**NEVER** set `SRGBColorSpace` on normal maps, roughness maps, metalness maps, or any data texture -- this corrupts the data and causes incorrect lighting. ONLY set `SRGBColorSpace` on diffuse\u002Fcolor\u002Femissive textures.\n\n**NEVER** forget to call `material.dispose()` and `texture.dispose()` when removing objects -- GPU memory leaks accumulate and crash the application.\n\n**NEVER** set `linewidth > 1` on `LineBasicMaterial` -- it is silently ignored on most platforms due to WebGL limitations. ALWAYS use `Line2` + `LineMaterial` from `three\u002Faddons\u002Flines\u002F` for thick lines.\n\n**ALWAYS** set `material.needsUpdate = true` after changing properties that affect shader compilation (e.g., toggling `flatShading`, changing `side`, adding\u002Fremoving texture maps at runtime).\n\n**ALWAYS** set `wrapS` and `wrapT` to `RepeatWrapping` when using `texture.repeat` values other than `(1, 1)` -- the default `ClampToEdgeWrapping` does NOT tile textures.\n\n---\n\n## MeshStandardMaterial (PBR)\n\nThe recommended material for most 3D scenes. Uses physically-based metalness\u002Froughness workflow.\n\n```javascript\nimport { MeshStandardMaterial, TextureLoader, SRGBColorSpace, RepeatWrapping } from 'three';\n\nconst loader = new TextureLoader();\nconst material = new MeshStandardMaterial({\n  color: 0xffffff,\n  roughness: 0.7,           \u002F\u002F 0 = mirror, 1 = fully rough\n  metalness: 0.0,           \u002F\u002F 0 = dielectric, 1 = metal\n  map: null,                \u002F\u002F Diffuse\u002Falbedo texture\n  roughnessMap: null,       \u002F\u002F Per-pixel roughness\n  metalnessMap: null,       \u002F\u002F Per-pixel metalness\n  normalMap: null,          \u002F\u002F Surface normal perturbation\n  normalScale: new Vector2(1, 1),\n  aoMap: null,              \u002F\u002F Ambient occlusion (requires uv2)\n  aoMapIntensity: 1.0,\n  emissive: 0x000000,       \u002F\u002F Emissive color\n  emissiveMap: null,        \u002F\u002F Emissive texture\n  emissiveIntensity: 1.0,\n  envMap: null,             \u002F\u002F Environment reflection map\n  envMapIntensity: 1.0,\n  bumpMap: null,            \u002F\u002F Grayscale height map\n  bumpScale: 1.0,\n  displacementMap: null,    \u002F\u002F Vertex displacement map\n  displacementScale: 1.0,\n  displacementBias: 0.0,\n  alphaMap: null,           \u002F\u002F Per-pixel transparency\n  lightMap: null,           \u002F\u002F Baked lighting (requires uv2)\n  lightMapIntensity: 1.0,\n  flatShading: false,\n  wireframe: false,\n  fog: true\n});\n```\n\n---\n\n## MeshPhysicalMaterial (Advanced PBR)\n\nExtends `MeshStandardMaterial` with ALL its properties, plus:\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `clearcoat` | `float` | `0.0` | Clear coat layer intensity (0-1) |\n| `clearcoatRoughness` | `float` | `0.0` | Clear coat roughness |\n| `clearcoatMap` | `Texture` | `null` | Clear coat intensity map |\n| `clearcoatNormalMap` | `Texture` | `null` | Clear coat normal map |\n| `transmission` | `float` | `0.0` | Physically-based transparency (0-1) |\n| `transmissionMap` | `Texture` | `null` | Transmission map |\n| `thickness` | `float` | `0.0` | Volume thickness for transmission |\n| `thicknessMap` | `Texture` | `null` | Thickness map |\n| `ior` | `float` | `1.5` | Index of refraction (1.0-2.333) |\n| `attenuationDistance` | `float` | `Infinity` | Light attenuation distance in volume |\n| `attenuationColor` | `Color` | `white` | Light attenuation tint |\n| `sheen` | `float` | `0.0` | Sheen layer intensity (fabric-like) |\n| `sheenColor` | `Color` | `0x000000` | Sheen tint color |\n| `sheenRoughness` | `float` | `1.0` | Sheen roughness |\n| `iridescence` | `float` | `0.0` | Thin-film interference (0-1) |\n| `iridescenceIOR` | `float` | `1.3` | Iridescence index of refraction |\n| `iridescenceThicknessRange` | `[float, float]` | `[100, 400]` | Thin-film thickness range (nm) |\n| `anisotropy` | `float` | `0.0` | Anisotropic reflection strength |\n| `anisotropyRotation` | `float` | `0.0` | Anisotropy rotation (radians) |\n| `specularIntensity` | `float` | `1.0` | Specular layer intensity |\n| `specularColor` | `Color` | `white` | Specular tint color |\n| `dispersion` | `float` | `0.0` | Chromatic dispersion (rainbow effect) |\n| `reflectivity` | `float` | `0.5` | Reflectivity at normal incidence |\n\n---\n\n## Texture System\n\n### Color Space Rules (Critical)\n\n| Map Type | Color Space | Channels Used |\n|----------|-------------|---------------|\n| `map` (diffuse\u002Falbedo) | `SRGBColorSpace` | RGB(A) |\n| `emissiveMap` | `SRGBColorSpace` | RGB |\n| `lightMap` | `SRGBColorSpace` | RGB |\n| `envMap` | `SRGBColorSpace` | RGB |\n| `sheenColorMap` | `SRGBColorSpace` | RGB |\n| `specularColorMap` | `SRGBColorSpace` | RGB |\n| `normalMap` | `NoColorSpace` | RGB |\n| `roughnessMap` | `NoColorSpace` | G channel |\n| `metalnessMap` | `NoColorSpace` | B channel |\n| `aoMap` | `NoColorSpace` | R channel |\n| `bumpMap` | `NoColorSpace` | R channel |\n| `displacementMap` | `NoColorSpace` | R channel |\n| `alphaMap` | `NoColorSpace` | R channel |\n| `clearcoatMap` | `NoColorSpace` | R channel |\n| `clearcoatRoughnessMap` | `NoColorSpace` | R channel |\n| `clearcoatNormalMap` | `NoColorSpace` | RGB |\n| `transmissionMap` | `NoColorSpace` | R channel |\n| `thicknessMap` | `NoColorSpace` | R channel |\n| `iridescenceMap` | `NoColorSpace` | R channel |\n| `iridescenceThicknessMap` | `NoColorSpace` | R channel |\n| `sheenRoughnessMap` | `NoColorSpace` | R channel |\n| `anisotropyMap` | `NoColorSpace` | RG channels |\n| `specularIntensityMap` | `NoColorSpace` | A channel |\n\n**Rule**: Diffuse\u002Femissive\u002Fcolor textures = `SRGBColorSpace`. ALL data textures = `NoColorSpace`. Getting this wrong causes washed-out or over-saturated rendering.\n\n### Texture Loaders\n\n| Loader | Format | Import |\n|--------|--------|--------|\n| `TextureLoader` | PNG, JPG, WebP | `three` core |\n| `CubeTextureLoader` | 6x PNG\u002FJPG cube maps | `three` core |\n| `RGBELoader` | .hdr (Radiance HDR) | `three\u002Faddons\u002Floaders\u002FRGBELoader.js` |\n| `EXRLoader` | .exr (OpenEXR HDR) | `three\u002Faddons\u002Floaders\u002FEXRLoader.js` |\n| `KTX2Loader` | .ktx2 (GPU compressed) | `three\u002Faddons\u002Floaders\u002FKTX2Loader.js` |\n\n### Wrapping Modes\n\n| Constant | Description |\n|----------|-------------|\n| `ClampToEdgeWrapping` | Edge texels stretched (default) |\n| `RepeatWrapping` | Texture tiles\u002Frepeats |\n| `MirroredRepeatWrapping` | Tiles with alternating mirror |\n\n### Filter Modes\n\n| Constant | Type | Description |\n|----------|------|-------------|\n| `NearestFilter` | Mag\u002FMin | Pixelated, crisp (retro, toon gradients) |\n| `LinearFilter` | Mag\u002FMin | Smooth interpolation |\n| `LinearMipmapLinearFilter` | Min | Trilinear filtering (default, best quality) |\n\n### Texture Properties\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `wrapS` \u002F `wrapT` | `number` | `ClampToEdgeWrapping` | Wrapping mode |\n| `magFilter` | `number` | `LinearFilter` | Magnification filter |\n| `minFilter` | `number` | `LinearMipmapLinearFilter` | Minification filter |\n| `anisotropy` | `number` | `1` | Anisotropic filtering (max = `renderer.capabilities.getMaxAnisotropy()`) |\n| `repeat` | `Vector2` | `(1, 1)` | UV repeat count |\n| `offset` | `Vector2` | `(0, 0)` | UV offset |\n| `rotation` | `number` | `0` | UV rotation in radians |\n| `center` | `Vector2` | `(0, 0)` | Center of rotation |\n| `flipY` | `boolean` | `true` | Flip vertically on upload |\n| `colorSpace` | `string` | `NoColorSpace` | Color space interpretation |\n| `generateMipmaps` | `boolean` | `true` | Auto-generate mipmaps |\n| `needsUpdate` | `boolean` | `false` | Trigger GPU re-upload |\n\n### flipY Rules\n\n- `flipY = true` (default): Correct for loaded image textures (PNG, JPG)\n- `flipY = false`: ALWAYS use for `WebGLRenderTarget` textures, `DataTexture`, and framebuffer textures\n\n---\n\n## Material Disposal\n\n```javascript\n\u002F\u002F ALWAYS dispose materials and textures when removing objects\nfunction disposeMesh(mesh) {\n  if (mesh.material) {\n    \u002F\u002F Dispose all texture maps\n    for (const key of Object.keys(mesh.material)) {\n      const value = mesh.material[key];\n      if (value && value.isTexture) {\n        value.dispose();\n      }\n    }\n    mesh.material.dispose();\n  }\n  if (mesh.geometry) {\n    mesh.geometry.dispose();\n  }\n}\n```\n\n---\n\n## needsUpdate Flag\n\nALWAYS set `material.needsUpdate = true` after changing these at runtime:\n- Toggling `flatShading`\n- Changing `side` (FrontSide\u002FBackSide\u002FDoubleSide)\n- Adding or removing a texture map (e.g., setting `map` from `null` to a texture)\n- Changing `transparent` or `alphaTest`\n- Toggling `wireframe`\n- Any property that changes the compiled shader variant\n\nNEVER set `needsUpdate = true` every frame -- it forces expensive shader recompilation. ONLY set it once after the property change.\n\nFor textures: set `texture.needsUpdate = true` after modifying `texture.image` data to trigger GPU re-upload.\n\n---\n\n## Toon Material Special Rule\n\nWhen using `MeshToonMaterial`, ALWAYS set `gradientMap.minFilter = NearestFilter` and `gradientMap.magFilter = NearestFilter`. Linear filtering blurs the discrete shading steps into smooth gradients, defeating the toon effect.\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) -- All material types with constructor signatures and key properties\n- [references\u002Fexamples.md](references\u002Fexamples.md) -- Complete working examples (PBR, textures, multi-material)\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) -- What NOT to do, with explanations\n\n### Official Sources\n\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Fmaterials\u002FMaterial\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Fmaterials\u002FMeshStandardMaterial\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Fmaterials\u002FMeshPhysicalMaterial\n- https:\u002F\u002Fthreejs.org\u002Fdocs\u002F#api\u002Fen\u002Ftextures\u002FTexture\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when choosing or configuring materials, loading textures, or setting up PBR workflows in Three.js. Prevents the common mistake of wrong color space on textures, forgetting material.dispose(), or not calling material.needsUpdate after changes. Covers all 15+ material types, PBR metalness\u002Froughness, MeshPhysicalMaterial, texture maps, color space. Keywords: MeshStandardMaterial, MeshPhysicalMaterial, material, texture, PBR, metalness, roughness, normalMap, color space, SRGBColorSpace, blurry texture, pixelated, texture quality, filtering.\n","Designed for Claude Code. Requires Three.js r160+.","main","4c174e06a831864e98c30f630a7aa6c04738b094","skills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules","https:\u002F\u002Fgithub.com\u002Fmhyahya854","2026-11-06 02:03:37",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mhyahya854\u002FAI-Second-Brain_Universal-Rules --skill threejs-syntax-materials",{"tool":40,"command":41},"bunx","bunx skills add mhyahya854\u002FAI-Second-Brain_Universal-Rules --skill threejs-syntax-materials",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mhyahya854\u002FAI-Second-Brain_Universal-Rules --skill threejs-syntax-materials","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials\u002FSKILL.md",true,[48,53,59,63],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":13,"sourceHtmlUrl":52},".gitkeep","OTHER","其他","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials\u002F.gitkeep",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fanti-patterns.md","REFERENCE","参考文档",8811,"https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials\u002Freferences\u002Fanti-patterns.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fexamples.md",6702,"https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials\u002Freferences\u002Fexamples.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fmethods.md",13567,"https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002FImpertio-Studio\u002FThree.js-Claude-Skill-Package\u002Fthreejs-syntax-materials\u002Freferences\u002Fmethods.md",[68,76,84,92,99,106],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":72,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M7EX4T721AAH60R0239P8WBZ","frontend-slides","Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT\u002FPPTX to web, or create slides for a talk\u002Fpitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fzarazhangrui\u002Ffrontend-slides\u002Ffrontend-slides\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fzarazhangrui\u002Ffrontend-slides\u002Ffrontend-slides\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7EX495RSHTTCEJVX7C83FA3","design-dna","Extract, define, and apply design DNA across three dimensions: design system (tokens), design style (qualitative feel), and visual effects (Canvas, WebGL, 3D, particles, shaders, scroll effects, etc.). Use this skill when: (1) a user wants to see the full 3-dimension design structure\u002Fschema, (2) a user provides images, screenshots, or URLs of reference designs and wants them analyzed into a structured JSON profile covering all three dimensions, (3) a user has a Design DNA JSON and content and wants a design generated from it, or (4) any combination of these phases. Triggers on \"design DNA\", \"extract design style\", \"analyze design\", \"design tokens from reference\", \"generate design from JSON\", \"design system from screenshot\", \"design profile\", \"style guide JSON\", \"visual effects analysis\", \"design with effects\", \"3d design analysis\".","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fzanwei\u002Fdesign-dna\u002Fdesign-dna\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fzanwei\u002Fdesign-dna\u002Fdesign-dna\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7EX45RF2XZKRC3KDJDTT1PH","wireframe","Generate JSON wireframe with HTML preview","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fyhassy\u002Fwireframe-skill\u002Fwireframe-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fyhassy\u002Fwireframe-skill\u002Fwireframe-skill\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7EWZEM3MHD48AYSYFR2C9JP","social-publishing","Schedule and publish social media posts across 13 platforms (X, LinkedIn, Instagram, Facebook Pages, TikTok, Discord, Telegram, YouTube, Reddit, WordPress, Pinterest) via the SocialClaw API. Use when the user wants to publish, schedule, or manage social media content programmatically. Requires SOCIALCLAW_API_KEY.","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fwshobson\u002Fagents\u002Fsocial-publishing\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7EWKDEK9840C728VXT78EQ9","hermes-tweet","Install and operate Hermes Tweet, a Hermes Agent plugin for X\u002FTwitter research, timeline reading, tweet analysis, and approval-gated private or state-changing operations. Use this skill when installing Hermes Tweet, researching X\u002FTwitter accounts, monitoring launch signals, investigating mentions, auditing giveaways, or preparing gated X operations. Use proactively when a Hermes Agent workflow needs current X\u002FTwitter context. Requires XQUIK_API_KEY for read and action tools.","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fwshobson\u002Fagents\u002Fhermes-tweet\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M7EWASXP3NZWW95CJPT2CRWN","refactoring-ui","Audit and fix visual hierarchy, spacing, color, and depth in web UIs. Use when the user mentions \"my UI looks off\" (or amateur\u002Funprofessional), \"fix the design\", \"Tailwind styling\", \"color palette\", \"visual hierarchy\", \"design system\", \"spacing scale\", or \"component styling\". Also trigger when building consistent design tokens, creating dark mode themes, improving data-visualization clarity, or polishing UI details before launch. Covers grayscale-first workflow, constrained design scales, shadows, and component styling. For typeface selection, see web-typography. For usability audits, see ux-heuristics.","https:\u002F\u002Fgithub.com\u002Fmhyahya854\u002FAI-Second-Brain_Universal-Rules\u002Fblob\u002Fmain\u002Fskills\u002F_intake\u002Fgithub\u002Fwondelai\u002Fskills\u002Frefactoring-ui\u002FSKILL.md",[],[]]