orbit-card
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrbit Card
Orbit Card
One centred feature card with a circular cut-out framing a dot sphere. The card enters from the right (0.25–1.80 s), holds with a subtle bob and depth drift, orbits a full turn around the sphere's centre (smoothstep between 4.97 and 5.97 s), and exits left (7.35–8.55 s). The camera path and card F-curves are exported from the approved Blender rig at 30 fps and interpolated; the sphere keeps its own translation and a constant spin. Title, description, accent and the orbit angle are variables; 180° and 720° work without touching keys.
Composition id: . Duration 10 s at 30 fps, 1920×1080.
orbit-card一张居中功能卡片,带有一个圆形切口,框住一个点球体。卡片从右侧进入(0.25–1.80秒),保持轻微上下浮动和深度漂移,围绕球体中心公转一整圈(在4.97–5.97秒之间平滑过渡),然后从左侧退出(7.35–8.55秒)。相机路径和卡片F曲线从已批准的Blender rig中以30fps导出并插值;球体保持自身平移和恒定旋转。标题、描述、强调色和轨道角度均为变量;180°和720°无需触碰关键帧即可工作。
Composition id: 。时长10秒,30fps,1920×1080。
orbit-cardFiles
文件
- (3 KB)
orbit-card.html - (4 KB)
assets/Archivo-LICENSE.txt - (1 KB)
assets/Three-LICENSE.txt - (108 KB)
assets/archivo-regular.ttf - (109 KB)
assets/archivo-semibold.ttf - (128 KB)
assets/gsap-3.14.2.min.js - (1 KB)
assets/GSAP-NOTICE.txt - (59 KB)
assets/orbit-motion.js - (8 KB)
assets/orbit-scene.js - (554 KB)
assets/three.core.min.js - (468 KB)
assets/three.module.min.js
- (3 KB)
orbit-card.html - (4 KB)
assets/Archivo-LICENSE.txt - (1 KB)
assets/Three-LICENSE.txt - (108 KB)
assets/archivo-regular.ttf - (109 KB)
assets/archivo-semibold.ttf - (128 KB)
assets/gsap-3.14.2.min.js - (1 KB)
assets/GSAP-NOTICE.txt - (59 KB)
assets/orbit-motion.js - (8 KB)
assets/orbit-scene.js - (554 KB)
assets/three.core.min.js - (468 KB)
assets/three.module.min.js
Install
安装
Install with ; by default the files above land under . Then mount the block from the host :
npx hyperframes add orbit-cardcompositions/orbit-card/index.htmlhtml
<div
data-composition-id="orbit-card"
data-composition-src="compositions/orbit-card/orbit-card.html"
data-start="0"
data-duration="10"
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/orbit-card/orbit-card.html' --variables '{"feature1Title":"Always in sync","feature1Desc":"Changes reach every screen the moment they happen."}'使用 安装;默认情况下,上述文件会落在 目录下。然后从宿主的 中挂载该块:
npx hyperframes add orbit-cardcompositions/orbit-card/index.htmlhtml
<div
data-composition-id="orbit-card"
data-composition-src="compositions/orbit-card/orbit-card.html"
data-start="0"
data-duration="10"
data-track-index="1"
data-width="1920"
data-height="1080"
></div>通过直接指定 composition 文件,使用自定义值渲染:
sh
npx --yes hyperframes@0.8.12 render 'compositions/orbit-card/orbit-card.html' --variables '{"feature1Title":"Always in sync","feature1Desc":"Changes reach every screen the moment they happen."}'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 | | Card title max 28 chars |
| string | | Card description max 110 chars |
| color | | Card accent |
| number | | Card orbit degrees -36000–36000 step 1 |
在运行时通过 读取;在 composition 根元素上以 属性声明(单引号属性,纯JSON)。
window.__hyperframes.getVariables()data-composition-variables| id | type | default | 标签 / 范围 |
|---|---|---|---|
| string | | 卡片标题最多28个字符 |
| string | | 卡片描述最多110个字符 |
| color | | 卡片强调色 |
| number | | 卡片轨道角度 -36000–36000 步长 1 |
Runtime contract
运行时契约
- One paused GSAP timeline registered as .
window.__timelines["orbit-card"] - 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: GSAP.
- External runtime dependencies: none (served locally).
- Local fonts: assets/archivo-regular.ttf, assets/archivo-semibold.ttf.
- 注册为 的单个暂停GSAP时间轴。
window.__timelines["orbit-card"] - 在 自定义事件上重新同步;每一帧都是时间的闭式函数(仅使用种子PRNG,无rAF循环,无Date.now)。
hf-seek - 渲染器:GSAP。
- 外部运行时依赖:无(本地提供)。
- 本地字体:assets/archivo-regular.ttf, assets/archivo-semibold.ttf。
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的设计面板保存它。" - 不要在静态标记中放置 ;在运行时创建它。
<canvas> - 保持每个视觉状态为t的函数;seek安全性是使该块可渲染的关键。