CombinedCamera.html 5.2 KB
Newer Older
1 2 3
<!DOCTYPE html>
<html lang="en">
	<head>
M
Mr.doob 已提交
4 5 6 7 8
		<meta charset="utf-8" />
		<base href="../../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
9 10
	</head>
	<body>
11 12
		[page:Camera] &rarr;

13
		<h1>[name]</h1>
M
Mr.doob 已提交
14

15
		<div class="desc">A general purpose camera, for setting FOV, Lens Focal Length,
G
gero3 已提交
16 17
 		and switching between perspective and orthographic views easily.
 		Use this only if you do not wish to manage
18
 		both an Orthographic and Perspective Camera</div>
M
Mr.doob 已提交
19

S
sukhwant 已提交
20
		<h2>Examples</h2>
M
Mr.doob 已提交
21

S
sukhwant 已提交
22
		<div>[example:canvas_camera_orthographic2 camera / orthographic2 ]</div>
M
Mr.doob 已提交
23

S
sukhwant 已提交
24 25 26
		<code>//Create combined camera
		camera = new THREE.CombinedCamera( window.innerWidth / 2, window.innerHeight / 2, 70, 1, 1000, - 500, 1000 );
		</code>
M
Mr.doob 已提交
27

28
		<h2>Constructor</h2>
M
Mr.doob 已提交
29

C
cjshannon 已提交
30

G
gero3 已提交
31
		<h3>[name]([page:Number width], [page:Number height], [page:Number fov], [page:Number near], [page:Number far], [page:Number orthoNear], [page:Number orthoFar])</h3>
C
cjshannon 已提交
32
		<div>
G
gero3 已提交
33 34 35 36 37 38 39
		width -- Camera frustum width.<br />
		height -- Camera frustum height.<br />
		fov — Camera frustum vertical field of view in perspective view.<br />
		near — Camera frustum near plane in perspective view.<br />
		far — Camera frustum far plane in perspective view.<br />
		orthoNear — Camera frustum near plane in orthographic view.<br />
		orthoFar — Camera frustum far plane in orthographic view.
C
cjshannon 已提交
40 41
		</div>
		<div>
M
Mr.doob 已提交
42
		Creates a [name]. This initializes 2 cameras, an OrthographicCamera and a PerspectiveCamera. The default is the perspective Camera.
C
cjshannon 已提交
43
		</div>
M
Mr.doob 已提交
44 45


46
		<h2>Properties</h2>
M
Mr.doob 已提交
47 48 49



50
		<h3>[property:Number fov]</h3>
C
cjshannon 已提交
51
		<div>
G
gero3 已提交
52
		Gets or sets the camera frustum vertical field of view in perspective view.
M
Mr.doob 已提交
53
		</div>
C
cjshannon 已提交
54

55
		<h3>[property:number left]</h3>
C
cjshannon 已提交
56
		<div>
G
gero3 已提交
57
		Gets or sets the camera frustum left plane in orthographic view.
M
Mr.doob 已提交
58
		</div>
C
cjshannon 已提交
59

60
		<h3>[property:Number right]</h3>
C
cjshannon 已提交
61
		<div>
M
Mr.doob 已提交
62 63
		Gets or sets the camera frustum right plane in orthographic view.
		</div>
C
cjshannon 已提交
64

65
		<h3>[property:number top]</h3>
C
cjshannon 已提交
66
		<div>
G
gero3 已提交
67
		Gets or sets the camera frustum top plane in orthographic view.
M
Mr.doob 已提交
68
		</div>
C
cjshannon 已提交
69

70
		<h3>[property:Number bottom]</h3>
C
cjshannon 已提交
71
		<div>
G
gero3 已提交
72
		Gets or sets the camera frustum bottom plane in orthographic view.
M
Mr.doob 已提交
73
		</div>
C
cjshannon 已提交
74

75
		<h3>[property:number zoom]</h3>
C
cjshannon 已提交
76
		<div>
G
gero3 已提交
77
		Gets or sets the zoom factor of the camera.
M
Mr.doob 已提交
78
		</div>
C
cjshannon 已提交
79

80
		<h3>[property:number near]</h3>
C
cjshannon 已提交
81
		<div>
82
		Gets camera frustum near plane.
M
Mr.doob 已提交
83
		</div>
C
cjshannon 已提交
84

85
		<h3>[property:number far]</h3>
C
cjshannon 已提交
86
		<div>
87
		Gets camera frustum far plane.
M
Mr.doob 已提交
88
		</div>
C
cjshannon 已提交
89

S
sukhwant 已提交
90 91 92 93
		<h3>[property:Matrix4 projectionMatrix]</h3>
		<div>
		This is the matrix which contains the projection.
		</div>
M
Mr.doob 已提交
94

95
		<h3>[property:OrthographicCamera cameraO]</h3>
C
cjshannon 已提交
96
		<div>
G
gero3 已提交
97
		Gets or sets the internal OrthographicCamera used as camera.
M
Mr.doob 已提交
98
		</div>
C
cjshannon 已提交
99

100
		<h3>[property:PerspectiveCamera cameraP]</h3>
C
cjshannon 已提交
101
		<div>
G
gero3 已提交
102
		Gets or sets the internal PerspectiveCamera used as camera.
M
Mr.doob 已提交
103
		</div>
C
cjshannon 已提交
104

