Talos docs

WaterHandle

Since 0.7

The scene's water, read-only: the sea, its lakes and rivers, exactly as the engine floats buoyancy bodies on them, at ctx.time.now.

Plain text

A replay reads the same numbers.

Signature

export interface WaterHandle {
  /**
   * The water at world (x, z), or null where there is none. Throws a `RangeError`
   * (`fluid.sample-invalid`) for a coordinate that is not a finite number.
   */
  sample(x: number, z: number): WaterSample | null
}

Import: import type { WaterHandle } from "@argus/api"

Members

MemberSignatureDescription
samplesample(x: number, z: number): WaterSample | nullThe water at world (x, z), or null where there is none. Throws a RangeError (fluid.sample-invalid) for a coordinate that is not a finite number.