[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CEH7VZ36BWSDBZEMP8MYMD":3,"skill-same:01M7CEH7VZ36BWSDBZEMP8MYMD":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7CEH7VZ36BWSDBZEMP8MYMD","threejs-materials",null,"Three.js materials - PBR, basic, phong, shader materials, material properties. Use when styling meshes, working with textures, creating custom shaders, or optimizing material performance.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fthreejs-materials\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: threejs-materials\ndescription: Three.js materials - PBR, basic, phong, shader materials, material properties. Use when styling meshes, working with textures, creating custom shaders, or optimizing material performance.\nrisk: unknown\nsource: community\n---\n\n# Three.js Materials\n\n## Quick Start\n\n```javascript\nimport * as THREE from \"three\";\n\n\u002F\u002F PBR material (recommended for realistic rendering)\nconst material = new THREE.MeshStandardMaterial({\n  color: 0x00ff00,\n  roughness: 0.5,\n  metalness: 0.5,\n});\n\nconst mesh = new THREE.Mesh(geometry, material);\n```\n\n## Material Types Overview\n\n| Material             | Use Case                              | Lighting           |\n| -------------------- | ------------------------------------- | ------------------ |\n| MeshBasicMaterial    | Unlit, flat colors, wireframes        | No                 |\n| MeshLambertMaterial  | Matte surfaces, performance           | Yes (diffuse only) |\n| MeshPhongMaterial    | Shiny surfaces, specular highlights   | Yes                |\n| MeshStandardMaterial | PBR, realistic materials              | Yes (PBR)          |\n| MeshPhysicalMaterial | Advanced PBR, clearcoat, transmission | Yes (PBR+)         |\n| MeshToonMaterial     | Cel-shaded, cartoon look              | Yes (toon)         |\n| MeshNormalMaterial   | Debug normals                         | No                 |\n| MeshDepthMaterial    | Depth visualization                   | No                 |\n| ShaderMaterial       | Custom GLSL shaders                   | Custom             |\n| RawShaderMaterial    | Full shader control                   | Custom             |\n\n## MeshBasicMaterial\n\nNo lighting calculations. Fast, always visible.\n\n```javascript\nconst material = new THREE.MeshBasicMaterial({\n  color: 0xff0000,\n  transparent: true,\n  opacity: 0.5,\n  side: THREE.DoubleSide, \u002F\u002F FrontSide, BackSide, DoubleSide\n  wireframe: false,\n  map: texture, \u002F\u002F Color\u002Fdiffuse texture\n  alphaMap: alphaTexture, \u002F\u002F Transparency texture\n  envMap: envTexture, \u002F\u002F Reflection texture\n  reflectivity: 1, \u002F\u002F Env map intensity\n  fog: true, \u002F\u002F Affected by scene fog\n});\n```\n\n## MeshLambertMaterial\n\nDiffuse-only lighting. Fast, no specular highlights.\n\n```javascript\nconst material = new THREE.MeshLambertMaterial({\n  color: 0x00ff00,\n  emissive: 0x111111, \u002F\u002F Self-illumination color\n  emissiveIntensity: 1,\n  map: texture,\n  emissiveMap: emissiveTexture,\n  envMap: envTexture,\n  reflectivity: 0.5,\n});\n```\n\n## MeshPhongMaterial\n\nSpecular highlights. Good for shiny, plastic-like surfaces.\n\n```javascript\nconst material = new THREE.MeshPhongMaterial({\n  color: 0x0000ff,\n  specular: 0xffffff, \u002F\u002F Highlight color\n  shininess: 100, \u002F\u002F Highlight sharpness (0-1000)\n  emissive: 0x000000,\n  flatShading: false, \u002F\u002F Flat vs smooth shading\n  map: texture,\n  specularMap: specTexture, \u002F\u002F Per-pixel shininess\n  normalMap: normalTexture,\n  normalScale: new THREE.Vector2(1, 1),\n  bumpMap: bumpTexture,\n  bumpScale: 1,\n  displacementMap: dispTexture,\n  displacementScale: 1,\n});\n```\n\n## MeshStandardMaterial (PBR)\n\nPhysically-based rendering. Recommended for realistic results.\n\n```javascript\nconst material = new THREE.MeshStandardMaterial({\n  color: 0xffffff,\n  roughness: 0.5, \u002F\u002F 0 = mirror, 1 = diffuse\n  metalness: 0.0, \u002F\u002F 0 = dielectric, 1 = metal\n\n  \u002F\u002F Textures\n  map: colorTexture, \u002F\u002F Albedo\u002Fbase color\n  roughnessMap: roughTexture, \u002F\u002F Per-pixel roughness\n  metalnessMap: metalTexture, \u002F\u002F Per-pixel metalness\n  normalMap: normalTexture, \u002F\u002F Surface detail\n  normalScale: new THREE.Vector2(1, 1),\n  aoMap: aoTexture, \u002F\u002F Ambient occlusion (uses uv2!)\n  aoMapIntensity: 1,\n  displacementMap: dispTexture, \u002F\u002F Vertex displacement\n  displacementScale: 0.1,\n  displacementBias: 0,\n\n  \u002F\u002F Emissive\n  emissive: 0x000000,\n  emissiveIntensity: 1,\n  emissiveMap: emissiveTexture,\n\n  \u002F\u002F Environment\n  envMap: envTexture,\n  envMapIntensity: 1,\n\n  \u002F\u002F Other\n  flatShading: false,\n  wireframe: false,\n  fog: true,\n});\n\n\u002F\u002F Note: aoMap requires second UV channel\ngeometry.setAttribute(\"uv2\", geometry.attributes.uv);\n```\n\n## MeshPhysicalMaterial (Advanced PBR)\n\nExtends MeshStandardMaterial with advanced features.\n\n```javascript\nconst material = new THREE.MeshPhysicalMaterial({\n  \u002F\u002F All MeshStandardMaterial properties plus:\n\n  \u002F\u002F Clearcoat (car paint, lacquer)\n  clearcoat: 1.0, \u002F\u002F 0-1 clearcoat layer strength\n  clearcoatRoughness: 0.1,\n  clearcoatMap: ccTexture,\n  clearcoatRoughnessMap: ccrTexture,\n  clearcoatNormalMap: ccnTexture,\n  clearcoatNormalScale: new THREE.Vector2(1, 1),\n\n  \u002F\u002F Transmission (glass, water)\n  transmission: 1.0, \u002F\u002F 0 = opaque, 1 = fully transparent\n  transmissionMap: transTexture,\n  thickness: 0.5, \u002F\u002F Volume thickness for refraction\n  thicknessMap: thickTexture,\n  attenuationDistance: 1, \u002F\u002F Absorption distance\n  attenuationColor: new THREE.Color(0xffffff),\n\n  \u002F\u002F Refraction\n  ior: 1.5, \u002F\u002F Index of refraction (1-2.333)\n\n  \u002F\u002F Sheen (fabric, velvet)\n  sheen: 1.0,\n  sheenRoughness: 0.5,\n  sheenColor: new THREE.Color(0xffffff),\n  sheenColorMap: sheenTexture,\n  sheenRoughnessMap: sheenRoughTexture,\n\n  \u002F\u002F Iridescence (soap bubbles, oil slicks)\n  iridescence: 1.0,\n  iridescenceIOR: 1.3,\n  iridescenceThicknessRange: [100, 400],\n  iridescenceMap: iridTexture,\n  iridescenceThicknessMap: iridThickTexture,\n\n  \u002F\u002F Anisotropy (brushed metal)\n  anisotropy: 1.0,\n  anisotropyRotation: 0,\n  anisotropyMap: anisoTexture,\n\n  \u002F\u002F Specular\n  specularIntensity: 1,\n  specularColor: new THREE.Color(0xffffff),\n  specularIntensityMap: specIntTexture,\n  specularColorMap: specColorTexture,\n});\n```\n\n### Glass Material Example\n\n```javascript\nconst glass = new THREE.MeshPhysicalMaterial({\n  color: 0xffffff,\n  metalness: 0,\n  roughness: 0,\n  transmission: 1,\n  thickness: 0.5,\n  ior: 1.5,\n  envMapIntensity: 1,\n});\n```\n\n### Car Paint Example\n\n```javascript\nconst carPaint = new THREE.MeshPhysicalMaterial({\n  color: 0xff0000,\n  metalness: 0.9,\n  roughness: 0.5,\n  clearcoat: 1,\n  clearcoatRoughness: 0.1,\n});\n```\n\n## MeshToonMaterial\n\nCel-shaded cartoon look.\n\n```javascript\nconst material = new THREE.MeshToonMaterial({\n  color: 0x00ff00,\n  gradientMap: gradientTexture, \u002F\u002F Optional: custom shading gradient\n});\n\n\u002F\u002F Create step gradient texture\nconst colors = new Uint8Array([0, 128, 255]);\nconst gradientMap = new THREE.DataTexture(colors, 3, 1, THREE.RedFormat);\ngradientMap.minFilter = THREE.NearestFilter;\ngradientMap.magFilter = THREE.NearestFilter;\ngradientMap.needsUpdate = true;\n```\n\n## MeshNormalMaterial\n\nVisualize surface normals. Useful for debugging.\n\n```javascript\nconst material = new THREE.MeshNormalMaterial({\n  flatShading: false,\n  wireframe: false,\n});\n```\n\n## MeshDepthMaterial\n\nRender depth values. Used for shadow maps, DOF effects.\n\n```javascript\nconst material = new THREE.MeshDepthMaterial({\n  depthPacking: THREE.RGBADepthPacking,\n});\n```\n\n## PointsMaterial\n\nFor point clouds.\n\n```javascript\nconst material = new THREE.PointsMaterial({\n  color: 0xffffff,\n  size: 0.1,\n  sizeAttenuation: true, \u002F\u002F Scale with distance\n  map: pointTexture,\n  alphaMap: alphaTexture,\n  transparent: true,\n  alphaTest: 0.5, \u002F\u002F Discard pixels below threshold\n  vertexColors: true, \u002F\u002F Use per-vertex colors\n});\n\nconst points = new THREE.Points(geometry, material);\n```\n\n## LineBasicMaterial & LineDashedMaterial\n\n```javascript\n\u002F\u002F Solid lines\nconst lineMaterial = new THREE.LineBasicMaterial({\n  color: 0xffffff,\n  linewidth: 1, \u002F\u002F Note: >1 only works on some systems\n  linecap: \"round\",\n  linejoin: \"round\",\n});\n\n\u002F\u002F Dashed lines\nconst dashedMaterial = new THREE.LineDashedMaterial({\n  color: 0xffffff,\n  dashSize: 0.5,\n  gapSize: 0.25,\n  scale: 1,\n});\n\n\u002F\u002F Required for dashed lines\nconst line = new THREE.Line(geometry, dashedMaterial);\nline.computeLineDistances();\n```\n\n## ShaderMaterial\n\nCustom GLSL shaders with Three.js uniforms.\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    time: { value: 0 },\n    color: { value: new THREE.Color(0xff0000) },\n    texture1: { value: texture },\n  },\n  vertexShader: `\n    varying vec2 vUv;\n    uniform float time;\n\n    void main() {\n      vUv = uv;\n      vec3 pos = position;\n      pos.z += sin(pos.x * 10.0 + time) * 0.1;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n    }\n  `,\n  fragmentShader: `\n    varying vec2 vUv;\n    uniform vec3 color;\n    uniform sampler2D texture1;\n\n    void main() {\n      \u002F\u002F Use texture2D() for GLSL 1.0, texture() for GLSL 3.0 (glslVersion: THREE.GLSL3)\n      vec4 texColor = texture2D(texture1, vUv);\n      gl_FragColor = vec4(color * texColor.rgb, 1.0);\n    }\n  `,\n  transparent: true,\n  side: THREE.DoubleSide,\n});\n\n\u002F\u002F Update uniform in animation loop\nmaterial.uniforms.time.value = clock.getElapsedTime();\n```\n\n### Built-in Uniforms (auto-provided)\n\n```glsl\n\u002F\u002F Vertex shader\nuniform mat4 modelMatrix;         \u002F\u002F Object to world\nuniform mat4 modelViewMatrix;     \u002F\u002F Object to camera\nuniform mat4 projectionMatrix;    \u002F\u002F Camera projection\nuniform mat4 viewMatrix;          \u002F\u002F World to camera\nuniform mat3 normalMatrix;        \u002F\u002F For transforming normals\nuniform vec3 cameraPosition;      \u002F\u002F Camera world position\n\n\u002F\u002F Attributes\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n```\n\n## RawShaderMaterial\n\nFull control - no built-in uniforms\u002Fattributes.\n\n```javascript\nconst material = new THREE.RawShaderMaterial({\n  uniforms: {\n    projectionMatrix: { value: camera.projectionMatrix },\n    modelViewMatrix: { value: new THREE.Matrix4() },\n  },\n  vertexShader: `\n    precision highp float;\n    attribute vec3 position;\n    uniform mat4 projectionMatrix;\n    uniform mat4 modelViewMatrix;\n\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    precision highp float;\n\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n## Common Material Properties\n\nAll materials share these base properties:\n\n```javascript\n\u002F\u002F Visibility\nmaterial.visible = true;\nmaterial.transparent = false;\nmaterial.opacity = 1.0;\nmaterial.alphaTest = 0; \u002F\u002F Discard pixels with alpha \u003C value\n\n\u002F\u002F Rendering\nmaterial.side = THREE.FrontSide; \u002F\u002F FrontSide, BackSide, DoubleSide\nmaterial.depthTest = true;\nmaterial.depthWrite = true;\nmaterial.colorWrite = true;\n\n\u002F\u002F Blending\nmaterial.blending = THREE.NormalBlending;\n\u002F\u002F NormalBlending, AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending\n\n\u002F\u002F Stencil\nmaterial.stencilWrite = false;\nmaterial.stencilFunc = THREE.AlwaysStencilFunc;\nmaterial.stencilRef = 0;\nmaterial.stencilMask = 0xff;\n\n\u002F\u002F Polygon offset (z-fighting fix)\nmaterial.polygonOffset = false;\nmaterial.polygonOffsetFactor = 0;\nmaterial.polygonOffsetUnits = 0;\n\n\u002F\u002F Misc\nmaterial.dithering = false;\nmaterial.toneMapped = true;\n```\n\n## Multiple Materials\n\n```javascript\n\u002F\u002F Assign different materials to geometry groups\nconst geometry = new THREE.BoxGeometry(1, 1, 1);\nconst materials = [\n  new THREE.MeshBasicMaterial({ color: 0xff0000 }), \u002F\u002F right\n  new THREE.MeshBasicMaterial({ color: 0x00ff00 }), \u002F\u002F left\n  new THREE.MeshBasicMaterial({ color: 0x0000ff }), \u002F\u002F top\n  new THREE.MeshBasicMaterial({ color: 0xffff00 }), \u002F\u002F bottom\n  new THREE.MeshBasicMaterial({ color: 0xff00ff }), \u002F\u002F front\n  new THREE.MeshBasicMaterial({ color: 0x00ffff }), \u002F\u002F back\n];\nconst mesh = new THREE.Mesh(geometry, materials);\n\n\u002F\u002F Custom groups\ngeometry.clearGroups();\ngeometry.addGroup(0, 6, 0); \u002F\u002F start, count, materialIndex\ngeometry.addGroup(6, 6, 1);\n```\n\n## Environment Maps\n\n```javascript\n\u002F\u002F Load cube texture\nconst cubeLoader = new THREE.CubeTextureLoader();\nconst envMap = cubeLoader.load([\n  \"px.jpg\",\n  \"nx.jpg\", \u002F\u002F positive\u002Fnegative X\n  \"py.jpg\",\n  \"ny.jpg\", \u002F\u002F positive\u002Fnegative Y\n  \"pz.jpg\",\n  \"nz.jpg\", \u002F\u002F positive\u002Fnegative Z\n]);\n\n\u002F\u002F Apply to material\nmaterial.envMap = envMap;\nmaterial.envMapIntensity = 1;\n\n\u002F\u002F Or set as scene environment (affects all PBR materials)\nscene.environment = envMap;\n\n\u002F\u002F HDR environment (recommended)\nimport { RGBELoader } from \"three\u002Fexamples\u002Fjsm\u002Floaders\u002FRGBELoader.js\";\nconst rgbeLoader = new RGBELoader();\nrgbeLoader.load(\"environment.hdr\", (texture) => {\n  texture.mapping = THREE.EquirectangularReflectionMapping;\n  scene.environment = texture;\n  scene.background = texture;\n});\n```\n\n## Material Cloning and Modification\n\n```javascript\n\u002F\u002F Clone material\nconst clone = material.clone();\nclone.color.set(0x00ff00);\n\n\u002F\u002F Modify at runtime\nmaterial.color.set(0xff0000);\nmaterial.needsUpdate = true; \u002F\u002F Only needed for some changes\n\n\u002F\u002F When needsUpdate is required:\n\u002F\u002F - Changing flat shading\n\u002F\u002F - Changing texture\n\u002F\u002F - Changing transparent\n\u002F\u002F - Custom shader code changes\n```\n\n## Performance Tips\n\n1. **Reuse materials**: Same material = batched draw calls\n2. **Avoid transparent when possible**: Transparent materials require sorting\n3. **Use alphaTest instead of transparency**: When applicable, faster\n4. **Choose simpler materials**: Basic > Lambert > Phong > Standard > Physical\n5. **Limit active lights**: Each light adds shader complexity\n\n```javascript\n\u002F\u002F Material pooling\nconst materialCache = new Map();\nfunction getMaterial(color) {\n  const key = color.toString(16);\n  if (!materialCache.has(key)) {\n    materialCache.set(key, new THREE.MeshStandardMaterial({ color }));\n  }\n  return materialCache.get(key);\n}\n\n\u002F\u002F Dispose when done\nmaterial.dispose();\n```\n\n## NodeMaterial \u002F TSL (Future Direction)\n\nThree.js is moving toward **NodeMaterial** and **TSL (Three.js Shading Language)** as the standard material system, especially for the WebGPU renderer:\n\n```javascript\nimport { MeshStandardNodeMaterial } from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\nimport { color, uv, texture } from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\n\nconst material = new MeshStandardNodeMaterial();\nmaterial.colorNode = texture(colorMap, uv());\n```\n\n**Key points:**\n- NodeMaterial works with both WebGL and WebGPU renderers\n- `onBeforeCompile` does **not** work with the WebGPU renderer -- use NodeMaterial instead\n- TSL replaces GLSL for cross-renderer shader compatibility\n- Standard GLSL `ShaderMaterial` continues to work with the WebGL renderer\n\n## Lambert\u002FPhong IBL Support (r183)\n\nAs of r183, `MeshLambertMaterial` and `MeshPhongMaterial` support image-based lighting (IBL) via `scene.environment`. Previously, only PBR materials (Standard\u002FPhysical) responded to environment maps set on the scene.\n\n## See Also\n\n- `threejs-textures` - Texture loading and configuration\n- `threejs-shaders` - Custom shader development\n- `threejs-lighting` - Light interaction with materials\n\n\n## When to Use\nUse this skill when tackling tasks related to its primary domain or functionality as described above.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# Three.js Materials\n\n## Quick Start\n\n```javascript\nimport * as THREE from \"three\";\n\n\u002F\u002F PBR material (recommended for realistic rendering)\nconst material = new THREE.MeshStandardMaterial({\n  color: 0x00ff00,\n  roughness: 0.5,\n  metalness: 0.5,\n});\n\nconst mesh = new THREE.Mesh(geometry, material);\n```\n\n## Material Types Overview\n\n| Material             | Use Case                              | Lighting           |\n| -------------------- | ------------------------------------- | ------------------ |\n| MeshBasicMaterial    | Unlit, flat colors, wireframes        | No                 |\n| MeshLambertMaterial  | Matte surfaces, performance           | Yes (diffuse only) |\n| MeshPhongMaterial    | Shiny surfaces, specular highlights   | Yes                |\n| MeshStandardMaterial | PBR, realistic materials              | Yes (PBR)          |\n| MeshPhysicalMaterial | Advanced PBR, clearcoat, transmission | Yes (PBR+)         |\n| MeshToonMaterial     | Cel-shaded, cartoon look              | Yes (toon)         |\n| MeshNormalMaterial   | Debug normals                         | No                 |\n| MeshDepthMaterial    | Depth visualization                   | No                 |\n| ShaderMaterial       | Custom GLSL shaders                   | Custom             |\n| RawShaderMaterial    | Full shader control                   | Custom             |\n\n## MeshBasicMaterial\n\nNo lighting calculations. Fast, always visible.\n\n```javascript\nconst material = new THREE.MeshBasicMaterial({\n  color: 0xff0000,\n  transparent: true,\n  opacity: 0.5,\n  side: THREE.DoubleSide, \u002F\u002F FrontSide, BackSide, DoubleSide\n  wireframe: false,\n  map: texture, \u002F\u002F Color\u002Fdiffuse texture\n  alphaMap: alphaTexture, \u002F\u002F Transparency texture\n  envMap: envTexture, \u002F\u002F Reflection texture\n  reflectivity: 1, \u002F\u002F Env map intensity\n  fog: true, \u002F\u002F Affected by scene fog\n});\n```\n\n## MeshLambertMaterial\n\nDiffuse-only lighting. Fast, no specular highlights.\n\n```javascript\nconst material = new THREE.MeshLambertMaterial({\n  color: 0x00ff00,\n  emissive: 0x111111, \u002F\u002F Self-illumination color\n  emissiveIntensity: 1,\n  map: texture,\n  emissiveMap: emissiveTexture,\n  envMap: envTexture,\n  reflectivity: 0.5,\n});\n```\n\n## MeshPhongMaterial\n\nSpecular highlights. Good for shiny, plastic-like surfaces.\n\n```javascript\nconst material = new THREE.MeshPhongMaterial({\n  color: 0x0000ff,\n  specular: 0xffffff, \u002F\u002F Highlight color\n  shininess: 100, \u002F\u002F Highlight sharpness (0-1000)\n  emissive: 0x000000,\n  flatShading: false, \u002F\u002F Flat vs smooth shading\n  map: texture,\n  specularMap: specTexture, \u002F\u002F Per-pixel shininess\n  normalMap: normalTexture,\n  normalScale: new THREE.Vector2(1, 1),\n  bumpMap: bumpTexture,\n  bumpScale: 1,\n  displacementMap: dispTexture,\n  displacementScale: 1,\n});\n```\n\n## MeshStandardMaterial (PBR)\n\nPhysically-based rendering. Recommended for realistic results.\n\n```javascript\nconst material = new THREE.MeshStandardMaterial({\n  color: 0xffffff,\n  roughness: 0.5, \u002F\u002F 0 = mirror, 1 = diffuse\n  metalness: 0.0, \u002F\u002F 0 = dielectric, 1 = metal\n\n  \u002F\u002F Textures\n  map: colorTexture, \u002F\u002F Albedo\u002Fbase color\n  roughnessMap: roughTexture, \u002F\u002F Per-pixel roughness\n  metalnessMap: metalTexture, \u002F\u002F Per-pixel metalness\n  normalMap: normalTexture, \u002F\u002F Surface detail\n  normalScale: new THREE.Vector2(1, 1),\n  aoMap: aoTexture, \u002F\u002F Ambient occlusion (uses uv2!)\n  aoMapIntensity: 1,\n  displacementMap: dispTexture, \u002F\u002F Vertex displacement\n  displacementScale: 0.1,\n  displacementBias: 0,\n\n  \u002F\u002F Emissive\n  emissive: 0x000000,\n  emissiveIntensity: 1,\n  emissiveMap: emissiveTexture,\n\n  \u002F\u002F Environment\n  envMap: envTexture,\n  envMapIntensity: 1,\n\n  \u002F\u002F Other\n  flatShading: false,\n  wireframe: false,\n  fog: true,\n});\n\n\u002F\u002F Note: aoMap requires second UV channel\ngeometry.setAttribute(\"uv2\", geometry.attributes.uv);\n```\n\n## MeshPhysicalMaterial (Advanced PBR)\n\nExtends MeshStandardMaterial with advanced features.\n\n```javascript\nconst material = new THREE.MeshPhysicalMaterial({\n  \u002F\u002F All MeshStandardMaterial properties plus:\n\n  \u002F\u002F Clearcoat (car paint, lacquer)\n  clearcoat: 1.0, \u002F\u002F 0-1 clearcoat layer strength\n  clearcoatRoughness: 0.1,\n  clearcoatMap: ccTexture,\n  clearcoatRoughnessMap: ccrTexture,\n  clearcoatNormalMap: ccnTexture,\n  clearcoatNormalScale: new THREE.Vector2(1, 1),\n\n  \u002F\u002F Transmission (glass, water)\n  transmission: 1.0, \u002F\u002F 0 = opaque, 1 = fully transparent\n  transmissionMap: transTexture,\n  thickness: 0.5, \u002F\u002F Volume thickness for refraction\n  thicknessMap: thickTexture,\n  attenuationDistance: 1, \u002F\u002F Absorption distance\n  attenuationColor: new THREE.Color(0xffffff),\n\n  \u002F\u002F Refraction\n  ior: 1.5, \u002F\u002F Index of refraction (1-2.333)\n\n  \u002F\u002F Sheen (fabric, velvet)\n  sheen: 1.0,\n  sheenRoughness: 0.5,\n  sheenColor: new THREE.Color(0xffffff),\n  sheenColorMap: sheenTexture,\n  sheenRoughnessMap: sheenRoughTexture,\n\n  \u002F\u002F Iridescence (soap bubbles, oil slicks)\n  iridescence: 1.0,\n  iridescenceIOR: 1.3,\n  iridescenceThicknessRange: [100, 400],\n  iridescenceMap: iridTexture,\n  iridescenceThicknessMap: iridThickTexture,\n\n  \u002F\u002F Anisotropy (brushed metal)\n  anisotropy: 1.0,\n  anisotropyRotation: 0,\n  anisotropyMap: anisoTexture,\n\n  \u002F\u002F Specular\n  specularIntensity: 1,\n  specularColor: new THREE.Color(0xffffff),\n  specularIntensityMap: specIntTexture,\n  specularColorMap: specColorTexture,\n});\n```\n\n### Glass Material Example\n\n```javascript\nconst glass = new THREE.MeshPhysicalMaterial({\n  color: 0xffffff,\n  metalness: 0,\n  roughness: 0,\n  transmission: 1,\n  thickness: 0.5,\n  ior: 1.5,\n  envMapIntensity: 1,\n});\n```\n\n### Car Paint Example\n\n```javascript\nconst carPaint = new THREE.MeshPhysicalMaterial({\n  color: 0xff0000,\n  metalness: 0.9,\n  roughness: 0.5,\n  clearcoat: 1,\n  clearcoatRoughness: 0.1,\n});\n```\n\n## MeshToonMaterial\n\nCel-shaded cartoon look.\n\n```javascript\nconst material = new THREE.MeshToonMaterial({\n  color: 0x00ff00,\n  gradientMap: gradientTexture, \u002F\u002F Optional: custom shading gradient\n});\n\n\u002F\u002F Create step gradient texture\nconst colors = new Uint8Array([0, 128, 255]);\nconst gradientMap = new THREE.DataTexture(colors, 3, 1, THREE.RedFormat);\ngradientMap.minFilter = THREE.NearestFilter;\ngradientMap.magFilter = THREE.NearestFilter;\ngradientMap.needsUpdate = true;\n```\n\n## MeshNormalMaterial\n\nVisualize surface normals. Useful for debugging.\n\n```javascript\nconst material = new THREE.MeshNormalMaterial({\n  flatShading: false,\n  wireframe: false,\n});\n```\n\n## MeshDepthMaterial\n\nRender depth values. Used for shadow maps, DOF effects.\n\n```javascript\nconst material = new THREE.MeshDepthMaterial({\n  depthPacking: THREE.RGBADepthPacking,\n});\n```\n\n## PointsMaterial\n\nFor point clouds.\n\n```javascript\nconst material = new THREE.PointsMaterial({\n  color: 0xffffff,\n  size: 0.1,\n  sizeAttenuation: true, \u002F\u002F Scale with distance\n  map: pointTexture,\n  alphaMap: alphaTexture,\n  transparent: true,\n  alphaTest: 0.5, \u002F\u002F Discard pixels below threshold\n  vertexColors: true, \u002F\u002F Use per-vertex colors\n});\n\nconst points = new THREE.Points(geometry, material);\n```\n\n## LineBasicMaterial & LineDashedMaterial\n\n```javascript\n\u002F\u002F Solid lines\nconst lineMaterial = new THREE.LineBasicMaterial({\n  color: 0xffffff,\n  linewidth: 1, \u002F\u002F Note: >1 only works on some systems\n  linecap: \"round\",\n  linejoin: \"round\",\n});\n\n\u002F\u002F Dashed lines\nconst dashedMaterial = new THREE.LineDashedMaterial({\n  color: 0xffffff,\n  dashSize: 0.5,\n  gapSize: 0.25,\n  scale: 1,\n});\n\n\u002F\u002F Required for dashed lines\nconst line = new THREE.Line(geometry, dashedMaterial);\nline.computeLineDistances();\n```\n\n## ShaderMaterial\n\nCustom GLSL shaders with Three.js uniforms.\n\n```javascript\nconst material = new THREE.ShaderMaterial({\n  uniforms: {\n    time: { value: 0 },\n    color: { value: new THREE.Color(0xff0000) },\n    texture1: { value: texture },\n  },\n  vertexShader: `\n    varying vec2 vUv;\n    uniform float time;\n\n    void main() {\n      vUv = uv;\n      vec3 pos = position;\n      pos.z += sin(pos.x * 10.0 + time) * 0.1;\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n    }\n  `,\n  fragmentShader: `\n    varying vec2 vUv;\n    uniform vec3 color;\n    uniform sampler2D texture1;\n\n    void main() {\n      \u002F\u002F Use texture2D() for GLSL 1.0, texture() for GLSL 3.0 (glslVersion: THREE.GLSL3)\n      vec4 texColor = texture2D(texture1, vUv);\n      gl_FragColor = vec4(color * texColor.rgb, 1.0);\n    }\n  `,\n  transparent: true,\n  side: THREE.DoubleSide,\n});\n\n\u002F\u002F Update uniform in animation loop\nmaterial.uniforms.time.value = clock.getElapsedTime();\n```\n\n### Built-in Uniforms (auto-provided)\n\n```glsl\n\u002F\u002F Vertex shader\nuniform mat4 modelMatrix;         \u002F\u002F Object to world\nuniform mat4 modelViewMatrix;     \u002F\u002F Object to camera\nuniform mat4 projectionMatrix;    \u002F\u002F Camera projection\nuniform mat4 viewMatrix;          \u002F\u002F World to camera\nuniform mat3 normalMatrix;        \u002F\u002F For transforming normals\nuniform vec3 cameraPosition;      \u002F\u002F Camera world position\n\n\u002F\u002F Attributes\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n```\n\n## RawShaderMaterial\n\nFull control - no built-in uniforms\u002Fattributes.\n\n```javascript\nconst material = new THREE.RawShaderMaterial({\n  uniforms: {\n    projectionMatrix: { value: camera.projectionMatrix },\n    modelViewMatrix: { value: new THREE.Matrix4() },\n  },\n  vertexShader: `\n    precision highp float;\n    attribute vec3 position;\n    uniform mat4 projectionMatrix;\n    uniform mat4 modelViewMatrix;\n\n    void main() {\n      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n    }\n  `,\n  fragmentShader: `\n    precision highp float;\n\n    void main() {\n      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n    }\n  `,\n});\n```\n\n## Common Material Properties\n\nAll materials share these base properties:\n\n```javascript\n\u002F\u002F Visibility\nmaterial.visible = true;\nmaterial.transparent = false;\nmaterial.opacity = 1.0;\nmaterial.alphaTest = 0; \u002F\u002F Discard pixels with alpha \u003C value\n\n\u002F\u002F Rendering\nmaterial.side = THREE.FrontSide; \u002F\u002F FrontSide, BackSide, DoubleSide\nmaterial.depthTest = true;\nmaterial.depthWrite = true;\nmaterial.colorWrite = true;\n\n\u002F\u002F Blending\nmaterial.blending = THREE.NormalBlending;\n\u002F\u002F NormalBlending, AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending\n\n\u002F\u002F Stencil\nmaterial.stencilWrite = false;\nmaterial.stencilFunc = THREE.AlwaysStencilFunc;\nmaterial.stencilRef = 0;\nmaterial.stencilMask = 0xff;\n\n\u002F\u002F Polygon offset (z-fighting fix)\nmaterial.polygonOffset = false;\nmaterial.polygonOffsetFactor = 0;\nmaterial.polygonOffsetUnits = 0;\n\n\u002F\u002F Misc\nmaterial.dithering = false;\nmaterial.toneMapped = true;\n```\n\n## Multiple Materials\n\n```javascript\n\u002F\u002F Assign different materials to geometry groups\nconst geometry = new THREE.BoxGeometry(1, 1, 1);\nconst materials = [\n  new THREE.MeshBasicMaterial({ color: 0xff0000 }), \u002F\u002F right\n  new THREE.MeshBasicMaterial({ color: 0x00ff00 }), \u002F\u002F left\n  new THREE.MeshBasicMaterial({ color: 0x0000ff }), \u002F\u002F top\n  new THREE.MeshBasicMaterial({ color: 0xffff00 }), \u002F\u002F bottom\n  new THREE.MeshBasicMaterial({ color: 0xff00ff }), \u002F\u002F front\n  new THREE.MeshBasicMaterial({ color: 0x00ffff }), \u002F\u002F back\n];\nconst mesh = new THREE.Mesh(geometry, materials);\n\n\u002F\u002F Custom groups\ngeometry.clearGroups();\ngeometry.addGroup(0, 6, 0); \u002F\u002F start, count, materialIndex\ngeometry.addGroup(6, 6, 1);\n```\n\n## Environment Maps\n\n```javascript\n\u002F\u002F Load cube texture\nconst cubeLoader = new THREE.CubeTextureLoader();\nconst envMap = cubeLoader.load([\n  \"px.jpg\",\n  \"nx.jpg\", \u002F\u002F positive\u002Fnegative X\n  \"py.jpg\",\n  \"ny.jpg\", \u002F\u002F positive\u002Fnegative Y\n  \"pz.jpg\",\n  \"nz.jpg\", \u002F\u002F positive\u002Fnegative Z\n]);\n\n\u002F\u002F Apply to material\nmaterial.envMap = envMap;\nmaterial.envMapIntensity = 1;\n\n\u002F\u002F Or set as scene environment (affects all PBR materials)\nscene.environment = envMap;\n\n\u002F\u002F HDR environment (recommended)\nimport { RGBELoader } from \"three\u002Fexamples\u002Fjsm\u002Floaders\u002FRGBELoader.js\";\nconst rgbeLoader = new RGBELoader();\nrgbeLoader.load(\"environment.hdr\", (texture) => {\n  texture.mapping = THREE.EquirectangularReflectionMapping;\n  scene.environment = texture;\n  scene.background = texture;\n});\n```\n\n## Material Cloning and Modification\n\n```javascript\n\u002F\u002F Clone material\nconst clone = material.clone();\nclone.color.set(0x00ff00);\n\n\u002F\u002F Modify at runtime\nmaterial.color.set(0xff0000);\nmaterial.needsUpdate = true; \u002F\u002F Only needed for some changes\n\n\u002F\u002F When needsUpdate is required:\n\u002F\u002F - Changing flat shading\n\u002F\u002F - Changing texture\n\u002F\u002F - Changing transparent\n\u002F\u002F - Custom shader code changes\n```\n\n## Performance Tips\n\n1. **Reuse materials**: Same material = batched draw calls\n2. **Avoid transparent when possible**: Transparent materials require sorting\n3. **Use alphaTest instead of transparency**: When applicable, faster\n4. **Choose simpler materials**: Basic > Lambert > Phong > Standard > Physical\n5. **Limit active lights**: Each light adds shader complexity\n\n```javascript\n\u002F\u002F Material pooling\nconst materialCache = new Map();\nfunction getMaterial(color) {\n  const key = color.toString(16);\n  if (!materialCache.has(key)) {\n    materialCache.set(key, new THREE.MeshStandardMaterial({ color }));\n  }\n  return materialCache.get(key);\n}\n\n\u002F\u002F Dispose when done\nmaterial.dispose();\n```\n\n## NodeMaterial \u002F TSL (Future Direction)\n\nThree.js is moving toward **NodeMaterial** and **TSL (Three.js Shading Language)** as the standard material system, especially for the WebGPU renderer:\n\n```javascript\nimport { MeshStandardNodeMaterial } from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\nimport { color, uv, texture } from \"three\u002Faddons\u002Fnodes\u002FNodes.js\";\n\nconst material = new MeshStandardNodeMaterial();\nmaterial.colorNode = texture(colorMap, uv());\n```\n\n**Key points:**\n- NodeMaterial works with both WebGL and WebGPU renderers\n- `onBeforeCompile` does **not** work with the WebGPU renderer -- use NodeMaterial instead\n- TSL replaces GLSL for cross-renderer shader compatibility\n- Standard GLSL `ShaderMaterial` continues to work with the WebGL renderer\n\n## Lambert\u002FPhong IBL Support (r183)\n\nAs of r183, `MeshLambertMaterial` and `MeshPhongMaterial` support image-based lighting (IBL) via `scene.environment`. Previously, only PBR materials (Standard\u002FPhysical) responded to environment maps set on the scene.\n\n## See Also\n\n- `threejs-textures` - Texture loading and configuration\n- `threejs-shaders` - Custom shader development\n- `threejs-lighting` - Light interaction with materials\n\n\n## When to Use\nUse this skill when tackling tasks related to its primary domain or functionality as described above.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"source":25,"description":7},"unknown","community","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fthreejs-materials",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill threejs-materials",{"tool":41,"command":42},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill threejs-materials",{"tool":44,"command":45},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill threejs-materials","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fthreejs-materials\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]