|
@@ -12,7 +12,14 @@
|
|
|
|
|
|
<h1>[name]</h1>
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">Camera with orthographic projection.</div>
|
|
|
|
|
|
+ <div class="desc">
|
|
|
|
+ Camera that uses [link:https://en.wikipedia.org/wiki/Orthographic_projection orthographic projection].<br /><br />
|
|
|
|
+
|
|
|
|
+ In this projection mode, an object's size in the rendered image stays constant
|
|
|
|
+ regardless of its distance from the camera.<br /><br />
|
|
|
|
+
|
|
|
|
+ This can be useful for rendering 2D scenes and UI elements, amongst other things.
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
<h2>Example</h2>
|
|
<h2>Example</h2>
|
|
@@ -37,42 +44,55 @@ scene.add( camera );</code>
|
|
<h2>Constructor</h2>
|
|
<h2>Constructor</h2>
|
|
|
|
|
|
|
|
|
|
- <h3>[name]( [page:Float left], [page:Float right], [page:Float top], [page:Float bottom], [page:Float near], [page:Float far] )</h3>
|
|
|
|
|
|
+ <h3>[name]( [page:Number left], [page:Number right], [page:Number top], [page:Number bottom], [page:Number near], [page:Number far] )</h3>
|
|
<div>
|
|
<div>
|
|
left — Camera frustum left plane.<br />
|
|
left — Camera frustum left plane.<br />
|
|
right — Camera frustum right plane.<br />
|
|
right — Camera frustum right plane.<br />
|
|
top — Camera frustum top plane.<br />
|
|
top — Camera frustum top plane.<br />
|
|
bottom — Camera frustum bottom plane.<br />
|
|
bottom — Camera frustum bottom plane.<br />
|
|
near — Camera frustum near plane.<br />
|
|
near — Camera frustum near plane.<br />
|
|
- far — Camera frustum far plane.
|
|
|
|
|
|
+ far — Camera frustum far plane.<br /><br />
|
|
|
|
+
|
|
|
|
+ Together these define the camera's [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2>Properties</h2>
|
|
<h2>Properties</h2>
|
|
|
|
+ <div>See the base [page:Camera] class for common properties.</div>
|
|
|
|
|
|
- <h3>[property:number zoom]</h3>
|
|
|
|
- <div>Gets or sets the zoom factor of the camera. Default is *1*.</div>
|
|
|
|
|
|
+ <h3>[property:Float bottom]</h3>
|
|
|
|
+ <div>Camera frustum bottom plane.</div>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Float far]</h3>
|
|
|
|
+ <div>Camera frustum far plane. Default is *2000*.</div>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Boolean isOrthographicCamera]</h3>
|
|
|
|
+ <div>
|
|
|
|
+ Used to test whether this or derived classes are OrthographicCameras. Default is *true*.<br /><br />
|
|
|
|
+
|
|
|
|
+ This should not be changed as it is used internally by the renderer for optimisation.
|
|
|
|
+ </div>
|
|
|
|
|
|
<h3>[property:Float left]</h3>
|
|
<h3>[property:Float left]</h3>
|
|
<div>Camera frustum left plane.</div>
|
|
<div>Camera frustum left plane.</div>
|
|
|
|
|
|
|
|
+ <h3>[property:Float near]</h3>
|
|
|
|
+ <div>Camera frustum near plane. Default is *0.1*.</div>
|
|
|
|
+
|
|
<h3>[property:Float right]</h3>
|
|
<h3>[property:Float right]</h3>
|
|
<div>Camera frustum right plane.</div>
|
|
<div>Camera frustum right plane.</div>
|
|
|
|
|
|
<h3>[property:Float top]</h3>
|
|
<h3>[property:Float top]</h3>
|
|
<div>Camera frustum top plane.</div>
|
|
<div>Camera frustum top plane.</div>
|
|
|
|
|
|
- <h3>[property:Float bottom]</h3>
|
|
|
|
- <div>Camera frustum bottom plane.</div>
|
|
|
|
-
|
|
|
|
- <h3>[property:Float near]</h3>
|
|
|
|
- <div>Camera frustum near plane. Default is *0.1*.</div>
|
|
|
|
-
|
|
|
|
- <h3>[property:Float far]</h3>
|
|
|
|
- <div>Camera frustum far plane. Default is *2000*.</div>
|
|
|
|
|
|
+ <h3>[property:Object view]</h3>
|
|
|
|
+ <div>Set by [page:OrthographicCamera.setViewOffset setViewOffset]. Default is *null*.</div>
|
|
|
|
|
|
|
|
+ <h3>[property:number zoom]</h3>
|
|
|
|
+ <div>Gets or sets the zoom factor of the camera. Default is *1*.</div>
|
|
|
|
|
|
<h2>Methods</h2>
|
|
<h2>Methods</h2>
|
|
|
|
+ <div>See the base [page:Camera] class for common methods.</div>
|
|
|
|
|
|
<h3>[method:null setViewOffset]( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>
|
|
<h3>[method:null setViewOffset]( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>
|
|
<div>
|
|
<div>
|
|
@@ -81,11 +101,11 @@ scene.add( camera );</code>
|
|
x — horizontal offset of subcamera<br />
|
|
x — horizontal offset of subcamera<br />
|
|
y — vertical offset of subcamera<br />
|
|
y — vertical offset of subcamera<br />
|
|
width — width of subcamera<br />
|
|
width — width of subcamera<br />
|
|
- height — height of subcamera
|
|
|
|
- </div>
|
|
|
|
|
|
+ height — height of subcamera<br /><br />
|
|
|
|
|
|
- <div>
|
|
|
|
- Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups. For an example on how to use it see [page:PerspectiveCamera].
|
|
|
|
|
|
+ Sets an offset in a larger [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum].
|
|
|
|
+ This is useful for multi-window or multi-monitor/multi-machine setups.
|
|
|
|
+ For an example on how to use it see [page:PerspectiveCamera.setViewOffset PerspectiveCamera].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:null clearViewOffset]()</h3>
|
|
<h3>[method:null clearViewOffset]()</h3>
|
|
@@ -95,19 +115,12 @@ scene.add( camera );</code>
|
|
|
|
|
|
<h3>[method:null updateProjectionMatrix]()</h3>
|
|
<h3>[method:null updateProjectionMatrix]()</h3>
|
|
<div>
|
|
<div>
|
|
- Updates the camera projection matrix. Must be called after change of parameters.
|
|
|
|
|
|
+ Updates the camera projection matrix. Must be called after any change of parameters.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:OrthographicCamera clone]()</h3>
|
|
|
|
- <div>
|
|
|
|
- <br />
|
|
|
|
- Returns a clone of the OrthographicCamera.
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<h3>[method:JSON toJSON]()</h3>
|
|
<h3>[method:JSON toJSON]()</h3>
|
|
<div>
|
|
<div>
|
|
- Return camera data in JSON format.
|
|
|
|
|
|
+ Return the camera's data in JSON format.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|