Claude of Duty is a browser-based FPS built in Three.js with procedurally generated assets, featuring a large, multi-subsystem architecture and a JavaScript/MIT-licensed codebase. The project emphasizes reproducible tooling and GPU-driven rendering pipelines, with no art files required at runtime.
What it is
A first-person shooter built in the browser using Three.js r180 and WebGL2. It procedurally generates textures, meshes, animations, and sounds from code with no external art assets. The only runtime dependency is three.
npm install
npm run dev # http://127.0.0.1:5173
How it works
The project is organized into multiple subsystems, each responsible for a part of the game: render, materials, sky, world, physics, player, weapons, fx, ai, ui, and audio. It includes an architecture document (ARCHITECTURE.md) that defines contract interfaces between agents and subsystems. Tooling is provided to capture and compare frames and performance via several scripts under tools. A performance section documents measured frame times and shader compilation behavior before and after optimization.
Subsystem capabilities include:
- render: HDR pipeline, cascaded shadow maps, PTSS/PCSS, MRT depth/normal/velocity prepass, GTAO, TAA, motion blur, bloom, EV100 metering, procedural LUT, and composite
- materials: 19 procedural surfaces, noise tiling, parallax occlusion, triplanar projection, edge wear
- sky: atmospheric scattering, PMREM, volumetric effects
- world: modular building kit with interiors and instanced props
- physics: custom BVH, swept-capsule controller, CCD, ragdolls, penetration
- weapons: procedural geometry, ADS, recoil, reloads, ballistic drop
- fx: GPU particles, decals, tracers, muzzle flash
- ai: soldiers, navmesh, perception, cover behavior
- ui: DOM/CSS HUD components
- audio: Web Audio synthesis with convolution reverb and HRTF
Getting started
Install and run the dev server:
npm install
npm run dev # http://127.0.0.1:5173
Interacting controls:
- Click canvas to lock cursor. WASD move, mouse aim, LMB fire, RMB ADS, R reload, Shift sprint, Ctrl crouch, Space jump, Q/E lean, Esc release.
Recent releases
- There are no release entries listed in the latest (0) releases.
Traction
- Stars: 1567, Forks: 254
- Open issues: 16
- Stars in last 24h: 559
Behind the repo
- Language: JavaScript
- License: MIT
- Created: 2026-07-25
- Last push: 2026-07-25
Caveats
- No artwork assets; all textures/meshes/animations/sounds are procedurally generated at load time from code. The only runtime dependency is three.
- README notes that performance can vary and that initial shader compilation and asset generation can cause stalls; an optimization pass reduced stalls and improved timing metrics in benchmarks.
