Creates a fleet; anything not in input uses DEFAULT_FLEET.
ReadonlymaterialThe single material every part shares.
ReadonlyobjectAdd this to your scene.
Resolved settings.
The simulation (typed arrays of every vehicle's pose and state).
ReadonlyuniformsLive material uniforms.
Dent depth at full damage, metres.
Headlights and lit windows, 0…1.
Number of vehicles (wagons count one each).
Draw calls the fleet costs (one per part mesh, plus fx and wakes).
Simulation time, seconds.
Frees GPU resources.
Sets vehicle i on fire (heat 0…1); it burns, slows to a stop and chars until it burns out or rain douses it.
Replaces all settings: anything not in input goes back to DEFAULT_FLEET.
Merges input into the settings. Groups and seed rebuild the fleet; everything else is live.
Swaps the road network (cars on roads routes are re-placed).
Sets states of vehicle i (wetness, snow, burn, damage).
Advances and redraws the fleet. Call once per frame.
Optionaldt: number
Seconds since the last call (measured if omitted).
Weather, fire and ground states to react to.
Thousands of animated vehicles in a few draw calls: one
InstancedMeshper model part (bodies, wheels, fans, rocket stages), driven every frame from the typed arrays of a FleetSim. Cars and bikes follow a road network or splines, trains pull their wagons along rails, boats bob, roll and leave wakes, planes bank through their turns, rockets launch and drop stages, carriers carry parked jets. Every vehicle gets wet, snowy, burnt and damaged through threejs-weathering's per-instance states.Example