CLASSES
TagsA - Z

Camera

NodeCamera

Description

class Camera extends Node

Constructor

new Camera(name, position, scene)

Creates a new Camera. A tutorial about ArcRotateCamera can be found here

Parameters

Name Type Description
name string
position Vector3 The camera position
scene Scene The scene linked to this camera

Members

inputs : CameraInputsManager<Camera>

static PERSPECTIVE_CAMERA : number

static ORTHOGRAPHIC_CAMERA : number

static FOVMODE_VERTICAL_FIXED : number

static FOVMODE_HORIZONTAL_FIXED : number

static RIG_MODE_NONE : number

static RIG_MODE_STEREOSCOPIC_ANAGLYPH : number

static RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : number

static RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED : number

static RIG_MODE_STEREOSCOPIC_OVERUNDER : number

static RIG_MODE_VR : number

static RIG_MODE_WEBVR : number

static ForceAttachControlToAlwaysPreventDefault : boolean

position : Vector3

Position of the camera

upVector : Vector3

Camera up

orthoLeft : any

For orthographic camera, it's the left side of point of view

orthoRight : any

For orthographic camera, it's the right side of point of view

orthoBottom : any

For orthegraphic camera, it's the bottom side of point of view

orthoTop : any

For orthographic camera, it's the top side of point of view

fov : number

Field of view of the camera

minZ : number

Minimum distance of view

maxZ : number

Maximum distance of view

inertia : number

Inertia of the camera

mode : number

0 = PERSPECTIVE

1 = ORTHOGRAPHIC

isIntermediate : boolean

True if this camera is a subcamera, false otherwise

viewport : Viewport

The viewport

layerMask : number

The layerMask

fovMode : number

cameraRigMode : number

interaxialDistance : number

isStereoscopicSideBySide : boolean

globalPosition : Vector3

Methods

toString(fullDetails) → string

Parameters

Name Type Description
optional fullDetails boolean

getActiveMeshes() → SmartArray<Mesh>

isActiveMesh(mesh) → boolean

Parameters

Name Type Description
mesh Mesh

attachControl(element, noPreventDefault) → void

Parameters

Name Type Description
element HTMLElement Element to detach control and display
optional noPreventDefault boolean

detachControl(element) → void

Detach the control and display of the camera from the element

Parameters

Name Type Description
element HTMLElement Element to detach control and display

update() → void

attachPostProcess(postProcess, insertAt) → number

Attaches a given post process

Parameters

Name Type Description
postProcess PostProcess @param postProcess
optional insertAt number Index of postProcess to add

detachPostProcess(postProcess, atIndices) → number[]

Detach a fiven post process

Parameters

Name Type Description
postProcess PostProcess @param postProcess
optional atIndices any Index of postProcess to detach

getWorldMatrix() → Matrix

Get the worldMatrix

getViewMatrix(force) → Matrix

Get the viewMatrix

Parameters

Name Type Description
optional force boolean

freezeProjectionMatrix(projection) → void

Parameters

Name Type Description
optional projection Matrix

unfreezeProjectionMatrix() → void

getProjectionMatrix(force) → Matrix

Get the projectionMatrix

Parameters

Name Type Description
optional force boolean

getTranformationMatrix() → Matrix

isInFrustum(target) → boolean

Parameters

Name Type Description
target ICullable

isCompletelyInFrustum(target) → boolean

Parameters

Name Type Description
target ICullable

dispose() → void

setCameraRigMode(mode, rigParams) → void

Parameters

Name Type Description
mode number
rigParams any

setCameraRigParameter(name, value) → void

Parameters

Name Type Description
name string
value any

createRigCamera(name, cameraIndex) → Camera

needs to be overridden by children so sub has required properties to be copied

Parameters

Name Type Description
name string
cameraIndex number

serialize() → any

getTypeName() → string

clone(name) → Camera

Parameters

Name Type Description
name string

getDirection(localAxis) → Vector3

Parameters

Name Type Description
localAxis Vector3

getDirectionToRef(localAxis, result) → void

Parameters

Name Type Description
localAxis Vector3
result Vector3

static GetConstructorFromName(type, name, scene, interaxial_distance, isStereoscopicSideBySide) → () => Camera

Parameters

Name Type Description
type string
name string
scene Scene The scene linked to this camera
optional interaxial_distance number

static Parse(parsedCamera, scene) → Camera

Parameters

Name Type Description
parsedCamera any
scene Scene The scene linked to this camera