軌道卡片
一張置中的特徵卡片,中央有圓形鏤空,框架一個點狀球體。卡片從右側入場(0.25–1.80 秒),停留時帶有微弱的擺動與深度漂移,繞球體中心完成一整圈軌道(在 4.97 到 5.97 秒之間使用平滑步進),然後從左側離場(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 | 字串 | "Always in sync" | 卡片標題最多 28 個字元 |
feature1Desc | 字串 | "Changes reach every screen the moment they happen." | 卡片描述最多 110 個字元 |
feature1Accent | 顏色 | "#4cc9ff" | 卡片強調色 |
cardOrbitDegrees | 數字 | 360 | 卡片軌道度數 -36000–36000 步進 1 |
執行時期契約
- 一條已暫停的 GSAP 時間軸,註冊為
window.__timelines["orbit-card"]。 - 在
hf-seek自訂事件觸發時重新同步;每個影格皆是時間的閉合函數(僅使用種子偽亂數,無 rAF 迴圈,無 Date.now)。 - 渲染器:GSAP。
- 外部執行時期依賴:無(本地提供)。
- 本機字型:assets/archivo-regular.ttf、assets/archivo-semibold.ttf。
編輯規則(來自原始專案)
- 保持
data-composition-variables為單引號屬性,內含純"JSON。切勿透過 Studio 的設計面板儲存。 - 不要在靜態標記中放置
<canvas>;應在執行時期建立。 - 保持所有視覺狀態為 t 的函數;尋軌安全性是讓區塊可渲染的關鍵。