From 7f2874c73e34d4a0146fd7fb7e507e461c011bfe Mon Sep 17 00:00:00 2001 From: Pavel Kabakin Date: Thu, 3 Sep 2020 01:25:04 +0300 Subject: [PATCH] Fix types --- types/phaser.d.ts | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/types/phaser.d.ts b/types/phaser.d.ts index d8422900f..3abb867a9 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -57954,6 +57954,10 @@ declare namespace Phaser { * Time, in seconds, that should elapse before the sound actually starts its playback. */ delay?: number; + /** + * A value between -1 (full left pan) and 1 (full right pan). 0 means no pan. + */ + pan?: number; }; /** @@ -75789,6 +75793,22 @@ declare namespace Phaser { */ const MUTE: any; + /** + * The Sound Pan Event. + * + * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their pan changes. + * + * Listen to it from a Sound instance using `Sound.on('pan', listener)`, i.e.: + * + * ```javascript + * var sound = this.sound.add('key'); + * sound.on('pan', listener); + * sound.play(); + * sound.setPan(0.5); + * ``` + */ + const PAN: any; + /** * The Pause All Sounds Event. * @@ -76078,6 +76098,18 @@ declare namespace Phaser { */ setLoop(value: boolean): Phaser.Sound.HTML5AudioSound; + /** + * Gets or sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan). + * Has no effect on HTML5 Audio Sound. + */ + pan: number; + + /** + * Sets the pan of this Sound. Has no effect on HTML5 Audio Sound. + * @param value The pan of the sound. + */ + setPan(value: number): Phaser.Sound.HTML5AudioSound; + } /** @@ -76400,6 +76432,16 @@ declare namespace Phaser { */ setLoop(value: boolean): Phaser.Sound.WebAudioSound; + /** + * Gets or sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan). + */ + pan: number; + + /** + * Sets the pan of this Sound. + * @param value The pan of the sound. + */ + setPan(value: number): Phaser.Sound.WebAudioSound; } /**