Jelajahi Sumber

Editor/App: Didn't know you could just pass a single string.

Mr.doob 10 tahun lalu
induk
melakukan
f9912deee8
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      editor/js/libs/app.js

+ 1 - 1
editor/js/libs/app.js

@@ -47,7 +47,7 @@ var APP = {
 
 					var script = scripts[ i ];
 
-					var functions = ( new Function( 'player', 'scene', 'keydown', 'keyup', 'mousedown', 'mouseup', 'mousemove', 'touchstart', 'touchend', 'touchmove', 'update', script.source + '\nreturn { keydown: keydown, keyup: keyup, mousedown: mousedown, mouseup: mouseup, mousemove: mousemove, touchstart: touchstart, touchend: touchend, touchmove: touchmove, update: update };' ).bind( object ) )( this, scene );
+					var functions = ( new Function( 'player, scene, keydown, keyup, mousedown, mouseup, mousemove, touchstart, touchend, touchmove, update', script.source + '\nreturn { keydown: keydown, keyup: keyup, mousedown: mousedown, mouseup: mouseup, mousemove: mousemove, touchstart: touchstart, touchend: touchend, touchmove: touchmove, update: update };' ).bind( object ) )( this, scene );
 
 					for ( var name in functions ) {