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
readonlyworldMatrix:object
Defined in: libs/scene/src/scene/water_surface_sampler.ts:12
World matrix; only the translation is read.
m03
readonlym03:number
m13
readonlym13:number
m23
readonlym23:number
waveTime
readonlywaveTime: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>