Threejs Agents Scene Builderのロゴ

Threejs Agents Scene Builder

組織
Impertio-Studio
threejs-agents-scene-builder

Use when composing a complete Three.js scene from scratch or when asked to create a 3D visualization. Provides decision trees for choosing lighting setup, materials, camera type, controls, and post-processing pipeline. Orchestrates other Three.js skills. Keywords: create scene, build 3D, Three.js project, scene setup, visualization, product viewer, 3D application, scene composition, how to start Three.js, new 3D project, basic scene.

概要

公開者Impertio-Studio
リポジトリThree.js-Claude-Skill-Package
スキル名threejs-agents-scene-builder
スター
29
フォーク
3
同梱ファイル
3
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    Impertio-StudioがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Threejs Agents Scene Builder」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package/tree/master/skills/source/threejs-agents/threejs-agents-scene-builder
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package.git /tmp/Three.js-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Three.js-Claude-Skill-Package/skills/source/threejs-agents/threejs-agents-scene-builder .claude/skills/threejs-agents-scene-builder
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでThreejs Agents Scene Builderを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にThreejs Agents Scene Builderを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Threejs Agents Scene Builderは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

threejs-agents-scene-builder

Purpose

This skill is an orchestration guide for building complete Three.js scenes. It provides decision trees that map use cases to the correct combination of lighting, materials, camera, controls, environment, and post-processing. ALWAYS consult this skill first when asked to create a 3D scene or visualization.


Master Decision Tree: Use Case to Scene Recipe

Step 1: Identify the Use Case

Use CaseGo To
Product viewer / configuratorRecipe A
Architectural walkthroughRecipe B
Game level / interactive 3DRecipe C
Data visualization / chartRecipe D
Portfolio / hero sectionRecipe E
CAD / BIM / IFC viewerRecipe F
AR / XR experienceRecipe G

Step 2: Choose R3F vs Imperative

ConditionDecision
Project uses ReactALWAYS use React Three Fiber (R3F)
Project uses Vue, Svelte, or vanilla JSALWAYS use imperative Three.js
Need maximum control over render loopPrefer imperative Three.js
Rapid prototyping with component reusePrefer R3F + Drei
Static scene, no interaction frameworkEither works; imperative is lighter

Cross-reference: threejs-impl-r3f for R3F patterns, threejs-core-scene-graph for imperative patterns.


Decision Tree: Lighting Setup

Step 1: Scene Type to Lighting Strategy

Scene TypePrimary LightFill LightShadows
Outdoor / daylightDirectionalLight (sun)HemisphereLight (sky/ground)DirectionalLight shadow, PCFSoftShadowMap
Indoor / roomPointLight or SpotLight (fixtures)AmbientLight (low)SpotLight shadows, limit to 2-3
Studio / productSpotLight (key) + SpotLight (rim)AmbientLight or HemisphereLightContactShadows (Drei) or AccumulativeShadows
Stylized / toonDirectionalLightHemisphereLightOptional; BasicShadowMap for hard edges
HDR environment onlyNone (IBL provides all lighting)NoneContactShadows or AccumulativeShadows
Night / darkSpotLight (focused pools)AmbientLight (very low, ~0.05)SpotLight shadows

Step 2: Lighting Intensity (Physically Correct, r160+)

Light TypeUnitTypical IndoorTypical Outdoor
DirectionalLightlux1-51-3 (scene scale dependent)
PointLightcandela50-200N/A
SpotLightcandela100-500N/A
AmbientLightunitless0.1-0.50.2-0.5
HemisphereLightunitless0.3-0.80.5-1.0

Step 3: Light Count Budget

PlatformMax Real-Time LightsMax Shadow-Casting Lights
Mobile3-41 (DirectionalLight only)
Desktop8-162-3 (NEVER PointLight shadows on mobile)
High-end16+ (use TiledLighting)4-5

Critical rules:

  • NEVER use PointLight shadows on mobile — each costs 6 shadow map renders
  • ALWAYS add directionalLight.target to the scene when repositioning the target
  • ALWAYS call RectAreaLightUniformsLib.init() before creating RectAreaLight

Cross-reference: threejs-impl-lighting-shadows for shadow tuning and artifact fixes.


Decision Tree: Material Selection

