Skip to content

Documentation / scene / Water

Class: Water

Defined in: libs/scene/src/scene/water.ts:43

Water scene node

Extends

  • GraphNode<this> & object & Disposable<this> & IMixinDrawable

Implements

Constructors

Constructor

new Water(scene): Water

Defined in: libs/scene/src/scene/water.ts:73

Creates an instance of Water node

Parameters

scene

Scene

Scene object

Returns

Water

Overrides

applyMixins(GraphNode, mixinDrawable).constructor

Properties

objectColor

readonly objectColor: Vector4

Defined in: libs/scene/src/render/drawable_mixin.ts:13

Inherited from

applyMixins(GraphNode, mixinDrawable).objectColor


BBOXDRAW_INHERITED

readonly static BBOXDRAW_INHERITED: -1 = -1

Defined in: libs/scene/src/scene/scene_node.ts:167

Bounding-box draw mode inherited from nearest graph ancestor.

Inherited from

applyMixins(GraphNode, mixinDrawable).BBOXDRAW_INHERITED


BBOXDRAW_DISABLED

readonly static BBOXDRAW_DISABLED: 0 = 0

Defined in: libs/scene/src/scene/scene_node.ts:169

Disable bounding-box visualization.

Inherited from

applyMixins(GraphNode, mixinDrawable).BBOXDRAW_DISABLED


BBOXDRAW_LOCAL

readonly static BBOXDRAW_LOCAL: 1 = 1

Defined in: libs/scene/src/scene/scene_node.ts:171

Draw local-space bounding box.

Inherited from

applyMixins(GraphNode, mixinDrawable).BBOXDRAW_LOCAL


BBOXDRAW_WORLD

readonly static BBOXDRAW_WORLD: 2 = 2

Defined in: libs/scene/src/scene/scene_node.ts:173

Draw world-space bounding box.

Inherited from

applyMixins(GraphNode, mixinDrawable).BBOXDRAW_WORLD

Accessors

disposed

Get Signature

get disposed(): boolean

Defined in: libs/base/dist/index.d.ts:6107

Returns

boolean

Inherited from

applyMixins(GraphNode, mixinDrawable).disposed


placeToOctree

Get Signature

get placeToOctree(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:313

Whether the node should be inserted into the scene's spatial structure.

Remarks

Toggling this hints the scene to (re)place the node in octree/acceleration structures.

Returns

boolean

Set Signature

set placeToOctree(val): void

Defined in: libs/scene/src/scene/scene_node.ts:316

Parameters
val

boolean

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).placeToOctree


runtimeId

Get Signature

get runtimeId(): number

Defined in: libs/scene/src/scene/scene_node.ts:327

Node's runtime unique identifier

Returns

number

Inherited from

applyMixins(GraphNode, mixinDrawable).runtimeId


persistentId

Get Signature

get persistentId(): string

Defined in: libs/scene/src/scene/scene_node.ts:336

Node's persistent identifier.

Remarks

Changing this affects serialization and registry lookup; ensure uniqueness.

Returns

string

Set Signature

set persistentId(id): void

Defined in: libs/scene/src/scene/scene_node.ts:339

Parameters
id

string

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).persistentId


prefabId

Get Signature

get prefabId(): string

Defined in: libs/scene/src/scene/scene_node.ts:348

If not empty, this node was loaded from a prefab

Remarks

Internal used for serialization

Returns

string

Set Signature

set prefabId(id): void

Defined in: libs/scene/src/scene/scene_node.ts:351

Parameters
id

string

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).prefabId


jointTypeT

Get Signature

get jointTypeT(): "none" | "animated" | "static"

Defined in: libs/scene/src/scene/scene_node.ts:367

Translation type if this is a joint node of any skeleton

Remarks

Internal used for serialization

Returns

"none" | "animated" | "static"

Set Signature

set jointTypeT(val): void

Defined in: libs/scene/src/scene/scene_node.ts:370

Parameters
val

"none" | "animated" | "static"

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).jointTypeT


jointTypeS

Get Signature

get jointTypeS(): "none" | "animated" | "static"

Defined in: libs/scene/src/scene/scene_node.ts:379

Scale type if this is a joint node of any skeleton

Remarks

Internal used for serialization

Returns

"none" | "animated" | "static"

Set Signature

set jointTypeS(val): void

Defined in: libs/scene/src/scene/scene_node.ts:382

Parameters
val

"none" | "animated" | "static"

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).jointTypeS


jointTypeR

Get Signature

get jointTypeR(): "none" | "animated" | "static"

Defined in: libs/scene/src/scene/scene_node.ts:391

Rotation type if this is a joint node of any skeleton

Remarks

Internal used for serialization

Returns

"none" | "animated" | "static"

Set Signature

set jointTypeR(val): void

Defined in: libs/scene/src/scene/scene_node.ts:394

Parameters
val

"none" | "animated" | "static"

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).jointTypeR


metaData

Get Signature

get metaData(): Metadata

Defined in: libs/scene/src/scene/scene_node.ts:403

Arbitrary metadata associated with this node.

Remarks

Stored and transported with the node; format is application-defined.

Returns

Metadata

Set Signature

set metaData(val): void

Defined in: libs/scene/src/scene/scene_node.ts:406

Parameters
val

Metadata

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).metaData


script

Get Signature

get script(): string

Defined in: libs/scene/src/scene/scene_node.ts:415

Attached script filename or identifier (engine-specific).

Remarks

Integrates with the engine’s scripting system if available.

Returns

string

Set Signature

set script(fileName): void

Defined in: libs/scene/src/scene/scene_node.ts:418

Parameters
fileName

string

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).script


scriptConfig

Get Signature

get scriptConfig(): object | unknown[]

Defined in: libs/scene/src/scene/scene_node.ts:431

Script component configuration payload used by editor/runtime script components.

Returns

object | unknown[]

Set Signature

set scriptConfig(value): void

Defined in: libs/scene/src/scene/scene_node.ts:434

Parameters
value

object | unknown[]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).scriptConfig


scripts

Get Signature

get scripts(): ScriptAttachment[]

Defined in: libs/scene/src/scene/scene_node.ts:448

All script attachments on this node.

Returns

ScriptAttachment[]

Set Signature

set scripts(value): void

Defined in: libs/scene/src/scene/scene_node.ts:451

Parameters
value

ScriptAttachment[]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).scripts


scriptConfigs

Get Signature

get scriptConfigs(): unknown[]

Defined in: libs/scene/src/scene/scene_node.ts:457

Script configs for all script attachments.

Returns

unknown[]

Set Signature

set scriptConfigs(value): void

Defined in: libs/scene/src/scene/scene_node.ts:460

Parameters
value

unknown[]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).scriptConfigs


name

Get Signature

get name(): string

Defined in: libs/scene/src/scene/scene_node.ts:475

Display name of the node (for UI/debugging).

Returns

string

Set Signature

set name(val): void

Defined in: libs/scene/src/scene/scene_node.ts:478

Parameters
val

string

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).name


scene

Get Signature

get scene(): Scene

Defined in: libs/scene/src/scene/scene_node.ts:482

The owning scene.

Returns

Scene

Inherited from

applyMixins(GraphNode, mixinDrawable).scene


attached

Get Signature

get attached(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:488

Whether this node is currently attached under the scene's root.

Returns

boolean

Inherited from

applyMixins(GraphNode, mixinDrawable).attached


sealed

Get Signature

get sealed(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:502

If true, the node is logically sealed; some operations (like cloning as child) may be restricted by engine policies.

Returns

boolean

Set Signature

set sealed(val): void

Defined in: libs/scene/src/scene/scene_node.ts:505

Parameters
val

boolean

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).sealed


animationSet

Get Signature

get animationSet(): AnimationSet

Defined in: libs/scene/src/scene/scene_node.ts:514

Lazily created animation set for this node.

Remarks

Accessing this schedules the node for update in the scene.

Returns

AnimationSet

Inherited from

applyMixins(GraphNode, mixinDrawable).animationSet


sharedModel

Get Signature

get sharedModel(): SharedModel

Defined in: libs/scene/src/scene/scene_node.ts:524

Shared model reference for instancing/streaming systems.

Returns

SharedModel

Set Signature

set sharedModel(model): void

Defined in: libs/scene/src/scene/scene_node.ts:527

Parameters
model

SharedModel

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).sharedModel


