Quick Reference
Checks (True / False) 1
| hasFoliage() | Whether it has the foliage. |
Other 21
| decodeFoliageDensity() | Density runs to levels: one byte per cell, size of them. |
| encodeFoliageDensity() | Levels to runs, the trailing none left off. |
| normalizeFoliageLayer() | Normalize foliage layer. |
| normalizeBush() | Normalize bush. |
| normalizeWind() | Normalize wind. |
| normalizeFoliage() | Normalize foliage. |
| foliageOf() | The map's foliage, normalized once per sidecar object (an edit writes a new one). |
| foliageCellOpen() | Whether a kind may grow in a cell: not where a piece or a rock stands on the ground, not under water (reeds t… |
| pieceOnGround() | Whether a piece or a rock stands on the ground in a cell (its foot under 1.5): nothing grows there. |
| foliageSlopeLimit() | The steepest ground anything grows on (rise per tile): a little short of where the room draws rock. |
| foliageClumps() | One layer's clumps in a square of cells, sorted by rank (drawing the first n is an even thinning): base (x, g… |
| bushCells() | The cells a bush stops a walker in: its middle cell and those its body covers, when it is big enough. |
| bushBlocking() | Bush blocking. |
| bushBlocksCell() | Bush blocks cell. |
| terrainBlocks() | Terrain blocks. |
| bushMesh() | A bush as leaf cards round a woody core: positions (tiles), leaf-atlas UVs, colours, and per vertex the bush'… |
| foliageUniforms() | Foliage uniforms. |
| foliageTemplate() | A kind's clump, built in the shader from these: (side or u, height share t or v, which blade) and the part (0… |
| foliageMaterial() | place is the scene's own wind and pushers (foliageOwn); without one the shared ones are read. |
| leafAtlas() | Leaf clusters on a transparent sheet, three cells of it, and a solid corner for the stems. |
| bushMaterial() | Bush material. |
Checks (True / False)
hasFoliage
static sourceR.hasFoliage(mapData)
Whether it has the foliage.
Other
decodeFoliageDensity
static sourceR.decodeFoliageDensity(text, size)
Density runs to levels: one byte per cell, size of them.
Details
Density runs to levels: one byte per cell, size of them. Unknown tokens read as none.
encodeFoliageDensity
static sourceR.encodeFoliageDensity(levels)
Levels to runs, the trailing none left off.
normalizeFoliageLayer
static sourceR.normalizeFoliageLayer(raw, mapData)
Normalize foliage layer.
normalizeBush
static sourceR.normalizeBush(raw, mapData)
Normalize bush.
normalizeWind
static sourceR.normalizeWind(raw)
Normalize wind.
normalizeFoliage
static sourceR.normalizeFoliage(raw, mapData)
Normalize foliage.
foliageOf
static sourceR.foliageOf(mapData)
The map's foliage, normalized once per sidecar object (an edit writes a new one).
foliageCellOpen
static sourceR.foliageCellOpen(mapData, x, y, kind, limit = R.foliageSlopeLimit(mapData)
Whether a kind may grow in a cell: not where a piece or a rock stands on the ground, not under water (reeds take shallow water), not on a slope the room draws as rock.
Details
Whether a kind may grow in a cell: not where a piece or a rock stands on the ground, not under water (reeds take shallow water), not on a slope the room draws as rock. Returns the water's depth for reeds (0 on land), or -1.
pieceOnGround
static sourceR.pieceOnGround(mapData, x, y)
Whether a piece or a rock stands on the ground in a cell (its foot under 1.5): nothing grows there.
foliageSlopeLimit
static sourceR.foliageSlopeLimit(mapData)
The steepest ground anything grows on (rise per tile): a little short of where the room draws rock.
foliageClumps
static sourceR.foliageClumps(mapData, layer, x0, y0, x1, y1)
One layer's clumps in a square of cells, sorted by rank (drawing the first n is an even thinning): base (x, ground, z, yaw), shape (height, width, lean, rank) and tint (r, g, b, phase) per clump.
bushCells
static sourceR.bushCells(bush)
The cells a bush stops a walker in: its middle cell and those its body covers, when it is big enough.
bushBlocking
static sourceR.bushBlocking(mapData)
Bush blocking.
bushBlocksCell
static sourceR.bushBlocksCell(mapData, x, y)
Bush blocks cell.
terrainBlocks
static sourceR.terrainBlocks(mapData, x, y, x2, y2, near)
Terrain blocks.
bushMesh
static sourceR.bushMesh(mapData, bush, out)
A bush as leaf cards round a woody core: positions (tiles), leaf-atlas UVs, colours, and per vertex the bush's foot and how much the vertex sways.
Details
A bush as leaf cards round a woody core: positions (tiles), leaf-atlas UVs, colours, and per vertex the bush's foot and how much the vertex sways. Seeded by the bush, so it looks the same each time the map loads.
foliageUniforms
static sourceR.foliageUniforms()
Foliage uniforms.
foliageTemplate
static sourceR.foliageTemplate(kind)
A kind's clump, built in the shader from these: (side or u, height share t or v, which blade) and the part (0 blade, 1 flower head, 2 cattail, 3 bulb).
foliageMaterial
static sourceR.foliageMaterial(layer, place)
place is the scene's own wind and pushers (foliageOwn); without one the shared ones are read.
leafAtlas
static sourceR.leafAtlas()
Leaf clusters on a transparent sheet, three cells of it, and a solid corner for the stems.
bushMaterial
static sourceR.bushMaterial(place)
Bush material.