melonJS
    Preparing search index...

    Function fade

    • Fade a currently playing sound between two volumes.

      Parameters

      • sound_name: string

        Audio clip name (case-sensitive).

      • from: number

        Volume to fade from, 0.0..1.0.

      • to: number

        Volume to fade to, 0.0..1.0.

      • duration: number

        Fade time in milliseconds.

      • Optionalid: number

        Sound instance ID. When omitted, all sounds in the group are faded.

      Returns void