OrthographicCamera.js 713 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.OrthographicCamera = function ( left, right, top, bottom, near, far ) {
  5. THREE.Camera.call( this );
  6. this.left = left;
  7. this.right = right;
  8. this.top = top;
  9. this.bottom = bottom;
  10. this.near = ( near !== undefined ) ? near : 0.1;
  11. this.far = ( far !== undefined ) ? far : 2000;
  12. this.updateProjectionMatrix();
  13. };
  14. THREE.OrthographicCamera.prototype = new THREE.Camera();
  15. THREE.OrthographicCamera.prototype.constructor = THREE.OrthographicCamera;
  16. THREE.OrthographicCamera.prototype.updateProjectionMatrix = function () {
  17. this.projectionMatrix = THREE.Matrix4.makeOrtho( this.left, this.right, this.top, this.bottom, this.near, this.far );
  18. };
粤ICP备19079148号