forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request phaserjs#5274 from pi-kei/sound-panning
Add ability to pan sounds
- Loading branch information
Showing
8 changed files
with
182 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* @author pi-kei | ||
* @copyright 2020 Photon Storm Ltd. | ||
* @license {@link https://opensource.org/licenses/MIT|MIT License} | ||
*/ | ||
|
||
/** | ||
* 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); | ||
* ``` | ||
* | ||
* @event Phaser.Sound.Events#PAN | ||
* @since 3.0.0 | ||
* | ||
* @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event. | ||
* @param {number} pan - The new pan of the Sound. | ||
*/ | ||
module.exports = 'pan'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters