Skip to content

1681-engine / index / SoundOptions

Interface: SoundOptions ​

Defined in: src/audio/SoundEngine.ts:38

Properties ​

gain? ​

ts
optional gain?: number;

Defined in: src/audio/SoundEngine.ts:45

Extra weight (default 1).


local? ​

ts
optional local?: boolean;

Defined in: src/audio/SoundEngine.ts:43

Done by (or to) the local player: full weight.


maxMs? ​

ts
optional maxMs?: number;

Defined in: src/audio/SoundEngine.ts:51

Cut off after this long (ms), faded over CUT_FADE_MS: a cast's sound ends with the cast.


minor? ​

ts
optional minor?: boolean;

Defined in: src/audio/SoundEngine.ts:49

Skipped when the mix is busy (footsteps).


range? ​

ts
optional range?: number;

Defined in: src/audio/SoundEngine.ts:47

How far away it can be heard (px), when nearer than HEARING.


x? ​

ts
optional x?: number;

Defined in: src/audio/SoundEngine.ts:40

Where it happened in the world; absent for what happens to or is done by the local player.


y? ​

ts
optional y?: number;

Defined in: src/audio/SoundEngine.ts:41

Released under the MIT License.