From frontend-craft
Guides Canvas 2D, Three.js/WebGL, React Three Fiber, GLSL shaders, and ShaderToy-to-WebGL adaptation with DPI handling, animation loop lifecycle, GPU resource cleanup, and accessibility patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-craft:fec-canvas-threejsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Enable high-performance 2D/3D graphics rendering in the browser.
Enable high-performance 2D/3D graphics rendering in the browser.
requestAnimationFrame, which is paused when it is invisible or has no changes, and canceled when it is uninstalled.aria-label, alternative text or DOM summary for inaccessible graphic content; interactive graphics must have keyboard support.const dpr = Math.min(window.devicePixelRatio || 1, 2);
canvas.width = width * dpr;
canvas.height = height * dpr;
canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
ctx.scale(dpr, dpr);
let animationId = 0;
function animate() {
animationId = requestAnimationFrame(animate);
renderer.render(scene, camera);
}
return () => {
cancelAnimationFrame(animationId);
geometry.dispose();
material.dispose();
renderer.dispose();
};
Load references/rendering-patterns.md when it comes to Canvas 2D drawing, animation loops, Three.js scene building, React Three Fiber, InstancedMesh, and performance cleanup.
Load references/shader-webgl-patterns.md when it comes to shader routing, WebGL2 adaptation, GLSL debugging, multi-pass budgeting, and visual verification.
dispose() will cause GPU memory leaks.2D/3D scenes are crisp, responsive, cleanable, and close to 60fps on key devices; users can understand/operate with core content via alt text or keyboard paths.
npx claudepluginhub bovinphang/frontend-craftWrites custom shaders for Three.js using GLSL or TSL for WebGL/WebGPU. Covers debugging, post-processing, noise functions, procedural textures, and performance optimization.
Builds interactive 3D web scenes with Three.js using WebGL/WebGPU. Guides on scenes, cameras, renderers, geometries, materials, meshes, lights, animations, and OrbitControls.
Creates 3D scenes, interactive experiences, and visual effects using Three.js. Handles WebGL rendering, animations, and 3D visualizations.