source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/src/cameras/OrthographicCamera.js@ 28897

Last change on this file since 28897 was 28897, checked in by davidb, 10 years ago

GUI front-end to server base plus web page content

File size: 989 bytes
Line 
1/**
2 * @author alteredq / http://alteredqualia.com/
3 */
4
5THREE.OrthographicCamera = function ( left, right, top, bottom, near, far ) {
6
7 THREE.Camera.call( this );
8
9 this.left = left;
10 this.right = right;
11 this.top = top;
12 this.bottom = bottom;
13
14 this.near = ( near !== undefined ) ? near : 0.1;
15 this.far = ( far !== undefined ) ? far : 2000;
16
17 this.updateProjectionMatrix();
18
19};
20
21THREE.OrthographicCamera.prototype = Object.create( THREE.Camera.prototype );
22
23THREE.OrthographicCamera.prototype.updateProjectionMatrix = function () {
24
25 this.projectionMatrix.makeOrthographic( this.left, this.right, this.top, this.bottom, this.near, this.far );
26
27};
28
29THREE.OrthographicCamera.prototype.clone = function () {
30
31 var camera = new THREE.OrthographicCamera();
32
33 THREE.Camera.prototype.clone.call( this, camera );
34
35 camera.left = this.left;
36 camera.right = this.right;
37 camera.top = this.top;
38 camera.bottom = this.bottom;
39
40 camera.near = this.near;
41 camera.far = this.far;
42
43 return camera;
44};
Note: See TracBrowser for help on using the repository browser.