shape — where Helsinki is, on this board.
The board is a miniature of the peninsula: sea on three sides, a ragged
coast, Töölönlahti cut into the middle of it, parks where Helsinki has
parks, and a street grid the little blocks stand in. This module answers
the geography questions the diorama is generated from — where the water
ends, what colour the ground is at a point, where a tree may stand — and
holds none of the geometry itself. `game.board.geo` builds; this decides.
World frame: X east, Z south, Y up. North is -Z, the top of the screen.
lerpShore(points: { { z: number, x: number } }, z: number) → number
| arg | type | description |
|---|
| points | { { z: number, x: number } } | |
| z | number | |
wobble(z: number, phase: number) → number
The ragged part. Helsinki's shoreline is all inlets and points; a plain
taper reads as a sausage, so the coast wobbles on three frequencies.
| arg | type | description |
|---|
| z | number | |
| phase | number | |
coast(z: number) → void
The west and east shore x at a given z. Both taper toward the south tip,
where the peninsula runs out into the ferry crossing.
| arg | type | description |
|---|
| z | number | |
bayDepth(x: number, z: number) → number
0 outside the bay, 1 at its middle, with a soft rim so the bank slopes.
| arg | type | description |
|---|
| x | number | |
| z | number | |
islandOutline(inset: number) → void
The fortress island's rim: an ellipse with the bastion notches the star
fort actually has, so its silhouette is not a pebble.
| arg | type | description |
|---|
| inset | number | |
onIsland(x: number, z: number, margin: number) → boolean
| arg | type | description |
|---|
| x | number | |
| z | number | |
| margin | number | |
onLand(x: number, z: number) → boolean
Is this point on the peninsula (not the island, not the bay)?
| arg | type | description |
|---|
| x | number | |
| z | number | |
seaDepth(x: number, z: number) → number
Roughly how far out to sea a point is: 0 at a shore, growing outward.
Used to shade the water from turquoise shallows to open blue.
| arg | type | description |
|---|
| x | number | |
| z | number | |
grain(x: number, z: number) → number
Cheap, seamless value wobble, for grain in the ground colour.
| arg | type | description |
|---|
| x | number | |
| z | number | |
ground(x: number, z: number) → void
The colour of the peninsula's surface at a point: the districts blended
by distance, the parks laid over them, a little grain on top.
| arg | type | description |
|---|
| x | number | |
| z | number | |
water(x: number, z: number) → void
The sea's colour at a point, shallows through open water.
| arg | type | description |
|---|
| x | number | |
| z | number | |
swell(x: number, z: number) → number
Low, slow swell. The water is built as facets, so this is all the motion
the surface needs to stop reading as a sheet of card.
| arg | type | description |
|---|
| x | number | |
| z | number | |
tileDistance(x: number, z: number) → number
How far the nearest tile centre is. Nothing but the path's own furniture
stands within a slab and a half of the route.
| arg | type | description |
|---|
| x | number | |
| z | number | |
landmarkDistance(x: number, z: number) → number
How far the nearest landmark anchor is, measured to the edge of the
footprint the landmarks slice will fill, so the board leaves it empty.
| arg | type | description |
|---|
| x | number | |
| z | number | |
streetDistance(x: number, z: number) → number
How far the nearest street centreline is.
| arg | type | description |
|---|
| x | number | |
| z | number | |
parkStrength(x: number, z: number) → number
How deep into a park a point is (0 outside every one of them).
| arg | type | description |
|---|
| x | number | |
| z | number | |