Communitygithub.com

VYBE シネマティック 3D

HyperFrames 動画向けの決定論的な Three.js / WebGL — 3D シーン、パーティクルシステム、プロシージャルジオメトリ、プロダクトターンテーブル、科学モデル(分子、惑星、ブラックホール)、ライティングリグ、カメラパスとカットを、HyperFrames の時間からフレーム単位で正確にレンダリングします。VYBE ストーリーボードが 3D、奥行き、パーティクル、宇宙、回転する製品、データ彫刻を要求する場合、または Three.js レイヤーが黒く表示されたり、ちらついたり、レンダリング間で異なる場合に使用します。

VYBE シネマティック 3D とは?

VYBE シネマティック 3D は、HyperFrames ビデオ制作において、決定論的でフレーム精度の高い 3D レンダリングを実現するエージェントスキルです。このスキルは Three.js ライブラリ(バージョン0.181.2固定)を使用し、各フレームを時間の純粋関数としてレンダリングします。開発者は Three.js のシーン、カメラ、レンダラーを同期的に構築し、`hf-seek` イベントを介して与えられる時間値に応じてレンダリングを行います。`requestAnimationFrame` や `Math.random()` の使用は禁止され、完全な再現性が保証されます。 このスキルは、パーティクルシステム(星、塵)、惑星、ブラックホール、分子、プロダクトターンテーブル、データ彫刻、プロシージャル地形など、様々な 3D コンテンツを構築するための具体的なレシピを提供します。ライティングは最小限のリグ(キーライト、リムライト、ヘミスフィアライト)で構成し、カメラは時間経過に基づいてスムーズな動きを生成します。パフォーマンスへの配慮として、最大100kトライアングル、20kパーティクルに制限し、ポストプロセッシングは避けることが推奨されています。 主な使用ケースは、VYBE ストーリーボードで 3D 要素が必要とされる場合や、Three.js レイヤーが正しくレンダリングされない問題の解決です。HyperFrames の `three` アダプターと統合され、`/hyperframes-animation` の指示に従ってインストールされます。このスキルは Claude Code、Cody、Codex などの AI エージェントで使用可能で、開発者はマークダウンドキュメントに従って実装を進めます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SJbuilds04/VYBE/tree/HEAD/skills/vybe-cinematic-3d

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

VYBE シネマティック 3D は何をしますか?

HyperFrames 動画における 3D は、すべてのフレームが時間の純粋関数である <canvas> です。HyperFrames の three アダプターが時間を公開し、あなたがレンダリングします。権威: インストール後 /hyperframes-animation → adapters/three.md。

契約(譲歩不可)

  • インポート固定: import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/+esm"; (またはアドオン用に同じバージョンをピン留めするインポートマップ)。
  • シーン、カメラ、レンダラー、マテリアルをロード時に同期的に構築し、レンダリングクリティカルなシークの前にモデルやテクスチャをロードします(Three の DefaultLoadingManager は自動的に待機されます。CPU 負荷の高いセットアップには、window.__hf.buildReady["<name>"] = promise を登録してください)。
  • 時間のみからレンダリング: window.addEventListener("hf-seek", e => renderAt(e.detail.time)); renderAt(window.__hfThreeTime || 0);
  • requestAnimationFrame ループ、クロック、デルタ、未シードの Math.random() は禁止。
  • renderer.setPixelRatio(1); renderer.setSize(W, H, false) とし、W/H はルート要素の data-width/height から取得。ルートには data-duration が必要。
  • 全面キャンバスに data-layout-allow-overflow をマーク。

スケルトン

<canvas id="gl" width="1920" height="1080" data-layout-allow-overflow></canvas>
<script type="module">
  import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";
  const root = document.getElementById("vybe-root");
  const W = +root.dataset.width, H = +root.dataset.height, D = +root.dataset.duration;
  const css = getComputedStyle(document.documentElement);
  const tok = (n, f) => css.getPropertyValue(n).trim() || f;           // VYBE トークンを読み取り
  const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById("gl"), antialias: true });
  renderer.setPixelRatio(1); renderer.setSize(W, H, false);
  renderer.setClearColor(new THREE.Color(tok("--vy-bg", "#000")), 1);
  const scene = new THREE.Scene();
  const camera = new THREE.PerspectiveCamera(W > H ? 40 : 60, W / H, 0.1, 200); // 縦長では広いFOV
  // … 構築 …
  function renderAt(t) { const p = t / D; /* カメラ+オブジェクトを t から */ renderer.render(scene, camera); }
  window.addEventListener("hf-seek", (e) => renderAt(e.detail.time));
  renderAt(window.__hfThreeTime || 0);
</script>

3D ワールドがシーンをまたがる場合(フィルム全体にわたるカメラアーク)はキャンバスをホスト(index.html)に配置し、1つのシーン内にのみ存在する場合はシーンファイルに配置します。その上に HTML タイプを重ね、DOM テキストで十分な場合は WebGL でテキストをレンダリングしないでください。

