Fences join like walls, fence designs, draw runs corner by corner
Deploy web Studio / deploy (push) Successful in 3m52s
Deploy web Studio / deploy (push) Successful in 3m52s
Joints: line_joint (util.rhai) applies the house-wall rules to fences and site walls, so pieces never overlap and the depth sort stays clean. - A corner is closed: the thicker piece (or, if equal, the one along world x) runs through, and the other stops at its face. - On a straight run, two pieces share one post. - At a T, the stem stops at the other piece's face without a post of its own. - A fence that ends at a site or house wall stops at the wall's face. Fence designs (prop style): mesh, wooden boards, steel bars, mesh on a stone base, cobble wall, and brick wall with pillars. Board, stone and brick joints are drawn on the face turned to the viewer. Brick pillars are separate sprites. Studio: line prefabs (walls, fences, hedges, roads) can be drawn as a run by clicking corner after corner. Double-click or Enter ends the run, clicking the first corner closes it, and Backspace drops the last corner. A run is one undo step. A drag still draws one piece. Corners and ends snap onto the ends and lines of the pieces they meet, and a marker shows where the next corner will snap. The house demo gets a brick front wall with gate pillars and wooden side fences in place of the old east fence, which ran over the road. Tests cover every design's corners, Ts, straight runs and wall stops, with no depth-sort cycles in any rotation, plus site walls. check_studio draws and closes a fence run, undoes it in one step, snaps a dragged spur, and picks a design.
This commit is contained in:
1 parent
7962249191
commit
e4017ce2a8
14 files changed
+559
-27
No files matched your search
@@ -81,6 +81,10 @@ Each phase ends with tests, a Studio/viewer check in Edge, commit and push.
|
||||
8. Waypoint animation: a person or car moving along a path of waypoints
|
||||
9. ~~Build your own house~~ (done, see above)
|
||||
|
||||
Done since: the middle mouse button only moves the camera; fences and site walls join like house
|
||||
walls (`line_joint`); fence designs (mesh, wood, bars, half stone, cobble, brick with pillars);
|
||||
runs of walls and fences drawn corner by corner, ends snapping onto the pieces they meet.
|
||||
|
||||
## Phase 2: richer editing
|
||||
|
||||
- [x] Interior prefabs (see Build your own house); a building `rooms` prop is still open
|
||||
|
||||
@@ -100,6 +100,22 @@ parts (`stdlib/house.rhai`, `stdlib/furniture.rhai`): `storey_of(z)`,
|
||||
`wall_top(w)`, `opening_at(o)`, `s.slab(a, b, th, z0, z1, mat)`,
|
||||
`s.chair_at(x, y, bx, by, mat)`, `s.office_chair(x, y, mat)`.
|
||||
|
||||
## Joints of walls and fences
|
||||
|
||||
`line_joint(o, e, same, stops)` (util.rhai) tells a line piece (centre line
|
||||
along local x, length `p.w`) how it meets others at its end `e` (-1 or 1):
|
||||
`#{ ext, post }`, how far it reaches past the end and whether it draws its end
|
||||
post. `same` are the types it joins with, `stops` the types it ends against;
|
||||
half thicknesses come from `line_ht(o)` (`p.t / 2`, for fences the design's).
|
||||
Alone a piece reaches half its thickness past the end; on a straight run the
|
||||
lower piece runs through and draws the shared post; at a corner the thicker
|
||||
piece (equal: the one along world x) runs through and the other stops at its
|
||||
face; at a T the stem stops at the face without an end post; against a `stops`
|
||||
piece it stops at the face and keeps its post. Pieces never overlap, which the
|
||||
depth sort needs. `fence` (designs `style`: mesh, wood, bars, half stone,
|
||||
cobble, brick) and the site `wall` use it; `house_wall` has its own version
|
||||
(`wall_ext`, house.rhai).
|
||||
|
||||
## House parts
|
||||
|
||||
`house_wall`, `window`, `door`, `floor`, `roof`, `stairs` and the furniture
|
||||
|
||||
Reference in new issue
Block a user