garden — the grounds the Hedgerow Assizes are fought in.
Every static thing you can see is built here: the mown lawn and its stripes,
the piste, the boundary hedges and their gateways, the garden wall, the
skyline, the furniture, the bell — and the property fence, which is the
health bar and moves whenever a post goes in.
Three entry points, all idempotent and all safe to call at any time:
Garden.build(style) rebuilds the static arena under "duel_arena"
Garden.fence(line) rebuilds the boundary under "duel_fence"
Garden.style() the style name standing in the world right now
`style` names a neighbour's grounds — one of `Garden.STYLES`. It is STICKY:
a name sets it and a later `build()` with no argument keeps it, because
DuelMatch and GardenDressing both rebuild the arena with no argument and a
garden that reverted every restart would be no garden at all. An unknown
name falls back to the standing style rather than erroring. To go back to
the neutral ground, name it: `Garden.build("assize")`.
Both builders despawn what they find before they build, and both call
`setTemporary(true)` on every entity they spawn, on the line after the
spawn. Nothing this module makes may ever reach scene.json: it is derived
from the match state and rebuilt from scratch on every load.
Reading the look. The frame has to answer "where are the two fencers and how
far apart are they" before it answers anything else, so every style is built
in the same value bands. Below a fencer's waist the background is mid-toned
oak paling; above it, deep hedge. A fencer in whites is lighter than either.
What a style changes is hue, skyline and furniture — never the value of the
band a fencer's shoulders are read against, and never anything at fencer
height inside the reading zone.
Depth is done in materials rather than in fog: the far hedge and the wall
wear paler, flatter surfaces than the near ones, which is aerial perspective
without a post-process that also greys out the sky.
Flat things are shelved. Every horizontal surface has its own height in
`M.Y`, 10 mm apart, and each is a 20 mm slab whose TOP sits on its shelf.
Two flat slabs that overlap in depth z-fight, and a z-fight across a lawn
reads as a diagonal seam drawn on the grass.
part(parent: string, name: string, mesh: string, pos: { number }, scale: { number }, mat: string?, rot: { number }?) →
Spawn one visible part. Every part is temporary the line after it spawns.
| arg | type | description |
|---|
| parent | string | Parent entity id. |
| name | string | Entity name. |
| mesh | string | Primitive mesh name ("cube", "cylinder", "sphere", "cone", ...). |
| pos | { number } | Local position as {x, y, z}. |
| scale | { number } | Local scale as {x, y, z}. |
| mat | string? | Material identity, or nil for the engine default. |
| rot | { number }? | Local euler angles as {x, y, z} degrees, or nil. |
backdrop(parent: string, name: string, mesh: string, pos: ?, scale: ?, mat: string?, rot: { number }?) → void
Deep background. It reads as one silhouette against the sky and its own
shadow is never in frame, so it does not spend the shadow atlas that the
fencers' long shadows need.
| arg | type | description |
|---|
| parent | string | |
| name | string | |
| mesh | string | |
| pos | ? | |
| scale | ? | |
| mat | string? | |
| rot | { number }? | |
flat(parent: string, name: string, x: number, z: number, w: number, d: number, y: number, mat: string?) → void
A horizontal slab on one of the shelves in `M.Y`. Nothing drawn on the
ground is authored any other way.
| arg | type | description |
|---|
| parent | string | |
| name | string | |
| x | number | |
| z | number | |
| w | number | |
| d | number | |
| y | number | |
| mat | string? | |
topiaryBall(r: string, x: number, z: number, h: number, tag: string, mat: string, trunk: string) → void
Everything here stands BEHIND the mid hedge or BEYOND the gateways. Nothing
a style adds may stand at fencer height inside the reading zone, because
every upright pale mass near the piste is something the eye has to rule out
before it can find the two fencers.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| h | number | |
| tag | string | |
| mat | string | |
| trunk | string | |
orchardTree(r: string, x: number, z: number, h: number, tag: string, leaf: string, trunk: string) → void
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| h | number | |
| tag | string | |
| leaf | string | |
| trunk | string | |
coneYew(r: string, x: number, z: number, h: number, tag: string, mat: string) → void
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| h | number | |
| tag | string | |
| mat | string | |
topiaryDrum(r: string, x: number, z: number, h: number, tag: string, mat: string) → void
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| h | number | |
| tag | string | |
| mat | string | |
peacockTopiary(r: string, x: number, z: number, tag: string, mat: string, stone: string) → void
Forty years of not surrendering a boundary, clipped into a bird.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| mat | string | |
| stone | string | |
beeSkeps(r: string, x: number, z: number, tag: string, straw: string, stand: string) → void
Mrs Pettifer's bees, on their stand against the wall.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| straw | string | |
| stand | string | |
flagstaff(r: string, x: number, z: number, tag: string, pole: string, flag: string) → void
The Major's colours, and the pole they run up.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| pole | string | |
| flag | string | |
bollardRun(r: string, x0: number, x1: number, z: number, n: number, tag: string, mat: string, chain: string) → void
| arg | type | description |
|---|
| r | string | |
| x0 | number | |
| x1 | number | |
| z | number | |
| n | number | |
| tag | string | |
| mat | string | |
| chain | string | |
sundial(r: string, x: number, z: number, tag: string, mat: string, gnomon: string) → void
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| mat | string | |
| gnomon | string | |
buildUrn(r: string, x: number, z: number, tag: string, stone: string, bloom: string) → void
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| stone | string | |
| bloom | string | |
glasshouse(r: string, x: number, z: number, len: number, tag: string, frame: string, glass: string) → void
A span of glasshouse: a dwarf wall, a glazed body and a ridge. Mr Quilty's
ground is a working nursery and the glass is what says so from a distance.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| len | number | |
| tag | string | |
| frame | string | |
| glass | string | |
coldFrame(r: string, x: number, z: number, tag: string, frame: string, glass: string) → void
A cold frame: a brick kerb under one sloped light, kept low so it never
competes with a fencer for the eye.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| frame | string | |
| glass | string | |
cordonRow(r: string, x0: number, x1: number, z: number, n: number, tag: string, post: string, leafMat: string) → void
Apples trained flat on wires, the nurseryman's stock in trade. A cordon is a
row of thin verticals, so it reads as ruled lines rather than as a mass.
| arg | type | description |
|---|
| r | string | |
| x0 | number | |
| x1 | number | |
| z | number | |
| n | number | |
| tag | string | |
| post | string | |
| leafMat | string | |
potStack(r: string, x: number, z: number, tag: string, mat: string) → void
Pots stacked where they were emptied.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| mat | string | |
headstone(r: string, x: number, z: number, tilt: number, tag: string, mat: string) → void
A headstone, leaning the way three centuries lean it.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tilt | number | |
| tag | string | |
| mat | string | |
lychgate(r: string, x: number, z: number, tag: string, timber: string, roof: string) → void
The lychgate: the roofed gate a churchyard is entered by, and the one piece
of the Revd's ground that has a silhouette of its own.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| timber | string | |
| roof | string | |
columnarYew(r: string, x: number, z: number, h: number, tag: string, mat: string) → void
A columnar churchyard yew. Narrower and far taller than a clipped cone, so
the Revd's skyline is verticals where the Major's is a drill line.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| h | number | |
| tag | string | |
| mat | string | |
hayRick(r: string, x: number, z: number, tag: string, hay: string, timber: string) → void
Young Tibb's rick, netted down and eaten into on the near side.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| hay | string | |
| timber | string | |
wireRun(r: string, x0: number, x1: number, z: number, n: number, tag: string, stake: string, wire: string) → void
Stakes and two strands of galvanised wire: the boundary a tenant actually
keeps, as opposed to the one being fenced for.
| arg | type | description |
|---|
| r | string | |
| x0 | number | |
| x1 | number | |
| z | number | |
| n | number | |
| tag | string | |
| stake | string | |
| wire | string | |
trough(r: string, x: number, z: number, tag: string, mat: string, stand: string) → void
A galvanised trough on its stand.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| tag | string | |
| mat | string | |
| stand | string | |
deadTree(r: string, x: number, z: number, h: number, tag: string, mat: string) → void
A dead ash, left standing because nobody has been paid to take it down.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| z | number | |
| h | number | |
| tag | string | |
| mat | string | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
skyline(r: ?, s: ?) → void
furniture(r: ?, s: ?) → void
beyond(r: ?, s: ?, side: ?, tag: ?) → void
| arg | type | description |
|---|
| r | ? | |
| s | ? | |
| side | ? | |
| tag | ? | |
styleFor(name: string?) → void
| arg | type | description |
|---|
| name | string? | |
style( ) → string
The style name standing in the world right now.
styleLabel(name: string?) → string
What a style is called, for a caption or a log line.
| arg | type | description |
|---|
| name | string? | A style name. |
buildGate(r: string, x: number, side: number, tag: string, s: ?) → void
The gateway at each end of the piste: the hedge stops, two piers carry a
lintel, and through it is the garden being played for. It is also why the
morning sun never throws an end hedge's shadow down the piste.
| arg | type | description |
|---|
| r | string | |
| x | number | |
| side | number | |
| tag | string | |
| s | ? | |
build(style: string?) →
Rebuild the whole static garden. Returns the arena root.
| arg | type | description |
|---|
| style | string? | and an unknown name falls back to it rather than erroring. |
bayNear(fid: string, k: number, x0: number, span: number) → void
| arg | type | description |
|---|
| fid | string | |
| k | number | |
| x0 | number | |
| span | number | |
bayFar(fid: string, k: number, x0: number, span: number) → void
| arg | type | description |
|---|
| fid | string | |
| k | number | |
| x0 | number | |
| span | number | |
wonGround(fid: string, spans: ?, line: number) → void
The ground the fence has taken, drawn as the history of the bout rather than
as one pale rectangle.
Everything more than four posts back is settled turf, mown and grown in.
The four most recent bays are laid one to a post and brighten toward the
line, so the eye can count backwards from where the fight is to how it got
there. Each of those posts still shows its spoil ring — earth turned when it
went in, greening over with every bay it falls behind. The leading edge is
cut in three steps instead of one straight line, because a lawn does not
change hands along a ruler.
| arg | type | description |
|---|
| fid | string | |
| spans | ? | |
| line | number | |
fence(line: number) →
Rebuild the boundary fence for a property line at X = line.
| arg | type | description |
|---|
| line | number | The property line's X position. |