Skip to content

LODCrowdingScratch

Defined in: network/lod.ts:1840

Reusable working storage for computeLODCrowding (#426): each aggregate’s members’ box, largest radius, horizon extent and 2-D index root, the index entries of the wide nodes, the walk’s pair stack, and one node’s children gathered at a time — grown on demand to the largest tree seen, so a pass run per streamed frame allocates nothing once warm. 28 B per aggregate; about 6 B per child of an indexed node (a wide node that is not crowded: 36 B per index entry, at most one per 16 children, and 4 B in perm); and 28 B per child of the widest node.

box: Float32Array

Defined in: network/lod.ts:1842

Per aggregate o = g − leafCount: its members’ box, [minX, minY, maxX, maxY] at 4o.


kdBox: Float32Array

Defined in: network/lod.ts:1856

Per index entry p: its members’ box at 4p, largest effective radius and member (leaf) count.


kdCount: Uint32Array

Defined in: network/lod.ts:1858


kdHi: Uint32Array

Defined in: network/lod.ts:1863


kdLeft: Uint32Array

Defined in: network/lod.ts:1860

Per index entry: its first child entry (the second is next to it), or 0 for a bucket.


kdLo: Uint32Array

Defined in: network/lod.ts:1862

Per entry: the range [kdLo, kdHi) of perm its children fill (a bucket’s, in x order).


kdR: Float32Array

Defined in: network/lod.ts:1857


kdRoot: Uint32Array

Defined in: network/lod.ts:1854

Per aggregate: 1 + the index entry at the root of the 2-D index over its children, or 0 when it has none — its children form one bucket (CROWDING_BUCKET), or it is crowded (no walk ever enters it).


kdStack: Uint32Array

Defined in: network/lod.ts:1867

The index’s job stack: an entry’s own pairs, or the pairs across its two halves.


kid: Uint32Array

Defined in: network/lod.ts:1876

One node’s children, gathered once per node: the child id, its box (a leaf’s is its point), its largest effective radius, and the children that can form a pair (order, reordered by the index and the sweeps). Single precision loses nothing: positions, boxes and radii are all stored in it.


kr: Float32Array

Defined in: network/lod.ts:1881


kx0: Float32Array

Defined in: network/lod.ts:1877


kx1: Float32Array

Defined in: network/lod.ts:1879


ky0: Float32Array

Defined in: network/lod.ts:1878


ky1: Float32Array

Defined in: network/lod.ts:1880


lo: Float32Array

Defined in: network/lod.ts:1849

Per aggregate: the least extent on its path to the root — the one whose horizon comes last, up to which its clear zoom must be exact (Infinity: none needed, see computeLODCrowding).


order: Uint32Array

Defined in: network/lod.ts:1882


pairA: Uint32Array

Defined in: network/lod.ts:1869

The walk’s stack of handle pairs (a tree node id, or size + an index entry).


pairB: Uint32Array

Defined in: network/lod.ts:1870


perm: Uint32Array

Defined in: network/lod.ts:1865

Every indexed node’s children, bucket by bucket, each in x order: a bucket is a range of it.


rmax: Float32Array

Defined in: network/lod.ts:1844

Per aggregate: its members’ largest effective radius (screen radii floored at ½).