105
		<h3>[property:boolean inOrthographicMode]</h3>
C
cjshannon 已提交
106
		<div>
G
gero3 已提交
107
		Gets whether the combinedCamera is in Orthographic Mode.
M
Mr.doob 已提交
108
		</div>
C
cjshannon 已提交
109

110
		<h3>[property:boolean inPerspectiveMode]</h3>
C
cjshannon 已提交
111
		<div>
G
gero3 已提交
112
		Gets whether the combinedCamera is in Perspective Mode.
M
Mr.doob 已提交
113
		</div>
C
cjshannon 已提交
114

115
		<h2>Methods</h2>
M
Mr.doob 已提交
116

G
Greg Tatum 已提交
117
		<h3>[method:null setFov]([page:Number fov])</h3>
C
cjshannon 已提交
118
		<div>
G
gero3 已提交
119
		fov --  Camera frustum vertical field of view in perspective view.
C
cjshannon 已提交
120 121
		</div>
		<div>
G
gero3 已提交
122
		sets the camera frustum vertical field of view in perspective view.
C
cjshannon 已提交
123
		</div>
G
gero3 已提交
124

G
Greg Tatum 已提交
125
		<h3>[method:null setZoom]([page:Number zoom])</h3>
C
cjshannon 已提交
126
		<div>
G
gero3 已提交
127
		zoom -- The zoom factor.
C
cjshannon 已提交
128 129
		</div>
		<div>
G
gero3 已提交
130
		Sets the zoomfactor.
C
cjshannon 已提交
131 132
		</div>

T
tschw 已提交
133
		<h3>[method:null setLens]([page:number focalLength], [page:Number filmGauge])</h3>
C
cjshannon 已提交
134
		<div>
G
gero3 已提交
135
		focalLength -- The focal length of a lens is defined as the distance from the optical center of a lens (or, the secondary principal point for a complex lens like a camera lens) to the focal point (sensor) when the lens is focused on an object at infinity. <br />
T
tschw 已提交
136
		filmGauge -- the size of the frame in mm. (default is *35*)
C
cjshannon 已提交
137 138
		</div>
		<div>
G
gero3 已提交
139
		Sets the fov based on lens data.
C
cjshannon 已提交
140 141
		</div>

G
Greg Tatum 已提交
142
		<h3>[method:null toFrontView]()</h3>
C
cjshannon 已提交
143
		<div>
G
gero3 已提交
144
		Sets the camera to view the front of the target.
C
cjshannon 已提交
145
		</div>
G
gero3 已提交
146

G
Greg Tatum 已提交
147
		<h3>[method:null toBackView]()</h3>
C
cjshannon 已提交
148
		<div>
G
gero3 已提交
149
		Sets the camera to view the back of the target.
C
cjshannon 已提交
150 151
		</div>

G
Greg Tatum 已提交
152
		<h3>[method:null toLeftView]()</h3>
C
cjshannon 已提交
153
		<div>
G
gero3 已提交
154
		Sets the camera to view the left of the target.
C
cjshannon 已提交
155 156
		</div>

G
Greg Tatum 已提交
157
		<h3>[method:null toRightView]()</h3>
C
cjshannon 已提交
158
		<div>
G
gero3 已提交
159
		Sets the camera to view the right of the target.
C
cjshannon 已提交
160 161
		</div>

G
Greg Tatum 已提交
162
		<h3>[method:null toTopView]()</h3>
C
cjshannon 已提交
163
		<div>
G
gero3 已提交
164
		Sets the camera to view the top.
C
cjshannon 已提交
165 166
		</div>

G
Greg Tatum 已提交
167
		<h3>[method:null toBottomView]()</h3>
C
cjshannon 已提交
168
		<div>
G
gero3 已提交
169
		Sets the camera to view the bottom.
C
cjshannon 已提交
170 171
		</div>

G
Greg Tatum 已提交
172
		<h3>[method:null setSize]([page:Number width], [page:Number height])</h3>
C
cjshannon 已提交
173
		<div>
G
gero3 已提交
174 175
		width -- The width of the orthographic view.<br />
		height -- The height of the orthographic view.
C
cjshannon 已提交
176 177
		</div>
		<div>
G
gero3 已提交
178
		Sets the size of the orthographic view.
C
cjshannon 已提交
179
		</div>
G
gero3 已提交
180

G
Greg Tatum 已提交
181
		<h3>[method:null toOrthographic]()</h3>
C
cjshannon 已提交
182
		<div>
G
gero3 已提交
183
		Change the camera to orthographic view.
C
cjshannon 已提交
184 185
		</div>

G
Greg Tatum 已提交
186
		<h3>[method:null toPerspective]()</h3>
C
cjshannon 已提交
187
		<div>
G
gero3 已提交
188
		Change the camera to Perspective view.
C
cjshannon 已提交
189 190
		</div>

G
Greg Tatum 已提交
191
		<h3>[method:null updateProjectionMatrix]()</h3>
C
cjshannon 已提交
192
		<div>
G
gero3 已提交
193
		Updates the ProjectionMatrix.
C
cjshannon 已提交
194 195
		</div>

196
		<h2>Source</h2>
M
Mr.doob 已提交
197

S
sukhwant 已提交
198
		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/cameras/CombinedCamera.js examples/cameras/CombinedCamera.js]
199 200
	</body>
</html>