Streets: sidewalks, road curves, junctions and roundabouts
Deploy web Studio / deploy (push) Successful in 4m31s
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:
1 parent
2442966743
commit
c91d63663b
24 files changed
+989
-29
No files matched your search
+17
-5
@@ -34,7 +34,8 @@ Each phase ends with tests, a Studio/viewer check in Edge, commit and push.
|
||||
- [x] Code editor for scripts, prefabs, theme and manifest, with script errors by file and line
|
||||
- [x] MCP tools inside the page (`isokit.mcp`), WebMCP registration when the browser offers it
|
||||
- [x] `tools/build_web.py` (static output), `tools/check_web.py` (44 checks, Edge)
|
||||
- [ ] Deploy a hosted copy; render in a Web Worker for very large scenes
|
||||
- [x] Hosted copy at https://isokit.buildfor.life/ (deployed by `.gitea/workflows/deploy-web.yml`)
|
||||
- [ ] Render in a Web Worker for very large scenes
|
||||
|
||||
## Agent window (done)
|
||||
|
||||
@@ -75,9 +76,9 @@ Each phase ends with tests, a Studio/viewer check in Edge, commit and push.
|
||||
2. ~~Conveyors~~ (done, see below)
|
||||
3. ~~Producers with adjustable production speed~~ (done, see below)
|
||||
4. ~~Robotic arms~~ (done, see below)
|
||||
5. Rounded streets: curved road segments
|
||||
6. Sidewalks along streets
|
||||
7. Roundabouts
|
||||
5. ~~Rounded streets: curved road segments~~ (done, see below)
|
||||
6. ~~Sidewalks along streets~~ (done, see below)
|
||||
7. ~~Roundabouts~~ (done, see below)
|
||||
8. Waypoint animation: a person or car moving along a path of waypoints
|
||||
9. ~~Build your own house~~ (done, see above)
|
||||
|
||||
@@ -108,12 +109,23 @@ another belt or on a pallet, one move per item (or a set cycle), waiting while t
|
||||
stands; the belt after it runs in step. Drawn as a 16-pose flipbook (inverse kinematics, links as
|
||||
the new native `beam` primitive) shown by a stepped CSS animation.
|
||||
|
||||
Streets (stdlib/streets.rhai): roads take sidewalks (none, both, left, right; 12 cm high paving with
|
||||
kerb faces); Road curve (radius, angle, left / right) carries a street round a bend, its kerbs and
|
||||
sidewalks drawn as true arcs so the 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 and give-way lines on the entry side (traffic on the left or right), central island with
|
||||
apron (tree, grass or paved). A road run drawn corner by corner gets a curve in each corner (prefab
|
||||
meta `corner`). Tooltips list the streets each one meets. New `polyline` primitive (open paths, so
|
||||
dashes run on round curves). `examples/streets`, Streets demo in the web Studio.
|
||||
|
||||
## Phase 2: richer editing
|
||||
|
||||
- [x] Interior prefabs (see Build your own house); a building `rooms` prop is still open
|
||||
- [ ] Path objects in the Studio: click points for areas, roads (polyline with width), fences, walls,
|
||||
pipe runs; vertex handles
|
||||
- [ ] Multi-select (box select, Shift-click), group move, align/distribute
|
||||
- [x] Multi-select (box select, Ctrl+click, Shift range), group move, turn, copy, delete, edit
|
||||
- [ ] Align / distribute the selection
|
||||
- [ ] Copy/paste between projects; prefab thumbnails in the palette (rendered icons)
|
||||
- [ ] Measure tool and grid overlay; numeric resize handles on the selection
|
||||
- [ ] Studio editor for `theme.toml` (colour pickers) and for project parameters
|
||||
|
||||
@@ -88,6 +88,7 @@ shaded automatically by face direction.
|
||||
| `flat(poly or polys, z, cls[, id])` | flat polygon(s); later ones cut holes |
|
||||
| `open(a, b, [[u0, u1, z0, z1], …], cls[, id])` | windows / doors on the face a→b (outward normal on the right) |
|
||||
| `lines(segs, z, cls)`, `disc(cx, cy, z, r, cls[, id])` | markings |
|
||||
| `polyline(lines, z, cls)` | open lines through plan points at height z (or 3D points): a dashed line stays one dash run round a curve |
|
||||
| `circle(x, y, z, r_px, cls[, dx, dy])`, `stem(x, y, z0, z1, w_px, cls)` | screen-space details (crowns, poles) |
|
||||
| `person(x, y, z[, cls])`, `sit(x, y, z, cls)`, `head(x, y, z, r)`, `led(x, y, z[, cls])` | figures |
|
||||
| `puffs(x, y, z[, kind[, n, dur]])`, `fan(x, y, z, r)` | animated steam / smoke / fans |
|
||||
@@ -153,6 +154,34 @@ through the document, like house parts:
|
||||
Poses pointing away from the viewer are drawn before the base, the others
|
||||
after it.
|
||||
|
||||
## Streets
|
||||
|
||||
`road`, `road_curve` and `roundabout` (stdlib/streets.rhai; `road` lives in
|
||||
ground.rhai) meet by their centre lines:
|
||||
|
||||
- Each street is a centre line (a polyline or a true arc) with the
|
||||
carriageway `d` wide around it; `walk` (none, both, left, right, looking
|
||||
along local +x) adds sidewalks `walk_w` wide behind the kerbs: 12 cm high
|
||||
paving with the kerb face drawn where it is turned to the viewer. Arcs stay
|
||||
arcs when cut and offset, so a curve meets a straight road exactly.
|
||||
- End to end (a curve continuing a road, a road continuing a roundabout arm)
|
||||
the pieces carry on, overlapping by 4 cm so no hairline shows.
|
||||
- A street ending on a road's centre line makes a T: the road leaves a gap in
|
||||
its kerb and sidewalk on that side, the street stops its centre line and
|
||||
kerbs at the road's edge and its sidewalks at the road's sidewalk.
|
||||
- Two roads ending at one point at right angles close the corner: both run
|
||||
over it, the inner sidewalks stop at the other road's kerb, the outer ones
|
||||
go round.
|
||||
- A roundabout's arms end `r + arm_len` from its centre, along its local
|
||||
+x, +y, -x, -y. Its kerbs flare into the ring with a fillet; splitter
|
||||
islands and give-way lines sit on the entry side for `drive` left or right.
|
||||
- The prefab meta `corner: "road_curve"` on `road` tells the Studio to round
|
||||
each corner of a road run with a curve (up to its default radius, less
|
||||
where the pieces next to a corner are short).
|
||||
- `street_ends(o)`, `street_join(o, end, others)`, `street_gaps(o, others)`
|
||||
and `street_path(o, line, j0, j1, gaps)` are there for your own street
|
||||
prefabs; tooltips list the streets each one meets (`Meets`).
|
||||
|
||||
## House parts
|
||||
|
||||
`house_wall`, `window`, `door`, `floor`, `roof`, `stairs` and the furniture
|
||||
|
||||
Reference in new issue
Block a user