r/threejs • u/No-Evidence-4891 • 8h ago
Demo I built a 20MB Three.js structural physics & mechanical puzzle game about 7 ancient engineering wonders (custom axial truss solver, merged static siblings, 124 interlocking parts)
Hi r/threejs! I've been building TianGong 3D, a browser-playable 3D ancient engineering, structural physics, and mechanical reconstruction puzzle game in Three.js + TypeScript.
Under-the-hood Three.js details that kept all 7 historical wonders under ~20MB at 60fps:
- Draw-call batching via static sibling geometry merging while keeping animated mortise-tenon & gear pivots independent
- Real-time axial truss, stone-arch & tension-cable solver with live RGB stress heatmaps tested against rolling 175kg carts & M8.0 seismic waves
- Pre-merge child bounding-box & radial-band spatial hit-testing for multi-element ring joinery (28 column plinths & Dougong brackets)
- Offscreen WebP part-card baker using the shared WebGLRenderer + RoomEnvironment PMREM lighting
Playable browser link is in my top comment below — would love feedback on performance, camera feel, or lighting!