PerspectiveCamera constructor
PerspectiveCameraParams used to create our PerspectiveCamera.
The universal unique id of the Camera.
Matrices object of the Camera.
Optional
onCallback 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. Useful only with PerspectiveCamera.
An object containing the visible width / height at a given z-depth from our camera parameters.
Eventual aspect ratio of the PerspectiveCamera to use.
The PerspectiveCamera frustum width and height.
Transformation object of the Object3D
Vec3 holding the actual position of this Object3D from its worldMatrix.
Children Object3D in the scene graph, used to compute their own worldMatrix.
Whether at least one of this Object3D matrix needs an update.
Get the near plane value.
Set the near plane value. Update the projectionMatrix only if the near plane actually changed.
New near plane value.
Get the far plane value.
Set the far plane value. Update projectionMatrix only if the far plane actually changed.
New far plane value.
Get the pixelRatio value.
Set the pixelRatio value. Update the CSSPerspective only if the pixel ratio actually changed.
New pixel ratio value.
Get the field of view.
Set the field of view. Update the projectionMatrix only if the field of view actually changed.
New field of view.
Get the current PerspectiveCamera frustum planes in the [left, right, top, bottom, near, far] order, based on its projectionMatrix and viewMatrix.
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 PerspectiveCamera width and height. Update the projectionMatrix only if the width or height actually changed.
New width and height values to use.
Sets the PerspectiveCamera perspective projection settings. Update the projectionMatrix if needed.
PerspectiveCameraOptions to use for the perspective projection.
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.
Get visible width / height at a given z-depth from our PerspectiveCamera parameters.
Depth to use for calculations.
Updates the PerspectiveCamera 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)
Update our model matrix.
Whether to update the parent worldMatrix beforehand. Default to false
.
Whether to update the children worldMatrix afterward. Default to true
.
Destroy this Object3D. Removes its parent and set its children free.
Used to create a PerspectiveCamera and its projection, model and view matrices.
GPUCurtainsRenderer and GPUCameraRenderer automatically create their own PerspectiveCamera under the hood, so it is unlikely you'd have to create one by yourself.
PerspectiveCamera default perspective settings are:
Also note that the PerspectiveCamera default position is set at
(0, 0, 10)
so the object created with a default size do not appear too big nor too small.