Visual GoalMaterialNotes
Realistic / PBRMeshStandardMaterialDefault choice for most scenes
Realistic + clearcoat, transmission, sheenMeshPhysicalMaterialHeavier than Standard; use only when needed
Toon / cel-shadedMeshToonMaterialRequires gradientMap texture for steps
Unlit / flat colorMeshBasicMaterialZero lighting cost; good for wireframes, UI
Performance-critical (many objects)MeshLambertMaterialVertex-lit; cheaper than Standard
Glass / transparentMeshPhysicalMaterial (transmission: 1)Or Drei's MeshTransmissionMaterial in R3F
Reflective floorDrei MeshReflectorMaterialR3F only
Custom shaderShaderMaterial or RawShaderMaterialFull GLSL control
Node-based (WebGPU)MeshStandardNodeMaterialTSL node system; r160+

Critical rules:

  • NEVER use MeshPhysicalMaterial when MeshStandardMaterial suffices — it is significantly more expensive
  • ALWAYS set material.needsUpdate = true after changing defines or extensions
  • ALWAYS dispose materials when removing objects from the scene

Cross-reference: threejs-syntax-materials for material properties and textures.


Decision Tree: Camera Selection

Use CaseCamera TypeTypical Settings
Most 3D scenesPerspectiveCamerafov: 50-75, near: 0.1, far: 1000
Product viewer (no perspective distortion)PerspectiveCamerafov: 35-45 (narrow = less distortion)
Architectural (wide angle)PerspectiveCamerafov: 60-90
2D game / isometricOrthographicCameraFrustum sized to world units
CAD / technical drawingOrthographicCameraALWAYS
Data visualization (flat)OrthographicCameraFrustum = data range
Cinematic / dramaticPerspectiveCamerafov: 20-35 (telephoto effect)

Critical rules:

  • ALWAYS call camera.updateProjectionMatrix() after changing fov, near, far, or aspect
  • NEVER set near to 0 — this causes z-fighting across the entire scene
  • ALWAYS keep the near/far ratio as small as possible (ideally < 1:10000)

Cross-reference: threejs-core-renderer-camera for camera API details.


Decision Tree: Controls Selection

Interaction PatternControlsNotes
Orbit around object (most common)OrbitControlsALWAYS enable damping
Map / top-down navigationMapControlsLeft-drag = pan, right-drag = rotate
First-person / walkthroughPointerLockControlsRequires pointer lock API
Fly-through (6DOF)FlyControlsKeyboard + mouse
Drag-to-rotate (presentation)Drei PresentationControlsR3F only; spring physics
Scroll-driven animationDrei ScrollControlsR3F only
Object manipulation (translate/rotate/scale)TransformControlsAttach to selected object
Mobile-friendly orbitOrbitControlsTouch gestures built-in

Critical rules:

  • ALWAYS call controls.update() in the animation loop when enableDamping is true
  • ALWAYS call controls.dispose() on cleanup
  • NEVER combine OrbitControls and TransformControls without disabling OrbitControls during transform interaction

Cross-reference: threejs-syntax-controls for controls API details.


Decision Tree: Environment Setup

Visual GoalApproachImplementation
Realistic reflections + ambientHDR environment mapscene.environment = pmremGenerator.fromEquirectangular(hdrTexture)
Solid color backgroundscene.background = new Color(...)Simplest option
Gradient backgroundCustom shader on background planeOr CSS gradient behind transparent canvas
SkyboxCubeTexture on scene.background6 face images
Procedural skyDrei <Sky> or Three.js Sky addonDynamic sun position
No background (transparent)renderer = new WebGLRenderer({ alpha: true })CSS controls what shows behind
R3F environmentDrei <Environment preset="studio" />Presets: apartment, city, dawn, forest, lobby, night, park, studio, sunset, warehouse

Critical rules:

  • ALWAYS use PMREMGenerator to prefilter environment maps for PBR materials
  • NEVER use unprocessed HDR textures as scene.environment — they MUST be PMREM-processed
  • Setting scene.environment provides IBL to ALL PBR materials automatically

Cross-reference: threejs-syntax-materials for environment map usage on materials.


Decision Tree: Post-Processing

When to Add Post-Processing

ConditionDecision
Scene looks flat or lacks depthAdd SSAO/GTAO + subtle bloom
Need glow / emissive highlightsAdd UnrealBloomPass
Need anti-aliasing (no MSAA)Add FXAA or SMAA
Cinematic lookAdd BokehPass (DoF) + FilmPass (grain) + LUTPass (color grading)
Outline selectionAdd OutlinePass
Performance is critical (mobile)NEVER add post-processing; use baked effects

Post-Processing Pipeline Order

