Build your own house: walls, windows, doors, floors, roof, stairs, furniture
Deploy web Studio / deploy (push) Successful in 3m27s

House parts (stdlib isokit/house): house_wall drawn along a line, with ends
that adapt at corners, T-junctions and straight runs so no two walls
overlap; window and door that sit on a wall and cut its opening (door
styles panel, glass, double, sliding, opening; swing and hinge by
rotation); floor (boards, tiles, carpet, stone); roof (hip, gable, flat,
optional solar); stairs.

Furniture (stdlib isokit/furniture): chair, sofa / armchair, table with
chairs, desk with monitor and chair, TV, bed, cupboard, bookshelf, kitchen
run, bathtub, shower, toilet, washbasin, plant, rug, floor lamp.

Cut-open levels: on gf / 1f the walls in front of a room are cut low
(rooms are found by their floors), the roof becomes an outline on the
floor, and storeys above are left out. A part's storey comes from z
(storey_h, default 3 m).

Scripting: objects_of, objects_at, objects_on, mount_of, mounted, frame,
to_world, to_local, local_of. Prefab meta: shape (line / rect), mount,
storey.

Studio: drag to draw lines and rectangles (walls, roads, fences, hedges,
floors, areas, buildings, roofs). The Room tool draws a floor plus walls,
without doubling walls that already stand on an edge. Windows and doors
snap onto walls with a hover preview, and they move, turn, copy and
delete with their wall in one undo step. New parts land on the storey
the view shows. Palette categories collapse, and the palette scrolls
apart from the object list.

The MCP instructions explain house building, and list_prefabs shows
sits_on. examples/house is a furnished bungalow; the web Studio gets a
House demo button. Tests: wall corners and junctions, zero depth-sort
cycles in every view, cut levels, and the house demo in every view;
check_studio covers the room / window / door / storey flow, check_web
the House demo.
This commit is contained in:
grabowski committed 2026-10-24 17:39:04 +07:00
1 parent 84309a7a08
commit 95ea4a8512
26 files changed
+2137 -64

No files matched your search

+34 -3
View File
@@ -15,6 +15,10 @@ click for details. One Rust binary does everything:
same operations; their changes show up live in an open Studio.
- **Build**: a self-contained HTML page with every view prerendered, or
standalone SVGs for documents.
- **Build your own house**: walls, windows, doors, floors, roofs and stairs,
plus furniture (sofa, TV, bed, kitchen, table and chairs, desk, bath, …).
Draw rooms by dragging; windows and doors snap onto walls; the GF / 1F levels
cut the house open like a doll's house.
- **Engine and scripting**: everything you can place is a *prefab* written in
[Rhai](https://rhai.rs). Projects add their own prefabs, scripts and colours
without touching the engine.
@@ -34,13 +38,15 @@ isokit studio C:/dev/myproject/site-view # opens the editor in the browser
isokit build C:/dev/myproject/site-view # dist/index.html, no server needed
```
Try the demo: `isokit studio examples/demo`.
Try the demos: `isokit studio examples/demo` (a works site) and
`isokit studio examples/house` (a furnished house built from parts).
### Studio (for everyone)
| Do | How |
|---|---|
| Add | pick an object on the left, click on the map (Shift-click places several) |
| Draw | walls, roads, fences, hedges: drag along the map; floors, areas, buildings, roofs, rugs: drag a rectangle |
| Select | click it on the map or in the object list |
| Move | drag it, or arrow keys by the snap step (0.1 / 0.5 / 1 / 5 m) |
| Turn | R / Shift+R or ⟲ ⟳ |
@@ -48,6 +54,30 @@ Try the demo: `isokit studio examples/demo`.
| Copy / delete | Ctrl+D / Delete; Ctrl+Z / Ctrl+Y undo and redo |
| Look | drag the ground to pan, Ctrl+wheel or pinch to zoom, ↺ ↻ rotate, Site / GF / 1F levels |
### Building a house
The **House** palette has the parts, **Furniture** the interior:
1. **Room**: drag a rectangle; you get a floor and a house wall on each edge
(walls already standing along an edge are not doubled). Or draw single
**House walls** by dragging along their line, and **Floors** as rectangles.
2. **Window** / **Door**: click on a wall. They snap onto its line, the wall
leaves the opening, and they move, turn, copy and delete with the wall. A
door opens to the side you clicked on; R turns it to the other hinge, then
to the other side. Styles: panel, glass, double, sliding, plain opening.
3. **Furniture**: chair, sofa / armchair, table with chairs, desk with monitor
and chair, TV, bed, cupboard, bookshelf, kitchen run (sink, hob, wall
cabinets, fridge), bathtub, shower, toilet, washbasin, plant, rug, floor
lamp. Fronts face local -y, so the back goes against a wall; R turns them.
4. **Roof** (hip, gable, flat, optional solar) as a rectangle over the walls,
and **Stairs**.
Level **GF** shows the house cut open: walls in front of a room are cut low
(walls tell inside from outside by the floors next to them), the roof becomes an
outline on the ground. For more storeys, view **1F** (2F, …): new walls, floors
and furniture go onto that storey (3 m apart, or the project parameter
`storey_h`), and the storeys below show closed.
Every change is saved to `scene.json` at once. When the file changes on disk
(an agent, git pull, another editor), the Studio reloads it, and that change can
be undone like any other.
@@ -70,7 +100,7 @@ requests. In addition:
| | |
|---|---|
| **Projects ▾** | list, open, delete; new project; demo copy; export as `.zip`; import a `.zip` or a project folder (drop it on the strip, or pick it) |
| **Projects ▾** | list, open, delete; new project; demo copy; house demo; export as `.zip`; import a `.zip` or a project folder (drop it on the strip, or pick it) |
| **Open folder live** | Chrome / Edge: edits are written straight to the folder's files, and changes made there (an agent running `isokit mcp <folder>`, an editor, `git pull`) show up within 1.5 s and can be undone |
| **{ } Code** | edit `scene.rhai`, `lib/*.rhai` prefabs, `theme.toml`, `isokit.toml`; Ctrl+S applies, script errors show with file and line |
| **Build page** | downloads the self-contained HTML page (a folder project gets `dist/index.html` like `isokit build`) |
@@ -175,7 +205,8 @@ crates/isokit-wasm the engine for the browser (wasm-bindgen): a project in m
viewer/ isokit-view.js/.css: pan, zoom, levels, rotation, tooltips (any page can embed it)
studio/ the Studio GUI (served by `isokit studio`, and by the web Studio); agent.js = agent window
web/ web Studio shell: WASM backend for studio.js, projects, folders, zip, code editor
examples/demo demo project
examples/demo demo project (works site)
examples/house house built from parts (walls, windows, doors, floors, furniture, roof)
deploy/Caddyfile the web Studio's vhost on the buildfor.life web server (s1)
```