morphTargetGroups

Get Signature

get morphTargetGroups(): SceneMorphTargetGroup[]

Defined in: libs/scene/src/scene/scene_node.ts:531

Runtime morph target groups bound to this model instance.

Returns

SceneMorphTargetGroup[]

Set Signature

set morphTargetGroups(groups): void

Defined in: libs/scene/src/scene/scene_node.ts:534

Parameters
groups

SceneMorphTargetGroup[]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).morphTargetGroups


clipTestEnabled

Get Signature

get clipTestEnabled(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:779

Clip mode

Returns

boolean

Set Signature

set clipTestEnabled(val): void

Defined in: libs/scene/src/scene/scene_node.ts:782

Parameters
val

boolean

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).clipTestEnabled


hidden

Get Signature

get hidden(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:786

Computed value of show state

Returns

boolean

Inherited from

applyMixins(GraphNode, mixinDrawable).hidden


showState

Get Signature

get showState(): SceneNodeVisible

Defined in: libs/scene/src/scene/scene_node.ts:794

Show state

Returns

SceneNodeVisible

Set Signature

set showState(val): void

Defined in: libs/scene/src/scene/scene_node.ts:797

Parameters
val

SceneNodeVisible

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).showState


pickable

Get Signature

get pickable(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:815

Whether this node is enabled for CPU picking

Returns

boolean

Set Signature

set pickable(val): void

Defined in: libs/scene/src/scene/scene_node.ts:818

Parameters
val

boolean

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).pickable


gpuPickable

Get Signature

get gpuPickable(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:822

Whether this node is enabled for GPU picking

Returns

boolean

Set Signature

set gpuPickable(val): void

Defined in: libs/scene/src/scene/scene_node.ts:825

Parameters
val

boolean

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).gpuPickable


computedBoundingBoxDrawMode

Get Signature

get computedBoundingBoxDrawMode(): number

Defined in: libs/scene/src/scene/scene_node.ts:907

Computed value for bounding box draw mode

Returns

number

Inherited from

applyMixins(GraphNode, mixinDrawable).computedBoundingBoxDrawMode


boundingBoxDrawMode

Get Signature

get boundingBoxDrawMode(): number

Defined in: libs/scene/src/scene/scene_node.ts:918

Bounding box draw mode

Returns

number

Set Signature

set boundingBoxDrawMode(mode): void

Defined in: libs/scene/src/scene/scene_node.ts:921

Parameters
mode

number

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).boundingBoxDrawMode


parent

Get Signature

get parent(): SceneNode

Defined in: libs/scene/src/scene/scene_node.ts:1211

Parent of the xform

Returns

SceneNode

Set Signature

set parent(p): void

Defined in: libs/scene/src/scene/scene_node.ts:1214

Parameters
p

SceneNode

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).parent


children

Get Signature

get children(): SceneNode[]

Defined in: libs/scene/src/scene/scene_node.ts:1220

Children of this xform

Returns

SceneNode[]

Inherited from

applyMixins(GraphNode, mixinDrawable).children


position

Get Signature

get position(): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1226

Position of the xform relative to it's parent

Returns

Vector3

Set Signature

set position(val): void

Defined in: libs/scene/src/scene/scene_node.ts:1229

Parameters
val

Vector3

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).position


scale

Get Signature

get scale(): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1235

Scaling of the xform

Returns

Vector3

Set Signature

set scale(val): void

Defined in: libs/scene/src/scene/scene_node.ts:1238

Parameters
val

Vector3

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).scale


rotation

Get Signature

get rotation(): Quaternion

Defined in: libs/scene/src/scene/scene_node.ts:1244

Rotation of the xform

Returns

Quaternion

Set Signature

set rotation(val): void

Defined in: libs/scene/src/scene/scene_node.ts:1247

Parameters
val

Quaternion

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).rotation


localMatrix

Get Signature

get localMatrix(): Immutable<Matrix4x4>

Defined in: libs/scene/src/scene/scene_node.ts:1353

Local transformation matrix of the xform

Returns

Immutable<Matrix4x4>

Set Signature

set localMatrix(matrix): void

Defined in: libs/scene/src/scene/scene_node.ts:1360

Parameters
matrix

Immutable<Matrix4x4>

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).localMatrix


worldMatrix

Get Signature

get worldMatrix(): Immutable<Matrix4x4>

Defined in: libs/scene/src/scene/scene_node.ts:1364

World transformation matrix of the xform

Returns

Immutable<Matrix4x4>

Inherited from

applyMixins(GraphNode, mixinDrawable).worldMatrix


worldMatrixDet

Get Signature

get worldMatrixDet(): number

Defined in: libs/scene/src/scene/scene_node.ts:1369

The determinant of world matrix

Returns

number

Inherited from

applyMixins(GraphNode, mixinDrawable).worldMatrixDet


invWorldMatrix

Get Signature

get invWorldMatrix(): Immutable<Matrix4x4>

Defined in: libs/scene/src/scene/scene_node.ts:1374

Inverse of the world transformation matrix of the xform

Returns

Immutable<Matrix4x4>

Inherited from

applyMixins(GraphNode, mixinDrawable).invWorldMatrix


wireframe

Get Signature

get wireframe(): boolean

Defined in: libs/scene/src/scene/water.ts:113

Whether water should be drawn with lines

Returns

boolean

Set Signature

set wireframe(val): void

Defined in: libs/scene/src/scene/water.ts:116

Parameters
val

boolean

Returns

void


material

Get Signature

get material(): WaterMaterial

Defined in: libs/scene/src/scene/water.ts:120

Material of the water

Returns

WaterMaterial


waveGenerator

Get Signature

get waveGenerator(): WaveGenerator

Defined in: libs/scene/src/scene/water.ts:124

Wave generator object of the water

Returns

WaveGenerator

Set Signature

set waveGenerator(waveGenerator): void

Defined in: libs/scene/src/scene/water.ts:127

Parameters
waveGenerator

WaveGenerator

Returns

void


infinite

Get Signature

get infinite(): boolean

Defined in: libs/scene/src/scene/water.ts:145

Whether the surface reads as an unbounded ocean reaching the horizon, rather than a body of water ending at the node's extent.

Off by default. A pond, a lake or a pool has an edge, and the region test that draws it is skipped entirely while this is on.

The horizon is reached without touching the camera's far plane: the clipmap's outermost ring is drawn as a skirt whose outer vertices are pushed well past it with their depth pinned to the far value. A far plane sized for the near scene therefore keeps its depth precision.

Returns

boolean

Set Signature

set infinite(val): void

Defined in: libs/scene/src/scene/water.ts:148

Parameters
val

boolean

Returns

void


viewDistance

Get Signature

get viewDistance(): number

Defined in: libs/scene/src/scene/water.ts:166

How far the surface is built out from the camera while infinite is on, in meters. 0 derives it from the true horizon distance for the camera's height above the water.

Raising it costs clipmap levels, which are logarithmic in the distance, so the geometry cost of a much larger value is small. What it really trades is against the sky's SkyRenderer.aerialPerspectiveDistance: build the water out further than the aerial perspective LUT reaches and the far water stops converging towards the sky colour, which puts back the hard band this setting exists to remove.

Returns

number

Set Signature

set viewDistance(val): void

Defined in: libs/scene/src/scene/water.ts:169

Parameters
val

number

Returns

void


animationSpeed

Get Signature

get animationSpeed(): number

Defined in: libs/scene/src/scene/water.ts:177

Animation speed of the water. Zero freezes the surface where it is rather than resetting it: the wave phase is accumulated, and this scales the increment.

