Skip to main content

audio

Description

This library includes functions that handle audio playback.

Functions

mute

Mute scene audio.

world.audio.mute() // -> void

unmute

Unmute scene audio.

world.audio.unmute() // -> void

pause

Pause scene audio.

world.audio.pause() // -> void

play

Play scene audio.

world.audio.play() // -> void

setVolume

Set volume of scene audio. The parameter should be a value between 0 and 1.

world.audio.setVolume(newVolume: number) // -> void