Panner3D
class Component ↳ extends ToneAudioNode<Panner3DOptions>
A spatialized panner node which supports equalpower or HRTF panning.
Constructor
Section titled “Constructor”new Panner3D(positionX: number, positionY: number, positionZ: number)Parameters
-
positionX
numberThe initial x position.
-
positionY
numberThe initial y position.
-
positionZ
numberThe initial z position.
new Panner3D(options?: Partial<Panner3DOptions>)Parameters
- options
Partial<Panner3DOptions>optional
Properties
Section titled “Properties”read-only
input: PannerNodeThe input node or nodes. If the object is a source, it does not have any input and this.input is undefined.
output
Section titled “output”read-only
output: PannerNodeThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
coneInnerAngle
Section titled “coneInnerAngle”coneInnerAngle: numberThe angle, in degrees, inside of which there will be no volume reduction
coneOuterAngle
Section titled “coneOuterAngle”coneOuterAngle: numberThe angle, in degrees, outside of which the volume will be reduced to a constant value of coneOuterGain
coneOuterGain
Section titled “coneOuterGain”coneOuterGain: numberThe gain outside of the coneOuterAngle
distanceModel
Section titled “distanceModel”distanceModel: DistanceModelTypeThe distance model used by, “linear”, “inverse”, or “exponential”.
maxDistance
Section titled “maxDistance”maxDistance: numberThe maximum distance between source and listener, after which the volume will not be reduced any further.
panningModel
Section titled “panningModel”panningModel: PanningModelTypeThe panning model. Either “equalpower” or “HRTF”.
refDistance
Section titled “refDistance”refDistance: numberA reference distance for reducing volume as source move further from the listener
rolloffFactor
Section titled “rolloffFactor”rolloffFactor: numberDescribes how quickly the volume is reduced as source moves away from listener.
Methods
Section titled “Methods”setOrientation()
Section titled “setOrientation()”setOrientation(x: number, y: number, z: number): thisSets the orientation of the source in 3d space.
Parameters
- x
number - y
number - z
number
Returns this
setPosition()
Section titled “setPosition()”setPosition(x: number, y: number, z: number): thisSets the position of the source in 3d space.
Parameters
- x
number - y
number - z
number
Returns this
getDefaults()
Section titled “getDefaults()”static
getDefaults(): Panner3DOptionsReturns all of the default options belonging to the class.
Returns Panner3DOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()