Repository navigation
API 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.
new WaterWake(): WaterWake;WaterWake
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: 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: 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: number = 0.6;Defined in: src/engine/render/water/WaterWake.ts:36
0–1: how white the wake is.
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: 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: 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: 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: number = 2.6;Defined in: src/engine/render/water/WaterWake.ts:30
Seconds the trail (beyond the field) lasts behind the boat.
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: 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: 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: 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.
get enabled(): boolean;Defined in: src/engine/core/Component.ts:63
boolean
set enabled(value): void;Defined in: src/engine/core/Component.ts:67
boolean
void
get gameObject(): GameObject;Defined in: src/engine/core/Component.ts:43
Unity-style alias for node.
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.
boolean
get node(): GameObject;Defined in: src/engine/core/Component.ts:38
The node this component is on.
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).
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).
Readonly<TimeState>
get transform(): Transform;Defined in: src/engine/core/Component.ts:57
The Transform of the node this component is on, if it has one.
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.
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.
string
InstantiateOptions = {}
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference