跳到正文
Skillpedia
图片与图标101k · #1054

webgl-distortion-grain

它能做什么

这段代码会创建一个竖向图片画廊,当你滚动或移动鼠标时,图片会移动并泛起涟漪。它还添加了胶片颗粒效果,类似老式相机拍出的质感。

适用场景

  • ✓打造现代且富有互动感的网站。
  • ✓动态展示图片作品集。
  • ✓为网页添加特殊效果。

技能链接

https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-distortion-grain/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/nexu-io/open-design/blob/main/plugins/_official/examples/webgl-distortion-grain/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我做一个带涟漪和胶片颗粒效果的图片画廊。”

每周 5 个新技能,1 分钟读完。

工作原理

它使用 WebGL 技术在屏幕上绘制图片,并根据你的滚动让图片平滑地弯曲。特殊代码(simplex noise,单纯形噪声)会在鼠标悬停时生成涟漪。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Distortion & Grain

Produce a single self-contained index.html — A vertical gallery (Three.js) where planes bend with scroll velocity, ripple under the cursor via simplex noise, and carry a film grain.

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-distortion-grain/
├── SKILL.md          ← you're reading this
├── example.html      ← the complete, working artifact (READ FIRST)
└── (assets, if any)

Credits / attribution

  • effect: Jan Kohlbach / Codrops (MIT)
  • imagery: Original (AI-generated)
  • simplex noise: Ashima Arts (MIT)

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).

常见问题

什么是 WebGL?

这是一种让网站直接在浏览器中显示 3D 图形和复杂视觉效果的技术,它会利用你电脑的显卡。

什么是 simplex noise?

它是一种数学算法,可以生成平滑、自然的噪声图案,这里用来制作图片上的涟漪效果。

我可以使用自己的图片吗?

可以,只要图片没有版权问题,或者你已获得使用许可。

详情

作者的原始描述

A vertical gallery (Three.js) where planes bend with scroll velocity, ripple under the cursor via simplex noise, and carry a film grain.

repo: nexu-io/open-design

热度

GitHub 星标
101k
排名
#1054
许可证
Apache-2.0
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能