4 <meta charset="utf-8" />
6 <script src="list.js"></script>
7 <script src="page.js"></script>
8 <link type="text/css" rel="stylesheet" href="page.css" />
11 [page:Object3D] →
16 Create a non-positional ( global ) audio object.<br /><br />
18 This uses the [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
25 <div>[example:misc_sound misc / sound ]</div>
27 //Create an AudioListener and add it to the camera
28 var listener = new THREE.AudioListener();
29 camera.add( listener );
31 // create a global audio source
32 var sound = new THREE.Audio( listener );
34 var audioLoader = new THREE.AudioLoader();
36 //Load a sound and set it as the Audio object's buffer
37 audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
38 sound.setBuffer( buffer );
51 Create a new AudioListener.
57 <h3>[property:AudioContext context]</h3>
58 <div>The [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] of the [page:AudioListener listener] given in the constructor.</div>
60 <h3>[property:GainNode gain]</h3>
61 <div>A [link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] created
62 using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().</div>
64 <h3>[property:AudioNode filter]</h3>
65 <div>Default is *null*.</div>
71 <h3>[method:GainNode getInput]()</h3>
73 Return the [page:AudioListener.gain gainNode].
76 <h3>[method:null removeFilter]()</h3>
78 Set the [page:AudioListener.filter filter] property to *null*.
81 <h3>[method:AudioNode getFilter]()</h3>
83 Returns the value of the [page:AudioListener.filter filter] property.
86 <h3>[method:null setFilter]( [page:AudioNode value] )</h3>
88 Set the [page:AudioListener.filter filter] property to *value*.
91 <h3>[method:Number getMasterVolume]()</h3>
96 <h3>[method:null setMasterVolume]( [page:Number value] )</h3>
104 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]