Point handles for routes and outlines; Area corners; bus goes round right
Deploy web Studio / deploy (push) Successful in 1m4s
Deploy web Studio / deploy (push) Successful in 1m4s
Studio: one selected object with pts (a route, an outlined area) shows a handle on each point and a + in the middle of each side: drag a point to move it, drag a + to add one there, double-click a point to remove it (open routes keep 2, outlines 3). Points snap to the grid and onto wall, fence and road ends, at any angle; one undo step each. Handles keep their screen size (new viewer callback onView on every redraw) and follow re-renders and selection. The viewer captures the pointer, so a double- click targets the drawing: the last point pressed is remembered instead. Prefab meta `outline`: the prefab draws pts as its outline. Area has it: Edit corners turns its rectangle into four points, Rectangle again removes them. Routes: where a path doubles back, the lane offset puts a point on each side, so it rounds into a U-turn instead of a diagonal across the lanes. The streets demo bus now runs east, three quarters round the roundabout (clockwise, left-hand traffic), down south street, turns and comes back by the short way, instead of going round the wrong way on its way out. Tests: Rust 81 (a doubling-back route: each mover once, no sort cycles), Studio 134 (corners, move, add, remove, undo), web 100.
This commit is contained in:
1 parent
540b37020c
commit
c8becc2e59
12 files changed
+189
-11
No files matched your search
+3
-2
@@ -162,8 +162,9 @@ per row, Ctrl+G / Ctrl+Shift+G, drag rows to reorder or into a group, ▲ ▼ an
|
||||
## 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 (routes are drawn point by point: meta `shape: "path"`)
|
||||
- [ ] Path objects in the Studio: click points for roads (polyline with width), fences, walls, pipe
|
||||
runs. Done: routes drawn point by point (meta `shape: "path"`); point handles on every object
|
||||
with `pts` (move, add on a side, double-click removes); areas get Edit corners (meta `outline`)
|
||||
- [x] Multi-select (box select, Ctrl+click, Shift range), group move, turn, copy, delete, edit
|
||||
- [x] Groups in the object tree (fold, hide, lock, drag in and out) and the drawing order (drag, ▲ ▼)
|
||||
- [ ] Align / distribute the selection
|
||||
|
||||
@@ -168,6 +168,15 @@ spread within `r` of the object, each facing its rotation give or take 70°,
|
||||
each its own sprite. Flocks of birds, butterflies and bees use `swim` with a
|
||||
`shape`.
|
||||
|
||||
## Points (`pts`)
|
||||
|
||||
An object's `pts` are plan points relative to its x, y in its turned frame. A prefab that draws
|
||||
them as its outline sets `outline: true` in its meta (Area): the Studio then offers Edit corners,
|
||||
which turns its `w` x `d` rectangle into four points, and Rectangle again, which removes them.
|
||||
Every selected object with `pts` shows handles: drag a point, drag the + of a side to add one,
|
||||
double-click a point to remove it (an open route keeps 2, a closed outline 3). Route points say
|
||||
whether they close with `props.closed`; any other `pts` are a closed outline.
|
||||
|
||||
## Groups and the drawing order
|
||||
|
||||
Objects of type `group` are never passed to scripts (they draw nothing), nor is anything inside a
|
||||
|
||||
Reference in new issue
Block a user