melonjs
    Preparing search index...

    Function panner

    • Parameters

      • sound_name: string

        audio clip name - case sensitive

      • Optionalattributes: {
            coneInnerAngle?: string;
            coneOuterAngle?: string;
            coneOuterGain?: string;
            distanceModel?: string;
            maxDistance?: string;
            panningModel?: string;
            refDistance?: string;
            rolloffFactor?: string;
        }

        the panner attributes to set

        • OptionalconeInnerAngle?: string

          A parameter for directional audio sources, this is an angle, in degrees, inside of which there will be no volume reduction.

        • OptionalconeOuterAngle?: string

          A parameter for directional audio sources, this is an angle, in degrees, outside of which the volume will be reduced to a constant value of coneOuterGain.

        • OptionalconeOuterGain?: string

          A parameter for directional audio sources, this is the gain outside of the coneOuterAngle. It is a linear value in the range [0, 1].

        • OptionaldistanceModel?: string

          Determines algorithm used to reduce volume as audio moves away from listener. Can be linear, inverse or exponential. @param {string} [attributes.maxDistance=10000] - The maximum distance between source and listener, after which the volume will not be reduced any further. @param {string} [attributes.refDistance=1] - A reference distance for reducing volume as source moves further from the listener. This is simply a variable of the distance model and has a different effect depending on which model is used and the scale of your coordinates. Generally, volume will be equal to 1 at this distance. @param {string} [attributes.rolloffFactor=1] - How quickly the volume reduces as source moves from listener. This is simply a variable of the distance model and can be in the range of [0, 1]withlinearand[0, ∞]withinverseandexponential. @param {string} [attributes.panningModel="HRTF"] - Determines which spatialization algorithm is used to position audio. Can be HRTForequalpower`.

        • OptionalmaxDistance?: string
        • OptionalpanningModel?: string
        • OptionalrefDistance?: string
        • OptionalrolloffFactor?: string
      • Optionalid: number

        the sound instance ID. If none is passed, all sounds in group will be changed.

      Returns Object

      current panner attributes.

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