线框传送门标题
挤出的线框字母由捆绑的 Geist 字体通过 TTF 加载器和多边形偏移构建,并通过一个爆裂传送门揭示,其混乱程度是一个变量。第二阶段将字母切换为替换短语,支持整词换行和自动字号调整,以可调节的缓动曲线和最终抖动效果错落呈现,并带有可选的深度雾效。
合成 ID: wireframe-portal-title。时长 8 秒,30 fps,1920×1080。
文件
wireframe-portal-title.html(63 KB)assets/fonts/Geist-Bold.ttf(65 KB)assets/fonts/Geist-Regular.ttf(65 KB)assets/fonts/Geist-SemiBold.ttf(65 KB)assets/fonts/Geist-OFL.txt(4 KB)
安装
使用 npx hyperframes add wireframe-portal-title 安装;默认情况下,上述文件会放置到 compositions/wireframe-portal-title/ 目录下。然后在宿主 index.html 中挂载区块:
<div
data-composition-id="wireframe-portal-title"
data-composition-src="compositions/wireframe-portal-title/wireframe-portal-title.html"
data-start="0"
data-duration="8"
data-track-index="1"
data-width="1920"
data-height="1080"
></div>
通过直接指定合成文件,使用自定义值进行渲染:
npx --yes [email protected] render 'compositions/wireframe-portal-title/wireframe-portal-title.html' --variables '{"title":"BREAKTHROUGH","replacementPhrase":"Lets do this sir!"}'
变量
运行时通过 window.__hyperframes.getVariables() 读取;在合成根元素上声明为 data-composition-variables(单引号属性,纯 JSON)。
| ID | 类型 | 默认值 | 标签/范围 |
|---|---|---|---|
title | string | "BREAKTHROUGH" | 标题最多 18 个字符 |
replacementPhrase | string | "Lets do this sir!" | 3D 替换短语(自动布局) |
phraseDuration | number | 1.85 | 短语过渡持续时间(秒)0.65–2.9 步长 0.05 |
phraseEasing | number | 8 | 过渡缓动(1 柔和 – 8 弹动)1–8 步长 0.25 |
settleGlitch | number | 0.2 | 字母抖动强度 0–4 步长 0.05 |
depthFog | boolean | true | 深度雾效(早期淡出始终开启) |
subtitle | string | "HYPERFRAMES PORTAL TITLE" | 副标题最多 48 个字符 |
accent | color | "#F5C518" | 强调色 |
burstChaos | number | 1 | 爆裂混乱度 (0-2) 0–2 步长 0.01 |
运行时约定
- 一个暂停的 GSAP 时间线注册为
window.__timelines["wireframe-portal-title"]。 - 在
hf-seek自定义事件上重新同步;每一帧都是时间的闭式函数(仅使用种子 PRNG,无 rAF 循环,无 Date.now)。 - 渲染器:three.js 0.181.2,GSAP 3.14.2,Canvas 2D,GLSL 着色器,后处理,种子 PRNG,Clipper。每个活跃实例预算约为 350 MB;建议一次仅运行一个。
- 外部运行时依赖:
https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js,https://cdn.jsdelivr.net/npm/[email protected]/clipper.js,https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js,https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/。 - 本地字体:assets/fonts/Geist-Regular.ttf,assets/fonts/Geist-SemiBold.ttf,assets/fonts/Geist-Bold.ttf。
编辑规则(来自原项目)
- 保持
data-composition-variables为单引号属性,内部使用纯"JSON。切勿通过 Studio 的设计面板保存它。 - 不要在静态标记中放置
<canvas>;在运行时创建。 - 保持每个视觉状态为 t 的函数;seek 安全性是使区块可渲染的关键。