interface AmbientSoundData {
    _id: string;
    x: number;
    y: number;
    radius: number;
    path: string;
    repeat: boolean;
    volume: number;
    walls: boolean;
    easing: boolean;
    hidden: boolean;
    darkness: {
        min: number;
        max: number;
    };
    effects: {
        base: Object;
        muffled: Object;
    };
    flags: object;
}

Properties

_id: string

The _id which uniquely identifies this AmbientSound document

x: number

The x-coordinate position of the origin of the sound.

y: number

The y-coordinate position of the origin of the sound.

radius: number

The radius of the emitted sound.

path: string

The audio file path that is played by this sound

repeat: boolean

Does this sound loop?

volume: number

The audio volume of the sound, from 0 to 1

walls: boolean

Whether or not this sound source is constrained by Walls. True by default.

easing: boolean

Whether to adjust the volume of the sound heard by the listener based on how close the listener is to the center of the sound source. True by default.

hidden: boolean

Is the sound source currently hidden? False by default.

darkness: {
    min: number;
    max: number;
}

A darkness range (min and max) for which the source should be active

Type declaration

  • min: number
  • max: number
effects: {
    base: Object;
    muffled: Object;
}

Special effects to apply to the sound

Type declaration

  • base: Object
  • muffled: Object
flags: object

An object of optional key/value flags