Returns

number

Set Signature

set animationSpeed(val): void

Defined in: libs/scene/src/scene/water.ts:180

Parameters
val

number

Returns

void


TAAStrength

Get Signature

get TAAStrength(): number

Defined in: libs/scene/src/scene/water.ts:184

TAA strength of the water

Returns

number

Set Signature

set TAAStrength(val): void

Defined in: libs/scene/src/scene/water.ts:187

Parameters
val

number

Returns

void


causticsEnabled

Get Signature

get causticsEnabled(): boolean

Defined in: libs/scene/src/scene/water.ts:197

Whether this water projects caustics onto the geometry below it.

Needs a shadow-casting directional light and a WebGL2/WebGPU device; the caustics pass switches itself off when either is missing, and when the sun drops close to the horizon.

Returns

boolean

Set Signature

set causticsEnabled(val): void

Defined in: libs/scene/src/scene/water.ts:200

Parameters
val

boolean

Returns

void


causticsIntensity

Get Signature

get causticsIntensity(): number

Defined in: libs/scene/src/scene/water.ts:204

Strength of the caustic contrast. 0 leaves the light unmodulated.

Returns

number

Set Signature

set causticsIntensity(val): void

Defined in: libs/scene/src/scene/water.ts:207

Parameters
val

number

Returns

void


causticsDepth

Get Signature

get causticsDepth(): number

Defined in: libs/scene/src/scene/water.ts:211

Depth in meters below the surface where the caustics are in focus.

Returns

number

Set Signature

set causticsDepth(val): void

Defined in: libs/scene/src/scene/water.ts:214

Parameters
val

number

Returns

void


causticsSceneDepth

Get Signature

get causticsSceneDepth(): boolean

Defined in: libs/scene/src/scene/water.ts:221

Whether caustics land on the scene rather than on a plane at causticsDepth. WebGL2 keeps the plane regardless.

Returns

boolean

Set Signature

set causticsSceneDepth(val): void

Defined in: libs/scene/src/scene/water.ts:224

Parameters
val

boolean

Returns

void


causticsRange

Get Signature

get causticsRange(): number

Defined in: libs/scene/src/scene/water.ts:233

Furthest distance in meters from the camera the caustic map reaches.

A cap rather than a fixed extent: the map is fitted to the part of the water within this distance.

Returns

number

Set Signature

set causticsRange(val): void

Defined in: libs/scene/src/scene/water.ts:236

Parameters
val

number

Returns

void


causticsFadeDistance

Get Signature

get causticsFadeDistance(): number

Defined in: libs/scene/src/scene/water.ts:243

Width in meters of the band the caustics fade out over at the edge of the map, or 0 to derive it from causticsRange.

Returns

number

Set Signature

set causticsFadeDistance(val): void

Defined in: libs/scene/src/scene/water.ts:246

Parameters
val

number

Returns

void


causticsWarp

Get Signature

get causticsWarp(): number

Defined in: libs/scene/src/scene/water.ts:254

How strongly caustic map texels are concentrated near the camera, 0 to spread them evenly. Ignored while the map already fits the water within causticsRange.

Returns

number

Set Signature

set causticsWarp(val): void

Defined in: libs/scene/src/scene/water.ts:257

Parameters
val

number

Returns

void


underwaterEnabled

Get Signature

get underwaterEnabled(): boolean

Defined in: libs/scene/src/scene/water.ts:273

Whether a camera inside this body of water sees the water from the inside: the medium applied to the whole scene, the sky replaced by water, and the surface read from below with its Snell window.

Uses the same medium coefficients the surface does (absorption, scattering and their scales), so the volume and the surface never disagree. Atmospheric fog is suppressed while submerged - the medium the eye is looking through is water, not air.

Only reaches opaque geometry, like the atmospheric fog it replaces; transparent surfaces are not tinted by the column in front of them.

Returns

boolean

Set Signature

set underwaterEnabled(val): void

Defined in: libs/scene/src/scene/water.ts:276

Parameters
val

boolean

Returns

void


underwaterAmbientIntensity

Get Signature

get underwaterAmbientIntensity(): number

Defined in: libs/scene/src/scene/water.ts:284

Scale on the downwelling sky light that fills the water column, 1 for the value the sky implies. This is what the water fades to in the distance, so it also sets how bright the underwater haze reads.

Returns

number

Set Signature

set underwaterAmbientIntensity(val): void

Defined in: libs/scene/src/scene/water.ts:287

Parameters
val

number

Returns

void


underwaterGodRays

Get Signature

get underwaterGodRays(): boolean

Defined in: libs/scene/src/scene/water.ts:298

Whether shafts of sunlight are marched through the water column.

Reads the caustic map as the surface's transmittance, so the shafts carry the same pattern that lands on the sea bed. Needs causticsEnabled and everything it needs; switches itself off wherever the map is unavailable.

Returns

boolean

Set Signature

set underwaterGodRays(val): void

Defined in: libs/scene/src/scene/water.ts:301

Parameters
val

boolean

Returns

void


underwaterGodRayIntensity

Get Signature

get underwaterGodRayIntensity(): number

Defined in: libs/scene/src/scene/water.ts:305

Strength of the light shafts, 1 for the value the medium implies.

Returns

number

Set Signature

set underwaterGodRayIntensity(val): void

Defined in: libs/scene/src/scene/water.ts:308

Parameters
val

number

Returns

void


underwaterGodRaySteps

Get Signature

get underwaterGodRaySteps(): number

Defined in: libs/scene/src/scene/water.ts:316

Samples taken along each view ray for the light shafts. Raise it when the shafts read as grain rather than as beams, which is what too few samples of a sharp caustic pattern look like.

Returns

number

Set Signature

set underwaterGodRaySteps(val): void

Defined in: libs/scene/src/scene/water.ts:319

Parameters
val

number

Returns

void


underwaterGodRayShadow

Get Signature

get underwaterGodRayShadow(): boolean

Defined in: libs/scene/src/scene/water.ts:332

Whether geometry standing in the water breaks the light shafts. Off by default.

The shafts come from the caustic map, which describes what the surface did to the sunlight and knows nothing about what is under it, so without this a shaft runs straight through a piling or a hull. Costs a shadow map lookup per march step, roughly doubling what the shafts cost. The sea bed's own shadows are unaffected either way.

Returns

boolean

Set Signature

set underwaterGodRayShadow(val): void

Defined in: libs/scene/src/scene/water.ts:335

Parameters
val

boolean

Returns

void


underwaterHysteresis

Get Signature

get underwaterHysteresis(): number

Defined in: libs/scene/src/scene/water.ts:343

Half-width in meters of the dead band around the surface the submerged test uses, so a camera sitting at water level does not flip state every frame. The test is against the rest plane, not the displaced surface.

Returns

number

Set Signature

set underwaterHysteresis(val): void

Defined in: libs/scene/src/scene/water.ts:346

Parameters
val

number

Returns

void


sunScatteringIntensity

Get Signature

get sunScatteringIntensity(): number

Defined in: libs/scene/src/scene/water.ts:356

Strength of the sunlight scattered out of the water column towards the eye, 1 for the value the medium coefficients imply.

This is what makes a shadow falling on the water darken the water itself, and a low sun tint it. 0 leaves the body lit by the environment alone.

Returns

number

Set Signature

set sunScatteringIntensity(val): void

Defined in: libs/scene/src/scene/water.ts:359

Parameters
val

number

Returns

void


shoreFoamAmount

Get Signature

get shoreFoamAmount(): number

Defined in: libs/scene/src/scene/water.ts:378

Coverage of the foam that collects where the water meets a surface, 0 to disable. Off by default.

Independent of the crest foam the wave generator produces: this one is keyed on how far the surface is from whatever is behind it, measured to that surface's own plane - the depth of water over a bed, the horizontal distance to a piling or a hull - so one band covers both the shoreline and the contact line around anything standing in the water. shoreFoamWashAmount is what makes it run up and drain back rather than sit there as a rim.

