Skip to content

five-on-it / apps/level-editor/src/scripts/blocks/road

apps/level-editor/src/scripts/blocks/road ​

Marks a node of the editor scene as a road: a straight stretch of street (a unit slab scaled to its width and length, its forward lanes running along the node's +z; pitched around its x axis it climbs or falls along its length, lying on the ramp or hillside under it), with the lanes in each direction and the speed limit as its parameters. Roads have no collider: they tell the AI where the streets are, and the game draws them. A smooth bend is a chain of short road slabs end to end. The library's block:road carries it: place instances of that mesh for npm run level:export to read.

Classes ​