fec-canvas-threejs

fec-canvas-threejs is a skill for Claude Code from bovinphang/frontend-craft. It costs 117 tokens per session (898 once invoked), scanned A, original, MIT.

A guide for building and reviewing browser graphics with Canvas 2D, Three.js, WebGL, React Three Fiber, and GLSL shaders. Canvas is a browser drawing surface, while WebGL and Three.js support GPU-based 3D graphics.

In plain words
What is it for?
Use it for 2D or 3D visualisations, games, particle effects, animations, shader work, responsive canvas sizing, and cleanup of graphics resources.
Why use it?
It helps avoid blurry rendering, stalled animation, graphics memory leaks, inaccessible visual content, and compatibility errors when adapting shaders or rendering code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frontend-craft plugin — 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers shipped together

Good fit Use it for 2D or 3D visualisations, games, particle effects, animations, shader work, responsive canvas sizing, and cleanup of graphics resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bovinphang/frontend-craft/fec-canvas-threejs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bovinphang/frontend-craft --skill fec-canvas-threejs
Clone the repo
git clone --depth 1 https://github.com/bovinphang/frontend-craft

Made for: Claude Code.

Or install frontend-craft, the plugin that ships this one along with the rest of its 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fec-canvas-threejs

README.md
[![agentmods](https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-canvas-threejs/github.svg)](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-canvas-threejs)
Your own site
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-canvas-threejs"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-canvas-threejs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fec-canvas-threejs

Your own site · 80×15
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-canvas-threejs"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-canvas-threejs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 898 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.00898
Opus 5 $0.00059 $0.00449
Sonnet 5 $0.00023 $0.00180
Haiku 4.5 $0.00012 $0.00090

Measured 10d ago against content hash c3e327f44b8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

fec-canvas-threejs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

localized/zh-CN/skills/fec-canvas-threejs/SKILL.md · 67 lines

What it actually says

Canvas 与 Three.js

用途

在浏览器中实现高性能 2D/3D 图形渲染。

流程

  1. 先选渲染层:标准 UI 用 DOM;简单 2D 图形/签名/粒子用 Canvas 2D;3D 模型、空间交互和复杂粒子用 Three.js/WebGL;React 项目中的声明式 3D 用 React Three Fiber。
  2. 为渲染容器定义稳定尺寸、DPI 适配和 resize 行为;Canvas 不会自动随 CSS 清晰缩放。
  3. 动画循环使用 requestAnimationFrame,不可见或无变化时暂停,卸载时取消。
  4. Three.js 必须释放 geometry/material/texture/renderer,并移除事件监听和 observer。
  5. Shader/WebGL 任务先识别是 SDF、ray marching、noise、particle、post-processing、multipass 还是调试问题,再决定是否需要原生 WebGL2、Three.js ShaderMaterial 或 R3F。
  6. WebGL2 适配时检查 GLSL 版本、入口函数、varying/in-out、texture API、uniform 使用和函数声明顺序,避免白屏只留控制台错误。
  7. 对不可访问的图形内容提供 aria-label、替代文本或 DOM 版摘要;交互式图形要有键盘兜底。

核心模式

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();
};

详细参考

涉及 Canvas 2D 绘图、动画循环、Three.js 场景搭建、React Three Fiber、InstancedMesh 和性能清理时,加载 references/rendering-patterns.md

涉及着色器路由、WebGL2 适配、GLSL 调试、多 pass 预算和视觉验证时,加载 references/shader-webgl-patterns.md

约束

  • Canvas/WebGL 内容对屏幕阅读器不可见,必须提供替代语义。
  • WebGL 消耗 GPU,低端设备需限制像素比、面数和纹理大小。
  • Three.js 资源不会自动释放,遗漏 dispose() 会造成 GPU 内存泄漏。
  • Canvas 响应式必须同步 CSS 尺寸、绘图尺寸和相机/viewport。
  • 复杂布局/路径规划可联用后台线程 workflow,但渲染本身仍在主线程/渲染线程协调。
  • Shader 主循环、采样层数和多 pass 数量必须有预算;低端设备上要降低 DPR、步数、粒子数或禁用重后处理。
  • 交付前必须确认 canvas 非空、尺寸正确、resize 后不拉伸、控制台无 shader compile/link 错误。

预期输出

2D/3D 场景清晰、响应式、可清理,关键设备上接近 60fps;用户能通过替代文本或键盘路径理解/操作核心内容。

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 67 lines · 117 tokens per session scan A c3e327f44b8b

Subscribe to this mod's changes

fec-canvas-threejs is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 9d ago), licensed MIT. It adds 117 tokens to every session and 898 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

brand-design

Brand-aware design system generator that acts as Head of Brand. Translates abstract brand language into a mathematically-validated, implementation-ready design system, writes creative-brief.md as the source of truth for all UI/UX in a project, and optionally compiles it to framework tokens (Tailwind v4 @theme, v3…

rfxlamia/pocketto · 146 tokens

mobile-flows-maestro

This skill should be used when Maestro is explicitly requested or already present and the task is to author, run, or debug iOS/Android Maestro flows; use Maestro MCP; or handle Maestro selectors, system UI, permissions, Keychain, JavaScript, waits, device state, flakiness, or CI. Evidence includes a .maestro directory…

johnkozaris/jko-claude-plugins · 102 tokens

ui-ux-pro-max

UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design…

avelikiy/great_cto · 238 tokens

genpage

Creates, updates, and deploys Power Apps generative pages for model-driven apps using React v17, TypeScript, and Fluent UI V9. Orchestrates specialist agents for planning, entity creation, and code generation. Use it when user asks to build, retrieve, or update a page in an existing Microsoft Power Apps model-driven…

microsoft/power-platform-skills · 140 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

liveview-patterns

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.

oliver-kriska/claude-elixir-phoenix · 51 tokens