コメント |
@DIV
THREE.UserPlay1 = function ( scene, camera, renderer, animate, radius ) {
this.scene = scene;
this.camera = camera;
this.renderer = renderer;
this.radius = ( radius !== undefined ) ? radius : 600;
this.theta = 0
this.animate = animate;
};
THREE.UserPlay1.prototype = {
constructor: THREE.UserPlay1,
start: function() {
this.animate();
},
render: function() {
this.theta += 0.1;
this.camera.position.x = this.radius * Math.sin( THREE.Math.degToRad( this.theta ) );
this.camera.position.y = this.radius * Math.sin( THREE.Math.degToRad( this.theta ) );
this.camera.position.z = this.radius * Math.cos( THREE.Math.degToRad( this.theta ) );
this.camera.lookAt( this.scene.position );
this.renderer.render( this.scene, this.camera );
}
};
@END |