Estimated from the depth buffer, so it only knows about what the camera can see: water in front of something standing above the surface gets no foam rather than a guess. See WaterMaterial.shoreFoamAmount.

Returns

number

Set Signature

set shoreFoamAmount(val): void

Defined in: libs/scene/src/scene/water.ts:381

Parameters
val

number

Returns

void


shoreFoamDepth

Get Signature

get shoreFoamDepth(): number

Defined in: libs/scene/src/scene/water.ts:390

How far, in meters, the foam band reaches from the surface behind it. A depth of water over a bed, a horizontal distance against anything vertical. How wide that is on screen depends on the geometry: a thin line on a steep drop-off, a broad stretch on a flat shelf.

Returns

number

Set Signature

set shoreFoamDepth(val): void

Defined in: libs/scene/src/scene/water.ts:393

Parameters
val

number

Returns

void


shoreFoamFalloff

Get Signature

get shoreFoamFalloff(): number

Defined in: libs/scene/src/scene/water.ts:400

Falloff across the band. Above 1 pushes the coverage towards the near end and keeps the outer edge thin and broken.

Returns

number

Set Signature

set shoreFoamFalloff(val): void

Defined in: libs/scene/src/scene/water.ts:403

Parameters
val

number

Returns

void


shoreFoamScale

Get Signature

get shoreFoamScale(): number

Defined in: libs/scene/src/scene/water.ts:413

Size of the clumps the band's edge breaks into, as cycles across the band.

Relative to shoreFoamDepth rather than in cycles per metre, so one setting reads the same on a shoreline metres across and on a collar a handspan wide around a piling.

Returns

number

Set Signature

set shoreFoamScale(val): void

Defined in: libs/scene/src/scene/water.ts:416

Parameters
val

number

Returns

void


shoreFoamWashAmount

Get Signature

get shoreFoamWashAmount(): number

Defined in: libs/scene/src/scene/water.ts:423

How far the band's edge runs back and forth, as a fraction of shoreFoamDepth. 0 leaves a static band.

Returns

number

Set Signature

set shoreFoamWashAmount(val): void

Defined in: libs/scene/src/scene/water.ts:426

Parameters
val

number

Returns

void


shoreFoamWashSpeed

Get Signature

get shoreFoamWashSpeed(): number

Defined in: libs/scene/src/scene/water.ts:430

Run-up cycles per second. Swell rather than wind waves, so well under 1.

Returns

number

Set Signature

set shoreFoamWashSpeed(val): void

Defined in: libs/scene/src/scene/water.ts:433

Parameters
val

number

Returns

void


shoreFoamWashScale

Get Signature

get shoreFoamWashScale(): number

Defined in: libs/scene/src/scene/water.ts:441

Spatial frequency of the run-up phase, in cycles per meter. At 0 the whole waterline advances in lockstep, which reads as the water level rising and falling; a cycle every few tens of meters breaks it into sections.

Returns

number

Set Signature

set shoreFoamWashScale(val): void

Defined in: libs/scene/src/scene/water.ts:444

Parameters
val

number

Returns

void


refractionMode

Get Signature

get refractionMode(): WaterRefractionMode

Defined in: libs/scene/src/scene/water.ts:456

How the refracted view sample is located. Defaults to march.

offset drops the depth-buffer search - a fixed number of texture fetches per water pixel - and displaces the screen UV by the wave normal instead. The water still refracts, but to the wrong point: a submerged silhouette smears rather than holding still. Set it on hardware that cannot afford the search.

Returns

WaterRefractionMode

Set Signature

set refractionMode(val): void

Defined in: libs/scene/src/scene/water.ts:459

Parameters
val

WaterRefractionMode

Returns

void


debugOutput

Get Signature

get debugOutput(): WaterDebugOutput

Defined in: libs/scene/src/scene/water.ts:467

Which intermediate shading term to display instead of the final colour. A debugging aid; leave it at none in production. See WaterDebugOutput for the available views.

Returns

WaterDebugOutput

Set Signature

set debugOutput(val): void

Defined in: libs/scene/src/scene/water.ts:470

Parameters
val

WaterDebugOutput

Returns

void


cheapRefractionDepth

Get Signature

get cheapRefractionDepth(): number

Defined in: libs/scene/src/scene/water.ts:481

Depth in meters the cheap refraction mode assumes the water is, used only when refractionMode is offset.

Sets how strong the cheap distortion looks. A constant rather than the real distance to the bottom, because an offset scaled by that distance paints a second copy of anything breaking the surface.

Returns

number

Set Signature

set cheapRefractionDepth(val): void

Defined in: libs/scene/src/scene/water.ts:484

Parameters
val

number

Returns

void


refractionBlur

Get Signature

get refractionBlur(): number

Defined in: libs/scene/src/scene/water.ts:492

Scale on how much the medium blurs what is seen through it, 1 for the width the scattering coefficient and the path length imply. 0 keeps the background sharp at any depth.

Returns

number

Set Signature

set refractionBlur(val): void

Defined in: libs/scene/src/scene/water.ts:495

Parameters
val

number

Returns

void


absorption

Get Signature

get absorption(): Vector3

Defined in: libs/scene/src/scene/water.ts:499

Absorption coefficient sigma_a in 1/m, per RGB channel.

Returns

Vector3

Set Signature

set absorption(val): void

Defined in: libs/scene/src/scene/water.ts:502

Parameters
val

Vector3

Returns

void


absorptionScale

Get Signature

get absorptionScale(): number

Defined in: libs/scene/src/scene/water.ts:506

Scale for the absorption coefficient.

Returns

number

Set Signature

set absorptionScale(val): void

Defined in: libs/scene/src/scene/water.ts:509

Parameters
val

number

Returns

void


scattering

Get Signature

get scattering(): Vector3

Defined in: libs/scene/src/scene/water.ts:513

Scattering coefficient sigma_s in 1/m, per RGB channel.

Returns

Vector3

Set Signature

set scattering(val): void

Defined in: libs/scene/src/scene/water.ts:516

Parameters
val

Vector3

Returns

void


scatteringScale

Get Signature

get scatteringScale(): number

Defined in: libs/scene/src/scene/water.ts:520

Scale for the scattering coefficient.

Returns

number

Set Signature

set scatteringScale(val): void

Defined in: libs/scene/src/scene/water.ts:523

Parameters
val

number

Returns

void


scatterAnisotropy

Get Signature

get scatterAnisotropy(): number

Defined in: libs/scene/src/scene/water.ts:532

Mean cosine of a single scattering event in the water, in [0, 0.95].

0 scatters equally in all directions; higher brightens the water when looking towards the sun through it.

Returns

number

Set Signature

set scatterAnisotropy(val): void

Defined in: libs/scene/src/scene/water.ts:535

Parameters
val

number

Returns

void


refractionScale

Get Signature

get refractionScale(): number

Defined in: libs/scene/src/scene/water.ts:551

Artistic scale on the refracted view offset. 1 is physical, 0 disables it.

The offset itself is derived: the view ray is refracted at the surface by Snell's law, walked to whatever is behind the water, and the hit point is projected back to the screen. That already accounts for the incidence angle, the depth of the receiver and the perspective foreshortening, so this exists only to dial the result back for a stylised look - not to make it correct.

Values above 1 exaggerate; the surface stays continuous, but the sample can wander far enough from the true hit point that the medium tint stops matching what is visible through it.

Returns

number

Set Signature

set refractionScale(val): void

Defined in: libs/scene/src/scene/water.ts:554

Parameters
val

number

Returns

void


reflectionStrength

Get Signature

get reflectionStrength(): number

Defined in: libs/scene/src/scene/water.ts:566

Scale on the Fresnel reflectance, 1 for the physical value.

