軌道卡片
一個居中且帶有圓形鏤空的特徵卡片,框架內展示點狀球體。卡片從右方進入(0.25–1.80 秒),保持輕微搖晃與深度漂移,繞球體中心旋轉一圈(在 4.97 至 5.97 秒之間使用 smoothstep 緩動),然後向左方退出(7.35–8.55 秒)。攝影機路徑與卡片的 F 曲線從經認可的 Blender 骨架以 30 fps 匯出並內插;球體保留自己的平移與恆定轉速。標題、描述、強調色與軌道角度皆為變數;180° 與 720° 無需碰觸關鍵幀即可運作。
合成 ID:orbit-card。時長 10 秒,30 fps,1920×1080。
檔案
orbit-card.html(3 KB)assets/Archivo-LICENSE.txt(4 KB)assets/Three-LICENSE.txt(1 KB)assets/archivo-regular.ttf(108 KB)assets/archivo-semibold.ttf(109 KB)assets/gsap-3.14.2.min.js(128 KB)assets/GSAP-NOTICE.txt(1 KB)assets/orbit-motion.js(59 KB)assets/orbit-scene.js(8 KB)assets/three.core.min.js(554 KB)assets/three.module.min.js(468 KB)
安裝
使用 npx hyperframes add orbit-card 安裝;預設情況下,上述檔案會放置於 compositions/orbit-card/ 目錄下。接著在主機的 index.html 中掛載區塊:
<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>
若要使用自訂值進行渲染,可直接指向合成檔案:
npx --yes [email protected] render 'compositions/orbit-card/orbit-card.html' --variables '{"feature1Title":"Always in sync","feature1Desc":"Changes reach every screen the moment they happen."}'
變數
在執行時期透過 window.__hyperframes.getVariables() 讀取;在合成根元素上宣告為 data-composition-variables(單引號屬性,純 JSON)。
| id | 類型 | 預設值 | 標籤 / 範圍 |
|---|---|---|---|
feature1Title | string | "Always in sync" | 卡片標題最多 28 個字元 |
feature1Desc | string | "Changes reach every screen the moment they happen." | 卡片描述最多 110 個字元 |
feature1Accent | color | "#4cc9ff" | 卡片強調色 |
cardOrbitDegrees | number | 360 | 卡片軌道角度 -36000–36000 步長 1 |
執行時期契約
- 一個暫停的 GSAP 時間軸,註冊為
window.__timelines["orbit-card"]。 - 在
hf-seek自訂事件發生時重新同步;每一幀都是時間的封閉形式函數(僅使用種子 PRNG,無 rAF 迴圈,無 Date.now)。 - 渲染器:GSAP。
- 外部執行時期依賴項:無(本地提供)。
- 本地字型:assets/archivo-regular.ttf、assets/archivo-semibold.ttf。
編輯規則(來自原始專案)
- 保持
data-composition-variables為單引號屬性,內含純"JSON。絕不要透過 Studio 的設計面板儲存它。 - 不要在靜態標記中放置
<canvas>;在執行時期動態建立。 - 保持每個視覺狀態為 t 的函數;seek 安全性是讓區塊可渲染的關鍵。