Explorar o código

according to spec, we should only have one audiocontext per document, so initialize it as static member

lqdchrm %!s(int64=12) %!d(string=hai) anos
pai
achega
11b9fcc619
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/js/AudioObject.js

+ 1 - 1
examples/js/AudioObject.js

@@ -38,7 +38,7 @@ THREE.AudioObject = function ( url, volume, playbackRate, loop ) {
 
 		try {
 
-			this.context = new webkitAudioContext();
+			THREE.AudioObject.prototype.context = new webkitAudioContext();
 
 		} catch( error ) {