five-on-it / packages/sim/src/seats
packages/sim/src/seats
Seats and doors, and the speeds people get out at (GAME_DESIGN §6.3). Where each seat of a class is and the doorway it is reached by come from its model: vehicle-seats.json, the seat empties of apps/client/public/models/vehicles.glb that the client seats people at and the doors it swings open, written by npm run models:hulls and checked by models:check.
A seat's door is its doorway in the model, where its opening is: on a flank (a car's door, level with the seats it serves; the bus's two on the kerb side; a middle seat's on the kerb's) or at an end (the ambulance's back doors: VehicleDoor's side 0). A seat with no doorway (a two-wheeler's, the buggy's) is got on and off beside it, on its side, and a seat on the centre line from either side, the left first. Getting in, a character goes to its seat's door (or across the car, over the seats, when its own is blocked: boarding.ts); getting out, it uses it, or the nearest free spot from it along the car (character.ts). The client swings the doorway a person used (doorwayNear).
How fast the car goes decides how one gets out (EXIT, exitMode): at a crawl a character steps out on its feet; faster, up to the bail-out limit, one that gets out bails out, tumbling to the ground with the car's speed; faster still, nobody gets out.