ALWAYS follow this pass order:

  1. RenderPass (beauty render) — ALWAYS first
  2. Geometry passes: SSAO, GTAO, SSR
  3. Effect passes: Bloom, DoF, Outline
  4. Anti-aliasing: FXAA or SMAA
  5. Color grading: LUT, Film
  6. OutputPass (tone mapping + color space) — ALWAYS last

R3F Post-Processing

In R3F, use @react-three/postprocessing (wraps pmndrs/postprocessing library):

jsx
import { EffectComposer, Bloom, SSAO } from '@react-three/postprocessing'

<EffectComposer>
  <SSAO />
  <Bloom luminanceThreshold={0.9} intensity={0.5} />
</EffectComposer>

Critical rules:

  • ALWAYS resize the composer when the window resizes: composer.setSize(w, h)
  • NEVER forget OutputPass at the end — without it, tone mapping and color space conversion are skipped
  • In R3F, @react-three/postprocessing handles pass ordering automatically

Cross-reference: threejs-impl-postprocessing for pass configuration and tuning.


Scene Composition Checklist

ALWAYS follow this checklist when building a scene:

  1. Renderer — Create WebGLRenderer with antialias: true, set pixel ratio, set size
  2. Scene — Create Scene, set background and/or environment
  3. Camera — Choose type per decision tree, set position
  4. Lighting — Choose recipe per decision tree, respect budget
  5. Ground/Environment — Add ground plane, environment map, or sky
  6. Content — Add geometries, load models, create materials
  7. Controls — Choose per decision tree, configure constraints
  8. Shadows — Enable on renderer + lights + objects (3-step opt-in)
  9. Post-processing — Add if needed, follow pipeline order
  10. Resize handling — ALWAYS handle window resize (camera + renderer + composer)
  11. Animation loop — requestAnimationFrame or R3F useFrame
  12. Disposal — ALWAYS dispose geometries, materials, textures on cleanup

Performance Quick Reference

OptimizationWhen to Apply
InstancedMesh>50 identical objects
LOD (Level of Detail)Large scenes with distant objects
frustumCulled: true (default)ALWAYS keep enabled unless object must render off-screen
matrixAutoUpdate: falseStatic objects that NEVER move
Texture compression (KTX2/Basis)ALWAYS for production; reduces GPU memory 4-6x
Geometry mergingMany small static meshes with same material
frameloop="demand" (R3F)Static scenes / configurators
Baked lightingStatic environments
Object poolingFrequently created/destroyed objects

Cross-reference: threejs-errors-performance for detailed optimization strategies.


Reference Links

Related Skills

SkillWhen to Consult
threejs-core-scene-graphScene hierarchy, Object3D API, disposal
threejs-core-renderer-cameraRenderer setup, camera configuration
threejs-core-math-transformsVectors, matrices, coordinate transforms
threejs-syntax-geometryBufferGeometry, built-in shapes, InstancedMesh
threejs-syntax-materialsMaterial properties, textures, environment maps
threejs-syntax-loadersGLTF, FBX, OBJ loading and optimization
threejs-syntax-controlsCamera controls setup and configuration
threejs-impl-lighting-shadowsLight types, shadow configuration, artifacts
threejs-impl-animationKeyframe animation, morph targets, skeletal
threejs-impl-postprocessingEffectComposer, bloom, SSAO, anti-aliasing
threejs-impl-physicsRapier/Cannon.js integration
threejs-impl-r3fReact Three Fiber patterns and hooks
threejs-impl-webgpuWebGPU renderer, TSL node materials
threejs-impl-ifcIFC/BIM model loading and processing
threejs-errors-performanceFPS optimization, memory leaks, draw calls
threejs-errors-renderingVisual artifacts, z-fighting, color issues
threejs-agents-model-optimizerGLTF optimization, compression, LOD generation

Official Sources

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Threejs Agents Scene Builder」では何ができますか?

Use when composing a complete Three.js scene from scratch or when asked to create a 3D visualization. Provides decision trees for choosing lighting setup, materials, camera type, controls, and post-processing pipeline. Orchestrates other Three.js skills. Keywords: create scene, build 3D, Three.js project, scene setup, visualization, product viewer, 3D application, scene composition, how to start Three.js, new 3D project, basic scene.

TypingMindでThreejs Agents Scene Builderを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Threejs Agents Scene Builderはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにThreejs Agents Scene Builderをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package/tree/master/skills/source/threejs-agents/threejs-agents-scene-builderを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Threejs Agents Scene Builderを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Threejs Agents Scene Builderで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもThreejs Agents Scene Builderを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Threejs Agents Scene Builder」は無料ですか?

はい。Impertio-StudioがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