Skip to content

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

Function: surfacesOver() ​

surfacesOver(level, x, z, only?): SurfaceOver[]

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

Every surface of something that collides over (or under) (x, z): each triangle whose footprint holds the point and that is not vertical, with its height there, which way it faces and its kind; only of the kinds only names when given (checked first, so a street with nothing but terrain over it costs next to nothing). The floors, decks and roofs of the layered navigation come from these.

Parameters ​

level ​

LevelData

x ​

number

z ​

number

only? ​

readonly PieceKind[]

Returns ​

SurfaceOver[]