PannerNode Class
A node that spatializes its input relative to the BaseAudioContext.Listener (https://webaudio.github.io/web-audio-api/#PannerNode): its output is stereo, panned by the azimuth (equal power, or a structural head-related transfer function), and attenuated by the distance and the sound cone.
public sealed class PannerNode : AudioNode- Inheritance
AudioNodePannerNode
Constructors
| Name | Description |
|---|---|
| PannerNode(BaseAudioContext, PannerOptions?) | Creates a panner. |
PannerNode(BaseAudioContext, PannerOptions?)
PannerNode.csCreates a panner.
public PannerNode(BaseAudioContext context, PannerOptions? options = null)Properties
| Name | Description |
|---|---|
| ConeInnerAngle | Gets or sets the angle in degrees of the inner cone, in which the volume is not reduced. |
| ConeOuterAngle | Gets or sets the angle in degrees of the outer cone, outside of which the volume is PannerNode.ConeOuterGain. |
| ConeOuterGain | Gets or sets the gain outside of the outer cone, from 0 to 1. |
| DistanceModel | Gets or sets the distance model. |
| MaxDistance | Gets or sets the maximum distance (the volume is not reduced further for greater distances). |
| OrientationX | Gets the x coordinate of the direction the source points to. |
| OrientationY | Gets the y coordinate of the direction the source points to. |
| OrientationZ | Gets the z coordinate of the direction the source points to. |
| PanningModel | Gets or sets the spatialization algorithm. |
| PositionX | Gets the x coordinate of the position. |
| PositionY | Gets the y coordinate of the position. |
| PositionZ | Gets the z coordinate of the position. |
| RefDistance | Gets or sets the reference distance (the volume is not reduced for smaller distances). |
| RolloffFactor | Gets or sets how quickly the volume is reduced with the distance. |
ConeInnerAngle
PannerNode.csGets or sets the angle in degrees of the inner cone, in which the volume is not reduced.
public double ConeInnerAngle { get; set; }ConeOuterAngle
PannerNode.csGets or sets the angle in degrees of the outer cone, outside of which the volume is PannerNode.ConeOuterGain.
public double ConeOuterAngle { get; set; }ConeOuterGain
PannerNode.csGets or sets the gain outside of the outer cone, from 0 to 1.
public double ConeOuterGain { get; set; }Property value
Exceptions
DomException- The value is not between 0 and 1 (an
InvalidStateError).
See also
DistanceModel
PannerNode.csGets or sets the distance model.
public DistanceModelType DistanceModel { get; set; }Property value
See also
MaxDistance
PannerNode.csGets or sets the maximum distance (the volume is not reduced further for greater distances).
public double MaxDistance { get; set; }OrientationX
PannerNode.csGets the x coordinate of the direction the source points to.
public AudioParam OrientationX { get; }Property value
See also
OrientationY
PannerNode.csGets the y coordinate of the direction the source points to.
public AudioParam OrientationY { get; }Property value
See also
OrientationZ
PannerNode.csGets the z coordinate of the direction the source points to.
public AudioParam OrientationZ { get; }Property value
See also
PanningModel
PannerNode.csGets or sets the spatialization algorithm.
public PanningModelType PanningModel { get; set; }Property value
See also
PositionX
PannerNode.csGets the x coordinate of the position.
public AudioParam PositionX { get; }PositionY
PannerNode.csGets the y coordinate of the position.
public AudioParam PositionY { get; }PositionZ
PannerNode.csGets the z coordinate of the position.
public AudioParam PositionZ { get; }RefDistance
PannerNode.csGets or sets the reference distance (the volume is not reduced for smaller distances).
public double RefDistance { get; set; }RolloffFactor
PannerNode.csGets or sets how quickly the volume is reduced with the distance.
public double RolloffFactor { get; set; }Methods
| Name | Description |
|---|---|
| SetOrientation(float, float, float) | Sets the direction the source points to (the values of the orientation parameters). |
| SetPosition(float, float, float) | Sets the position (the values of the position parameters). |