Skip to content

1681-engine / index / SpatialEmitterOptions

Interface: SpatialEmitterOptions ​

Defined in: src/audio/spatial.ts:48

Extends ​

Properties ​

loop? ​

ts
optional loop?: boolean;

Defined in: src/audio/spatial.ts:52

Plays on for good (default true); a one-shot ends by itself.


maxPan? ​

ts
optional maxPan?: number;

Defined in: src/audio/spatial.ts:15

The furthest it pans, 0–1: 1 is one ear only, which sounds wrong on headphones (default 0.8).

Inherited from ​

SpatialMixOptions.maxPan


muffle? ​

ts
optional muffle?: readonly [number, number] | null;

Defined in: src/audio/spatial.ts:17

Low-pass cutoff (Hz) beside the listener and at the edge of range, so far sounds are dull; null for none.

Inherited from ​

SpatialMixOptions.muffle


panWidth? ​

ts
optional panWidth?: number;

Defined in: src/audio/spatial.ts:13

Px off to one side at which the sound is panned fully that way (default range / 2).

Inherited from ​

SpatialMixOptions.panWidth


playbackRate? ​

ts
optional playbackRate?: number;

Defined in: src/audio/spatial.ts:53


range? ​

ts
optional range?: number;

Defined in: src/audio/spatial.ts:9

Beyond this (px) the source is not heard (default 480).

Inherited from ​

SpatialMixOptions.range


rolloff? ​

ts
optional rolloff?: number;

Defined in: src/audio/spatial.ts:11

How the loudness falls off: 1 straight, higher drops faster near the edge of range (default 1.5).

Inherited from ​

SpatialMixOptions.rolloff


volume? ​

ts
optional volume?: number;

Defined in: src/audio/spatial.ts:50

0–1 (default 1).

Released under the MIT License.