1仕組みと動作原理
出力カット:中央の機能カード(ドット球体を囲む円形くり抜き付き)が右から登場(0.25–1.80秒)→ わずかな上下浮遊と深度ドリフトを伴う静止フェーズ → 球心周りを1周公転(4.97–5.97秒、smoothstep使用)→ 左へ退場(7.35–8.55秒)。
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).
モーションはその場で設計されたものではなく、承認済みのBlenderリグからエクスポートされ、ブロック内で補間されます。カメラパスとカードのF-curveは30fpsの定数テーブルとしてベイクされており、ソースファイルの出所もデータ内に記載されています。
// Approved Blender motion, frame 1 = 0 seconds; generated from the existing saved-rig export. … fps: 30, … orbitFrames: [150, 180], … source: "orbit-card-motion-rig.blend",
そのため変数は4つ(タイトル、説明、アクセントカラー、公転角度)のみであり、公転角度はキーフレームを変更することなく180°や720°に設定可能です。
Title, description, accent and the orbit angle are variables; 180° and 720° work without touching keys.
構造は3層に分かれています:composition(109行)はマウントとタイムラインのみを担当、シーンは assets/orbit-scene.js(WebGLRendererとジオメトリ)、モーション定数は assets/orbit-motion.js(59 KB)に格納され、インポートされたモジュールからは本compositionの__hyperframesが参照できないため、モジュールは引数として変数を受け取ります。
// Built per call from the variables the mounting module passes in: an imported // module only sees the page's __hyperframes, not its composition's.
明示的な座標系変換を実施:Blender X/Y/Z → Three X/Z/−Y、かつ元のCSS 100ピクセル=1リグ単位とし、2Dタイポグラフィと3Dシーンの位置合わせを保証します。
// Blender X/Y/Z -> Three X/Z/-Y. 100 original CSS pixels = one rig unit.
入力の正規化:公転角度は有限数チェック、アクセントカラーは6桁hex正規表現検証と不正時のデフォルトフォールバック、タイトル/説明はStringフォールバックを実施します。
const number = (v, fallback) => (Number.isFinite(Number(v)) ? Number(v) : fallback); … const accent = /^#[0-9a-f]{6}$/i.test(V.feature1Accent) ? V.feature1Accent : "#4cc9ff";
seekは[0,10]にクランプされ、単体プレビューは?play(および?loop)クエリパラメータでタイムラインを駆動します。
timeline.totalTime(Math.max(0, Math.min(10, event.detail.time)), true); … if (query.has("play")) { timeline.repeat(query.has("loop") ? 999 : 0);
完全ローカル:threeとgsapはバンドル同梱のコピーであり、フォントArchivoも@font-faceでローカルのttf(regular/semibold、OFL)を参照し、ブロックディレクトリ内にhttp(s)参照は一切ありません。
font-family: Archivo; font-weight: 400; src: url("assets/archivo-regular.ttf");
2コア機能
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| cli | HyperFrames 官方 CLI(add / render) |
| package | GSAP 3.14.2(随块本地副本) |
| package | three.js(随块本地副本)与场景模块 |
| package | Archivo 字体(regular/semibold,OFL) |
4推奨統制措置と判定根拠
- scripts/: ローカルスクリプトまたはコマンドの実行: orbit-card.html(ブラウザ/レンダラー側で実行:sceneのマウント、一時停止タイムラインの登録、hf-seekによる再同期、?playプレビュー)
5二重目の独立検証
- [ok] 变量数与声明一致性(frontmatter 自称 4 variables) — 脚本实测:SKILL.md 变量表 4 行、html data-composition-variables 解析出 4 项、frontmatter 写 4 —— 一致,为本批最小变量面。
- [ok] 「approved Blender motion」声称的真实性 — assets/orbit-motion.js 首行注释与字段(fps: 30、frameStart: 1、orbitFrames: [150,180]、source: "orbit-card-motion-rig.blend")逐字命中;运动确为烘焙数据而非现场函数。
- [ok] 零外链声称 — 对 orbit-card.html / orbit-scene.js / orbit-motion.js 做 http(s):// grep:零命中;脚本与字体全为 ./assets/ 相对路径。
- [ok] registry-item 文件清单 vs 盘上文件 — 声明 12 个文件(含两份许可与两枚字体)全部存在于盘上,无远端 url 兜底。
- [ok] 无随机/时钟依赖 — 本目录 grep Math.random / Date.now / requestAnimationFrame:零命中;运动全部来自常量表插值。
- [ok] 时长一致性 — registry-item duration 10、html data-duration 10、MOTION.duration 10、SKILL.md 标题行 10s —— 四处一致。
6結論
affb86a2ddee4335…