New route prefab (routes.rhai): cars, buses, motorbikes, cyclists, people, deer or elephants move along waypoints, round a loop or there and back. Each way keeps to the left of the line (or right), corners are rounded into pieces of at most 45 degrees; there-and-back routes become loops with U-turns, so the two directions never share a strip. Engine: Prim::Travel / sprite.begin_travel / script travel(a, b, dur, windows) ... end(): the mover is drawn at a piece's start and slides to its end while it is on that piece, hidden otherwise. The renderer writes keyframes per piece (named by a hash of their content) into one <style> per view. Each piece is its own sprite with the lane strip as its sort extent (ext_reset), mitred at the corners, so movers pass in front of and behind trees, lamps and houses. Movers that look alike and never meet on a piece share one drawing. iso-travel pauses (not hides) in still, reduced-motion and ghosted views. Studio: meta shape "path" draws point by point (snapping like runs) and saves one object with pts; ending on the first point closes the loop. MCP: pts in the object schema, route guidance. Demos: streets gets traffic round the block, a bus, motorbikes, cyclists and strolling people (replacing the one-axis cars); country gets cars on the lane. Tests: Rust 79 (each mover on exactly one piece at every moment, in every rotation), Studio 125, web 99.
This commit is contained in:
1 parent
ccfd619a99
commit
5ec164a633
20 files changed
+698
-23
No files matched your search
@@ -272,6 +272,8 @@ mach3 = "#5b6370"
|
||||
mach4 = "#b8692b"
|
||||
robot = "#e07a1f"
|
||||
robotb = "#3a3f48"
|
||||
# route paths
|
||||
route = "#e0b84a"
|
||||
# wildlife and garden
|
||||
deer = "#8a5a32"
|
||||
deerl = "#d6c4a6"
|
||||
@@ -581,6 +583,7 @@ mach3 = "#8a93a1"
|
||||
mach4 = "#e08a43"
|
||||
robot = "#f08c2b"
|
||||
robotb = "#5a616d"
|
||||
route = "#b0802a"
|
||||
deer = "#a8703f"
|
||||
deerl = "#ecdfc8"
|
||||
nose = "#3a302a"
|
||||
@@ -918,6 +921,7 @@ f-conc = "conc"
|
||||
".iso-svg .iso-win" = "fill: var(--iso-win); stroke: none"
|
||||
".iso-svg .iso-school" = "pointer-events: none"
|
||||
".iso-svg .iso-swimbox" = "fill: none; stroke: none"
|
||||
".iso-svg .iso-route" = "fill: none; stroke: var(--iso-route); stroke-width: 1.2; stroke-dasharray: 5 4; stroke-linecap: round; stroke-linejoin: round; opacity: .75"
|
||||
".iso-svg .iso-antler" = "fill: none; stroke: var(--iso-antler); stroke-width: .35; stroke-linecap: round; stroke-linejoin: round"
|
||||
".iso-svg .iso-bristle" = "fill: none; stroke: var(--iso-bristle); stroke-width: .5; stroke-linecap: round"
|
||||
".iso-svg .iso-bird, .iso-svg .iso-wing" = "stroke: none"
|
||||
|
||||
Reference in new issue
Block a user