webgl-caustic-pool
它能做什么
这段代码利用先进的浏览器图形技术,演示水面涟漪的视觉效果。你可以点击水面,制造新的涟漪。
适用场景
- ✓展示美观且动态的视觉效果。
- ✓测试浏览器显示 3D 图形的能力。
- ✓作为简单的网页动画示例。
技能链接
https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-caustic-pool/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在我的浏览器里展示一个水波涟漪效果。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用 WebGL2 技术直接在电脑屏幕上绘图,无需预先制作的图片。涟漪是通过数学计算生成的,用来模拟水的运动。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Caustic Pool
Produce a single self-contained index.html — A self-contained WebGL2 hero: animated water caustics woven from domain-warped ripples; click the water to drop a ripple. No meshes, no textures.
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-caustic-pool/
├── 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).
常见问题
什么是“焦散”?
焦散是光线穿过波动的水面时形成的明暗图案。
使用它需要安装什么吗?
不需要,一切都直接在你的网页浏览器中运行。
我可以更改颜色或速度吗?
这段代码没有直接的自定义选项,但它是一个很好的示例,展示了如何制作这类效果。
详情
作者的原始描述
A self-contained WebGL2 hero: animated water caustics woven from domain-warped ripples; click the water to drop a ripple. No meshes, no textures.
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #1052
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …