Logo Threejs Agents Scene Builder

Threejs Agents Scene Builder

Tổ chức
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.

Tổng quan

Nhà phát hànhImpertio-Studio
Kho mãThree.js-Claude-Skill-Package
Tên kỹ năngthreejs-agents-scene-builder
Sao
29
Bản fork
3
Tệp đi kèm
3
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Impertio-Studio công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Threejs Agents Scene Builder trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package/tree/master/skills/source/threejs-agents/threejs-agents-scene-builder
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân 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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Threejs Agents Scene Builder trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Threejs Agents Scene Builder ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Threejs Agents Scene Builder với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Threejs Agents Scene Builder làm được gì?

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.

Vì sao nên dùng Threejs Agents Scene Builder trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Threejs Agents Scene Builder là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Threejs Agents Scene Builder trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package/tree/master/skills/source/threejs-agents/threejs-agents-scene-builder. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Threejs Agents Scene Builder?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Threejs Agents Scene Builder với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Threejs Agents Scene Builder với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Threejs Agents Scene Builder có miễn phí không?

Có. Kỹ năng này được Impertio-Studio phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