setOrientation
Summary
Describes which direction the audio source is pointing in the 3D cartesian coordinate space. Depending on how directional the sound is (controlled by the cone attributes), a sound pointing away from the listener can be very quiet or completely silent. The x, y, and z parameters represent a direction vector in 3D space. The default value is (1,0,0).
Method of apis/webaudio/PannerNodeapis/webaudio/PannerNode
Syntax
var = PannerNode.setOrientation(x, y, z);
Parameters
x
- Data-type
- Number
y
- Data-type
- Number
z
- Data-type
- Number
Return Value
Returns an object of type NumberNumber
Examples
var audioCtx = new AudioContext();
var panner = audioCtx.createPanner();
panner.setOrientation(1,0,0);
Related specifications
- W3C Web Audio API
- W3C Editor’s Draft