提交 99e2e4e6 编写于 作者: S SUNAG

set camera by function

上级 7b8aad6f
......@@ -7,9 +7,7 @@ THREE.CameraNode = function( scope, camera ) {
THREE.TempNode.call( this, 'v3' );
this.setScope( scope || THREE.CameraNode.POSITION );
this.camera = camera;
this.requestUpdate = this.camera !== undefined;
this.setCamera( camera );
};
......@@ -19,6 +17,13 @@ THREE.CameraNode.prototype.constructor = THREE.CameraNode;
THREE.CameraNode.POSITION = 'position';
THREE.CameraNode.DEPTH = 'depth';
THREE.CameraNode.prototype.setCamera = function( camera ) {
this.camera = camera;
this.requestUpdate = camera !== undefined;
};
THREE.CameraNode.prototype.setScope = function( scope ) {
switch ( this.scope ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册