首页 / 全部技能 / 内容创作 / wireframe-portal-title
内容创作 · heygen-com/hyperframes

wireframe-portal-title

A wireframe portal bursts open, the title comes through, then its letters swap into a second phrase. HyperFrames block, 1920×1080, 8s, 9 variables.

L4 高权限 · 分级授权与审计V1 已固定执行命令联网Dual-pass Audit
Author heygen-comGitHub heygen-com/hyperframes ↗Stars 44283License Apache-2.0(仓库根 LICENSE = Apache License Version 2.0;块内随带第三方许可文本:three.js MIT、GSAP 标准许可、Geist/Archivo/Cormorant Garamond OFL 等)Commit d2f0bc7f34
管控等级描述 skill 的能力与建议配套的管控措施,不代表质量或安全认证,也不表示可用或不可用。是否使用由用户和管理者决定。不同 agent 宿主对权限的约束各不相同,请勿假定宿主一定会提供安全兜底。第三方 skill 版权归原作者,使用风险由使用者自行承担。

1实现原理 · 为什么它能做到

产出镜头:用随包 Geist 字形经 TTF 解析与多边形偏移建出挤出的线框字形,再从「传送门爆开」中揭示(爆开混沌度可调);第二拍把字母换成替代短语。

registry/blocks/wireframe-portal-title/SKILL.md
Extruded wireframe letterforms are built from the bundled Geist face with a TTF loader and polygon offsetting, then revealed through a portal burst whose chaos is a variable. … A second beat swaps the letters into a replacement phrase with whole-word wrapping and auto type size, staggered with a tunable easing curve and settle glitch, with optional depth fog.
这里在做什么:字形不是贴图而是几何(可线框、可挤出、可逐字母变形);同一镜头塞两次信息(主题词 → 行动短语),是同族里唯一的两段式标题块。

双画布分层:立体层(wpt-three)与扭曲层(wpt-warp)都在运行时创建,静态 markup 里不出现 <canvas>。

