Repository navigation
API Class Fog
Defined in: src/engine/render/components.ts:712
Distance fog for the World (ADR 0071): the first enabled one applies to every material that takes fog. Every field can change each frame (a storm fading in) without recompiling materials.
new Fog(): Fog;Fog
affectsSkybox: boolean = false;Defined in: src/engine/render/components.ts:723
Fade the sky to the fog colour too, by skyboxFog.
color: Color;Defined in: src/engine/render/components.ts:715
density: number = 0.02;Defined in: src/engine/render/components.ts:721
Thickness of exponential fog (about 1 / the distance it fades out over).
far: number = 100;Defined in: src/engine/render/components.ts:719
Distance where linear fog is total, in metres.
heightFog: boolean = false;Defined in: src/engine/render/components.ts:727
Height fog (ADR 0110): thick near heightFogBase and thinning above it, on top of distance fog.
heightFogBase: number = 0;Defined in: src/engine/render/components.ts:731
The height, in metres, where height fog has heightFogDensity; it's thicker below and thinner above.
heightFogDensity: number = 0.05;Defined in: src/engine/render/components.ts:729
Height fog's thickness at heightFogBase (about 1 / the distance it fades out over there).
heightFogFalloff: number = 0.2;Defined in: src/engine/render/components.ts:733
How fast height fog thins with height: it falls to about a third every 1 / falloff metres up.
mode: FogMode = "linear";Defined in: src/engine/render/components.ts:714
Distance fog's curve, or none for height fog alone (ADR 0110).
near: number = 10;Defined in: src/engine/render/components.ts:717
Distance where linear fog starts, in metres.
skyboxFog: number = 1;Defined in: src/engine/render/components.ts:725
How far the sky fades to the fog colour when affectsSkybox is on, 0 to 1.
get enabled(): boolean;Defined in: src/engine/core/Component.ts:57
boolean
set enabled(value): void;Defined in: src/engine/core/Component.ts:61
boolean
void
get gameObject(): GameObject;Defined in: src/engine/core/Component.ts:37
Unity-style alias for node.
get isActiveAndEnabled(): boolean;Defined in: src/engine/core/Component.ts:68
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:32
The node this component is on.
get owner(): GameObject;Defined in: src/engine/core/Component.ts:45
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:93
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:51
The Transform of the node this component is on, if it has one.
get world(): WorldHandle;Defined in: src/engine/core/Component.ts:82
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:103
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