DrainageGraph

interface DrainageGraph

The graph, as the arrays the field and the tests read.

universe/src/drainage.ts:179

Members

areareadonly

area: Float64Array

Upstream area, in cells, the node's own included.

cellMetersreadonly

cellMeters: number

Mean cell size on the ground, meters.

cellsreadonly

cells: number

Cells per face edge.

cellSegmentsreadonly

cellSegments: Uint32Array

cellStartreadonly

cellStart: Uint32Array

nodes + 1 offsets into cellSegments.

elevationreadonly

elevation: Float64Array

The macro landform at the node, meters.

filledreadonly

filled: Float64Array

The spill level: the landform or the water standing over it.

floorreadonly

floor: Float64Array

The channel floor at the node, meters.

lakereadonly

lake: Float64Array

The standing water over the node — a lake's spill level, or the sea's datum on a node the sea reaches — else NaN.

levelreadonly

level: number

The region level the lattice cells are addressed at: log2(cells).

neighborsreadonly

neighbors: Int32Array

Eight neighbor indices per node, −1 where a cube corner has seven. The lattice's own table, shared by every body of this size; on the graph so the kernel packer and the lake lookup read one.

nodesreadonly

nodes: number

6 · cells².

orderreadonly

order: Uint8Array

Strahler order, one at a headwater.

popOrderreadonly

popOrder: Int32Array

The nodes in flood order, downstream first: a topological order.

positionsreadonly

positions: Float64Array

Unit direction per node, jittered inside its cell, three per node.

reachreadonly

reach: number

The valley half-width every segment carves over, radians.

receiverreadonly

receiver: Int32Array

The node each drains to, or −1 at a sink.

seareadonly

sea: Uint8Array

Whether the node is under the sea.

segmentCountreadonly

segmentCount: number

segmentsreadonly

segments: Float32Array