Skip to content

Commit 8e2cb94

Browse files
Added docs for defining SoundConfig custom type
1 parent 2219858 commit 8e2cb94

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/sound/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@
88
* @namespace Phaser.Sound
99
*/
1010

11+
/**
12+
* Config object containing various sound settings.
13+
*
14+
* @typedef {object} SoundConfig
15+
*
16+
* @property {boolean} [mute=false] - Boolean indicating whether the sound should be muted or not.
17+
* @property {number} [volume=1] - A value between 0 (silence) and 1 (full volume).
18+
* @property {number} [rate=1] - Defines the speed at which the sound should be played.
19+
* @property {number} [detune=0] - Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
20+
* @property {number} [seek=0] - Position of playback for this sound, in seconds.
21+
* @property {boolean} [loop=false] - Whether or not the sound or current sound marker should loop.
22+
* @property {number} [delay=0] - Time, in seconds, that should elapse before the sound actually starts its playback.
23+
*/
24+
1125
module.exports = {
1226

1327
SoundManagerCreator: require('./SoundManagerCreator'),

0 commit comments

Comments
 (0)