1- [page:Object3D] → [page:Camera] →
1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < script src ="../../list.js "> </ script >
6+ < script src ="../../page.js "> </ script >
7+ < link type ="text/css " rel ="stylesheet " href ="../../page.css " />
8+ </ head >
9+ < body >
10+ [page:Object3D] → [page:Camera] →
211
3- < h1 > [name]</ h1 >
12+ < h1 > [name]</ h1 >
413
5- < div class ="desc "> Camera with perspective projection.</ div >
14+ < div class ="desc "> Camera with perspective projection.</ div >
615
716
8- < h2 > Example</ h2 >
17+ < h2 > Example</ h2 >
918
10- < code > var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 );
11- scene.add( camera );
12- </ code >
19+ < code > var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 );
20+ scene.add( camera );</ code >
1321
1422
15- < h2 > Constructor</ h2 >
23+ < h2 > Constructor</ h2 >
1624
17- < h3 > [name]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] )</ h3 >
18- < div >
19- fov — Camera frustum vertical field of view.< br />
20- aspect — Camera frustum aspect ratio.< br />
21- near — Camera frustum near plane.< br />
22- far — Camera frustum far plane.
23- </ div >
25+ < h3 > [name]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] )</ h3 >
26+ < div >
27+ fov — Camera frustum vertical field of view.< br />
28+ aspect — Camera frustum aspect ratio.< br />
29+ near — Camera frustum near plane.< br />
30+ far — Camera frustum far plane.
31+ </ div >
2432
2533
26- < h2 > Properties</ h2 >
34+ < h2 > Properties</ h2 >
2735
28- < h3 > .[page:Float fov]</ h3 >
29- < div > Camera frustum vertical field of view.</ div >
36+ < h3 > .[page:Float fov]</ h3 >
37+ < div > Camera frustum vertical field of view.</ div >
3038
31- < h3 > .[page:Float aspect]</ h3 >
32- < div > Camera frustum aspect ratio.</ div >
39+ < h3 > .[page:Float aspect]</ h3 >
40+ < div > Camera frustum aspect ratio.</ div >
3341
34- < h3 > .[page:Float near]</ h3 >
35- < div > Camera frustum near plane.</ div >
42+ < h3 > .[page:Float near]</ h3 >
43+ < div > Camera frustum near plane.</ div >
3644
37- < h3 > .[page:Float far]</ h3 >
38- < div > Camera frustum far plane.</ div >
45+ < h3 > .[page:Float far]</ h3 >
46+ < div > Camera frustum far plane.</ div >
3947
4048
41- < h2 > Methods</ h2 >
49+ < h2 > Methods</ h2 >
4250
43- < h3 > .setLens( [page:Float focalLength], [page:Float frameSize] )</ h3 >
44- < div >
45- focalLength — focal length< br />
46- frameSize — frame size
47- </ div >
51+ < h3 > .setLens( [page:Float focalLength], [page:Float frameSize] )</ h3 >
52+ < div >
53+ focalLength — focal length< br />
54+ frameSize — frame size
55+ </ div >
4856
49- < div >
50- Uses focal length (in mm) to estimate and set FOV 35mm (fullframe) camera is used if frame size is not specified.< br />
51- Formula based on [link:http://www.bobatkins.com/photography/technical/field_of_view.html]
52- </ div >
57+ < div >
58+ Uses focal length (in mm) to estimate and set FOV 35mm (fullframe) camera is used if frame size is not specified.< br />
59+ Formula based on [link:http://www.bobatkins.com/photography/technical/field_of_view.html]
60+ </ div >
5361
54- < h3 > .setViewOffset( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</ h3 >
55- < div >
56- fullWidth — full width of multiview setup< br />
57- fullHeight — full height of multiview setup< br />
58- x — horizontal offset of subcamera< br />
59- y — vertical offset of subcamera< br />
60- width — width of subcamera< br />
61- height — height of subcamera
62- </ div >
62+ < h3 > .setViewOffset( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</ h3 >
63+ < div >
64+ fullWidth — full width of multiview setup< br />
65+ fullHeight — full height of multiview setup< br />
66+ x — horizontal offset of subcamera< br />
67+ y — vertical offset of subcamera< br />
68+ width — width of subcamera< br />
69+ height — height of subcamera
70+ </ div >
6371
64- < div >
65- Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups.
66- </ div >
72+ < div >
73+ Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups.
74+ </ div >
6775
68- < div >
69- For example, if you have 3x2 monitors and each monitor is 1920x1080 and the monitors are in grid like this:< br />
76+ < div >
77+ For example, if you have 3x2 monitors and each monitor is 1920x1080 and the monitors are in grid like this:< br />
7078
71- < pre > +---+---+---+
79+ < pre > +---+---+---+
7280| A | B | C |
7381+---+---+---+
7482| D | E | F |
75- +---+---+---+
76- </ pre >
83+ +---+---+---+</ pre >
7784
78- then for each monitor you would call it like this:< br />
85+ then for each monitor you would call it like this:< br />
7986
80- < code > var w = 1920;
87+ < code > var w = 1920;
8188var h = 1080;
8289var fullWidth = w * 3;
8390var fullHeight = h * 2;
@@ -96,15 +103,17 @@ <h3>.setViewOffset( [page:Float fullWidth], [page:Float fullHeight], [page:Float
96103camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
97104</ code >
98105
99- Note there is no reason monitors have to be the same size or in a grid.
100- </ div >
106+ Note there is no reason monitors have to be the same size or in a grid.
107+ </ div >
101108
102- < h3 > .updateProjectionMatrix()</ h3 >
103- < div >
104- Updates the camera projection matrix. Must be called after change of parameters.
105- </ div >
109+ < h3 > .updateProjectionMatrix()</ h3 >
110+ < div >
111+ Updates the camera projection matrix. Must be called after change of parameters.
112+ </ div >
106113
107114
108- < h2 > Source</ h2 >
115+ < h2 > Source</ h2 >
109116
110- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
117+ [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
118+ </ body >
119+ </ html >
0 commit comments