Camera.js 649 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * @author mr.doob / http://mrdoob.com/
  3. * @author mikael emtinger / http://gomo.se/
  4. */
  5. THREE.Camera = function () {
  6. THREE.Object3D.call( this );
  7. this.matrixWorldInverse = new THREE.Matrix4();
  8. this.projectionMatrix = new THREE.Matrix4();
  9. this.projectionMatrixInverse = new THREE.Matrix4();
  10. };
  11. THREE.Camera.prototype = new THREE.Object3D();
  12. THREE.Camera.prototype.constructor = THREE.Camera;
  13. THREE.Camera.prototype.lookAt = function ( vector ) {
  14. // TODO: Add hierarchy support.
  15. this.matrix.lookAt( this.position, vector, this.up );
  16. if ( this.rotationAutoUpdate ) {
  17. this.rotation.getRotationFromMatrix( this.matrix );
  18. }
  19. };
粤ICP备19079148号