melonJS
    Preparing search index...

    Function panner

    • Get or set the panner-node attributes for a sound or sound group.

      Parameters

      • sound_name: string

        Audio clip name (case-sensitive).

      • Optionalattributes: PannerAttributes

        The PannerAttributes to apply (cone angles, distance model, panning algorithm, …). See the interface for per-field defaults.

      • Optionalid: number

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

      Returns PannerAttributes

      The resulting PannerAttributes after the update.

      me.audio.panner("cling", {
      panningModel: "HRTF",
      refDistance: 0.8,
      rolloffFactor: 2.5,
      distanceModel: "exponential",
      });