registry/blocks/wireframe-portal-title/wireframe-portal-title.html
["wpt-three", "wpt-warp"].forEach(function (id) { var canvas = document.createElement("canvas"); canvas.id = id; canvas.width = 1920; canvas.height = 1080;
这里在做什么:分层渲染让线框世界与扭曲/后处理互不干扰,同时满足 Studio 解析器对静态 canvas 的限制。

排版靠离屏 canvas 实测字宽:按 Geist 700 176px 逐字量宽并加 3% 字距,再做整词换行与自适应字号。

registry/blocks/wireframe-portal-title/wireframe-portal-title.html
const measure = document.createElement("canvas").getContext("2d"); measure.font = "700 176px Geist"; const tracking = 176 * 0.03; const advance = (char) => measure.measureText(char).width + tracking;
这里在做什么:换词要「保住每个词」,所以必须真量文字宽度而不是估——这样才能自动换行与缩字号。

字体是本地资产:经宿主提供的 assetUrl("assets/fonts/Geist-Bold.ttf") 取回 ArrayBuffer,再交给 TTFLoader/FontLoader 解析。

registry/blocks/wireframe-portal-title/wireframe-portal-title.html
const ttfBuffer = await fetch(assetUrl("assets/fonts/Geist-Bold.ttf")).then((r) => r.arrayBuffer(), ); const font = new FontLoader().parse(new TTFLoader().parse(ttfBuffer));
这里在做什么:字体走宿主 assetUrl 解析(挂载后路径才正确),不是硬编码相对路径;也解释了字体加载与几何构建的先后。

随机性用两个独立种子替换了原实验的 Math.random:场景一份(20260824)、短语错峰一份(20260831),保证换词与爆开都可复现。

registry/blocks/wireframe-portal-title/wireframe-portal-title.html
// ---------- seeded PRNG (replaces the experiment's Math.random) ---------- … const rand = mulberry32(20260824); const phraseRand = mulberry32(20260831);
这里在做什么:原工程是交互实验,搬进渲染管线时必须把随机改成种子化,否则每帧结果不稳定。

首帧预热有明确理由:t=0 时传送门关闭、什么都不画,若等到播放中第一次真绘制,会把所有 shader 链接塞进播放期间。

registry/blocks/wireframe-portal-title/wireframe-portal-title.html
The portal is closed at t=0 and draws nothing, so the first real draw would link every shader mid-playback. Draw across the timeline and flush the GPU
这里在做什么:解释「为什么要在 ready 前把时间线整条预绘一遍」——避免首帧后卡顿,属逐帧渲染流水线的必要步骤。

确定性契约同族:paused 时间线注册到 window.__timelines["wireframe-portal-title"],hf-seek 重同步,每帧是 t 的闭式函数。

registry/blocks/wireframe-portal-title/SKILL.md
One paused GSAP timeline registered as `window.__timelines["wireframe-portal-title"]`. … Re-syncs on the `hf-seek` CustomEvent; every frame is a closed-form function of time (seeded PRNG only, no rAF loops, no Date.now).
这里在做什么:同批所有块的共性契约,保证逐帧渲染可复现。

2核心能力

01线框传送门 + 标题揭示 + 字母换词(1920×1080、8s、9 变量)
02几何化字形:TTF 解析 + 多边形偏移(Clipper)构建挤出线框字母,配合后处理与 GLSL
03两拍节奏可调:传送门爆开混沌度 0–2、字母落定抖动 0–4、换词时长 0.65–2.9s 与缓动 1–8
04可选的深度雾,并带副标题与强调色(accent 默认 #F5C518)
05替词的排版纪律:整词保留、整词换行、字号自适应(离屏 canvas 实测字宽)
06本地字体(Geist Regular/SemiBold/Bold + OFL 文本)随块分发
07脱离 Studio 也能出片:直接渲染并覆盖标题与替词

3外部依赖

KindDependency / Endpoint
cliHyperFrames 官方 CLI(add / render)
networkjsDelivr CDN:GSAP 3.14.2(产物期脚本)
networkjsDelivr CDN:clipper-lib 6.4.2(多边形偏移,构建线框字形轮廓)
networkjsDelivr CDN:three.js 0.181.2 与 examples/jsm(importmap 解析,含后处理模块)
package本地字体(Geist ×3,OFL)随块分发;其余依赖见上(三个 CDN 脚本)

4管控建议与判定依据

建议配套管控措施
面向 Agent
分级或逐次授权,建议在沙箱运行
面向管理者
审批流程、可回滚、全程审计
判定依据(文件路径与关键语句摘要)
  • scripts/: 执行本地脚本或命令: wireframe-portal-title.html(浏览器/渲染器端执行:解析变量 → 创建两块 canvas → 构建线框字形几何 → 注册 p
  • 网络端点: 声明外部网络访问: cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js(产物期:浏览器执行)
审计说明: 。判级对象=本 block 目录(SKILL.md + composition HTML + 随包 Geist 字体):无凭证/env 读取、无 shell 脚本、无写盘代码、无数据外发。三个外链(jsdelivr 的 gsap、clipper-lib、three + examples/jsm)均属产物期浏览器拉取,按范式附录A第2条不判级,仅列出端点。安装/渲染走官方 CLI 生态。据此取 blue。注意:本块外链最多,离线渲染前需把三个脚本本地化,否则线框字形无法构建。

5第二遍独立确认

  • [ok] 变量数与声明一致性(frontmatter 自称 9 variables) — 脚本实测:SKILL.md 变量表 9 行、html data-composition-variables 解析出 9 项、frontmatter 写 9 —— 一致。
  • [ok] 外链清单与 SKILL.md 声称一致 — html 命中三处 jsdelivr(gsap、clipper-lib、three importmap + addons 前缀),与 SKILL.md 的 External runtime dependencies 逐项对应。
  • [ok] 字体加载路径 — 字体经 assetUrl("assets/fonts/Geist-Bold.ttf") 取回;assets/fonts/ 三枚 ttf 与 OFL 文本都在盘上,registry-item 也全列(6/6 文件存在)。
  • [ok] 种子化声称 — mulberry32 定义与两个常数种子(20260824 / 20260831)逐字命中;全文 grep Math.random / Date.now / requestAnimationFrame 零命中。
  • [ok] 双画布与 Studio 解析器约束 — 静态 markup 中无 <canvas>;两块 canvas 由 forEach 在运行时创建(wpt-three / wpt-warp),与 SKILL.md 编辑纪律第 2 条一致。
  • [ok] 首帧预热的理由是否成立 — html 注释给出可核查的理由(t=0 传送门关闭、不绘制 → 首次真绘制会链接全部 shader),且代码确在注册时间线后按 tl.time() 预绘一遍。

6结论

  • 两段信息一镜到底
  • 字形是几何,可线框可变形
  • 排版可靠
  • 参数少但关键点都在
  • 适合: 需要「科技感线框 + 传送门揭示 + 二段文案」的标题卡(8s),例如发布会主题词 → 行动短语的镜头。
    不适合: 要求零外链离线渲染且不愿本地化三个 CDN 脚本的流水线;标题超过 18 字符、需要长句排印的场合。
    Install Agent-Ready
    ① Verified Mirror 2026-09-28
    Option A · Direct DownloadDownload wireframe-portal-title.tar.gz
    sha256: 7c548c8702b7c0cf…
    Option B · Copy Guide for Agent
    install.json
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit d2f0bc7f34.