Below 1 the surface reflects less than it should and shows more of what is beneath it. Water reflects almost everything at a grazing angle, which is physically right but can bury a sea bed the shot is about; this is the knob that trades that reflection away. The F0 floor is scaled with it, so 0 gives a surface with no specular response at all.

Returns

number

Set Signature

set reflectionStrength(val): void

Defined in: libs/scene/src/scene/water.ts:569

Parameters
val

number

Returns

void


foamAmount

Get Signature

get foamAmount(): number

Defined in: libs/scene/src/scene/water.ts:579

How much of a folded texel reads as foam.

The wave generator reports where the surface has folded over on itself, which is a measure of the fold rather than of area; this scales it into a coverage fraction. 0 disables foam.

Returns

number

Set Signature

set foamAmount(val): void

Defined in: libs/scene/src/scene/water.ts:582

Parameters
val

number

Returns

void


foamFalloff

Get Signature

get foamFalloff(): number

Defined in: libs/scene/src/scene/water.ts:592

Falloff applied to foam coverage before it is scaled.

Above 1 this pushes light folding towards no foam at all, so only a crest that has genuinely broken shows any - which is what keeps a windy sea from turning uniformly white.

Returns

number

Set Signature

set foamFalloff(val): void

Defined in: libs/scene/src/scene/water.ts:595

Parameters
val

number

Returns

void


foamColor

Get Signature

get foamColor(): Vector3

Defined in: libs/scene/src/scene/water.ts:599

Diffuse albedo of the foam.

Returns

Vector3

Set Signature

set foamColor(val): void

Defined in: libs/scene/src/scene/water.ts:602

Parameters
val

Vector3

Returns

void


gridScale

Get Signature

get gridScale(): number

Defined in: libs/scene/src/scene/water.ts:830

Grid scale

Returns

number

Set Signature

set gridScale(val): void

Defined in: libs/scene/src/scene/water.ts:833

Parameters
val

number

Returns

void

Methods

isPrototypeOf()

static isPrototypeOf(v): boolean

Defined in: libs/base/dist/index.d.ts:80

Parameters

v

object

Returns

boolean

Inherited from

applyMixins(GraphNode, mixinDrawable).isPrototypeOf


on()

Call Signature

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:671

IEventTarget.on

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

listener

EventListener<object & object, K>

context?

unknown

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).on

Call Signature

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:630

IEventTarget.on

Type Parameters
K

K extends "dispose"

Parameters
type

K

listener

EventListener<{ dispose: []; }, K>

context?

unknown

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).on


once()

Call Signature

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:675

IEventTarget.once

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

listener

EventListener<object & object, K>

context?

unknown

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).once

Call Signature

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:634

IEventTarget.once

Type Parameters
K

K extends "dispose"

Parameters
type

K

listener

EventListener<{ dispose: []; }, K>

context?

unknown

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).once


off()

Call Signature

off<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:679

IEventTarget.off

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

listener

EventListener<object & object, K>

context?

unknown

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).off

Call Signature

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:638

IEventTarget.off

Type Parameters
K

K extends "dispose"

Parameters
type

K

listener?

EventListener<{ dispose: []; }>

context?

unknown

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).off


dispatchEvent()

Call Signature

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:683

IEventTarget.dispatchEvent

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

args

...object & object[K]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).dispatchEvent

Call Signature

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:642

IEventTarget.dispatchEvent

Type Parameters
K

K extends "dispose"

Parameters
type

K

args

...object[K]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).dispatchEvent


dispose()

dispose(): void

Defined in: libs/base/dist/index.d.ts:6108

Releases all GPU resources and detaches from the renderer.

Returns

void

Implementation of

Drawable.dispose

Inherited from

applyMixins(GraphNode, mixinDrawable).dispose


getDrawableId()

getDrawableId(): number

Defined in: libs/scene/src/render/drawable_mixin.ts:14

Unique, stable identifier for the drawable, used in caches and picking.

Returns

number

Implementation of

Drawable.getDrawableId

Inherited from

applyMixins(GraphNode, mixinDrawable).getDrawableId


pushRenderQueueRef()

pushRenderQueueRef(ref): void

Defined in: libs/scene/src/render/drawable_mixin.ts:15

Pushes a reference to the current render queue for cleanup or back-references.

Useful for batching or delayed state application.

Parameters

ref

RenderQueueRef

Returns

void

Implementation of

Drawable.pushRenderQueueRef

Inherited from

applyMixins(GraphNode, mixinDrawable).pushRenderQueueRef


applyInstanceOffsetAndStride()

applyInstanceOffsetAndStride(renderQueue, stride, offset): void

Defined in: libs/scene/src/render/drawable_mixin.ts:16

Parameters

renderQueue

RenderQueue

stride

number

offset

number

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).applyInstanceOffsetAndStride


applyTransformUniforms()

applyTransformUniforms(renderQueue): void

Defined in: libs/scene/src/render/drawable_mixin.ts:17

Applies transform-related uniforms to the active bind group or pipeline.

Parameters

renderQueue

RenderQueue

The current render queue issuing this draw.

Returns

void

Implementation of

Drawable.applyTransformUniforms

Inherited from

applyMixins(GraphNode, mixinDrawable).applyTransformUniforms


applyMaterialUniforms()

applyMaterialUniforms(instanceInfo): void

Defined in: libs/scene/src/render/drawable_mixin.ts:18

Parameters

instanceInfo

DrawableInstanceInfo

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).applyMaterialUniforms


applyMaterialUniformsAll()

applyMaterialUniformsAll(): void

Defined in: libs/scene/src/render/drawable_mixin.ts:19

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).applyMaterialUniformsAll


getObjectColor()

getObjectColor(): Vector4

Defined in: libs/scene/src/render/drawable_mixin.ts:20

Returns the unique color used for GPU picking (object ID in color).

Returns

Vector4

Implementation of

Drawable.getObjectColor

Inherited from

applyMixins(GraphNode, mixinDrawable).getObjectColor


updateState()

updateState(): void

Defined in: libs/scene/src/render/drawable_mixin.ts:21

Updates internal state or GPU resources for this drawable, if needed.

Returns

void

Implementation of

Drawable.updateState

Inherited from

applyMixins(GraphNode, mixinDrawable).updateState


bind()

bind(ctx, renderQueue): void

Defined in: libs/scene/src/render/drawable_mixin.ts:22

Parameters

ctx

DrawContext

renderQueue

RenderQueue

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).bind


getName()

getName(): string

Defined in: libs/scene/src/scene/graph_node.ts:36

Gets the name

Returns

string

Implementation of

Drawable.getName

Inherited from

applyMixins(GraphNode, mixinDrawable).getName


isGraphNode()

isGraphNode(): this is GraphNode

Defined in: libs/scene/src/scene/graph_node.ts:43

Type guard: true if this node is a graph node.

Returns

this is GraphNode

Inherited from

applyMixins(GraphNode, mixinDrawable).isGraphNode


getNode()

Call Signature

getNode(): Water

Defined in: libs/scene/src/scene/graph_node.ts:49

Returns the owning scene node (transform and hierarchy).

Returns

Water

Implementation of

Drawable.getNode

Inherited from

applyMixins(GraphNode, mixinDrawable).getNode

Call Signature

getNode(): SceneNode

Defined in: libs/scene/src/render/drawable_mixin.ts:88

Returns

SceneNode

Implementation of

Drawable.getNode

Inherited from

applyMixins(GraphNode, mixinDrawable).getNode


getBoneMatrices()

getBoneMatrices(): Texture2D<unknown>

Defined in: libs/scene/src/scene/graph_node.ts:55

Returns the texture containing bone matrices for skinned meshes.

Returns

Texture2D<unknown>

Implementation of

Drawable.getBoneMatrices

Inherited from

applyMixins(GraphNode, mixinDrawable).getBoneMatrices


getSortDistance()

getSortDistance(camera): number

Defined in: libs/scene/src/scene/graph_node.ts:61

Computes the distance used for sorting (e.g., transparent draw order).

Parameters

camera

Camera

