提交 d3720827 编写于 作者: M Mr.doob

Editor: Passing scene to Script.

上级 e3d6bde9
......@@ -16,7 +16,7 @@ var Player = function ( json ) {
if ( child.script !== undefined ) {
child.script.compiled = new Function( 'object', child.script.source );
child.script.compiled = new Function( 'object', 'scene', child.script.source );
scriptObjects.push( child );
......@@ -47,7 +47,7 @@ var Player = function ( json ) {
for ( var i = 0; i < scriptObjects.length; i ++ ) {
var object = scriptObjects[ i ];
object.script.compiled( object );
object.script.compiled( object, scene );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册