FarTraffic.component
README.md
FarTraffic
The one updater behind carForge.fleet's far traffic. It sits on the root entity Fleet.farTraffic builds and moves every low-poly car under it along its lane (a polyline with arc length, both directions when the road has two), on this peer only: no physics, no Vehicle, no per-car scripts. Each frame it walks each car's segment forward (constant time per car), fills flat position and heading arrays, and writes them to the engine through retained entity bindings and typed CPU buffers, one copy per field for the whole group; spinning wheels add one more. Fields: speed (m/s), spinWheels, running. Methods: setup(group) (called by Fleet.farTraffic), stats() → { cars, wheels, lastMs, avgMs, fast }, resetStats(). Needs nothing else on the entity; the cars are its children.