Camera from which to compute distance (usually camera -> object).

Returns

number

Implementation of

Drawable.getSortDistance

Inherited from

applyMixins(GraphNode, mixinDrawable).getSortDistance


isBatchable()

isBatchable(): this is BatchDrawable

Defined in: libs/scene/src/scene/graph_node.ts:72

Returns true if the object supports instanced rendering.

When true, the object should also implement the BatchDrawable methods.

Returns

this is BatchDrawable

Implementation of

Drawable.isBatchable

Inherited from

applyMixins(GraphNode, mixinDrawable).isBatchable


getPrefabNode()

getPrefabNode(): SceneNode

Defined in: libs/scene/src/scene/scene_node.ts:358

Get prefab node this node belongs to, or null if this node does not belongs to any prefab

Returns

SceneNode

prefab node this node belongs to

Inherited from

applyMixins(GraphNode, mixinDrawable).getPrefabNode


clone()

clone(): Promise<Water>

Defined in: libs/scene/src/scene/scene_node.ts:548

Clone this node.

Returns

Promise<Water>

New node instance

Remarks

If a shared model exists, it may create an instanced node. The clone is attached under the same parent; children are cloned based on method and recursive.

Inherited from

applyMixins(GraphNode, mixinDrawable).clone


hasChild()

hasChild(child): boolean

Defined in: libs/scene/src/scene/scene_node.ts:578

Whether the given node is a direct child of this node.

Parameters

child

SceneNode

The node to be checked

Returns

boolean

true if the given node is a direct child of this node, false otherwise

Inherited from

applyMixins(GraphNode, mixinDrawable).hasChild


removeChildren()

removeChildren(): void

Defined in: libs/scene/src/scene/scene_node.ts:584

Remove all children from this node.

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).removeChildren


isParentOf()

isParentOf(child): boolean

Defined in: libs/scene/src/scene/scene_node.ts:592

Whether this node is an ancestor (direct or indirect) of the given node.

Parameters

child

SceneNode

Returns

boolean

Inherited from

applyMixins(GraphNode, mixinDrawable).isParentOf


remove()

remove(): Water

Defined in: libs/scene/src/scene/scene_node.ts:603

Detach this node from its parent.

Returns

Water

this

Inherited from

applyMixins(GraphNode, mixinDrawable).remove


traverse()

traverse(v): void

Defined in: libs/scene/src/scene/scene_node.ts:612

Depth-first traversal of this node's subtree (pre-order).

Parameters

v

Visitor<SceneNode>

Visitor invoked on each node.

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).traverse


iterate()

iterate(callback): boolean

Defined in: libs/scene/src/scene/scene_node.ts:626

Iterate self and descendants in pre-order.

Warning: Do not remove children during this iteration. To allow removal, use iterateBottomToTop.

Parameters

callback

NodeIterateFunc

Called for each node; if returns true, iteration stops.

Returns

boolean

If returns true, the iteration will immediately stop.

Inherited from

applyMixins(GraphNode, mixinDrawable).iterate


iterateBottomToTop()

iterateBottomToTop(callback): boolean

Defined in: libs/scene/src/scene/scene_node.ts:645

Iterate self and descendants in reverse post-order (bottom-to-top).

Child nodes can be safely removed during this iteration.

Parameters

callback

NodeIterateFunc

Called for each node; if returns true, iteration stops.

Returns

boolean

If returns true, the iteration will immediately stop.

Inherited from

applyMixins(GraphNode, mixinDrawable).iterateBottomToTop


isLight()

isLight(): this is BaseLight

Defined in: libs/scene/src/scene/scene_node.ts:662

Type guard: true if this node is a light.

Returns

this is BaseLight

Inherited from

applyMixins(GraphNode, mixinDrawable).isLight


isMesh()

isMesh(): this is Mesh

Defined in: libs/scene/src/scene/scene_node.ts:666

Type guard: true if this node is a mesh.

Returns

this is Mesh

Inherited from

applyMixins(GraphNode, mixinDrawable).isMesh


isSprite()

isSprite(): this is Sprite

Defined in: libs/scene/src/scene/scene_node.ts:670

Type guard: true if this node is a sprite

Returns

this is Sprite

Inherited from

applyMixins(GraphNode, mixinDrawable).isSprite


isMSDFTextSprite()

isMSDFTextSprite(): this is MSDFTextSprite

Defined in: libs/scene/src/scene/scene_node.ts:674

Type guard: true if this node is a MSDF text sprite

Returns

this is MSDFTextSprite

Inherited from

applyMixins(GraphNode, mixinDrawable).isMSDFTextSprite


isMSDFText()

isMSDFText(): this is MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:678

Type guard: true if this node is a MSDF text sprite

Returns

this is MSDFText

Inherited from

applyMixins(GraphNode, mixinDrawable).isMSDFText


isHair()

isHair(): this is HairNode

Defined in: libs/scene/src/scene/scene_node.ts:686

Type guard: true if this node is a hair node.

Returns

this is HairNode

Inherited from

applyMixins(GraphNode, mixinDrawable).isHair


isParticleSystem()

isParticleSystem(): this is ParticleSystem

Defined in: libs/scene/src/scene/scene_node.ts:690

Type guard: true if this node is a particle system.

Returns

this is ParticleSystem

Inherited from

applyMixins(GraphNode, mixinDrawable).isParticleSystem


isBatchGroup()

isBatchGroup(): this is BatchGroup

Defined in: libs/scene/src/scene/scene_node.ts:694

Type guard: true if this node is a batch group.

Returns

this is BatchGroup

Inherited from

applyMixins(GraphNode, mixinDrawable).isBatchGroup


isClipmapTerrain()

isClipmapTerrain(): this is ClipmapTerrain

Defined in: libs/scene/src/scene/scene_node.ts:698

Type guard: true if this node is a clipmap terrain.

Returns

this is ClipmapTerrain

Inherited from

applyMixins(GraphNode, mixinDrawable).isClipmapTerrain


isCamera()

isCamera(): this is Camera

Defined in: libs/scene/src/scene/scene_node.ts:702

true if this is a camera node, false otherwise

Returns

this is Camera

Inherited from

applyMixins(GraphNode, mixinDrawable).isCamera


isPunctualLight()

isPunctualLight(): this is PunctualLight

Defined in: libs/scene/src/scene/scene_node.ts:706

true if this is a punctual light node, false otherwise

Returns

this is PunctualLight

Inherited from

applyMixins(GraphNode, mixinDrawable).isPunctualLight


getBoundingVolume()

getBoundingVolume(): BoundingVolume

Defined in: libs/scene/src/scene/scene_node.ts:720

Gets the bounding volume of the node

Returns

BoundingVolume

The bounding volume of the node

Inherited from

applyMixins(GraphNode, mixinDrawable).getBoundingVolume


setBoundingVolume()

setBoundingVolume(bv): void

Defined in: libs/scene/src/scene/scene_node.ts:731

Sets the bounding volume of the node

Parameters

bv

BoundingVolume

The bounding volume to set

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).setBoundingVolume


getWorldBoundingVolume()

getWorldBoundingVolume(): BoundingVolume

Defined in: libs/scene/src/scene/scene_node.ts:742

Gets the world space bounding volume of the node

Returns

BoundingVolume

The world space bounding volume of the node

Inherited from

applyMixins(GraphNode, mixinDrawable).getWorldBoundingVolume


invalidateBoundingVolume()

invalidateBoundingVolume(): void

Defined in: libs/scene/src/scene/scene_node.ts:758

Force the bounding volume to be recalculated

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).invalidateBoundingVolume


invalidateWorldBoundingVolume()

invalidateWorldBoundingVolume(transformChanged): void

Defined in: libs/scene/src/scene/scene_node.ts:763

Force the world space bounding volume to be recalculated

Parameters

transformChanged

boolean

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).invalidateWorldBoundingVolume


findNodeById()

findNodeById<T>(id): T

Defined in: libs/scene/src/scene/scene_node.ts:835

