Skip to content

five-on-it / packages/world/src/geometry / LevelGeometry

Interface: LevelGeometry ​

Defined in: packages/world/src/geometry.ts:28

The level's triangles in world space, bucketed; one per level object.

Properties ​

box ​

box: Float64Array

Defined in: packages/world/src/geometry.ts:42

The box of each triangle's footprint on the ground: its lowest and highest x, then z (m), four numbers a triangle.


buckets ​

buckets: Map<number, number[]>

Defined in: packages/world/src/geometry.ts:44

The triangles touching each bucket, by bucket key column * stride + row.


kind ​

kind: Uint8Array

Defined in: packages/world/src/geometry.ts:32

The kind of the piece each triangle belongs to, as an index into PIECE_KINDS.


maxY ​

maxY: Float32Array

Defined in: packages/world/src/geometry.ts:40

The highest y of each triangle (m).


minY ​

minY: Float32Array

Defined in: packages/world/src/geometry.ts:38

The lowest y of each triangle (m).


origin ​

origin: number

Defined in: packages/world/src/geometry.ts:48

World x and z of the first bucket (m).


owner ​

owner: Uint32Array

Defined in: packages/world/src/geometry.ts:34

The index of the placement each triangle belongs to.


stride ​

stride: number

Defined in: packages/world/src/geometry.ts:46

Columns per row of buckets.


triangle ​

triangle: Uint32Array

Defined in: packages/world/src/geometry.ts:36

Which triangle of its placement's mesh each triangle is (its first index in the mesh's indices, over three).


tris ​

tris: Float64Array

Defined in: packages/world/src/geometry.ts:30

Vertex positions, nine numbers per triangle (m).