Torque Valley: Driving, Drift and Crash Sandbox
README.md
gaugeClusters
Checks the gauge package without putting anything on screen:
- Styles: ten styles in gallery order (
styles.ids()andgauges.styles()agree), each with abuildand a size. An unknown id falls back to analog. - Reader:
gearLabel(R / N / gear / "-").read()returns every field from hand-writtencar.*values, km/h is derived fromcar.speedalone, the redline defaults to 87 % of the limiter, and a missing car readsok = false. Also covered:isCar,writesValuesandresolveof an explicit car. - FakeCar: the simulation the
FakeCarcomponent runs drives up through the gears, and the reader reads exactly what it wrote. The component starts at rest and exposesstate(). - View maths: km/h vs mph, the style's top speed (260 km/h, 160 mph, truck 140) unless
maxSpeedis set, the rev scale rounded up to the next thousand and the redline fraction. - Every style draws:
Gauges.framebuilds a full-screen tree with the cluster node for every style, both with a car and without one. - GaugeCluster component:
setStyleaccepts all ten and refuses an unknown one.reading()follows the style and reads the target car,cycleStylewraps round, andtarget()is the car.
It leaves alone what the clusters look like on screen and the per-frame screen registration, which runs only in play (judge those with the gallery scene and a capture), as well as following the local player's car. Entities are spawned far below the play area and despawned after each test. The cluster under test has visible = false.
Run it in edit mode:
return asset.resolve("gaugeClusters", "testSuite"):run()