Skip to main content

Class: WaterOptics

Per-frame driver of the camera's underwater state. Smooths submersion and depth across the waterline, and derives the ambient water color, sky fade, and near-camera light filter that the renderer uniforms consume.

Constructors

constructor

new WaterOptics(): WaterOptics

Returns

WaterOptics

Properties

ambientColor

Readonly ambientColor: Color


depth

depth: number = 0


lightFilter

Readonly lightFilter: Color


skyFade

skyFade: number = 0


submersion

submersion: number = 0


waterPlaneY

waterPlaneY: number = 0

Methods

update

update(input): void

Parameters

NameType
inputWaterOpticsFrameInput

Returns

void