Skip to content

Documentation / scene / WaterSurfaceSource

Interface: WaterSurfaceSource ​

Defined in: libs/scene/src/scene/water_surface_sampler.ts:10

What WaterSurfaceSampler needs from a body of water: where its rest plane is, what time its surface is at, and a way to evaluate the displaced surface at a set of positions. Water provides all three.

Properties ​

worldMatrix ​

readonly worldMatrix: object

Defined in: libs/scene/src/scene/water_surface_sampler.ts:12

World matrix; only the translation is read.

m03 ​

readonly m03: number

m13 ​

readonly m13: number

m23 ​

readonly m23: number


waveTime ​

readonly waveTime: number

Defined in: libs/scene/src/scene/water_surface_sampler.ts:14

Wave clock of the surface, in seconds.

Methods ​

getSurfacePoint() ​

getSurfacePoint(points, outPos?, outNorm?): Promise<void>

Defined in: libs/scene/src/scene/water_surface_sampler.ts:16

Evaluate the displaced surface over world XZ positions.

Parameters ​

points ​

Vector3[]

outPos? ​

Vector3[]

outNorm? ​

Vector3[]

Returns ​

Promise<void>

Released under the MIT License.