Description
class Camera extends Node
Constructor
new Camera(name, position, scene)
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
position |
Vector3 |
|
|
scene |
Scene |
|
Members
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
static UseAlternateWebVRRendering : boolean
orthoLeft : Nullable<number>
orthoRight : Nullable<number>
orthoBottom : Nullable<number>
orthoTop : Nullable<number>
fov : number
minZ : number
maxZ : number
inertia : number
mode : number
layerMask : number
fovMode : number
cameraRigMode : number
interaxialDistance : number
isStereoscopicSideBySide : boolean
onViewMatrixChangedObservable : Observable<Camera>
onProjectionMatrixChangedObservable : Observable<Camera>
globalPosition : Vector3
rigCameras : Camera[]
rigPostProcess : Nullable<PostProcess>
leftCamera : Nullable<FreeCamera>
rightCamera : Nullable<FreeCamera>
Methods
storeState() → Camera
Store current camera state (fov, position, etc..)
restoreState() → boolean
Restored camera state. You must call storeState() first
getClassName() → string
toString(fullDetails) → string
Parameters
|
Name |
Type |
Description |
optional |
fullDetails |
boolean |
|
isActiveMesh(mesh) → boolean
Parameters
|
Name |
Type |
Description |
|
mesh |
Mesh |
|
attachControl(element, noPreventDefault) → void
Parameters
|
Name |
Type |
Description |
|
element |
HTMLElement |
|
optional |
noPreventDefault |
boolean |
|
detachControl(element) → void
Parameters
|
Name |
Type |
Description |
|
element |
HTMLElement |
|
update() → void
attachPostProcess(postProcess, insertAt) → number
Parameters
|
Name |
Type |
Description |
|
postProcess |
PostProcess |
|
optional |
insertAt |
Nullable<number> |
|
detachPostProcess(postProcess) → void
Parameters
getWorldMatrix() → Matrix
getViewMatrix(force) → Matrix
Parameters
|
Name |
Type |
Description |
optional |
force |
boolean |
|
freezeProjectionMatrix(projection) → void
Parameters
|
Name |
Type |
Description |
optional |
projection |
Matrix |
|
unfreezeProjectionMatrix() → void
getProjectionMatrix(force) → Matrix
Parameters
|
Name |
Type |
Description |
optional |
force |
boolean |
|
isInFrustum(target) → boolean
Parameters
|
Name |
Type |
Description |
|
target |
ICullable |
|
isCompletelyInFrustum(target) → boolean
Parameters
|
Name |
Type |
Description |
|
target |
ICullable |
|
Parameters
|
Name |
Type |
Description |
optional |
length |
number |
|
optional |
transform |
Matrix |
|
optional |
origin |
Vector3 |
|
dispose() → void
getLeftTarget() → Nullable<Vector3>
getRightTarget() → Nullable<Vector3>
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) → Nullable<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
clone(name) → Camera
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
getDirection(localAxis) → Vector3
Parameters
|
Name |
Type |
Description |
|
localAxis |
Vector3 |
|
getDirectionToRef(localAxis, result) → void
Parameters
static GetConstructorFromName(type, name, scene, interaxial_distance, isStereoscopicSideBySide) → () => Camera
Parameters
|
Name |
Type |
Description |
|
type |
string |
|
|
name |
string |
|
|
scene |
Scene |
|
optional |
interaxial_distance |
number |
|
computeWorldMatrix() → Matrix
static Parse(parsedCamera, scene) → Camera
Parameters
|
Name |
Type |
Description |
|
parsedCamera |
any |
|
|
scene |
Scene |
|