Sound#fadeOut()

fadeOut(duration)

Decreases the volume of this Sound from its current value to 0 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 (0) as the second parameter.

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

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

Source code: sound/Sound.js (Line 952)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.