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.

Hierarchy (view full)

Constructors

Properties

uuid: string

The universal unique id of the Camera

up: Vec3

Up vector used for lookAt calculations.

size: RectSize

The Camera frustum width and height

onMatricesChanged?: (() => void)

Callback to execute when one of the camera matrices changed

Type declaration

    • (): void
    • Callback to execute when one of the camera matrices changed

      Returns void

CSSPerspective: number

A number representing what CSS perspective value (in pixel) should be used to obtain the same perspective effect as this Camera

visibleSize: RectSize

An object containing the visible width / height at a given z-depth from our camera parameters

transforms: Object3DTransforms
children: Object3D[]

Children Object3D in the scene graph, used to compute their own world matrix

object3DIndex: number

Index (order of creation) of this Object3D. Used in the parent / children relation.

matricesNeedUpdate: boolean

Whether at least one of this Object3D matrix needs an update.

Accessors

  • get frustumPlanes(): Float32Array[]
  • Get the current Camera frustum planes in the [left, right, top, bottom, near, far] order, based on its projectionMatrix and viewMatrix.

    Returns Float32Array[]

    • Frustum planes as an array of 6 faces in the [left, right, top, bottom, near, far] order, made of Float32Array of length 4.

Methods

  • Set our view dependent matrices shouldUpdate flag to true (tell it to update)

    Returns void

  • Set our projection dependent matrices shouldUpdate flag to true (tell it to update)

    Returns void