I'll build a 3D bullet penetration simulator with Three.js — realistic-ish ballistics (energy, penetration depth, ricochets), multiple target materials (wood, plastic, steel, glass, gel...), slow-motion bullet cam, particles, holes, and sound. First, let me look at the project setup.
I need Three.js installed:
Now I'll create the ballistics engine — bullet specs, material specs, and the physics that computes penetration/embed/ricochet per target layer:
Small lint fix — remove the unused layers field:
Both edits applied. Now let me check the existing css/html shells before writing the UI:
Now let's build to verify everything compiles:
The build is clean. Ballistic Penetration Lab is ready — a full 3D bullet penetration simulator set in an indoor shooting range.
What was built
3D Scene (src/game/scene.ts) — Three.js shooting range with procedurally textured concrete floor/walls, ceiling light strips, an angled steel backstop with sand pile, a tripod-mounted rifle, a red laser line-of-fire, and orbit camera controls. Everything (textures, muzzle flash, bullet holes) is generated procedurally — zero external assets.
Physics engine (src/game/ballistics.ts) — a simplified but plausible penetration model:
- 7 rounds: 9mm, .45 ACP, 5.56 NATO, 7.62×39, .308 Win, 12ga slug, .50 BMG AP — each with real mass, velocity, caliber, and core hardness
- 11 materials: ballistic gel, pine, oak, HDPE, polycarbonate shield, tempered glass, concrete, aluminum, mild steel, AR500 armor, Kevlar composite
- Energy-based penetration: kinetic energy vs. resistance × cross-section × slant thickness, hardness mismatch penalties (soft lead splatters on AR500; AP cores punch through), oblique-angle effective thickness, and ricochet off hard plates at ≥40°
Simulation feel
- Stack up to 3 target layers with per-layer material + thickness (2–500 mm), global impact angle 0–70°
- Slow motion time scale (down to 1/200×) with automatic extra slo-mo near impacts, plus a bullet-cam that chases the round
- Material-specific effects: wood splinters, glowing metal sparks, glass shatter bursts, gel wobble debris, entry/exit holes sized by caliber, embedded bullets left visible in gel
- Synthesized WebAudio gunshot, per-material impact sounds, and ricochet whine
Live shot report — per-layer results reveal as the bullet arrives: PENETRATED / STOPPED (with embed depth in mm) / RICOCHET / SHATTERED, with entry/exit velocity, energy lost, slant thickness, and residual energy percentage.
Try firing a 9mm at 6mm mild steel at 50° for a ricochet, or send a .50 BMG through oak + steel + gel to watch it plow through everything.
Files built: src/game/ballistics.ts, src/game/audio.ts, src/game/textures.ts, src/game/scene.ts, src/App.tsx, src/index.css, index.html