OrthographicCamera Class
Orthographic Camera is used for 2D like image projection.
Based on OrthographicCamera, original documentation available at https:// threejs.org/docs/index.html#Reference/Cameras/OrthographicCamera.
Item Index
Properties
Attributes
Methods
destroy
()
Destroy camera object and remove it from the scene.
render
-
renderer
-
scene
Render a scene using this camera and the internal EffectComposer.
Parameters:
-
renderer
WebGLRendererWebGL renderer to use.
-
scene
SceneScene to be rendered.
resize
-
x
-
y
-
viewport
Resize this camera, should be called every time after resizing the screen.
Updates the viewport, rendering composer and the camera projection matrix.
Parameters:
-
x
NumberWidth of the screen.
-
y
NumberHeight of the screen.
-
viewport
ViewportViewport that encapsulates the viewport of the camera.
setupRenderer
-
renderer
Prepare the renderer to render the frame using the camera settings.
Should be called before the render() method to setup clear configuration and viewport.
Parameters:
-
renderer
WebGLRendererWebGL renderer to configure.
updateProjectionMatrix
()
Update camera projection matrix.
Also updates left right, top and bottom values from aspect and size.
Should be called after chaging projection parameters.
Properties
aspect
Number
Aspect ratio X/Y.
Default: 1.0
clearColor
Boolean
Clear screen color flag.
Default: false
clearDepth
Boolean
Clear depth flag.
Default: false
clearDepth
Boolean
Clear stencil buffer flag.
Default: false
composer
EffectComposer
Effect composed of this camera. Is used to render the scene to the screen and apply effects.
It is inialized with a RenderPass attached to it.
mode
Number
Camera resize mode.
Default: RESIZE_HORIZONTAL
order
Number
Camera draw order preference.
If more than one camera has the same order value the draw order is undefined for those cameras.
Default: 0
size
Number
Camera size relative to resize mode.
Default: 10.0