1 | import { Camera } from './Camera';
|
2 |
|
3 | /**
|
4 | * Camera with orthographic projection
|
5 | *
|
6 | * see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/OrthographicCamera.js|src/cameras/OrthographicCamera.js}
|
7 | *
|
8 | * @example
|
9 | * const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
|
10 | * scene.add( camera );
|
11 | */
|
12 | export class OrthographicCamera extends Camera {
|
13 | /**
|
14 | * @param left Camera frustum left plane.
|
15 | * @param right Camera frustum right plane.
|
16 | * @param top Camera frustum top plane.
|
17 | * @param bottom Camera frustum bottom plane.
|
18 | * @param [near=0.1] Camera frustum near plane.
|
19 | * @param [far=2000] Camera frustum far plane.
|
20 | */
|
21 | constructor(left: number, right: number, top: number, bottom: number, near?: number, far?: number);
|
22 |
|
23 | type: 'OrthographicCamera';
|
24 |
|
25 | readonly isOrthographicCamera: true;
|
26 |
|
27 | /**
|
28 | * @default 1
|
29 | */
|
30 | zoom: number;
|
31 |
|
32 | /**
|
33 | * @default null
|
34 | */
|
35 | view: null | {
|
36 | enabled: boolean;
|
37 | fullWidth: number;
|
38 | fullHeight: number;
|
39 | offsetX: number;
|
40 | offsetY: number;
|
41 | width: number;
|
42 | height: number;
|
43 | };
|
44 |
|
45 | /**
|
46 | * Camera frustum left plane.
|
47 | * @default -1
|
48 | */
|
49 | left: number;
|
50 |
|
51 | /**
|
52 | * Camera frustum right plane.
|
53 | * @default 1
|
54 | */
|
55 | right: number;
|
56 |
|
57 | /**
|
58 | * Camera frustum top plane.
|
59 | * @default 1
|
60 | */
|
61 | top: number;
|
62 |
|
63 | /**
|
64 | * Camera frustum bottom plane.
|
65 | * @default -1
|
66 | */
|
67 | bottom: number;
|
68 |
|
69 | /**
|
70 | * Camera frustum near plane.
|
71 | * @default 0.1
|
72 | */
|
73 | near: number;
|
74 |
|
75 | /**
|
76 | * Camera frustum far plane.
|
77 | * @default 2000
|
78 | */
|
79 | far: number;
|
80 |
|
81 | /**
|
82 | * Updates the camera projection matrix. Must be called after change of parameters.
|
83 | */
|
84 | updateProjectionMatrix(): void;
|
85 | setViewOffset(
|
86 | fullWidth: number,
|
87 | fullHeight: number,
|
88 | offsetX: number,
|
89 | offsetY: number,
|
90 | width: number,
|
91 | height: number,
|
92 | ): void;
|
93 | clearViewOffset(): void;
|
94 | toJSON(meta?: any): any;
|
95 | }
|