PokéRogue
    Preparing search index...

    Interface PannerNode

    The PannerNode interface defines an audio-processing object that represents the location, direction, and behavior of an audio source signal in a simulated physical space.

    MDN Reference

    interface PannerNode {
        channelCount: number;
        channelCountMode: ChannelCountMode;
        channelInterpretation: ChannelInterpretation;
        coneInnerAngle: number;
        coneOuterAngle: number;
        coneOuterGain: number;
        context: BaseAudioContext;
        distanceModel: DistanceModelType;
        maxDistance: number;
        numberOfInputs: number;
        numberOfOutputs: number;
        orientationX: AudioParam;
        orientationY: AudioParam;
        orientationZ: AudioParam;
        panningModel: PanningModelType;
        positionX: AudioParam;
        positionY: AudioParam;
        positionZ: AudioParam;
        refDistance: number;
        rolloffFactor: number;
        addEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | AddEventListenerOptions,
        ): void;
        connect(
            destinationNode: AudioNode,
            output?: number,
            input?: number,
        ): AudioNode;
        connect(destinationParam: AudioParam, output?: number): void;
        disconnect(): void;
        disconnect(output: number): void;
        disconnect(destinationNode: AudioNode): void;
        disconnect(destinationNode: AudioNode, output: number): void;
        disconnect(destinationNode: AudioNode, output: number, input: number): void;
        disconnect(destinationParam: AudioParam): void;
        disconnect(destinationParam: AudioParam, output: number): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | EventListenerOptions,
        ): void;
        setOrientation(x: number, y: number, z: number): void;
        setPosition(x: number, y: number, z: number): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    channelCount: number

    The channelCount property of the AudioNode interface represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.

    MDN Reference

    channelCountMode: ChannelCountMode

    The channelCountMode property of the AudioNode interface represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.

    MDN Reference

    channelInterpretation: ChannelInterpretation

    The channelInterpretation property of the AudioNode interface represents an enumerated value describing how input channels are mapped to output channels when the number of inputs/outputs is different.

    MDN Reference

    coneInnerAngle: number

    The coneInnerAngle property of the PannerNode interface is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction.

    MDN Reference

    coneOuterAngle: number

    The coneOuterAngle property of the PannerNode interface is a double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the PannerNode.coneOuterGain property.

    MDN Reference

    coneOuterGain: number

    The coneOuterGain property of the PannerNode interface is a double value, describing the amount of volume reduction outside the cone, defined by the PannerNode.coneOuterAngle attribute.

    MDN Reference

    The read-only context property of the the node is participating in.

    MDN Reference

    distanceModel: DistanceModelType

    The distanceModel property of the PannerNode interface is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.

    MDN Reference

    maxDistance: number

    The maxDistance property of the PannerNode interface is a double value representing the maximum distance between the audio source and the listener, after which the volume is not reduced any further.

    MDN Reference

    numberOfInputs: number

    The numberOfInputs property of the AudioNode interface returns the number of inputs feeding the node.

    MDN Reference

    numberOfOutputs: number

    The numberOfOutputs property of the AudioNode interface returns the number of outputs coming out of the node.

    MDN Reference

    orientationX: AudioParam

    The orientationX property of the PannerNode interface indicates the X (horizontal) component of the direction in which the audio source is facing, in a 3D Cartesian coordinate space.

    MDN Reference

    orientationY: AudioParam

    The orientationY property of the PannerNode interface indicates the Y (vertical) component of the direction the audio source is facing, in 3D Cartesian coordinate space.

    MDN Reference

    orientationZ: AudioParam

    The orientationZ property of the PannerNode interface indicates the Z (depth) component of the direction the audio source is facing, in 3D Cartesian coordinate space.

    MDN Reference

    panningModel: PanningModelType

    The panningModel property of the PannerNode interface is an enumerated value determining which spatialization algorithm to use to position the audio in 3D space.

    MDN Reference

    positionX: AudioParam

    The positionX property of the PannerNode interface specifies the X coordinate of the audio source's position in 3D Cartesian coordinates, corresponding to the horizontal axis (left-right).

    MDN Reference

    positionY: AudioParam

    The positionY property of the PannerNode interface specifies the Y coordinate of the audio source's position in 3D Cartesian coordinates, corresponding to the vertical axis (top-bottom).

    MDN Reference

    positionZ: AudioParam

    The positionZ property of the PannerNode interface specifies the Z coordinate of the audio source's position in 3D Cartesian coordinates, corresponding to the depth axis (behind-in front of the listener).

    MDN Reference

    refDistance: number

    The refDistance property of the PannerNode interface is a double value representing the reference distance for reducing volume as the audio source moves further from the listener – i.e., the distance at which the volume reduction starts taking effect.

    MDN Reference

    rolloffFactor: number

    The rolloffFactor property of the PannerNode interface is a double value describing how quickly the volume is reduced as the source moves away from the listener.

    MDN Reference

    Methods

    • The connect() method of the AudioNode interface lets you connect one of the node's outputs to a target, which may be either another AudioNode (thereby directing the sound data to the specified node) or an change the value of that parameter over time.

      MDN Reference

      Parameters

      • destinationNode: AudioNode
      • Optionaloutput: number
      • Optionalinput: number

      Returns AudioNode

    • Parameters

      • destinationParam: AudioParam
      • Optionaloutput: number

      Returns void

    • The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

      MDN Reference

      Returns void

    • Parameters

      • output: number

      Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Parameters

      • destinationNode: AudioNode
      • output: number
      • input: number

      Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      Returns void

    • The setOrientation() method of the PannerNode Interface defines the direction the audio source is playing in.

      Parameters

      • x: number
      • y: number
      • z: number

      Returns void

      MDN Reference

    • The setPosition() method of the PannerNode Interface defines the position of the audio source relative to the listener (represented by an AudioListener object stored in the BaseAudioContext.listener attribute.) The three parameters x, y and z are unitless and describe the source's position in 3D space using the right-hand Cartesian coordinate system.

      Parameters

      • x: number
      • y: number
      • z: number

      Returns void

      MDN Reference