Interior: the architecture pieces rooms are built from, shared by RoomShell
and the apartment shell — plank and tile floors, baseboard and crown
profiles, a straight wall with openings (door ways and windows) that
leaves its colliders open where a doorway is, a window unit, and room trim.
Wall frame: a wall is built along its local x (length L, centred on 0),
thickness t across local z centred on 0, from the floor (y = 0) to `h`.
Face A is the +z face, face B the -z face.
moulding(shape: any, x0: number, x1: number, y: number) → void
A moulding profile extruded along local x from x0 to x1, standing out to +z.
| arg | type | description |
|---|
| shape | any | |
| x0 | number | |
| x1 | number | |
| y | number | |
plankFloor(P: any, parent: any, x0: number, x1: number, z0: number, z1: number, seed: number) → void
Oak planks over the rectangle x0..x1, z0..z1 (top at y = 0), running along X.
| arg | type | description |
|---|
| P | any | |
| parent | any | |
| x0 | number | |
| x1 | number | |
| z0 | number | |
| z1 | number | |
| seed | number | |
tileFloor(parent: any, x0: number, x1: number, z0: number, z1: number, size: number, seed: number) → void
Porcelain tiles over the rectangle (top at y = 0), on a grout bed.
| arg | type | description |
|---|
| parent | any | |
| x0 | number | |
| x1 | number | |
| z0 | number | |
| z1 | number | |
| size | number | |
| seed | number | |
tileGeo(w: number, d: number) → void
| arg | type | description |
|---|
| w | number | |
| d | number | |
window(P: any, g: any, o: any, t: number, inside: number) → void
A window unit in a wall frame at opening `o` ({ c, w, y0, y1 }); `inside` is
+1 when face A is the room side, -1 when face B is.
| arg | type | description |
|---|
| P | any | |
| g | any | |
| o | any | |
| t | number | |
| inside | number | |
doorway(P: any, g: any, o: any, t: number, faceA: boolean, faceB: boolean) → void
A doorway's frame: jamb linings and head across the wall, casings on the
faces named (`faceA`, `faceB`), and an oak threshold across the opening.
| arg | type | description |
|---|
| P | any | |
| g | any | |
| o | any | |
| t | number | |
| faceA | boolean | |
| faceB | boolean | |
wall(P: any, parent: any, spec: any) → void
A straight wall in its own frame. spec: { name, length, t, h, openings =
{ { kind = "doorway" | "window", c, w, y0, y1, inside? } }, faceA, faceB
(true when that face is a room: doorway casings go there) }.
| arg | type | description |
|---|
| P | any | |
| parent | any | |
| spec | any | |
piece(name: string, a: number, b: number, y0: number, y1: number) → void
| arg | type | description |
|---|
| name | string | |
| a | number | |
| b | number | |
| y0 | number | |
| y1 | number | |
collider(name: string, a: number, b: number, y0: number, y1: number) → void
| arg | type | description |
|---|
| name | string | |
| a | number | |
| b | number | |
| y0 | number | |
| y1 | number | |
roomTrim(P: any, parent: any, x0: number, x1: number, z0: number, z1: number, h: number, gaps: any) → void
Baseboard and crown round a room's inner rectangle, the baseboard broken at
each doorway. gaps: { back = { centres along x }, front = {...}, left =
{ centres along z }, right = {...} } in the same coordinates as x0..z1.
| arg | type | description |
|---|
| P | any | |
| parent | any | |
| x0 | number | |
| x1 | number | |
| z0 | number | |
| z1 | number | |
| h | number | |
| gaps | any | |