babylonjs
Babylon.jsのエキスパートとして、WebGL/WebGPU対応の3Dエンジンを活用し、ゲームやVR/ARなどのインタラクティブな3Dウェブアプリケーション開発を支援するSkill。
📜 元の英語説明(参考)
You are an expert in Babylon.js, the powerful open-source 3D engine for web browsers with WebGL and WebGPU support. You help developers build games, product configurators, architectural visualizations, VR/AR experiences, and interactive 3D applications — using Babylon's scene graph, PBR materials, Havok physics, particle systems, GUI, animation, and XR support for production-grade 3D on the web.
🇯🇵 日本人クリエイター向け解説
Babylon.jsのエキスパートとして、WebGL/WebGPU対応の3Dエンジンを活用し、ゲームやVR/ARなどのインタラクティブな3Dウェブアプリケーション開発を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o babylonjs.zip https://jpskill.com/download/14680.zip && unzip -o babylonjs.zip && rm babylonjs.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14680.zip -OutFile "$d\babylonjs.zip"; Expand-Archive "$d\babylonjs.zip" -DestinationPath $d -Force; ri "$d\babylonjs.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
babylonjs.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
babylonjsフォルダができる - 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 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Babylon.js — Web 用プロフェッショナル 3D エンジン
あなたは、WebGL および WebGPU をサポートする、Web ブラウザ向けの強力なオープンソース 3D エンジンである Babylon.js のエキスパートです。Babylon のシーングラフ、PBR マテリアル、Havok 物理演算、パーティクルシステム、GUI、アニメーション、および Web 上のプロダクショングレードの 3D 向けの XR サポートを使用して、開発者がゲーム、製品コンフィギュレーター、建築ビジュアライゼーション、VR/AR エクスペリエンス、およびインタラクティブな 3D アプリケーションを構築するのを支援します。
主要な機能
シーンのセットアップ
// src/main.ts — Babylon.js シーン
import {
Engine, Scene, ArcRotateCamera, HemisphericLight,
Vector3, MeshBuilder, PBRMaterial, Color3,
} from "@babylonjs/core";
import "@babylonjs/loaders"; // GLTF/GLB ローダー
const canvas = document.getElementById("renderCanvas") as HTMLCanvasElement;
const engine = new Engine(canvas, true, {
adaptToDeviceRatio: true,
antialias: true,
});
const scene = new Scene(engine);
scene.clearColor = new Color4(0.1, 0.1, 0.15, 1);
// カメラ (ターゲットを中心に回転)
const camera = new ArcRotateCamera("camera", Math.PI / 4, Math.PI / 3, 10, Vector3.Zero(), scene);
camera.attachControl(canvas, true);
camera.lowerRadiusLimit = 3; // 最小ズーム
camera.upperRadiusLimit = 20; // 最大ズーム
// 照明
const light = new HemisphericLight("light", new Vector3(0, 1, 0), scene);
light.intensity = 0.7;
// PBR マテリアル
const material = new PBRMaterial("pbr", scene);
material.albedoColor = new Color3(0.8, 0.2, 0.3);
material.metallic = 0.3;
material.roughness = 0.4;
// メッシュ
const sphere = MeshBuilder.CreateSphere("sphere", { diameter: 2, segments: 32 }, scene);
sphere.material = material;
// レンダリングループ
engine.runRenderLoop(() => scene.render());
window.addEventListener("resize", () => engine.resize());
3D モデルのロード
import { SceneLoader } from "@babylonjs/core";
import "@babylonjs/loaders/glTF";
// GLTF モデルのロード
const result = await SceneLoader.ImportMeshAsync("", "/models/", "product.glb", scene);
const model = result.meshes[0];
model.scaling = new Vector3(0.5, 0.5, 0.5);
model.position = new Vector3(0, 0, 0);
// 名前で特定のメッシュにアクセス
const body = scene.getMeshByName("Body");
if (body && body.material) {
(body.material as PBRMaterial).albedoColor = new Color3(1, 0, 0); // 赤
}
物理演算 (Havok)
import { HavokPlugin } from "@babylonjs/core";
import HavokPhysics from "@babylonjs/havok";
// Havok 物理演算の初期化
const havok = await HavokPhysics();
const physicsPlugin = new HavokPlugin(true, havok);
scene.enablePhysics(new Vector3(0, -9.81, 0), physicsPlugin);
// メッシュに物理演算を追加
const ground = MeshBuilder.CreateGround("ground", { width: 20, height: 20 }, scene);
new PhysicsAggregate(ground, PhysicsShapeType.BOX, { mass: 0 }, scene); // 静的
const ball = MeshBuilder.CreateSphere("ball", { diameter: 1 }, scene);
ball.position.y = 10;
new PhysicsAggregate(ball, PhysicsShapeType.SPHERE, {
mass: 1,
restitution: 0.7, // 反発係数
}, scene);
GUI (3D の 2D UI)
import { AdvancedDynamicTexture, Button, TextBlock, StackPanel } from "@babylonjs/gui";
// フルスクリーン UI オーバーレイ
const ui = AdvancedDynamicTexture.CreateFullscreenUI("UI");
const panel = new StackPanel();
panel.width = "220px";
panel.horizontalAlignment = 0; // 左
panel.verticalAlignment = 0; // 上
panel.paddingTop = "20px";
panel.paddingLeft = "20px";
ui.addControl(panel);
const button = Button.CreateSimpleButton("btn", "Change Color");
button.width = "200px";
button.height = "40px";
button.color = "white";
button.background = "#6366f1";
button.onPointerClickObservable.add(() => {
material.albedoColor = Color3.Random();
});
panel.addControl(button);
// 3D にアタッチされた UI (メッシュを追跡するラベル)
const label = AdvancedDynamicTexture.CreateForMesh(sphere);
const text = new TextBlock();
text.text = "Product Name";
text.color = "white";
text.fontSize = 24;
label.addControl(text);
WebXR (VR/AR)
// 1 行で VR を有効化
const xr = await scene.createDefaultXRExperienceAsync({
floorMeshes: [ground],
uiOptions: { sessionMode: "immersive-vr" },
});
// AR モード
const xrAR = await scene.createDefaultXRExperienceAsync({
uiOptions: { sessionMode: "immersive-ar" },
});
インストール
npm install @babylonjs/core @babylonjs/loaders @babylonjs/gui
npm install @babylonjs/havok # 物理演算 (オプション)
npm install @babylonjs/materials # 高度なマテリアル (オプション)
ベストプラクティス
- PBR materials — リアルなレンダリングには
PBRMaterialを使用します。metallic/roughness を設定し、反射のために環境テクスチャを追加します。 - Asset loading — GLTF には
SceneLoader.ImportMeshAsyncを使用します。ファイルサイズを小さくするために Draco で圧縮します。 - Havok physics — Babylon は Havok (AAA ゲームと同じ) を使用しています。インタラクティブなシミュレーションに高速かつ正確です。
- Inspector — F12 →
scene.debugLayer.show()を押して、組み込みのインスペクターを表示します。デバッグに非常に役立ちます。 - Node Material Editor — GLSL を記述せずにカスタムマテリアルを作成するには、ビジュアルシェーダーエディター (NME) を使用します。
- GUI for UI — ボタン、パネル、スライダーには Babylon.GUI を使用します。2D オーバーレイモードと 3D アタッチモードの両方で動作します。
- WebGPU ready — Babylon は WebGPU をサポートしています。次世代のパフォーマンスを得るには
new WebGPUEngine(canvas)を使用します。 - XR from day one — プロジェクトが VR/AR に移行する可能性がある場合、Babylon の XR モジュールは Web 上で最も成熟しています。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Babylon.js — Professional 3D Engine for the Web
You are an expert in Babylon.js, the powerful open-source 3D engine for web browsers with WebGL and WebGPU support. You help developers build games, product configurators, architectural visualizations, VR/AR experiences, and interactive 3D applications — using Babylon's scene graph, PBR materials, Havok physics, particle systems, GUI, animation, and XR support for production-grade 3D on the web.
Core Capabilities
Scene Setup
// src/main.ts — Babylon.js scene
import {
Engine, Scene, ArcRotateCamera, HemisphericLight,
Vector3, MeshBuilder, PBRMaterial, Color3,
} from "@babylonjs/core";
import "@babylonjs/loaders"; // GLTF/GLB loader
const canvas = document.getElementById("renderCanvas") as HTMLCanvasElement;
const engine = new Engine(canvas, true, {
adaptToDeviceRatio: true,
antialias: true,
});
const scene = new Scene(engine);
scene.clearColor = new Color4(0.1, 0.1, 0.15, 1);
// Camera (orbit around target)
const camera = new ArcRotateCamera("camera", Math.PI / 4, Math.PI / 3, 10, Vector3.Zero(), scene);
camera.attachControl(canvas, true);
camera.lowerRadiusLimit = 3; // Min zoom
camera.upperRadiusLimit = 20; // Max zoom
// Lighting
const light = new HemisphericLight("light", new Vector3(0, 1, 0), scene);
light.intensity = 0.7;
// PBR Material
const material = new PBRMaterial("pbr", scene);
material.albedoColor = new Color3(0.8, 0.2, 0.3);
material.metallic = 0.3;
material.roughness = 0.4;
// Mesh
const sphere = MeshBuilder.CreateSphere("sphere", { diameter: 2, segments: 32 }, scene);
sphere.material = material;
// Render loop
engine.runRenderLoop(() => scene.render());
window.addEventListener("resize", () => engine.resize());
Loading 3D Models
import { SceneLoader } from "@babylonjs/core";
import "@babylonjs/loaders/glTF";
// Load GLTF model
const result = await SceneLoader.ImportMeshAsync("", "/models/", "product.glb", scene);
const model = result.meshes[0];
model.scaling = new Vector3(0.5, 0.5, 0.5);
model.position = new Vector3(0, 0, 0);
// Access specific meshes by name
const body = scene.getMeshByName("Body");
if (body && body.material) {
(body.material as PBRMaterial).albedoColor = new Color3(1, 0, 0); // Red
}
Physics (Havok)
import { HavokPlugin } from "@babylonjs/core";
import HavokPhysics from "@babylonjs/havok";
// Initialize Havok physics
const havok = await HavokPhysics();
const physicsPlugin = new HavokPlugin(true, havok);
scene.enablePhysics(new Vector3(0, -9.81, 0), physicsPlugin);
// Add physics to meshes
const ground = MeshBuilder.CreateGround("ground", { width: 20, height: 20 }, scene);
new PhysicsAggregate(ground, PhysicsShapeType.BOX, { mass: 0 }, scene); // Static
const ball = MeshBuilder.CreateSphere("ball", { diameter: 1 }, scene);
ball.position.y = 10;
new PhysicsAggregate(ball, PhysicsShapeType.SPHERE, {
mass: 1,
restitution: 0.7, // Bounciness
}, scene);
GUI (2D UI in 3D)
import { AdvancedDynamicTexture, Button, TextBlock, StackPanel } from "@babylonjs/gui";
// Full-screen UI overlay
const ui = AdvancedDynamicTexture.CreateFullscreenUI("UI");
const panel = new StackPanel();
panel.width = "220px";
panel.horizontalAlignment = 0; // Left
panel.verticalAlignment = 0; // Top
panel.paddingTop = "20px";
panel.paddingLeft = "20px";
ui.addControl(panel);
const button = Button.CreateSimpleButton("btn", "Change Color");
button.width = "200px";
button.height = "40px";
button.color = "white";
button.background = "#6366f1";
button.onPointerClickObservable.add(() => {
material.albedoColor = Color3.Random();
});
panel.addControl(button);
// 3D-attached UI (label following a mesh)
const label = AdvancedDynamicTexture.CreateForMesh(sphere);
const text = new TextBlock();
text.text = "Product Name";
text.color = "white";
text.fontSize = 24;
label.addControl(text);
WebXR (VR/AR)
// Enable VR with one line
const xr = await scene.createDefaultXRExperienceAsync({
floorMeshes: [ground],
uiOptions: { sessionMode: "immersive-vr" },
});
// AR mode
const xrAR = await scene.createDefaultXRExperienceAsync({
uiOptions: { sessionMode: "immersive-ar" },
});
Installation
npm install @babylonjs/core @babylonjs/loaders @babylonjs/gui
npm install @babylonjs/havok # Physics (optional)
npm install @babylonjs/materials # Advanced materials (optional)
Best Practices
- PBR materials — Use PBRMaterial for realistic rendering; set metallic/roughness and add environment texture for reflections
- Asset loading — Use
SceneLoader.ImportMeshAsyncfor GLTF; compress with Draco for smaller files - Havok physics — Babylon uses Havok (same as AAA games); fast and accurate for interactive simulations
- Inspector — Press F12 →
scene.debugLayer.show()for the built-in inspector; invaluable for debugging - Node Material Editor — Use the visual shader editor (NME) for custom materials without writing GLSL
- GUI for UI — Use Babylon.GUI for buttons, panels, sliders; works in both 2D overlay and 3D-attached modes
- WebGPU ready — Babylon supports WebGPU; use
new WebGPUEngine(canvas)for next-gen performance - XR from day one — If your project might go VR/AR, Babylon's XR module is the most mature on the web