three-webgl-game

작성자: openai

일반 Three.js로 브라우저 게임 런타임을 구현합니다. 사용자가 TypeScript나 Vite에서 GLB 에셋, 로더, 물리 등을 사용하여 명령형 장면 제어를 원할 때 사용합니다.

npx skills add https://github.com/openai/plugins --skill three-webgl-game

Three WebGL Game

Overview

Use this skill for the default non-React 3D path in the plugin. This is not generic WebGL advice. It is an opinionated stack for browser 3D work:

  • three
  • TypeScript
  • Vite
  • GLB or glTF 2.0 assets
  • Three.js loaders such as GLTFLoader, DRACOLoader, and KTX2Loader
  • Rapier JS for physics
  • SpectorJS for GPU and frame debugging
  • DOM overlays for HUD, menus, and settings

Use this skill when the project wants direct scene, camera, renderer, and game-loop control. If the app already lives in React, route to ../react-three-fiber-game/SKILL.md instead.

Use This Skill When

  • the app is plain TypeScript or Vite rather than React-first
  • the project wants direct imperative control over the render loop
  • the user asks for Three.js specifically
  • the runtime needs engine-like control over scene, camera, loaders, and physics

Do Not Use This Skill When

  • the 3D scene lives inside an existing React app
  • the main problem is shipped-asset optimization rather than runtime code
  • the user explicitly chose Babylon.js or PlayCanvas

Core Rules

  1. Keep simulation state outside Three.js objects.
    • Game rules, AI, quest state, timers, and progression should not live inside meshes or materials.
  2. Treat the render graph as an adapter.
    • Scene graph, cameras, materials, loaders, and post-processing are view concerns layered over simulation state.
  3. Keep camera behavior explicit.
    • Orbit, follow, chase, rail, and first-person styles each need their own control boundary.
  4. Keep UI out of WebGL unless the presentation absolutely depends on it.
    • Menus, HUD, inventories, and settings should default to DOM.
  5. Use GLB or glTF 2.0 as the default shipping model format.
    • Do not build the runtime around DCC-native formats.
  6. Use Rapier instead of ad hoc collision code when the game has meaningful 3D physics or collision response.
  7. Keep the first playable view low-chrome.
    • Default to one compact objective or status cluster plus transient prompts.
    • Long notes, lore, and controls references should be collapsed until asked for.
    • Do not frame the scene with multiple equal-weight cards during normal play.

Initial Scaffold UX

For exploration, traversal, and character-control prototypes, start with a sparse shell:

  • one edge-aligned objective chip
  • one transient controls hint
  • one optional compact status strip

Only add larger UI surfaces when the game loop truly requires them. Journal, quest log, codex, map, and settings surfaces should open on demand, not occupy the viewport by default.

Recommended Structure

Use the module shape in ../../references/three-webgl-architecture.md, then keep these boundaries clean:

  • simulation/: rules, progression, state, and AI
  • render/app/: renderer, scene, camera, resize, context lifecycle
  • render/loaders/: GLTF, Draco, KTX2, texture, and environment loading
  • render/objects/: mesh instantiation and disposal
  • render/materials/: material setup and shader boundaries
  • physics/: Rapier world, bodies, colliders, and simulation bridge
  • ui/: DOM overlays and menus
  • diagnostics/: debug toggles, perf probes, and capture hooks

Good Fit Scenarios

  • Exploration demos
  • Lightweight 3D combat prototypes
  • Vehicle or traversal prototypes
  • Scene-driven product or world showcases with gameplay
  • Material, lighting, or post-process-led experiences
  • 3D games where camera movement and depth readability are central

Loaders, Assets, and Post-Processing

  • Start with GLTFLoader for shipped 3D content.
  • Add DRACOLoader or Meshopt-compatible optimization as part of the asset pipeline, not as a random runtime patch.
  • Use KTX2Loader for compressed textures when the asset pipeline provides them.
  • Prefer built-in Three.js render and post-processing utilities first. Add heavier abstraction only when the project actually needs it.
  • Keep post-processing optional and measurable. Bloom and color effects should not hide gameplay readability.

Shader and Material Guidance

  • Start with standard Three.js materials and correct lighting before reaching for custom shaders.
  • Use custom shaders only when the visual target genuinely needs them.
  • Keep shader parameters driven by game state, not by incidental scene mutations.
  • If a material stack gets complex, isolate it behind material factories instead of scattering shader setup across scene code.