Finds a scene node by its persistent ID.

Type Parameters

T

T extends SceneNode

Expected node type.

Parameters

id

string

Persistent identifier to match against SceneNode.persistentId.

Returns

T

The first matching node, or null if not found.

Inherited from

applyMixins(GraphNode, mixinDrawable).findNodeById


findSkeletonById()

findSkeletonById(id): SkinBinding

Defined in: libs/scene/src/scene/scene_node.ts:850

Finds a skeleton object by its persistent ID.

Parameters

id

string

Persistent identifier to match against Skeleton.persistentId.

Returns

SkinBinding

The first matchign node, or null if not found.

Inherited from

applyMixins(GraphNode, mixinDrawable).findSkeletonById


findSkinBindingById()

findSkinBindingById(id): SkinBinding

Defined in: libs/scene/src/scene/scene_node.ts:858

Finds a skin binding by its persistent ID.

Parameters

id

string

Persistent identifier to match against SkinBinding.persistentId.

Returns

SkinBinding

The first matching binding, or null if not found.

Inherited from

applyMixins(GraphNode, mixinDrawable).findSkinBindingById


findSkeletonRigById()

findSkeletonRigById(id): SkeletonRig

Defined in: libs/scene/src/scene/scene_node.ts:873

Finds a shared skeleton rig by its persistent ID.

Parameters

id

string

Persistent identifier to match against SkeletonRig.persistentId.

Returns

SkeletonRig

The first matching rig, or null if not found.

Inherited from

applyMixins(GraphNode, mixinDrawable).findSkeletonRigById


findNodeByName()

findNodeByName<T>(name): T

Defined in: libs/scene/src/scene/scene_node.ts:895

Finds a scene node by name.

If multiple nodes share the same name, returns the first match encountered during traversal.

Type Parameters

T

T extends SceneNode

Expected node type.

Parameters

name

string

Node name to match.

Returns

T

The first matching node, or null if not found.

Remarks

Names are not guaranteed unique. Prefer IDs for stable references.

Inherited from

applyMixins(GraphNode, mixinDrawable).findNodeByName


getSerializedMorphTargetGroups()

getSerializedMorphTargetGroups(): SerializedMorphTargetGroup[]

Defined in: libs/scene/src/scene/scene_node.ts:978

Returns serialized morph target groups for this node.

Returns

SerializedMorphTargetGroup[]

Inherited from

applyMixins(GraphNode, mixinDrawable).getSerializedMorphTargetGroups


setSerializedMorphTargetGroups()

setSerializedMorphTargetGroups(groups): void

Defined in: libs/scene/src/scene/scene_node.ts:996

Restores serialized morph target groups for this node.

Parameters

groups

SerializedMorphTargetGroup[]

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).setSerializedMorphTargetGroups


invalidateTransform()

invalidateTransform(invalidateLocal?): void

Defined in: libs/scene/src/scene/scene_node.ts:1032

Force transform update and notify descendants.

Parameters

invalidateLocal?

boolean = true

If true, also invalidate local matrix; otherwise only invalidate world matrix.

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).invalidateTransform


setMorphTargetWeight()

setMorphTargetWeight(name, weight): void

Defined in: libs/scene/src/scene/scene_node.ts:1040

Set morph target weight by name for all meshes in the subtree.

Parameters

name

string

Morph target name

weight

number

Morph target weight

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).setMorphTargetWeight


setMorphTargetGroupWeight()

setMorphTargetGroupWeight(name, weight): void

Defined in: libs/scene/src/scene/scene_node.ts:1056

Set morph target group weight for the model instance.

Parameters

name

string

Morph target group name

weight

number

Group weight

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable).setMorphTargetGroupWeight


getMorphTargetGroupWeight()

getMorphTargetGroupWeight(name): number

Defined in: libs/scene/src/scene/scene_node.ts:1078

Get morph target group weight.

Parameters

name

string

Morph target group name

Returns

number

The group weight, or 0 if no group was found

Inherited from

applyMixins(GraphNode, mixinDrawable).getMorphTargetGroupWeight


collectMorphTargetNames()

collectMorphTargetNames(): string[]

Defined in: libs/scene/src/scene/scene_node.ts:1086

Collect all morph target names from meshes in the subtree.

Returns

string[]

Array of unique morph target names

Inherited from

applyMixins(GraphNode, mixinDrawable).collectMorphTargetNames


collectMorphTargetGroupNames()

collectMorphTargetGroupNames(): string[]

Defined in: libs/scene/src/scene/scene_node.ts:1102

Collect all model-level morph target group names.

Returns

string[]

Array of morph target group names

Inherited from

applyMixins(GraphNode, mixinDrawable).collectMorphTargetGroupNames


onPostClone()

protected onPostClone(): void | Promise<void>

Defined in: libs/scene/src/scene/scene_node.ts:1111

Get called when the node was just created by cloning from other node

Returns

void | Promise<void>

Inherited from

applyMixins(GraphNode, mixinDrawable).onPostClone


_onAttached()

protected _onAttached(): void

Defined in: libs/scene/src/scene/scene_node.ts:1181

Get called when this node is attached to scene

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable)._onAttached


_onDetached()

protected _onDetached(): void

Defined in: libs/scene/src/scene/scene_node.ts:1185

Get called when this node is detached from scene

Returns

void

Inherited from

applyMixins(GraphNode, mixinDrawable)._onDetached


worldToThis()

Call Signature

worldToThis(v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1256

Transform world coordinate to local space

Parameters
v

Vector3

point or vector in world space

result?

Vector3

The output result

Returns

Vector3

The transformed local space coordinate

Inherited from

applyMixins(GraphNode, mixinDrawable).worldToThis

Call Signature

worldToThis(v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1257

Transform world coordinate to local space

Parameters
v

Vector4

point or vector in world space

result?

Vector4

The output result

Returns

Vector4

The transformed local space coordinate

Inherited from

applyMixins(GraphNode, mixinDrawable).worldToThis


otherToThis()

Call Signature

otherToThis(other, v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1276

Transform coordinate in other coordinate space to local space

Parameters
other

SceneNode

The other coordinate space

v

Vector3

point or vector in other coordinate space

result?

Vector3

The output result

Returns

Vector3

The transformed local space coordinate

Inherited from

applyMixins(GraphNode, mixinDrawable).otherToThis

Call Signature

otherToThis(other, v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1277

Transform coordinate in other coordinate space to local space

Parameters
other

SceneNode

The other coordinate space

v

Vector4

point or vector in other coordinate space

result?

Vector4

The output result

Returns

Vector4

The transformed local space coordinate

Inherited from

applyMixins(GraphNode, mixinDrawable).otherToThis


thisToWorld()

Call Signature

thisToWorld(v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1287

Transform local coordinate to world space

Parameters
v

Vector3

point or vector in local space

result?

Vector3

The output result

Returns

Vector3

The transformed world space coordinate

Inherited from

applyMixins(GraphNode, mixinDrawable).thisToWorld

Call Signature

thisToWorld(v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1288

Transform local coordinate to world space

Parameters
v

Vector4

point or vector in local space

result?

Vector4

The output result

Returns

Vector4

The transformed world space coordinate

Inherited from

applyMixins(GraphNode, mixinDrawable).thisToWorld


thisToOther()

Call Signature

thisToOther(other, v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1307

Transform local space coordinate to other coordinate space

Parameters
other

SceneNode

The other coordinate space

v

Vector3

point or vector in localspace

result?

Vector3

The output result

Returns

Vector3

The transformed coordinate in other coordinate space

Inherited from

applyMixins(GraphNode, mixinDrawable).thisToOther

Call Signature

thisToOther(other, v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1308

Transform local space coordinate to other coordinate space

Parameters
other

SceneNode

The other coordinate space

v

Vector4

point or vector in localspace

result?

Vector4

The output result

Returns

Vector4

The transformed coordinate in other coordinate space

Inherited from

applyMixins(GraphNode, mixinDrawable).thisToOther


getWorldPosition()

getWorldPosition(outPos?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1316

Gets the position of the xform in world space

Parameters

outPos?

Vector3

Returns

Vector3

position of the xform in world space

Inherited from

applyMixins(GraphNode, mixinDrawable).getWorldPosition


moveBy()

moveBy(delta): Water

Defined in: libs/scene/src/scene/scene_node.ts:1327

Moves the xform by an offset vector

Parameters

delta

Vector3

The offset vector

Returns

Water

self

Inherited from

applyMixins(GraphNode, mixinDrawable).moveBy


scaleBy()

scaleBy(factor): Water

Defined in: libs/scene/src/scene/scene_node.ts:1336

Scales the xform by a given scale factor

Parameters

factor

Vector3

The scale factor

Returns

Water

self

Inherited from

applyMixins(GraphNode, mixinDrawable).scaleBy


setLocalTransform()

setLocalTransform(matrix): Water

Defined in: libs/scene/src/scene/scene_node.ts:1345

Sets the local transform matrix of the xform

Parameters

matrix

Matrix4x4

The transform matrix to set

Returns

Water

self

Inherited from

applyMixins(GraphNode, mixinDrawable).setLocalTransform


lookAt()

lookAt(eye, target, up): Water

Defined in: libs/scene/src/scene/scene_node.ts:1403

Sets the local tranformation matrix by a look-at matrix

Parameters

eye

Vector3

The eye position used to make the look-at matrix

target

Vector3

The target position used to make the look-at matrix

up

Vector3

The up vector used to make the look-at matrix

Returns

Water

self

Inherited from

applyMixins(GraphNode, mixinDrawable).lookAt


reparent()

reparent(p?): Water

Defined in: libs/scene/src/scene/scene_node.ts:1439

Removes this node from it's parent and add this node to another parent node if required

Parameters

p?

SceneNode

The new parent node that this node should be added to or null

Returns

Water

self

Inherited from

applyMixins(GraphNode, mixinDrawable).reparent


onDispose()

protected onDispose(): void

Defined in: libs/scene/src/scene/water.ts:97

Disposes the water node

Returns

void

Overrides

applyMixins(GraphNode, mixinDrawable).onDispose


update()

update(frameId, elapsedInSeconds): void

Defined in: libs/scene/src/scene/water.ts:606

Update node state once per-frame

Parameters

frameId

number

Current frame id

elapsedInSeconds

number

Elapsed time from game start in seconds

Returns

void

Overrides

applyMixins(GraphNode, mixinDrawable).update


updatePerCamera()

updatePerCamera(camera, _elapsedInSeconds, _deltaInSeconds): void

Defined in: libs/scene/src/scene/water.ts:626

Update node state once per-camera

Parameters

camera

Camera

Updates according to which camera

_elapsedInSeconds

number

Elapsed time from game start in seconds

_deltaInSeconds

number

Elapsed time since previous frame in seconds

Returns

void

Overrides

applyMixins(GraphNode, mixinDrawable).updatePerCamera


getPickTarget()

getPickTarget(): PickTarget

Defined in: libs/scene/src/scene/water.ts:723

Returns the pick target override to be reported when this object is picked.

If not set, a default target derived from the node/material may be used.

Returns

PickTarget

Implementation of

Drawable.getPickTarget


getMorphData()

getMorphData(): any

Defined in: libs/scene/src/scene/water.ts:729

Returns the morph target data texture (if morphing is used).

Returns

any

Implementation of

Drawable.getMorphData


getSkinInfluenceData()

getSkinInfluenceData(): any

Defined in: libs/scene/src/scene/water.ts:732

Returns additional per-vertex skinning influences packed in a texture, if needed.

Returns

any

Implementation of

Drawable.getSkinInfluenceData


getMorphInfo()

getMorphInfo(): any

Defined in: libs/scene/src/scene/water.ts:738

Returns the morph information buffer (weights, ranges, etc.).

Returns

any

Implementation of

Drawable.getMorphInfo


getQueueType()

getQueueType(): number

Defined in: libs/scene/src/scene/water.ts:744

Returns the type/category of render queue this object belongs to.

Returns

number

Implementation of

Drawable.getQueueType


isUnlit()

isUnlit(): boolean

Defined in: libs/scene/src/scene/water.ts:750

True if shading is unlit (does not depend on scene lighting).

Returns

boolean

Implementation of

Drawable.isUnlit


needSceneColor()

needSceneColor(): boolean

Defined in: libs/scene/src/scene/water.ts:756

Whether the object requires access to the scene color buffer.

Returns

boolean

Implementation of

Drawable.needSceneColor


needSceneDepth()

needSceneDepth(): boolean

Defined in: libs/scene/src/scene/water.ts:762

Whether the object requires access to the scene depth (linear or non-linear).

Returns

boolean

Implementation of

Drawable.needSceneDepth


needHiZNearest()

needHiZNearest(): boolean

Defined in: libs/scene/src/scene/water.ts:768

Whether the object queries the Hi-Z pyramid's nearest-depth channel.

Turns that channel on for the frame, which doubles the pyramid's bandwidth, so only a drawable that actually samples it should say yes. Unavailable on WebGL1, where the request is dropped and the drawable has to shade without it.

Optional: almost nothing needs it, and requiring it would break every external Drawable implementation for the sake of a return false.

Returns

boolean

Implementation of

Drawable.needHiZNearest


getMaterial()

getMaterial(): WaterMaterial

Defined in: libs/scene/src/scene/water.ts:774

Returns the bound material driving shading for this drawable.

Returns

WaterMaterial

Implementation of

Drawable.getMaterial


getPrimitive()

getPrimitive(): any

Defined in: libs/scene/src/scene/water.ts:780

Returns the geometry primitive to be drawn.

Returns

any

Implementation of

Drawable.getPrimitive


isWater()

isWater(): this is Water

Defined in: libs/scene/src/scene/water.ts:786

Type guard: true if this node is a water node.

Returns

this is Water

Overrides

applyMixins(GraphNode, mixinDrawable).isWater


computeBoundingVolume()

computeBoundingVolume(): any

Defined in: libs/scene/src/scene/water.ts:792

Computes the bounding volume of the node

Returns

any

The output bounding volume

Overrides

applyMixins(GraphNode, mixinDrawable).computeBoundingVolume


computeWorldBoundingVolume()

computeWorldBoundingVolume(): BoundingBox

Defined in: libs/scene/src/scene/water.ts:798

Computes the world space bounding volume of the node

Returns

BoundingBox

The output bounding volume

Overrides

applyMixins(GraphNode, mixinDrawable).computeWorldBoundingVolume


calculateLocalTransform()

calculateLocalTransform(outMatrix): void

Defined in: libs/scene/src/scene/water.ts:836

Calculate local transform matrix

Parameters

outMatrix

Matrix4x4

Matrix object that holds the result of calculation

Returns

void

Overrides

applyMixins(GraphNode, mixinDrawable).calculateLocalTransform


calculateWorldTransform()

calculateWorldTransform(outMatrix): void

Defined in: libs/scene/src/scene/water.ts:839

Calculate world transform matrix

Parameters

outMatrix

Matrix4x4

Matrix object that holds the result of calculation

Returns

void

Overrides

applyMixins(GraphNode, mixinDrawable).calculateWorldTransform


draw()

draw(ctx, renderQueue): void

Defined in: libs/scene/src/scene/water.ts:861

Issues draw commands for this object.

Parameters

ctx

DrawContext

Full draw context for the current pass.

renderQueue

RenderQueue

The current render queue issuing this draw.

Returns

void

Implementation of

Drawable.draw


getSurfacePoint()

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

Defined in: libs/scene/src/scene/water.ts:875

Retreive the disturbed world position and normal at water surface

Parameters

points

Vector3[]

outPos?

Vector3[]

outNorm?

Vector3[]

Returns

Promise<void>

Released under the MIT License.