Skip to content

API Class WaterWake

github-actions[bot] edited this page Dec 2, 2026 · 3 revisions

Class: WaterWake

Defined in: src/engine/render/water/WaterWake.ts:22

Makes water surfaces draw a wake behind this node while it moves. Its speed is measured from how the node moves (no script needs to feed it); strength scales the wake (0 hides it at once, as disabling the component does). The node's +Z is its bow.

ADR 0665: with a footprint image the hull presses that shape into the water instead of an ellipse (where the field runs on the GPU): a top-down grayscale image in the node's frame, its top row the bow, white pressed draft m deep, its edge softened by feather. The inspector's "Bake footprint" projects the node's meshes into one.

Extends

Constructors

Constructor

new WaterWake(): WaterWake;

Returns

WaterWake

Inherited from

Component.constructor

Properties

bow

bow: number = 2;

Defined in: src/engine/render/water/WaterWake.ts:32

Where the stem meets the water, ahead of the node along its +Z (m).


draft

draft: number = 0.6;

Defined in: src/engine/render/water/WaterWake.ts:45

How deep (m) the footprint's white presses the water (scaled by the wake's strength, as the ellipse is).


feather

feather: number = 0.3;

Defined in: src/engine/render/water/WaterWake.ts:47

How far (m) the footprint's edge is softened, so a sharp-sided hull doesn't throw hard ripples.


foam

foam: number = 0.6;

Defined in: src/engine/render/water/WaterWake.ts:36

0–1: how white the wake is.


footprint

footprint: string = "";

Defined in: src/engine/render/water/WaterWake.ts:43

The hull's footprint (ADR 0665): a grayscale image, top-down, its top row the bow and its left column the node's -X side; white is pressed draft m deep, black not at all. Empty: an ellipse from bow, stern and width.


footprintOffset

footprintOffset: Vector2;

Defined in: src/engine/render/water/WaterWake.ts:51

Where the footprint's centre lies from the node (m): across (x) and along its +Z (y).


footprintSize

footprintSize: Vector2;

Defined in: src/engine/render/water/WaterWake.ts:49

The footprint's size on the water (m): across (x) and along the node's +Z (y).


fullSpeed

fullSpeed: number = 6;

Defined in: src/engine/render/water/WaterWake.ts:26

The speed (m/s) at which the wake is at full size; slower, it is smaller, and none at rest.


life

life: number = 2.6;

Defined in: src/engine/render/water/WaterWake.ts:30

Seconds the trail (beyond the field) lasts behind the boat.


ripples

ripples: number = 0.6;

Defined in: src/engine/render/water/WaterWake.ts:38

0–1: how strongly the trail's Kelvin waves (beyond the field) bend the surface.


stern

stern: number = -2;

Defined in: src/engine/render/water/WaterWake.ts:34

Where the stern is, along its +Z (m; behind the node is negative).


strength

strength: number = 1;

Defined in: src/engine/render/water/WaterWake.ts:24

0–1: scales the whole wake. Set 0 (or disable the component) to hide it at once.


width

width: number = 3;

Defined in: src/engine/render/water/WaterWake.ts:28

The foam trail's width at the stern (m); it widens behind. The hull's beam in the field is a little over half of it.

Accessors

enabled

Get Signature

get enabled(): boolean;

Defined in: src/engine/core/Component.ts:63

Returns

boolean

Set Signature

set enabled(value): void;

Defined in: src/engine/core/Component.ts:67

Parameters
value

boolean

Returns

void

Inherited from

Component.enabled


gameObject

Get Signature

get gameObject(): GameObject;

Defined in: src/engine/core/Component.ts:43

Unity-style alias for node.

Returns

GameObject

Inherited from

Component.gameObject


isActiveAndEnabled

Get Signature

get isActiveAndEnabled(): boolean;

Defined in: src/engine/core/Component.ts:74

True when enabled, the node is active in the hierarchy, and the node is in a loaded world.

Returns

boolean

Inherited from

Component.isActiveAndEnabled


node

Get Signature

get node(): GameObject;

Defined in: src/engine/core/Component.ts:38

The node this component is on.

Returns

GameObject

Inherited from

Component.node


owner

Get Signature

get owner(): GameObject;

Defined in: src/engine/core/Component.ts:51

The node this component acts for: the node itself when attached directly, or the parent node when this component lives on a component node (ADR 0009).

Returns

GameObject

Inherited from

Component.owner


time

Get Signature

get time(): Readonly<TimeState>;

Defined in: src/engine/core/Component.ts:99

This component's World's clock (ADR 0032): the same values as Time, but safe to read outside the World's frame too (after an await, say).

Returns

Readonly<TimeState>

Inherited from

Component.time


transform

Get Signature

get transform(): Transform;

Defined in: src/engine/core/Component.ts:57

The Transform of the node this component is on, if it has one.

Returns

Transform

Inherited from

Component.transform


world

Get Signature

get world(): WorldHandle;

Defined in: src/engine/core/Component.ts:88

A handle on this component's World (ADR 0132): the same one Engine.findWorld returns. Load a scene into it, pause, connect or destroy it: this.world.loadScene("scenes/level2.scene.json"). Throws for a World no Engine owns.

Returns

WorldHandle

Inherited from

Component.world

Methods

instantiate()

instantiate(prefabPath, options?): GameObject;

Defined in: src/engine/core/Component.ts:109

Instantiate a prefab in this component's World (ADR 0034), like GameObject.instantiate. Use it in code that may run after an await: by then the frame is over and the current World is the Engine's default one, which may not be this component's. A parent from another World throws.

Parameters

prefabPath

string

options?

InstantiateOptions = {}

Returns

GameObject

Inherited from

Component.instantiate

Clone this wiki locally