mesh-avatar-studio
Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证生成变形玻璃斑块并通过一个 HTML 标签嵌入。使用 Three.js、自定义 GLSL 着色器和 simplex 噪声,打包为网页组件。
AI 翻译
Generate morphing glass blobs and embed them with one HTML tag. Three.js, custom GLSL shaders and simplex noise, packaged as a web component.
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
A morphing glass blob you can drop into any web page as a single HTML tag, plus a playground for tuning it.
The blob is a custom element built on Three.js. The sphere is deformed in a vertex shader with simplex noise, and its normals are recomputed so reflections and refraction follow the shape.
• Shape the blob with sliders, presets and a random seed
• Change the glass: frost, thickness, dispersion and tint
• Put it over an image, or on a transparent background
• Copy the embed code, copy a link that reproduces your settings, or download a PNG查看完整 README ↗A morphing glass blob you can drop into any web page as a single HTML tag, plus a playground for tuning it.
The blob is a <glass-blob> custom element built on Three.js. The sphere is deformed in a vertex shader with simplex noise, and its normals are recomputed so reflections and refraction follow the shape.
The playground (index.html) lets you:
Load the script once, then use the tag wherever you want a blob. Give it a height (it is 400px tall and full width by default).
<script type="module" src="https://jbryn.github.io/glass-blob-generator/glass-blob.js"></script>
<glass-blob
image="https://example.com/photo.jpg"
strength="0.5"
color="#ffb38a"
style="height: 480px"
></glass-blob>
| Attribute | Default | What it does |
|---|---|---|
image | none | Backdrop image the glass refracts. Omit for a transparent background |
strength | 0.35 | How far the surface is pushed in and out |
frequency | 0.55 | Amount of detail: low is a few big lobes, high is lumpy |
speed | 0.15 | Animation speed, 0 to freeze |
seed | 0 | Picks a different shape |
size | 1 | Scale of the blob inside the element |
roughness | 0 | Frosted glass |
thickness | 0.7 | How strongly the backdrop is refracted |
dispersion | 0 | Chromatic aberration at the edges |
color | #ffffff | Tint |
Things to know:
image. Without one the blob shows reflections and tint over whatever is behind the element, and thickness and dispersion have no effect.image must be served with CORS headers if it lives on another domain.element.toBlob() returns a promise for a PNG of the current frame.# Install dependencies
npm install
# Run the playground locally
npm run dev
# Build for production (output in dist/)
npm run build
# Preview the production build
npm run preview
The build produces the playground and a standalone dist/glass-blob.js. The embed code shown in the playground points at glass-blob.js next to the page, so it is only valid for a built and deployed copy, not for npm run dev.
Pushing to master deploys the build to GitHub Pages through .github/workflows/deploy.yml.