Sound#fadeTo()

fadeTo(duration, volume)

Fades the volume of this Sound from its current value to the given volume over the duration specified.
At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,
and the final volume (volume) as the second parameter.

Parameters
Name Type Argument Default Description
duration number <optional>
1000

The time in milliseconds during which the Sound should fade out.

volume number <optional>

The volume which the Sound should fade to. This is a value between 0 and 1.

Source code: sound/Sound.js (Line 966)
doc_phaser
2017-02-14 11:09:45
Comments
Leave a Comment

Please login to continue.