webgl-holographic-foil
它能做什么
这段代码在网页上做出一种全息视觉效果。它模拟被揉皱的箔纸的光泽,会随着你移动鼠标而变换颜色。
适用场景
- ✓给网站做一个引人注目的背景。
- ✓展示网页上的高级视觉效果。
- ✓为项目增添一点艺术感和现代感。
技能链接
https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-holographic-foil/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为我的网站创建一个全息效果。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用一种叫 WebGL2 的技术,直接在浏览器中绘制这个效果。移动光标会改变观察角度,从而让颜色发生变化,类似全息图的效果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Holographic Foil
Produce a single self-contained index.html — A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.
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-holographic-foil/
├── 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).
常见问题
使用前需要安装什么吗?
不需要,这段代码是独立的,直接在浏览器中就能运行。
我可以更改颜色吗?
原文没有说明如何更改颜色,但主要效果是颜色会随观察角度变化。
它能在所有浏览器上运行吗?
它可以在支持 WebGL2 的浏览器上运行,大多数现代浏览器都支持。
详情
作者的原始描述
A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #1056
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …