webgl-voronoi-cells
它能做什么
这段代码利用先进的图形技术创建了一个可交互的视觉动画。它会显示不断移动并变换颜色的细胞状区域,你可以通过移动鼠标与它们互动。
适用场景
- ✓为网站制作一个有趣的动态背景。
- ✓在项目中展示独特的视觉效果。
- ✓为网页增添动感且吸睛的元素。
技能链接
https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-voronoi-cells/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我创建一个可交互的背景,上面有移动的细胞状图案。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用一种叫 WebGL2 的技术,直接在你的浏览器中绘制图形。这些细胞区域是根据移动的点生成的,当你用鼠标互动时,它们的颜色和边界线也会随之变化。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Voronoi Cells
Produce a single self-contained index.html — A self-contained WebGL2 hero: a living Voronoi network with drifting feature points, palette-keyed cells and glowing boundaries; move the cursor to push the cells.
Why this is a powered artifact
OpenDesign detects getContext('webgl2') / heavy WebGL and renders this file in powered preview (a cross-origin-isolated iframe). The full GPU + scroll pipeline runs; no opaque-sandbox workarounds are needed.
Resource map
webgl-voronoi-cells/
├── SKILL.md ← you're reading this
├── example.html ← the complete, working artifact (READ FIRST)
└── (assets, if any)
Credits / attribution
- Original, self-contained (no third-party assets).
Keep any bundled LICENSE and on-screen credit intact. Replace imagery only with license-clean assets (original / AI, Lummi.ai, Unsplash/Pexels — never scraped imagery).
常见问题
什么是“Voronoi 细胞”(沃罗诺伊图)?
它们是由一组点划分出来的区域。每个区域包含的,都是离某个中心点比离其他中心点更近的所有位置。
使用它需要安装什么吗?
不需要。这段代码是“自包含”的,也就是说它自带所需的一切,直接在浏览器中就能运行。
我可以更换颜色吗?
可以。代码允许你定义一组颜色方案(调色板),细胞会根据这个调色板分配颜色。
详情
作者的原始描述
A self-contained WebGL2 hero: a living Voronoi network with drifting feature points, palette-keyed cells and glowing boundaries; move the cursor to push the cells.
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #1064
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …