PokéRogue
    Preparing search index...

    Interface AudioListener

    The AudioListener interface represents the position and orientation of the unique person listening to the audio scene, and is used in audio spatialization.

    MDN Reference

    interface AudioListener {
        forwardX: AudioParam;
        forwardY: AudioParam;
        forwardZ: AudioParam;
        positionX: AudioParam;
        positionY: AudioParam;
        positionZ: AudioParam;
        upX: AudioParam;
        upY: AudioParam;
        upZ: AudioParam;
        setOrientation(
            x: number,
            y: number,
            z: number,
            xUp: number,
            yUp: number,
            zUp: number,
        ): void;
        setPosition(x: number, y: number, z: number): void;
    }
    Index

    Properties

    forwardX: AudioParam

    The forwardX read-only property of the AudioListener interface is an AudioParam representing the x value of the direction vector defining the forward direction the listener is pointing in.

    MDN Reference

    forwardY: AudioParam

    The forwardY read-only property of the AudioListener interface is an AudioParam representing the y value of the direction vector defining the forward direction the listener is pointing in.

    MDN Reference

    forwardZ: AudioParam

    The forwardZ read-only property of the AudioListener interface is an AudioParam representing the z value of the direction vector defining the forward direction the listener is pointing in.

    MDN Reference

    positionX: AudioParam

    The positionX read-only property of the AudioListener interface is an AudioParam representing the x position of the listener in 3D cartesian space.

    MDN Reference

    positionY: AudioParam

    The positionY read-only property of the AudioListener interface is an AudioParam representing the y position of the listener in 3D cartesian space.

    MDN Reference

    positionZ: AudioParam

    The positionZ read-only property of the AudioListener interface is an AudioParam representing the z position of the listener in 3D cartesian space.

    MDN Reference

    The upX read-only property of the AudioListener interface is an AudioParam representing the x value of the direction vector defining the up direction the listener is pointing in.

    MDN Reference

    The upY read-only property of the AudioListener interface is an AudioParam representing the y value of the direction vector defining the up direction the listener is pointing in.

    MDN Reference

    The upZ read-only property of the AudioListener interface is an AudioParam representing the z value of the direction vector defining the up direction the listener is pointing in.

    MDN Reference

    Methods

    • The setOrientation() method of the AudioListener interface defines the orientation of the listener.

      Parameters

      • x: number
      • y: number
      • z: number
      • xUp: number
      • yUp: number
      • zUp: number

      Returns void

      MDN Reference

    • The setPosition() method of the AudioListener Interface defines the position of the listener.

      Parameters

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

      Returns void

      MDN Reference