magic-pixels
    Preparing search index...

    Class PerspectiveCamera

    Camera with a perspective projection.

    Hierarchy (View Summary)

    Index
    • Parameters

      • fov: number = 50

        vertical field of view in degrees

      • aspect: number = 1

        width / height of the viewport

      • near: number = 0.1

        distance to the near clipping plane

      • far: number = 2000

        distance to the far clipping plane

      Returns PerspectiveCamera

    aspect: number = 1

    width / height of the viewport

    children: Object3D[] = []
    far: number = 2000

    distance to the far clipping plane

    fov: number = 50

    vertical field of view in degrees

    localMatrix: Mat4 = ...

    transform relative to the parent

    matrixAutoUpdate: boolean = true

    When true (the default), updateWorldMatrix() recomposes localMatrix from position, rotation and scale. Set to false to write localMatrix yourself; flag changes with worldMatrixNeedsUpdate.

    near: number = 0.1

    distance to the near clipping plane

    parent: Object3D | null = null
    position: Vector = ...

    translation relative to the parent

    projectionMatrix: Mat4 = ...
    quaternion: Quaternion = ...

    rotation relative to the parent, as a unit quaternion

    rotation: Vector = ...

    rotation relative to the parent, as Euler angles in radians applied in XYZ order; kept in sync with quaternion

    scale: Vector = ...

    scale factors per axis

    viewMatrix: Mat4 = ...

    inverse of worldMatrix; transforms world space into view space

    visible: boolean = true

    invisible objects and their children are not rendered

    worldMatrix: Mat4 = ...

    transform relative to the scene root

    worldMatrixNeedsUpdate: boolean = false

    set to true after changing localMatrix manually

    • Point the camera at target (the viewing direction is the camera's -Z axis).

      Parameters

      • target: Vector

        a point in the parent's coordinate system

      • up: Vector = DEFAULT_UP

        the up direction, +Y by default

      Returns this

    • Recompose localMatrix from position, quaternion and scale, after bringing quaternion and rotation in sync (see the class description).

      Returns this

    • Update the world matrices of this object and its descendants.

      Parameters

      • force: boolean = false

        recompute even if nothing was flagged as changed

      Returns void