glass-shard-title
Glass shards fly in through fog and tile themselves into the headline. HyperFrames block, 1920×1080, 12.16s, 19 variables.
1How It Works & Mechanism
Output shot: Glass panels cut via Voronoi fly in and rotate from the depth, assemble into the headline's silhouette, and then fly past the camera; tileCount can degenerate to 1, turning into a single sheet of glass serving as the headline surface.
Voronoi-cut glass panes fly in from depth, rotating, and land as a tiled silhouette of the headline, then fly out past the camera. … Tile count 1 gives a single pane.
Coverage is guaranteed algorithmically: Each shard is the result of Sutherland–Hodgman clipping between a "jittered blob" and its "Voronoi cell", ensuring shards always fully cover the glyph without exposing gaps.
Each shard is a Sutherland–Hodgman clip of a jittered blob against its Voronoi cell, so the pieces always cover the type.
Per-shard fog applied to glass and matcap surfaces; Z-axis flight is decoupled from easing, making the depth traversal of shards visually legible (rather than snapping into place instantly).
Glass and matcap surfaces get per-fragment fog; the z-flight is decoupled from the ease so shards visibly traverse it.
Refactoring level: The composition is only 16 KB; heavy logic resides in a 549 KB inlined bundle at assets/glass-main.js (three 0.181.2 + d3-delaunay + GLSL).
Bundled code is inlined into the composition (assets/glass-main.js); rebuild with esbuild and re-inline after editing the .mjs source.
The rebuild pipeline is a small script: Because the source uses top-level await (for HDR, matcap, and font loading) while HF sub-compositions require classic IIFEs, it hoists imports, wraps the body in an async IIFE, and delegates bundling to npx esbuild.
The source uses top-level await (HDR + matcap + font loads), which esbuild cannot emit in the classic-IIFE format that HyperFrames sub-compositions require, so the body is wrapped in an async IIFE with the imports hoisted before bundling.
Listeners and timelines are singleton-managed: Re-entry stacks hf-seek listeners and stale paused timelines; the script explicitly removes old listeners, kills old timelines, and cleans up on pagehide (excluding bfcache).
Exactly one listener and one live timeline per document. A second evaluation of this script would otherwise stack another hf-seek listener and leave the previous paused timeline registered, so every seek would drive N timelines and repaint N times.
Determinism: Comments explicitly state no rAF, no numerical integrators, and no Math.random(); shard layout is seeded and constructed only after font loading completes (cell selection requires sampling the rasterized text).
No rAF, no integrators, no Math.random(). Shard layout is seeded and built after fonts load (cell selection samples the rasterised text).
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | HyperFrames 官方 CLI(add / render) |
| network | jsDelivr CDN:GSAP 3.14.2(产物期脚本) |
| network | jsDelivr CDN:d3-delaunay 6.0.4(Voronoi 计算) |
| network | 装机期资产:matcap 贴图(官方 CDN,安装时拉取) |
| package | 构建依赖(仅重建时需要):npx esbuild + three(需 0.185.1 起才带 HDRLoader) |
4Recommended Governance & Evidence
- scripts/: Execute local script or command: assets/glass-main.js (bundled artifact executed within composition: Voronoi/clipping/glass material and timeline driver)
- 网络端点: Declare external network access: cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js (artifact runtime: executed in browser)
- 本地工作目录: File I/O and artifact output: Runtime (composition): no disk writes; glass meshes and textures reside entirely in memory.
5Second-Pass Verification
- [ok] 变量数与声明一致性(frontmatter 自称 19 variables) — 脚本实测:SKILL.md 变量表 19 行、html data-composition-variables 解析出 19 项、frontmatter 写 19 —— 一致。
- [discrepancy] 「可编辑 .mjs 源码」在安装后的可达性 — SKILL.md 的 Files 列表含 assets/glass-main.mjs 并指示「改完 .mjs 后重建并重新内联」,但 registry-item.json 的分发清单只列 glass-main.js:安装进项目后不会有那份可编辑源码(本仓库目录里有)。重建前须自行保留源码。
- [ok] 装机期资产声称 — registry-item.json 中 matcap-1.png 带 static.heygen.ai 的 url,盘上确实缺失,与 SKILL.md 括注 fetched from the CDN at install 一致。
- [ok] 重入/释放处理 — html 中确有 removeEventListener(hf-seek)、旧时间线 kill、pagehide + persisted 分支;与注释所述单例纪律相符。
- [ok] 确定性声称 — html 注释写 No rAF, no integrators, no Math.random();全文 grep Math.random / Date.now / requestAnimationFrame 零命中。
- [ok] 重建脚本的真实行为 — build-bundle.mjs 逐字命中:读 glass-main.mjs → 提出 import → 包 async IIFE 写临时文件 → execFileSync("npx", ["esbuild", …, "--format=iife", "--minify"]) → finally unlinkSync。
6Verdict & Scenarios
f39a3f1b95ae6b82…