rng(seed: number) → any
| arg | type | description |
|---|
| seed | number | |
next(self: any) → number
| arg | type | description |
|---|
| self | any | |
range(self: any, a: number, b: number) → number
| arg | type | description |
|---|
| self | any | |
| a | number | |
| b | number | |
int(self: any, a: number, b: number) → number
| arg | type | description |
|---|
| self | any | |
| a | number | |
| b | number | |
pick(self: any, t: { any }) → any
| arg | type | description |
|---|
| self | any | |
| t | { any } | |
window(b: any, x: number, y: number, w: number, h: number, o: any?) → void
A facade frame: push to the wall's outer face centre with the outward normal as
local +Z. The wall body then spans x in [-L/2, L/2], z in [-t, 0].
A window on a facade: recessed glass, a timber surround, a sill, shutters and
(optionally) a flower box.
| arg | type | description |
|---|
| b | any | |
| x | number | |
| y | number | |
| w | number | |
| h | number | |
| o | any? | |
door(b: any, x: number, y: number, w: number, h: number, o: any?) → void
A door on a facade. `open` leaves a walkable opening (an interior behind it).
| arg | type | description |
|---|
| b | any | |
| x | number | |
| y | number | |
| w | number | |
| h | number | |
| o | any? | |
wallWithOpenings(b: any, slot: string, L: number, H: number, t: number, openings: { { number } }, y0: number?) → void
A wall face with rectangular openings cut out. Openings: { x, w, y, h }.
Builds the wall body (slot) in pieces around the openings, returns nothing.
| arg | type | description |
|---|
| b | any | |
| slot | string | |
| L | number | |
| H | number | |
| t | number | |
| openings | { { number } } | |
| y0 | number? | |
timberFrame(b: any, L: number, y0: number, H: number, o: any?) → void
Half-timber framing on a facade panel (x in [-L/2, L/2], y in [y0, y0+H]).
| arg | type | description |
|---|
| b | any | |
| L | number | |
| y0 | number | |
| H | number | |
| o | any? | |
gableRoof(b: any, slot: string, w: number, d: number, y0: number, pitch: number, o: any?) → void
A gable roof over a w (x) by d (z) box whose eaves sit at y0, ridge along x.
Returns the ridge height above y0.
| arg | type | description |
|---|
| b | any | |
| slot | string | |
| w | number | |
| d | number | |
| y0 | number | |
| pitch | number | |
| o | any? | |
gableEnds(b: any, slot: string, w: number, d: number, y0: number, rise: number, o: any?) → void
the triangular gable walls at both ends of a gable roof (x = +-w/2)
| arg | type | description |
|---|
| b | any | |
| slot | string | |
| w | number | |
| d | number | |
| y0 | number | |
| rise | number | |
| o | any? | |
chimney(b: any, x: number, z: number, y0: number, h: number) → void
| arg | type | description |
|---|
| b | any | |
| x | number | |
| z | number | |
| y0 | number | |
| h | number | |
house(b: any, o: any) → void
A half-timbered town house. o: w, d, floors, roof, plaster, base ("stone"|"plaster"), seed
| arg | type | description |
|---|
| b | any | |
| o | any | |
facade(front: boolean) → void
the four walls, front (-Z) and back (+Z) as facades, sides as plain walls
| arg | type | description |
|---|
| front | boolean | |
houseSmall(b: any, o: any) → void
| arg | type | description |
|---|
| b | any | |
| o | any | |
houseMedium(b: any, o: any) → void
| arg | type | description |
|---|
| b | any | |
| o | any | |
houseLarge(b: any, o: any) → void
| arg | type | description |
|---|
| b | any | |
| o | any | |
cottage(b: any, o: any) → void
a thatched cottage for hamlets
| arg | type | description |
|---|
| b | any | |
| o | any | |
shop(b: any, o: any) → void
A shop: a house whose ground floor is an open shopfront with a counter under a
striped awning, a hanging sign and goods. o.shop: general|smith|potion|bakery|tailor
| arg | type | description |
|---|
| b | any | |
| o | any | |
table4(b: any, x: number, z: number, seats: boolean) → void
| arg | type | description |
|---|
| b | any | |
| x | number | |
| z | number | |
| seats | boolean | |
fireplace(b: any, x: number, z: number, yaw: number) → void
| arg | type | description |
|---|
| b | any | |
| x | number | |
| z | number | |
| yaw | number | |
chandelier(b: any, x: number, y: number, z: number) → void
| arg | type | description |
|---|
| b | any | |
| x | number | |
| y | number | |
| z | number | |
innerFinish(b: any, L: number, H: number, t: number, openings: { { number } }, o: any?) → void
The warm inside face of a wall, built in that wall's own frame (the wall spans
local z in [-t, 0]; -z faces the room): a plaster skin with the wall's openings
cut out, wood wainscoting with stiles, a chair rail and a skirting board. Any
opening that starts below the wainscot (a doorway) cuts the wainscot too.
| arg | type | description |
|---|
| b | any | |
| L | number | |
| H | number | |
| t | number | |
| openings | { { number } } | |
| o | any? | |
innerBanner(b: any, x: number, top: number, t: number, cloth: string, h: number?) → void
A hanging banner on an inside wall (wall frame, -z faces the room).
| arg | type | description |
|---|
| b | any | |
| x | number | |
| top | number | |
| t | number | |
| cloth | string | |
| h | number? | |
sconce(b: any, x: number, y: number, t: number, intensity: number?) → void
A candle sconce on an inside wall with a warm light (wall frame).
| arg | type | description |
|---|
| b | any | |
| x | number | |
| y | number | |
| t | number | |
| intensity | number? | |
guildHall(b: any, o: any) → void
The adventurers' guild: a stone hall you walk into through a wide doorway, with a
reception desk, a quest board, tables, a fireplace and chandeliers; a timber
upper storey, a teal roof and a bell tower with the guild's banners outside.
| arg | type | description |
|---|
| b | any | |
| o | any | |
inn(b: any, o: any) → void
The Sleeping Griffin: an inn and tavern with an open doorway, a bar with stools,
barrels behind it, tables, a fireplace and rooms upstairs (closed).
| arg | type | description |
|---|
| b | any | |
| o | any | |
crenels(b: any, slot: string, L: number, y: number, z: number, t: number) → void
| arg | type | description |
|---|
| b | any | |
| slot | string | |
| L | number | |
| y | number | |
| z | number | |
| t | number | |
tower(b: any, o: any) → void
A round tower with a conical roof. o.r, o.h, o.roof
| arg | type | description |
|---|
| b | any | |
| o | any | |
wall(b: any, o: any) → void
A straight stretch of town wall, `o.length` long, along local x, 2.4 m thick.
| arg | type | description |
|---|
| b | any | |
| o | any | |
castleGate(b: any, o: any) → void
The castle gate: a stone gatehouse with an arched passage you walk through, a
raised portcullis, crenellations, banners and two round towers with conical roofs.
| arg | type | description |
|---|
| b | any | |
| o | any | |
chapel(b: any, o: any) → void
A small stone chapel with a bell cote (closed, decorative), for squares.
| arg | type | description |
|---|
| b | any | |
| o | any | |
marketStall(b: any, o: any) → void
| arg | type | description |
|---|
| b | any | |
| o | any | |
build(b: any, kind: string, o: any?) → void
Write one building of `kind` into builder `b` (its local frame). Returns its footprint {w, d}.
| arg | type | description |
|---|
| b | any | |
| kind | string | |
| o | any? | |