レシピ

  • パーティクル / ダスト / 星: THREE.Points とシード付きPRNGを使用した位置、パレットからの頂点カラー、丸いスプライト(CanvasTexture ラジアルグラデーションを map として使用 — デフォルトのポイントは四角形)、AdditiveBlending、depthWrite: false。すべてのパーティクルをカメラの最も近いzより遠くに保ちます。そうしないと、カメラが通過するときに巨大なスプライトに膨らみます(実際のVYBEの欠陥)。
  • ヒーローオーブ / 惑星: SphereGeometry(r, 96, 64) + MeshStandardMaterial(metalness/roughness)+ エミッシブハロー TorusGeometry リング。時間とともにライトアップします。
  • ブラックホール: 暗い球体 + 降着円盤 = RingGeometry とキャンバスグラデーションテクスチャ、70~80°傾けて回転。レンズリング = カメラに向いた2つ目の薄いトーラス。星のゆがみ = 背景ポイントレイヤーを中心付近で放射状にスケーリング。
  • 分子: 原子位置の球体(多数の場合は InstancedMesh)、それらの間の円柱(quaternion.setFromUnitVectors で向きを設定)。カメラを周回させる。
  • プロダクトターンテーブル: GLTFLoader(インポートマップ)を使用した GLTF、作成されたクリップ用の AnimationMixer.setTime(t)、以下にスタジオライトリグ、ショット全体で20~35°の緩やかな軌道。
  • データ彫刻: データから高さが決まる InstancedMesh ボックス。時間の経過とともに smoothstep で成長します。
  • プロシージャル地形 / 波: PlaneGeometry を JS で t から変形(最大40k頂点のフレームごとに位置を再計算)、または ShaderMaterial で renderAt に設定された uTime ユニフォームを使用。

ライティング

references/lighting.md を読み込んでください。最小限のリグ: キーライト(Point/Directional)、対照的な色相のリム/バックライト、および HemisphereLight フィル — 1つのライトだけのメッシュは暗い側が黒い切り抜きとしてレンダリングされます。ライトの強度を同じ時間関数から固定比率で駆動します。

カメラ

正規化された進行度 p = t / D から位置を導出し、アクトごとにスムーズステップセグメントを使用します(シネマティックテンプレートの renderAt を参照)。カットの場合、const CUT_B = 23 を一度宣言し、それをカメラショットセレクターとオブジェクトの可視性の両方に使用します。直前と直後のフレームを確認してください(snapshot --at 22.9667,23)。

パフォーマンス(ヘッドレス Chrome はソフトウェア GL の場合があります)

  • 最大100kトライアングル、最大20kパーティクル、フレーム履歴を必要とするポストプロセッシングパスはなし。ブルーム: 加法的スプライト/ハローで偽装します。
  • 低RAMマシンでの4Kでの antialias + 巨大なキャンバスを避け、ドラフトレンダリングをテストします。
  • レンダリング環境で WebGL が失敗した場合、キャンバスは黒くなります: QC が黒フレームとして検出します。シーンの 2D キャンバスまたは CSS-3D バージョンにフォールバックします。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

SJbuilds04/vybe-audio-design

Sound design and music direction for VYBE / HyperFrames videos — choosing music by mood and arc, spotting sound effects to picture, voiceover direction and provider choice (HeyGen, ElevenLabs, Kokoro, Gemini), ducking, loudness targets, beat-synced editing and caption sync. Use when planning or fixing the audio of a video, when a video feels silent, cheap, cluttered or out of sync, or when choosing a voice or music provider.

SJbuilds04/vybe-image-to-motion

Animate a still image into video. Analyzes the image, plans the motion, and picks the right technique — programmatic 2.5D (camera moves, depth-map parallax, subject/background layer separation, particles, fog, light) or AI image-to-video (Runway Gen-4.5 / Veo 3.1 / Kling 3.0, Luma Ray 3.2, Gemini Omni Flash) for organic motion like walking, faces, water or hair — then composes the result in HyperFrames with music, SFX and text. Use when someone supplies an image and asks to animate it, bring it

SJbuilds04/vybe-motion-design

Motion design craft for VYBE / HyperFrames videos — animation principles, easing and timing, choreography and staggering, scene transitions, camera movement, and visual effects (blur, glow, masks, grain, light leaks), written as seek-safe GSAP recipes. Use when designing or fixing how things move in a video — entrances, exits, transitions between scenes, camera moves, rhythm, or when motion feels generic, floaty, stiff or repetitive.

SJbuilds04/vybe-typography

Typography for motion — type systems, font pairing with bundled OFL fonts, scale and readability rules for video, kinetic typography techniques, per-letter/word animation, captions design and safe zones, in HyperFrames compositions. Use when choosing fonts, sizing or animating text in a VYBE video, building kinetic type or lyric videos, styling captions, or when text overlaps, clips, is unreadable or looks generic.

関連スキル