five-on-it / apps/client/src/renderer/scene
apps/client/src/renderer/scene
Babylon.js setup and the level's look: a right-handed scene (so it matches Rapier without any axis flipping) under a sky light and a low sun, and the level drawn from its data: a dark ground with a grid just under the level's own ground, the level's meshes as flat-shaded low-poly pieces (every standing piece baked into the batches of its cell, level-batches.ts; a street lamp, a piece painted lava and a light piece come loose as instances of one Babylon mesh per level mesh, split into a sub-mesh per colour group; a roof that fades over the player gets a mesh of its own, see overhead.ts), the roads (roads.ts), the nail strips; a wireframe of the collision meshes, coloured by kind, built the first time it is shown and switched over the level (createColliders); and wireframe actors (cars, people) with a nose marker.