melonJS
    Preparing search index...

    Function orientation

    Get or set the direction the audio source is pointing in 3D space. Combined with the PannerAttributes cone settings, a sound pointing away from the listener will be quieter or silent.

    Call with just sound_name to read back the group's current orientation; call with x (and optionally y / z / id) to write it.

    Audio clip name (case-sensitive).

    X-component of the orientation vector. Omit to read.

    Y-component. Defaults to the current value when setting.

    Z-component. Defaults to the current value when setting.

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

    The current [x, y, z] when called as a getter; nothing when called as a setter.

    • Parameters

      • sound_name: string

      Returns [number, number, number]

    • Parameters

      • sound_name: string
      • x: number
      • Optionaly: number
      • Optionalz: number
      • Optionalid: number

      Returns void