Browser Safety

  • Handle resize explicitly.
  • Expect WebGL context loss and recovery.
  • Keep a fallback or degraded mode in mind for fragile GPU paths.
  • Watch texture size, geometry count, draw-call growth, and post-processing cost.
  • Use SpectorJS when the scene behaves incorrectly or frame cost is unclear.

Scope Warning

Do not claim that this plugin offers equal 3D depth to the Phaser track. It supports serious 3D implementation, but the plugin is still 2D-first overall.

References

  • Shared architecture: ../web-game-foundations/SKILL.md
  • Frontend direction: ../game-ui-frontend/SKILL.md
  • 3D HUD layout patterns: ../../references/three-hud-layout-patterns.md
  • Three.js ecosystem: ../../references/threejs-stack.md
  • Three.js structure: ../../references/three-webgl-architecture.md
  • Vanilla starter: ../../references/threejs-vanilla-starter.md
  • GLB loader starter: ../../references/gltf-loading-starter.md
  • Rapier starter: ../../references/rapier-integration-starter.md
  • 3D asset pipeline: ../../references/web-3d-asset-pipeline.md
  • WebGL debugging and perf: ../../references/webgl-debugging-and-performance.md

openai의 다른 스킬

user-context
openai
데이터 분석 플러그인의 지속적인 소스 라우팅 기본 설정, 온보딩 로직, 설정 진행 상황 및 의미 계층 레지스트리를 로드하거나 관리합니다.
official
notion-research-documentation
openai
Notion 콘텐츠를 조사하고 인용문과 함께 구조화된 브리핑, 보고서 또는 비교 자료로 종합합니다. 대상 질의를 사용해 Notion 페이지를 검색하고 가져온 후, 인라인 출처 인용과 참고 문헌 섹션을 포함해 주제별로 결과를 정리합니다. 범위와 사용자 목표에 따라 네 가지 출력 형식(빠른 브리핑, 연구 요약, 비교, 종합 보고서) 중에서 선택합니다. 내장 템플릿을 사용해 Notion 페이지를 생성 및 업데이트하고, 새 정보가 도착하면 출처를 직접 연결하고 변경 사항을 추적합니다...
official
rcsb-pdb-skill
openai
핵심 메타데이터, Search API 쿼리 및 FASTA 다운로드를 위한 간결한 RCSB PDB 요청을 제출합니다. 사용자가 간결한 RCSB 요약을 원할 때 사용하며, 원시 JSON 또는…을 저장합니다.
official
pdf
openai
PDF 읽기, 생성 및 검증 기능을 제공하며, 시각적 렌더링과 프로그래매틱 생성을 지원합니다. Poppler(pdftoppm)를 사용하여 PDF 페이지를 PNG로 렌더링하여 레이아웃, 간격, 타이포그래피를 시각적으로 검사할 수 있습니다. reportlab을 사용하여 프로그래매틱 방식으로 PDF를 생성하여 안정적인 포맷을 보장하며, pdfplumber 또는 pypdf를 통해 텍스트와 메타데이터를 추출합니다. 품질 기준을 준수합니다: 잘린 텍스트, 겹치는 요소, 깨진 표, 렌더링 아티팩트가 없어야 하며, ASCII 하이픈만 사용하고 사람이 읽을 수 있는 인용을 사용합니다.
official
test-coverage-improver
openai
Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose…
official
playwright
openai
터미널 기반 브라우저 자동화로 요소 스냅샷 및 대화형 UI 워크플로우 지원. playwright-cli 래퍼 스크립트를 통해 작동하며(npx 필요), 헤드리스 및 헤드 모드 모두 지원하여 시각적 디버깅 가능. 핵심 워크플로우: 페이지 열기, 안정적인 요소 참조를 위한 스냅샷 생성, 참조를 사용한 상호작용, 탐색 또는 DOM 변경 후 재스냅샷. 양식 작성, 클릭, 타이핑, 다중 탭 관리, 스크린샷/PDF 캡처, 흐름 디버깅을 위한 트레이스 기록 포함. 요소 참조(예: e3, e15)...
official
ukb-topmed-phewas-skill
openai
단일 변이에 대한 간결한 UKB-TOPMed PheWAS 요약을 가져오며, rsID, GRCh37 또는 GRCh38 입력을 받아 필요한 GRCh38 쿼리로 변환합니다. 다음과 같은 경우에 사용하세요…
official
code-review-context
openai
모델 가시 컨텍스트
official