Streets: sidewalks, road curves, junctions and roundabouts
Deploy web Studio / deploy (push) Successful in 4m31s

Roads take sidewalks (none, both, left, right): 12 cm high paving with
kerb faces drawn where they face the viewer. Road curve (radius, angle,
left/right) carries a street round a bend; centre lines are true arcs
when cut and offset, so curve joints are seamless. A road ending on
another road's centre line opens that road's kerb and sidewalk (T
junction); two roads ending at one corner close it. Roundabout: ring
radius and width, one or two lanes, up to four arms with flared kerbs,
splitter islands, give-way lines on the entry side (traffic on the left
or right) and a central island with apron.

Studio: a road run drawn corner by corner gets a curve in each corner
(prefab meta `corner`). Tooltips list the streets each one meets.
Engine: open `polyline` primitive (Prim::Poly open) so dashes run on
round curves. examples/streets and a Streets demo in the web Studio;
MCP guidance, docs. ROADMAP: backlog 5-7 done; multi-select and the
hosted copy marked done.

Tests: Rust 72, Studio 113, web 95.
This commit is contained in:
grabowski committed 2026-10-25 12:32:52 +07:00
1 parent 2442966743
commit c91d63663b
24 files changed
+989 -29

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
{
"version": 1,
"objects": [
{"id": "site", "type": "site", "name": "Quarter", "x": 0, "y": 4, "locked": true, "props": {"w": 112, "d": 92, "mat": "g-grass"}},
{"id": "rb", "type": "roundabout", "name": "Roundabout", "x": 0, "y": 0, "props": {"r": 12, "lane": 7, "arm_len": 8, "road_d": 6.5, "walk_w": 2.5}},
{"id": "east-ave", "type": "road", "name": "East avenue", "x": 36, "y": 0, "props": {"walk": "both", "walk_w": 2.5, "d": 6.5, "w": 32}},
{"id": "west-st", "type": "road", "name": "West street", "x": -36, "y": 0, "props": {"walk": "both", "walk_w": 2.5, "d": 6.5, "w": 32}},
{"id": "south-st", "type": "road", "name": "South street", "x": 0, "y": -31, "rot": 90, "props": {"walk": "both", "walk_w": 2.5, "d": 6.5, "w": 22}},
{"id": "north-st", "type": "road", "name": "North street", "x": 0, "y": 27, "rot": 90, "props": {"walk": "both", "walk_w": 2.5, "d": 6.5, "w": 14}},
{"id": "bend", "type": "road_curve", "name": "Corner", "x": 0, "y": 34, "rot": 90, "props": {"walk": "both", "walk_w": 2.5, "d": 6.5, "r": 12, "turn": "right"}},
{"id": "park-rd", "type": "road", "name": "Park road", "x": 34, "y": 46, "props": {"walk": "both", "walk_w": 2.5, "d": 6.5, "w": 44}},
{"id": "cross-st", "type": "road", "name": "Cross street", "x": 34, "y": 23, "rot": 90, "props": {"w": 46, "d": 5.5, "walk": "both", "walk_w": 2}},
{"id": "offices", "type": "building", "name": "Offices", "x": 19, "y": 27, "props": {"w": 14, "d": 13, "floors": 3, "pv": true}},
{"id": "flats", "type": "building", "name": "Flats", "x": 46, "y": 23, "props": {"w": 10, "d": 28, "floors": 4, "roof": "gable", "mat": "brick"}},
{"id": "school", "type": "building", "name": "School", "x": -33, "y": -21, "props": {"w": 20, "d": 14, "floors": 2, "ac": true}},
{"id": "shop", "type": "building", "name": "Corner shop", "x": -14, "y": 30, "props": {"w": 10, "d": 9, "floors": 1}},
{"id": "parking", "type": "parking", "name": "Car park", "x": -36, "y": 22, "props": {"n": 8}},
{"id": "pond", "type": "pond", "name": "Park pond", "x": 32, "y": -24},
{"id": "tree-1", "type": "tree", "x": 16, "y": -16, "props": {"r": 2.2}},
{"id": "tree-2", "type": "tree", "x": 20, "y": -33, "props": {"r": 2.0}},
{"id": "tree-3", "type": "tree", "x": 46, "y": -14},
{"id": "tree-4", "type": "tree", "x": 48, "y": -34, "props": {"r": 2.4}},
{"id": "trees-west", "type": "tree_row", "name": "Avenue trees", "x": -36, "y": 9, "props": {"w": 28}},
{"id": "car-1", "type": "car", "x": 30, "y": 1.6, "props": {"moving": true, "travel": 22, "dur": 6, "colour": "car1"}},
{"id": "car-2", "type": "car", "x": 44, "y": -1.6, "rot": 180, "props": {"moving": true, "travel": 22, "dur": 7}},
{"id": "car-3", "type": "car", "x": -1.6, "y": -30, "rot": 90, "props": {"colour": "car3"}},
{"id": "bus", "type": "truck", "name": "Delivery", "x": -40, "y": 1.6, "props": {"len": 7}},
{"id": "moto", "type": "moto", "x": 1.6, "y": 26, "rot": 270},
{"id": "walker-1", "type": "person", "x": 24, "y": 4.6, "props": {"cls": "guest1"}},
{"id": "walker-2", "type": "person", "x": -26, "y": -4.7},
{"id": "walker-3", "type": "person", "x": 31.6, "y": 30, "props": {"cls": "guest3"}},
{"id": "crowd", "type": "crowd", "name": "Pupils", "x": -24, "y": -11, "props": {"n": 6, "r": 1.6}},
{"id": "lamp-1", "type": "lamp", "x": 26, "y": -5.2},
{"id": "lamp-2", "type": "lamp", "x": 44, "y": -5.2},
{"id": "lamp-3", "type": "lamp", "x": -28, "y": 5.2},
{"id": "lamp-4", "type": "lamp", "x": -44, "y": 5.2},
{"id": "lamp-5", "type": "lamp", "x": 5.2, "y": -28}
]
}