three
HyperFramesのhf-seekイベントに連動するThree.jsシーン、WebGLキャンバス、アニメーション、カメラモーション、シェーダー、キャンバス描画などを、決定論的に作成・制御するためのThree.jsとWebGLのアダプターパターンを利用するSkill。
📜 元の英語説明(参考)
Three.js and WebGL adapter patterns for HyperFrames. Use when creating deterministic Three.js scenes, WebGL canvas layers, AnimationMixer timelines, camera motion, shader-driven visuals, or canvas renders that respond to HyperFrames hf-seek events.
🇯🇵 日本人クリエイター向け解説
HyperFramesのhf-seekイベントに連動するThree.jsシーン、WebGLキャンバス、アニメーション、カメラモーション、シェーダー、キャンバス描画などを、決定論的に作成・制御するためのThree.jsとWebGLのアダプターパターンを利用するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o three.zip https://jpskill.com/download/19207.zip && unzip -o three.zip && rm three.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19207.zip -OutFile "$d\three.zip"; Expand-Archive "$d\three.zip" -DestinationPath $d -Force; ri "$d\three.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
three.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
threeフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
HyperFrames 用 Three.js
HyperFrames は、three ランタイムアダプターを介して Three.js をサポートしています。このアダプターは、お客様のシーンを所有しません。HyperFrames の時間を公開し、シークイベントをディスパッチすることで、コンポジションが正確なフレームをレンダリングできるようにします。
契約
- シーン、カメラ、レンダラー、マテリアル、アセットは、可能な限り同期的に作成してください。
- 壁時計の時間ではなく、HyperFrames の時間からレンダリングしてください。
hf-seekイベントをリッスンし、その時間を正確にレンダリングしてください。- モデル、テクスチャ、HDRI は、レンダリングに重要なシークの前にロードしてください。シーク時にフェッチしないでください。
- レンダリングに重要なモーションの真のソースとして、
requestAnimationFrameやrenderer.setAnimationLoopを避けてください。
アダプターは window.__hfThreeTime を設定し、各シークで new CustomEvent("hf-seek", { detail: { time } }) をディスパッチします。
基本パターン
<canvas id="three-layer"></canvas>
<script type="module">
import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.181.2/+esm";
const canvas = document.getElementById("three-layer");
const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true });
// Match these to your composition's frame size.
renderer.setSize(1920, 1080, false);
renderer.setPixelRatio(1);
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(35, 1920 / 1080, 0.1, 100);
camera.position.set(0, 0, 6);
const mesh = new THREE.Mesh(
new THREE.IcosahedronGeometry(1.4, 4),
new THREE.MeshStandardMaterial({ color: 0x64d2ff, roughness: 0.38 }),
);
scene.add(mesh);
scene.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));
function renderAt(time) {
mesh.rotation.y = time * 0.7;
mesh.rotation.x = Math.sin(time * 0.6) * 0.16;
renderer.render(scene, camera);
}
window.addEventListener("hf-seek", (event) => {
renderAt(event.detail.time);
});
renderAt(window.__hfThreeTime || 0);
</script>
#three-layer {
width: 100%;
height: 100%;
display: block;
}
AnimationMixer パターン
GLTF または作成されたクリップアニメーションの場合、ミキサーを直接シークします。
function renderAt(time) {
mixer.setTime(time);
renderer.render(scene, camera);
}
複数のミキサーが存在する場合は、すべてを同じ time からシークしてください。
良い使い方
- 決定論的な 3D オブジェクト、製品のスピン、シードデータを持つパーティクル、シェーダープレート。
timeから派生したカメラの動き。- アセットがローカルにあり、検証が完了する前にロードされる場合の GLTF アニメーションクリップ。
避けるべきこと
- シーンの状態を更新するために
Date.now()、performance.now()、またはクロックデルタを使用すること。 - レンダリングに重要な作業を自由実行アニメーションループ内に残すこと。
- レンダリング時にリモートモデルやテクスチャをロードすること。
- デバイスピクセル比に依存する出力。ビデオレンダリングの場合は、レンダラーのサイズとピクセル比を固定してください。
- 時間から状態を再構築できない限り、前のフレーム履歴に依存するポストプロセスパス。
検証
Three.js コンポジションを編集した後:
npx hyperframes lint
npx hyperframes validate
クレジットと参考文献
- HyperFrames アダプターのソース:
packages/core/src/runtime/adapters/three.ts。 - Three.js
WebGLRendererドキュメント: https://threejs.org/docs/pages/WebGLRenderer.html - Three.js
AnimationMixer.setTime()ドキュメント: https://threejs.org/docs/pages/AnimationMixer.html
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Three.js for HyperFrames
HyperFrames supports Three.js through its three runtime adapter. The adapter does not own your scene. It publishes HyperFrames time and dispatches a seek event so your composition can render the exact frame.
Contract
- Create the scene, camera, renderer, materials, and assets synchronously when possible.
- Render from HyperFrames time, not wall-clock time.
- Listen for the
hf-seekevent and render exactly that time. - Load models, textures, and HDRIs before render-critical seeking. Do not fetch them at seek time.
- Avoid
requestAnimationFrameorrenderer.setAnimationLoopas the source of truth for render-critical motion.
The adapter sets window.__hfThreeTime and dispatches new CustomEvent("hf-seek", { detail: { time } }) on each seek.
Basic Pattern
<canvas id="three-layer"></canvas>
<script type="module">
import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.181.2/+esm";
const canvas = document.getElementById("three-layer");
const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true });
// Match these to your composition's frame size.
renderer.setSize(1920, 1080, false);
renderer.setPixelRatio(1);
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(35, 1920 / 1080, 0.1, 100);
camera.position.set(0, 0, 6);
const mesh = new THREE.Mesh(
new THREE.IcosahedronGeometry(1.4, 4),
new THREE.MeshStandardMaterial({ color: 0x64d2ff, roughness: 0.38 }),
);
scene.add(mesh);
scene.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));
function renderAt(time) {
mesh.rotation.y = time * 0.7;
mesh.rotation.x = Math.sin(time * 0.6) * 0.16;
renderer.render(scene, camera);
}
window.addEventListener("hf-seek", (event) => {
renderAt(event.detail.time);
});
renderAt(window.__hfThreeTime || 0);
</script>
#three-layer {
width: 100%;
height: 100%;
display: block;
}
AnimationMixer Pattern
For GLTF or authored clip animation, seek the mixer directly:
function renderAt(time) {
mixer.setTime(time);
renderer.render(scene, camera);
}
If several mixers exist, seek all of them from the same time.
Good Uses
- Deterministic 3D objects, product spins, particles with seeded data, and shader plates.
- Camera moves derived from
time. - GLTF animation clips when assets are local and loaded before validation completes.
Avoid
- Using
Date.now(),performance.now(), or clock deltas to update scene state. - Leaving render-critical work inside a free-running animation loop.
- Loading remote models or textures at render time.
- Device-pixel-ratio dependent output. Pin renderer size and pixel ratio for video renders.
- Post-processing passes that depend on previous frame history unless you can reconstruct state from time.
Validation
After editing a Three.js composition:
npx hyperframes lint
npx hyperframes validate
Credits And References
- HyperFrames adapter source:
packages/core/src/runtime/adapters/three.ts. - Three.js
WebGLRendererdocs: https://threejs.org/docs/pages/WebGLRenderer.html - Three.js
AnimationMixer.setTime()docs: https://threejs.org/docs/pages/AnimationMixer.html