Skip to content
Tone.js

Panner3D

class Component ↳ extends ToneAudioNode<Panner3DOptions>

A spatialized panner node which supports equalpower or HRTF panning.

new Panner3D(positionX: number, positionY: number, positionZ: number)

Parameters

  • positionX number

    The initial x position.

  • positionY number

    The initial y position.

  • positionZ number

    The initial z position.

new Panner3D(options?: Partial<Panner3DOptions>)

Parameters

read-only

input: PannerNode

The input node or nodes. If the object is a source, it does not have any input and this.input is undefined.

read-only

name: string

The name of the class

Default: "Panner3D"

read-only

orientationX: Param<"number">

read-only

orientationY: Param<"number">

read-only

orientationZ: Param<"number">

read-only

output: PannerNode

The output nodes. If the object is a sink, it does not have any output and this.output is undefined.

read-only

positionX: Param<"number">

read-only

positionY: Param<"number">

read-only

positionZ: Param<"number">
coneInnerAngle: number

The angle, in degrees, inside of which there will be no volume reduction

coneOuterAngle: number

The angle, in degrees, outside of which the volume will be reduced to a constant value of coneOuterGain

coneOuterGain: number

The gain outside of the coneOuterAngle

distanceModel: DistanceModelType

The distance model used by, “linear”, “inverse”, or “exponential”.

maxDistance: number

The maximum distance between source and listener, after which the volume will not be reduced any further.

panningModel: PanningModelType

The panning model. Either “equalpower” or “HRTF”.

refDistance: number

A reference distance for reducing volume as source move further from the listener

rolloffFactor: number

Describes how quickly the volume is reduced as source moves away from listener.

dispose(): this

Dispose and disconnect

Returns this

setOrientation(x: number, y: number, z: number): this

Sets the orientation of the source in 3d space.

Parameters

  • x number
  • y number
  • z number

Returns this

setPosition(x: number, y: number, z: number): this

Sets the position of the source in 3d space.

Parameters

  • x number
  • y number
  • z number

Returns this

static

getDefaults(): Panner3DOptions

Returns all of the default options belonging to the class.

Returns Panner3DOptions