Skip to content

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

Function: supportAt() ​

supportAt(level, x, z, y, tolerance): object

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

What carries something at height y over (x, z), as supportHeight finds it: its height (m) and the colour of the triangle there, the colour of the ground a tyre rolls on (a hillside's grass, a car park's deck); undefined on the level's plane and on a collider nobody sees (the slope under a flight of stairs).

Parameters ​

level ​

LevelData

x ​

number

z ​

number

y ​

number

tolerance ​

number

Returns ​

object

color ​

color: [number, number, number] | undefined

height ​

height: number