fec-canvas-threejs SKILL.md skillA
fec-canvas-threejs from bovinphang/frontend-craft is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bovinphang/frontend-craft/fec-canvas-threejs@git:20260611.9d7f5e4Pins git:20260611.9d7f5e4 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bovinphang/frontend-craft
- Path
localized/zh-CN/skills/fec-canvas-threejs/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260611.9d7f5e4, committed Jun 11, 2026
- Size
- 3,285 bytes
- Repository stars
- 22
- License
- MIT
用于构建或审查 Canvas 2D、Three.js/WebGL、React Three Fiber、GLSL shader、ShaderToy 到 WebGL 适配、2D/3D 可视化、游戏渲染、动画循环、GPU 资源清理或渲染性能。不要用于标准 DOM UI、已有图表库覆盖的图表或非图形类性能工作;中文触发词包括 Canvas、Three.js、WebGL、GLSL、Shader、3D、数据可视化、游戏。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file 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 版摘要;交互式图形要有键盘兜底。
## 核心模式
```ts
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);
```
```ts
let animationId = 0;
function animate() {
animationId = requestAnimationFrame(animate);
renderer.render(scene, camera);
}
return () => {
cancelAnimationFrame(animationId);
geometry.dispose();
material.dispose();
renderer.dispose();
};
```
## 详细参考
…Read the whole file at its exact version.
How to install
mdr add bovinphang/frontend-craft/fec-canvas-threejs@sha256:c3e327f44b8b4490The line at the top of this page pins the label git:20260611.9d7f5e4, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_fyrklmeuqxk7ivuq)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jun 11, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3285 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bovinphang/frontend-craft · 22 stars · license MIT · pushed 2026-09-26 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_fyrklmeuqxk7ivuq GET https://markdownregistry.com/api/v1/resolve?ref=bovinphang/frontend-craft/fec-canvas-threejs GET https://markdownregistry.com/api/v1/blob/c3e327f44b8b4490f68a98e50f8834416e415d3ec10ff809138d9f7a15682e5a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from bovinphang/frontend-craft
Every file in bovinphang/frontend-craft