canopy-part-title
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCanopy Part Title
树冠部分标题
A dense canopy of textured leaves sweeps across the frame with shallow depth of field, then parts to uncover the first headline; a second, depth-lifted batch carries the second headline past the camera. A handful of leaves stay behind on the type and keep a light breeze. Font, weight, size, letter spacing, leaf counts, sweep speed and the retained-leaf breeze are variables.
Composition id: . Duration 12 s at 30 fps, 1920×1080.
canopy-part-title一片密集的、有纹理的树叶树冠以浅景深扫过画面,然后分开,露出第一个标题;第二批树叶被提升深度,将第二个标题带过镜头。少量树叶留在文字上,保持一阵微风。字体、字重、字号、字间距、树叶数量、扫动速度和保留树叶的微风都是变量。
组合 ID:。时长 12 秒,30 fps,1920×1080。
canopy-part-titleFiles
文件
- (57 KB)
canopy-part-title.html - (64 KB)
assets/leaf-surface-color.webp - (136 KB)
assets/leaf-surface-normal.webp
- (57 KB)
canopy-part-title.html - (64 KB)
assets/leaf-surface-color.webp - (136 KB)
assets/leaf-surface-normal.webp
Install
安装
Install with ; by default the files above land under . Then mount the block from the host :
npx hyperframes add canopy-part-titlecompositions/canopy-part-title/index.htmlhtml
<div
data-composition-id="canopy-part-title"
data-composition-src="compositions/canopy-part-title/canopy-part-title.html"
data-start="0"
data-duration="12"
data-track-index="1"
data-width="1920"
data-height="1080"
></div>Render with custom values by targeting the composition file directly:
sh
npx --yes hyperframes@0.8.12 render 'compositions/canopy-part-title/canopy-part-title.html' --variables '{"headline1":"Understory","headline2":"Move slowly"}'使用 安装;默认情况下,上述文件将位于 下。然后从宿主 中挂载该块:
npx hyperframes add canopy-part-titlecompositions/canopy-part-title/index.htmlhtml
<div
data-composition-id="canopy-part-title"
data-composition-src="compositions/canopy-part-title/canopy-part-title.html"
data-start="0"
data-duration="12"
data-track-index="1"
data-width="1920"
data-height="1080"
></div>通过直接指定组合文件,使用自定义值渲染:
sh
npx --yes hyperframes@0.8.12 render 'compositions/canopy-part-title/canopy-part-title.html' --variables '{"headline1":"Understory","headline2":"Move slowly"}'Variables
变量
Read at runtime via ; declared on the composition root as (single-quoted attribute, plain JSON).
window.__hyperframes.getVariables()data-composition-variables| id | type | default | label / range |
|---|---|---|---|
| string | | Headline 1 |
| string | | Headline 2 |
| string | | Headline font |
| number | | Font weight 100–900 step 100 |
| number | | Font size (1 = auto-fit) 0.3–2 step 0.01 |
| number | | Letter spacing (em) -0.2–1 step 0.01 |
| color | | Background |
| number | | Leaves per sweep 40–320 step 1 |
| number | | Leaves left behind 0–20 step 1 |
| number | | Sweep speed 0.3–3 step 0.05 |
| number | | Retained leaf breeze 0–2 step 0.05 |
在运行时通过 读取;在组合根元素上声明为 (单引号属性,纯 JSON)。
window.__hyperframes.getVariables()data-composition-variables| id | type | default | label / range |
|---|---|---|---|
| string | | 标题1 |
| string | | 标题2 |
| string | | 标题字体 |
| number | | 字重 100–900 步长100 |
| number | | 字号 (1 = auto-fit) 0.3–2 步长0.01 |
| number | | 字间距 (em) -0.2–1 步长0.01 |
| color | | 背景 |
| number | | 每次扫过的树叶数量 40–320 步长1 |
| number | | 留下的树叶数量 0–20 步长1 |
| number | | 扫动速度 0.3–3 步长0.05 |
| number | | 保留树叶的微风 0–2 步长0.05 |
Runtime contract
运行时约定
- One paused GSAP timeline registered as .
window.__timelines["canopy-part-title"] - Re-syncs on the CustomEvent; every frame is a closed-form function of time (seeded PRNG only, no rAF loops, no Date.now).
hf-seek - Renderer: three.js 0.170.0, GSAP 3.14.2, Canvas 2D, Post-processing, Seeded PRNG, Shadow maps. Budget roughly 350 MB per live instance; run one at a time.
- External runtime dependencies: ,
https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js,https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js,https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/postprocessing/EffectComposer.js,https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/postprocessing/RenderPass.js.https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/postprocessing/BokehPass.js - Web fonts from Google Fonts: Gelasio.
- 一个暂停的 GSAP 时间线注册为 。
window.__timelines["canopy-part-title"] - 在 CustomEvent 上重新同步;每一帧都是时间的闭合形式函数(仅使用带种子的 PRNG,没有 rAF 循环,没有 Date.now)。
hf-seek - 渲染器:three.js 0.170.0、GSAP 3.14.2、Canvas 2D、后处理、带种子的 PRNG、阴影贴图。每个实时实例大约需要 350 MB 内存;一次运行一个。
- 外部运行时依赖:、
https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js、https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js、https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/postprocessing/EffectComposer.js、https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/postprocessing/RenderPass.js。https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/postprocessing/BokehPass.js - 来自 Google Fonts 的 Web 字体:Gelasio。
Editing rules (from the source project)
编辑规则(来自源项目)
- Keep a single-quoted attribute with plain
data-composition-variablesJSON. Never save it through Studio's Design panel." - Do not put in static markup; create it at runtime.
<canvas> - Keep every visual state a function of t; seek-safety is what makes the block renderable.
- 保持 为单引号属性,包含纯
data-composition-variablesJSON。切勿通过 Studio 的 Design 面板保存它。\" - 不要在静态标记中放置 ;在运行时创建它。
<canvas> - 保持每个视觉状态都是 t 的函数;seek 安全性是该块可渲染的关键。