Instantiates a new ArcRotateCamera in a given scene
Defines the name of the camera
Defines the camera rotation along the longitudinal axis
Defines the camera rotation along the latitudinal axis
Defines the camera distance from its target
Defines the camera target
Optional
scene: SceneDefines the scene the camera belongs to
Optional
setActiveOnSceneIfNoneActive: booleanDefines whether the camera should be marked as active if not other active cameras have been defined
Allows the camera to be completely reversed. If false the camera can not arrive upside down.
Defines the rotation angle of the camera along the longitudinal axis.
Gets a list of Animations associated with the node
Defines the rotation angle of the camera along the latitudinal axis.
Define the current direction the camera is moving to
Rig mode of the camera. This is useful to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes. This is normally controlled byt the camera themselves as internal use.
Define the current rotation the camera is rotating to
Defines whether the camera should check collision with the objects oh the scene.
https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions#how-can-i-do-this-
Defines the collision radius of the camera. This simulates a sphere around the camera.
https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions#arcrotatecamera
Defines the list of custom render target which are rendered to and then used as the input to this camera's render. Eg. display another camera view on a TV in the main scene This is pretty helpful if you wish to make a camera render to a texture you could reuse somewhere else in the scene. (Eg. security camera)
To change the final output target of the camera, camera.outputRenderTarget should be used instead (eg. webXR renders to a render target corresponding to an HMD)
Field Of View is set in Radians. (default is 0.8)
fovMode sets the camera frustum bounds to the viewport bounds. (default is FOVMODE_VERTICAL_FIXED)
Gets or sets the id of the node
Gets or sets a boolean indicating that the scaling of the parent hierarchy will not be taken in account by the camera
Define the default inertia of the camera. This helps giving a smooth feeling to the camera movement.
Current inertia value on the longitudinal axis. The bigger this number the longer it will take for the camera to stop.
Current inertia value on the latitudinal axis. The bigger this number the longer it will take for the camera to stop.
Defines the current inertia value used during panning of the camera along the X axis.
Defines the current inertia value used during panning of the camera along the Y axis.
Current inertia value on the radius axis. The bigger this number the longer it will take for the camera to stop.
Defines the input associated to the camera.
List of inspectable custom properties (used by the Inspector)
https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
Defines the distance between both "eyes" in case of a RIG
Speed multiplier for inverse camera panning
Reverses mouselook direction to 'natural' panning as opposed to traditional direct panning
Define whether the camera is intermediate. This is useful to not present the output directly to the screen in case of rig without post process for instance
Is this camera a part of a rig system?
Defines if stereoscopic rendering is done side by side or over under.
Restricts the camera to viewing objects with the same layerMask. A camera with a layerMask of 1 will render mesh.layerMask & camera.layerMask!== 0
Define the current target of the camera as an object or a position. Please note that locking a target will disable panning.
Minimum allowed angle on the longitudinal axis. This can help limiting how the Camera is able to move in the scene.
Minimum allowed angle on the latitudinal axis. This can help limiting how the Camera is able to move in the scene.
Minimum allowed distance of the camera to the target (The camera can not get closer). This can help limiting how the Camera is able to move in the scene.
Defines if camera will eliminate transform on y axis.
Define the maximum distance the camera can see to. This is important to note that the depth buffer are not infinite and the further it end the more your scene might encounter depth fighting issue.
Gets or sets an object used to store user defined information for the node
Define the minimum distance the camera can see from. This is important to note that the depth buffer are not infinite and the closer it starts the more your scene might encounter depth fighting issue.
Gets or sets the name of the node
Add constraint to the camera to prevent it to move freely in all directions and around all axis.
Object containing oblique projection values (only used with ORTHOGRAPHIC_CAMERA)
Observable triggered when the inputs have been processed.
Event raised when the camera is colliding with a mesh.
An event triggered when the mesh is disposed
Observable triggered when the mesh target has been changed on the camera.
Observable triggered when the camera Projection matrix has changed.
Callback raised when the node is ready to be used
Observable triggered when reset has been called and applied to the camera.
Observable triggered when the camera view matrix has changed.
When set, the camera will render to this render target instead of the default canvas
If the desire is to use the output of a camera as a texture in the scene consider using camera.customRenderTargets instead
Defines an override value to use as the parameter to setTarget. This allows the parameter to be specified when animating the target (e.g. using FramingBehavior).
Defines the allowed panning axis.
Defines the maximum distance the camera can pan. This could help keeping the camera always in your scene.
Defines the value of the inertia used during panning. 0 would mean stop inertia and one would mean no deceleration at all.
Defines the target of the camera before panning.
Defines the distance used to consider the camera in pan mode vs pinch/zoom. Basically if your fingers moves away from more than this distance you will be considered in pinch mode.
Projection plane tilt around the X axis (horizontal), set in Radians. (default is 0) Can be used to make vertical lines in world space actually vertical on the screen. See https://forum.babylonjs.com/t/add-vertical-shift-to-3ds-max-exporter-babylon-cameras/17480
Defines the radius of the camera from it s target point.
Render pass id used by the camera to render into the main framebuffer
For internal use only. Please do not use.
Optional
rigIf isRigCamera set to true this will be set with the parent camera. The parent camera is not (!) necessarily the .parent of this camera (like in the case of XR)
Define the current rotation of the camera
Define the current rotation of the camera as a quaternion to prevent Gimbal lock
Define the current speed of the camera
Gets or sets a string used to store user defined state for the node
Defines a screen offset for the camera position.
Gets or sets the unique id of the node
When set, the up vector of the camera will be updated by the rotation of the camera
Maximum allowed angle on the longitudinal axis. This can help limiting how the Camera is able to move in the scene.
Maximum allowed angle on the latitudinal axis. This can help limiting how the Camera is able to move in the scene.
Maximum allowed distance of the camera to the target (The camera can not get further). This can help limiting how the Camera is able to move in the scene.
Define if double tap/click is used to restore the previously saved state of the camera.
Define the viewport of the camera. This correspond to the portion of the screen the camera will render to in normalized 0 to 1 unit.
Defines how much the radius should be scaled while zooming on a particular mesh (through the zoomOn function)
Static
Readonly
FOVMODE_This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.
Static
Readonly
FOVMODE_This is the default FOV mode for perspective cameras. This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.
Static
ForceDefines if by default attaching controls should prevent the default javascript event to continue.
Static
Readonly
ORTHOGRAPHIC_This helps creating camera with an orthographic mode. Orthographic is commonly used in engineering as a means to produce object specifications that communicate dimensions unambiguously, each line of 1 unit length (cm, meter..whatever) will appear to have the same length everywhere on the drawing. This allows the drafter to dimension only a subset of lines and let the reader know that other lines of that length on the drawing are also that length in reality. Every parallel line in the drawing is also parallel in the object.
Static
Readonly
PERSPECTIVE_This is the default projection mode used by the cameras. It helps recreating a feeling of perspective and better appreciate depth. This is the best way to simulate real life cameras.
Static
Readonly
RIG_Custom rig mode allowing rig cameras to be populated manually with any number of cameras
Static
Readonly
RIG_This specifies there is no need for a camera rig. Basically only one eye is rendered corresponding to the camera.
Static
Readonly
RIG_Simulates a camera Rig with one blue eye and one red eye. This can be use with 3d blue and red glasses.
Static
Readonly
RIG_Defines that both eyes of the camera will be rendered on successive lines interlaced for passive 3d monitors.
Static
Readonly
RIG_Defines that both eyes of the camera will be rendered over under each other.
Static
Readonly
RIG_Defines that both eyes of the camera will be rendered side by side with a none parallel target.
Static
Readonly
RIG_Defines that both eyes of the camera will be rendered side by side with a parallel target.
Static
Readonly
RIG_Defines that both eyes of the camera should be renderered in a VR mode (carbox).
Returns the current camera absolute rotation
Gets or sets the accessibility tag to describe the node for accessibility purpose.
Gets or Set the pointer angular sensibility along the X axis or how fast is the camera rotating.
Gets or Set the pointer angular sensibility along the Y axis or how fast is the camera rotating.
Gets or sets the animation properties override
Gets the auto rotation behavior of the camera if it has been enabled.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors#autorotation-behavior
Gets the list of attached behaviors
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
Gets the bouncing behavior of the camera if it has been enabled.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors#bouncing-behavior
Gets or sets a boolean used to define if the node must be serialized
Gets the framing behavior of the camera if it has been enabled.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors#framing-behavior
Gets the left camera of a rig setup in case of Rigged Camera
Gets the right camera of a rig setup in case of Rigged Camera
Gets or Set the list of keyboard keys used to control beta angle in a negative direction.
Gets or Set the list of keyboard keys used to control alpha angle in a negative direction.
Gets or Set the list of keyboard keys used to control alpha angle in a positive direction.
Gets or Set the list of keyboard keys used to control beta angle in a positive direction.
Gets the left camera of a rig setup in case of Rigged Camera
Sets a callback that will be raised when the node will be disposed
An event triggered when the enabled state of the node changes
Gets or Set the pointer panning sensibility or how fast is the camera moving.
Gets or sets the parent of the node (without keeping the current position in the scene)
https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent
Gets or Set the pointer pinch delta percentage or how fast is the camera zooming. It will be used instead of pinchDeltaPrecision if different from 0. It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
Gets or Set the pointer pinch precision or how fast is the camera zooming.
Gets the post process used by the rig cameras
Gets the right camera of a rig setup in case of Rigged Camera
The screen area in scene units squared
Defines the target mesh of the camera. The camera looks towards it from the radius distance. Please note that setting a target host will disable panning.
The vector the camera should consider as up. (default is Vector3(0, 1, 0) as returned by Vector3.Up()) Setting this will copy the given vector to the camera's upVector, and set rotation matrices to and from Y up. DO NOT set the up vector using copyFrom or copyFromFloats, as this bypasses setting the above matrices.
Defines if the auto rotation behavior of the camera is enabled on the camera.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors#autorotation-behavior
Defines if the bouncing behavior of the camera is enabled on the camera.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors#bouncing-behavior
Defines if the framing behavior of the camera is enabled on the camera.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors#framing-behavior
Gets or Set the pointer use natural pinch zoom to override the pinch precision and pinch delta percentage. When useNaturalPinchZoom is true, multi touch zoom will zoom in such that any object in the plane at the camera's target point will scale perfectly with finger motion.
Gets or Set the mouse wheel delta percentage or how fast is the camera zooming. It will be used instead of pinchDeltaPrecision if different from 0. It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
Gets or Set the mouse wheel precision or how fast is the camera zooming.
Returns directly the latest state of the mesh World matrix. A Matrix is returned.
Gets or Set the boolean value that controls whether or not the mouse wheel zooms to the location of the mouse pointer or not. The default is false.
Attach a behavior to the node
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
the current Node
defines the behavior to attach
Optional
attachImmediately: booleandefines that the behavior must be attached even if the scene is still loading
Attach the input controls to a specific dom element to get the input from.
Optional
noPreventDefault: booleanDefines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Attach the input controls to a specific dom element to get the input from.
defines an ignored parameter kept for backward compatibility.
Optional
noPreventDefault: booleanDefines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Attached controls to the current camera.
Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Defines whether ctrl is used for panning within the controls
Attached controls to the current camera.
defines an ignored parameter kept for backward compatibility.
Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Defines whether ctrl is used for panning within the controls
Attached controls to the current camera.
Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Defines whether ctrl is used for panning within the controls
Defines whether panning is allowed through mouse click button
Attach a post process to the camera.
the position the post process has been inserted at
The post process to attach to the camera
Optional
insertAt: Nullable<number>The position of the post process in case several of them are in use in the scene
Will start the animation sequence
the object created for this animation. If range does not exist, it will return null
defines the range frames for animation sequence
Optional
loop: booleandefines if the animation should loop (false by default)
Optional
speedRatio: numberdefines the speed factor in which to run the animation (1 by default)
Optional
onAnimationEnd: (() => void)defines a function to be executed when the animation ended (undefined by default)
Focus on a mesh or a bounding box. This adapts the target and maxRadius if necessary but does not update the current radius. The target will be changed but the radius
Defines the mesh or bounding info to focus on
Optional
doNotUpdateMaxZ: booleanDefines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
Freeze the projection matrix. It will prevent the cache check of the camera projection compute and can speed up perf if no parameter of the camera are meant to change
Optional
projection: MatrixDefines manually a projection if necessary
Gets the list of active meshes this frame (meshes no culled or excluded by lod s in the frame)
the active meshe list
Get an animation by name
null if not found else the requested animation
defines the name of the animation to look for
Gets an attached behavior by name
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
null if behavior was not found else the requested behavior
defines the name of the behavior to look for
Get all child-meshes of this node
an array of AbstractMesh
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)
Optional
predicate: ((node: Node) => node is T)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Get all child-meshes of this node
an array of AbstractMesh
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)
Optional
predicate: ((node: Node) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Get all direct children of this node
an array of Node
Optional
predicate: ((node: Node) => node is T)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)
Get all direct children of this node
an array of Node
Optional
predicate: ((node: Node) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)
Will return all nodes that have this node as ascendant
all children nodes of all types
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
Optional
predicate: ((node: Node) => node is T)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Will return all nodes that have this node as ascendant
all children nodes of all types
Optional
directDescendantsOnly: booleandefines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
Optional
predicate: ((node: Node) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
Gets a ray in the forward direction from the camera.
the forward ray
Optional
length: numberDefines the length of the ray to create
Optional
transform: MatrixDefines the transform to apply to the ray, by default the world matrix is used to create a workd space ray
Optional
origin: Vector3Defines the start point of the ray which defaults to the camera position
Gets a ray in the forward direction from the camera.
the forward ray
the ray to (re)use when setting the values
Optional
length: numberDefines the length of the ray to create
Optional
transform: MatrixDefines the transform to apply to the ray, by default the world matrx is used to create a workd space ray
Optional
origin: Vector3Defines the start point of the ray which defaults to the camera position
Return the minimum and maximum world vectors of the entire hierarchy under current node
the new bounding vectors
Optional
includeDescendants: booleanInclude bounding info from descendants as well (true by default)
Optional
predicate: Nullable<((abstractMesh: AbstractMesh) => boolean)>defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors
Is this node a descendant of the given node? The function will iterate up the hierarchy until the ancestor was found or no more parents defined
a boolean indicating if this node is a descendant of the given node
defines the parent node to inspect
Is this node enabled? If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true
whether this node (and its parent) is enabled
Optional
checkAncestors: booleanindicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors
Checks if a cullable object (mesh...) is in the camera frustum This checks the bounding box center. See isCompletelyInFrustum for a full bounding check
true if the object is in frustum otherwise false
The object to check
Optional
checkRigCameras: booleanIf the rig cameras should be checked (eg. with VR camera both eyes should be checked) (Default: false)
Remove an attached behavior
https://doc.babylonjs.com/features/featuresDeepDive/behaviors
the current Node
defines the behavior to attach
Defines the target the camera should look at. This will automatically adapt alpha beta and radius to fit within the new target. Please note that setting a target as a mesh will disable panning.
Defines the new target as a Vector or a mesh
Optional
toBoundingCenter: booleanIn case of a mesh target, defines whether to target the mesh position or its bounding information center
Optional
allowSamePosition: booleanIf false, prevents reapplying the new computed position if it is identical to the current one (optim)
Optional
cloneAlphaBetaRadius: booleanIf true, replicate the current setup (alpha, beta, radius) on the new target
Zooms on a mesh to be at the min distance where we could see it fully in the current viewport.
Optional
meshes: AbstractMesh[]Defines the mesh to zoom on
Optional
doNotUpdateMaxZ: booleanDefines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
Static
AddStatic
ConstructReturns a node constructor based on type name
the new constructor or null
defines the type name
defines the new node name
defines the hosting scene
Optional
options: anydefines optional options to transmit to constructors
Static
GetGets a camera constructor for a given camera type
a factory method to construct the camera
The type of the camera to construct (should be equal to one of the camera class name)
The name of the camera the result will be able to instantiate
The scene the result will construct the camera in
Optional
interaxial_distance: numberIn case of stereoscopic setup, the distance between both eyes
Optional
isStereoscopicSideBySide: booleanIn case of stereoscopic setup, should the sereo be side b side
Gets a camera constructor for a given camera type
a factory method to construct the camera
Static
ParseStatic
ParseGenerated using TypeDoc
This represents an orbital type of camera.
This camera always points towards a given target position and can be rotated around that target with the target as the centre of rotation. It can be controlled with cursors and mouse, or with touch events. Think of this camera as one orbiting its target position, or more imaginatively as a spy satellite orbiting the earth. Its position relative to the target (earth) can be set by three parameters, alpha (radians) the longitudinal rotation, beta (radians) the latitudinal rotation and radius the distance from the target position.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#arc-rotate-camera