Browse Source

Merge pull request #12519 from mrdoob/Mugen87-patch-1

Update PositionalAudio.html
Mr.doob 7 năm trước cách đây
mục cha
commit
998e635d35

+ 3 - 3
docs/api/audio/PositionalAudio.html

@@ -33,9 +33,9 @@
 		//Load a sound and set it as the PositionalAudio object's buffer
 		//Load a sound and set it as the PositionalAudio object's buffer
 		var audioLoader = new THREE.AudioLoader();
 		var audioLoader = new THREE.AudioLoader();
 		audioLoader.load( 'sounds/song.ogg', function( buffer ) {
 		audioLoader.load( 'sounds/song.ogg', function( buffer ) {
-			sound1.setBuffer( buffer );
-			sound1.setRefDistance( 20 );
-			sound1.play();
+			sound.setBuffer( buffer );
+			sound.setRefDistance( 20 );
+			sound.play();
 		});
 		});
 
 
 		//Create an object for the sound to play from
 		//Create an object for the sound to play from