2026-04-27.02-03-58.mp4
WebGPU-first game engine prototype built with TypeScript, React, and Vite.
Architect combines a custom deferred renderer, fixed-step simulation, and an asset packing pipeline for large scene workflows.
- Custom WebGPU renderer with WGSL shaders and deferred G-buffer passes
- Stylized lighting/color treatment with palette quantization + ordered dithering
- Fixed-step simulation loop (60 Hz target) with interpolation for rendering
- ECS-style state organization using repository-driven simulation state
- Rapier3D physics integration
- Scene loading via URL query (for example,
?scene=SITE_22) - Input layer with keyboard, mouse, and gamepad support
- Asset pipeline for GLTF/GLB processing, atlas/manifest generation, and Brotli workflows
- React-based shell UI (viewport + dialogue UI)
- Node.js 20+ (recommended)
- npm 10+
- A browser with WebGPU support (
navigator.gpurequired)- Latest Chrome or Edge is recommended
- Optional (for content tooling):
- Blender (for the Blender add-on workflow)
npm install
npm run devThen open the local Vite URL shown in terminal (typically http://localhost:5173).
npm run dev- start local development servernpm run build- create production buildnpm run preview- preview build output locallynpm run test- run test suite (Vitest)
npm run engine- run animation generation and executeengine/index.tsnpm run optimize-glb- optimize GLB assetsnpm run generate-animations- generate animation artifactsnpm run generate-brotli- generate Brotli-compressed outputsnpm run asset-packer- open interactive asset packer server/UInpm run build-assets- run asset packer in CLI modenpm run install-blender-addon- install the Blender add-on helper
- Place or update scene/model sources under
src/assets. - Run
npm run asset-packerfor interactive file selection and packing. - Or run
npm run build-assetsfor CLI packing. - Run
npm run generate-animationsif animation data changed. - Run
npm run devand validate scene rendering.
src/graphics/webgpu- renderer context, camera, GPU resources, draw pathsrc/graphics/shaders- WGSL shaders and rendering stagessrc/simulation- simulation state, systems, commands, and repositoriessrc/scenes- scene definitions and scene bootstrap loadingsrc/input- player and device input normalization/controlsrc/audio- audio loading and volume utilitiestools/assetPacker- interactive + CLI asset packing toolchainengine- engine-side generation/bootstrap scripts
The app supports loading scenes from the URL query string:
- Example:
http://localhost:5173/?scene=SITE_22
If no scene query is provided, the default scene is loaded.