mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
Added volume event docs
This commit is contained in:
parent
5c5ddd88f5
commit
a6c7e2da8b
1 changed files with 5 additions and 0 deletions
|
@ -458,6 +458,11 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', {
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
this.currentConfig.volume = value;
|
this.currentConfig.volume = value;
|
||||||
this.volumeNode.gain.setValueAtTime(value, 0);
|
this.volumeNode.gain.setValueAtTime(value, 0);
|
||||||
|
/**
|
||||||
|
* @event Phaser.Sound.WebAudioSound#volume
|
||||||
|
* @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event.
|
||||||
|
* @param {number} value - An updated value of Phaser.Sound.WebAudioSound#volume property.
|
||||||
|
*/
|
||||||
this.emit('volume', this, value);
|
this.emit('volume', this, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue