Browse Source

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

Mr.doob 10 years ago
parent
commit
f9912deee8
1 changed files with 1 additions and 1 deletions
  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 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 ) {
 					for ( var name in functions ) {