一键导入
threejs
Three.js 着色器:GLSL 基础、ShaderMaterial、uniforms、常用坐标空间与自定义效果。用户需要自定义视觉效果时调用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Three.js 着色器:GLSL 基础、ShaderMaterial、uniforms、常用坐标空间与自定义效果。用户需要自定义视觉效果时调用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Weekly Focus Engineering analysis using ActivityWatch data. Use when analyzing app usage patterns, detecting context switching problems, identifying "death loops" (repetitive app switching), calculating focus scores, or creating weekly productivity reviews.
WCAG 2.2 AA conformance auditor. Systematically verifies success criteria through automated, interactive, and manual testing methods.
Implement features from spec documents (context/doc required)
PR review for bugs, security & quality (requires PR URL)
Brutally honest roasts of your code with fixes
Accessibility improvement planning support. Generates organizational maturity assessment, phased roadmap, KPI design, and stakeholder persuasion materials.
| name | Three.js着色器 |
| description | Three.js 着色器:GLSL 基础、ShaderMaterial、uniforms、常用坐标空间与自定义效果。用户需要自定义视觉效果时调用。 |
import * as THREE from "three";
const material = new THREE.ShaderMaterial({
uniforms: {
uTime: { value: 0 },
uColor: { value: new THREE.Color(0x4aa3ff) },
},
vertexShader: `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,
fragmentShader: `
uniform float uTime;
uniform vec3 uColor;
varying vec2 vUv;
void main() {
float wave = 0.5 + 0.5 * sin(uTime + vUv.x * 10.0);
gl_FragColor = vec4(uColor * wave, 1.0);
}
`,
});
const mesh = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), material);
scene.add(mesh);
modelMatrix:局部到世界viewMatrix:世界到相机projectionMatrix:相机到裁剪空间modelViewMatrix:viewMatrix * modelMatrixuniform:CPU 传给 GPU 的参数(时间、颜色、贴图等)varying:顶点着色器传给片元着色器的插值数据(如 UV、法线等)onBeforeCompile 或使用 NodeMaterial/后处理管线const clock = new THREE.Clock();
function animate() {
requestAnimationFrame(animate);
material.uniforms.uTime.value += clock.getDelta();
renderer.render(scene, camera);
}
sampler2D + texture2D/texture