Camera constructor
parameters used to create our Camera
The universal unique id of the Camera
Matrices object of the Camera
The Camera frustum width and height
Optional
onCallback to execute when one of the camera matrices changed
Callback to execute when one of the camera matrices changed
A number representing what CSS perspective value (in pixel) should be used to obtain the same perspective effect as this Camera
An object containing the visible width / height at a given z-depth from our camera parameters
Transformation object of the Object3D
Children Object3D in the scene graph, used to compute their own world matrix
Whether at least one of this Object3D matrix needs an update.
Get the Camera field of view
Set the Camera field of view. Update the projectionMatrix only if the field of view actually changed
new field of view
Set the Camera near plane value. Update the projectionMatrix only if the near plane actually changed
new near plane value
Set the Camera far plane value. Update projectionMatrix only if the far plane actually changed
new far plane value
Get the Camera pixelRatio value.
Set the Camera pixelRatio value. Update the CSSPerspective only if the pixel ratio actually changed
new pixel ratio value
Get our quaternion
Set our quaternion
new quaternion
Get our model matrix
Set our model matrix
new model matrix
Get our world matrix
Set our world matrix
new world matrix
Callback to run when the camera model matrix has been updated
Set the Camera width and height. Update the projectionMatrix only if the width or height actually changed
width and height values to use
Sets the Camera perspective. Update the projectionMatrix if needed.
parameters to use for the perspective
Sets a CSSPerspective property based on size, pixelRatio and fov.
Used to translate planes along the Z axis using pixel units as CSS would do.
See reference
Get visible width / height at a given z-depth from our Camera parameters.
See reference
depth to use for calculations
Updates the Camera projectionMatrix
Set our transforms properties and vectors onChange callbacks
Apply our rotation and tell our model matrix to update
Tell our model matrix to update
Tell our model matrix to update
Tell our model matrix to update
Set our model matrix shouldUpdate flag to true (tell it to update)
Set our world matrix shouldUpdate flag to true (tell it to update)
Destroy this Object3D. Removes its parent and set its children free.
Used to create a perspective Camera and its projection, model and view matrices.
GPUCurtainsRenderer and GPUCameraRenderer automatically create their own Camera under the hood, so it is unlikely you'd have to create one by yourself.
Camera default perspective settings are:
Also note that the Camera default position is set at
(0, 0, 10)
so the object created with a default size do not appear too big nor too small.