Back to Impact Yard
SOURCE / PINNED RELEASE

Made of little things.

Impact Yard

Release
09fe6aebec3c
Author-recorded commit
0696a4211733…
License
LICENSE
Author’s source reference
nostr://npub1n8ga89w8h6tvwamxusfyzexw8gjy84yxu9rxgnmk955cxtml4ujswzxydd/wss%3A%2F%2Fgit.napplet.soy%2F/n-0b3d7b60562

Archive hash verified: 823f5de0d2677ef2. The source-to-build association is the author’s claim; it has not been independently rebuilt.

docs/driving-simulator.md
# Driving simulator build spec

nappletType: impact-yard
purpose: Drive a car into freestanding structures and explore their physical collapse.
NAPs used: theme (optional), storage (optional).
requires: none.
optional domains and fallbacks: theme → local charcoal/copper palette; storage → camera preference lasts for this session only.
SDK helpers: themeGet, themeOnChanged, storage.getItem/setItem.
data flow: simulation stays in memory; only the selected camera is saved on a user camera change.
relay escape hatches: none.
config schema: none.
interop: none.
density: compact controls; larger speed digits because this is a driving instrument.
tiers: tiny = canvas, icon actions, condensed driving buttons; compact = touch controls and speed; regular = controls and compact telemetry; wide = more of the 3D yard, structure guide and full telemetry; short-height = hide secondary instruments.
minimum size: none.
theme: optional, all UI tokens and scene atmosphere follow the runtime background/text/primary; fallback #182420 / #edf2e9 / #e4ac6b.
states: inline starting status; inline WebGL failure with retry; no identity needed; absent storage affects preference persistence only.

## Simulation and presentation

### Obstacle expansion and ramp repair

Add a domino run, a timber block tower with alternating layers, and a masonry
archway carrying loose crates. Each is built from movable bodies; collapse and
chain reactions come from contacts and gravity. Spread these into the yard's
unused west and east areas, preserving driving space and the ramp approach.
The ramp becomes a solid wedge whose driving surface starts at ground level.
Physics and rendering share its vertices so the visible entrance matches the
collider. New regression checks drive the actual car up the ramp at low and high
throttle and strike each new structure. The structure guide adapts to the larger
list and short frames. NAPs, persistence, required domains and fallbacks are as
specified above; these additions use only bundled geometry and local simulation.

Three.js renders a procedural industrial test yard with an orange hatchback,
wooden crates, masonry blocks, barrel pyramids, and a ramp. cannon-es handles
gravity, mass, friction, contact impulses, angular momentum and a raycast vehicle
with four spring/damper suspension units. Individual loose blocks fall and scatter
through contact forces. Fixed 1/120-second physics steps reduce fast-impact
penetration. This is a rigid-body approximation, not finite-element material
fracture or vehicle body deformation. No scripted explosions or impact teleports.

WASD / arrow keys work only on the focused game canvas. Pointer buttons provide
the same controls, including on touch devices; there is no global key capture.
Space brakes; R recovers the car; C cycles chase, orbit and overhead cameras.
Toolbar actions pause, select half-speed, recover, and rebuild the yard.
Blur, lost pointer capture and hidden documents release driving controls.

Dependencies are bundled; there are no remote models, textures, fonts or network
requests. Existing boilerplate build and conformance wiring is retained.

API references: [cannon-es vehicle example](https://github.com/pmndrs/cannon-es/blob/master/examples/raycast_vehicle.html),
[Three.js WebGLRenderer](https://threejs.org/docs/pages/WebGLRenderer.html).