AnaglyphArcRotateCamera

Camera used to simulate anaglyphic rendering (based on ArcRotateCamera)

see

http://doc.babylonjs.com/features/cameras#anaglyph-cameras

Hierarchy

Index

Constructors

constructor

Find examples in Playground
  • Creates a new AnaglyphArcRotateCamera

    Parameters

    • name: string

      defines camera name

    • alpha: number

      defines alpha angle (in radians)

    • beta: number

      defines beta angle (in radians)

    • radius: number

      defines radius

    • target: Vector3

      defines camera target

    • interaxialDistance: number

      defines distance between each color axis

    • scene: Scene

      defines the hosting scene

    Returns AnaglyphArcRotateCamera

Properties

allowUpsideDown

Find examples in Playground
allowUpsideDown: boolean

Allows the camera to be completely reversed. If false the camera can not arrive upside down.

alpha

Find examples in Playground
alpha: number

Defines the rotation angle of the camera along the longitudinal axis.

angularSensibilityX

Find examples in Playground
angularSensibilityX: number

Gets or Set the pointer angular sensibility along the X axis or how fast is the camera rotating.

angularSensibilityY

Find examples in Playground
angularSensibilityY: number

Gets or Set the pointer angular sensibility along the Y axis or how fast is the camera rotating.

autoRotationBehavior

Find examples in Playground
autoRotationBehavior: Nullable<AutoRotationBehavior>

Gets the auto rotation behavior of the camera if it has been enabled.

see

http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior

beta

Find examples in Playground
beta: number

Defines the rotation angle of the camera along the latitudinal axis.

bouncingBehavior

Find examples in Playground
bouncingBehavior: Nullable<BouncingBehavior>

Gets the bouncing behavior of the camera if it has been enabled.

see

http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior

cameraDirection

Find examples in Playground
cameraDirection: Vector3

Define the current direction the camera is moving to

cameraRotation

Find examples in Playground
cameraRotation: Vector2

Define the current rotation the camera is rotating to

checkCollisions

Find examples in Playground
checkCollisions: boolean

Defines whether the camera should check collision with the objects oh the scene.

see

http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#how-can-i-do-this

collisionRadius

Find examples in Playground
collisionRadius: Vector3

Defines the collision radius of the camera. This simulates a sphere around the camera.

see

http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#arcrotatecamera

framingBehavior

Find examples in Playground
framingBehavior: Nullable<FramingBehavior>

Gets the framing behavior of the camera if it has been enabled.

see

http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior

inertialAlphaOffset

Find examples in Playground
inertialAlphaOffset: number

Current inertia value on the longitudinal axis. The bigger this number the longer it will take for the camera to stop.

inertialBetaOffset

Find examples in Playground
inertialBetaOffset: number

Current inertia value on the latitudinal axis. The bigger this number the longer it will take for the camera to stop.

inertialPanningX

Find examples in Playground
inertialPanningX: number

Defines the current inertia value used during panning of the camera along the X axis.

inertialPanningY

Find examples in Playground
inertialPanningY: number

Defines the current inertia value used during panning of the camera along the Y axis.

inertialRadiusOffset

Find examples in Playground
inertialRadiusOffset: number

Current inertia value on the radius axis. The bigger this number the longer it will take for the camera to stop.

inputs

Find examples in Playground

Defines the input associated to the camera.

keysDown

Find examples in Playground
keysDown: number[]

Gets or Set the list of keyboard keys used to control beta angle in a negative direction.

keysLeft

Find examples in Playground
keysLeft: number[]

Gets or Set the list of keyboard keys used to control alpha angle in a negative direction.

keysRight

Find examples in Playground
keysRight: number[]

Gets or Set the list of keyboard keys used to control alpha angle in a positive direction.

keysUp

Find examples in Playground
keysUp: number[]

Gets or Set the list of keyboard keys used to control beta angle in a positive direction.

lockedTarget

Find examples in Playground
lockedTarget: any

Define the current target of the camera as an object or a position.

lowerAlphaLimit

Find examples in Playground
lowerAlphaLimit: Nullable<number>

Minimum allowed angle on the longitudinal axis. This can help limiting how the Camera is able to move in the scene.

lowerBetaLimit

Find examples in Playground
lowerBetaLimit: number

Minimum allowed angle on the latitudinal axis. This can help limiting how the Camera is able to move in the scene.

lowerRadiusLimit

Find examples in Playground
lowerRadiusLimit: Nullable<number>

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.

noRotationConstraint

Find examples in Playground
noRotationConstraint: boolean

Add cconstraint to the camera to prevent it to move freely in all directions and around all axis.

onCollide

Find examples in Playground
onCollide: function

Event raised when the camera is colliding with a mesh.

Type declaration

onMeshTargetChangedObservable

Find examples in Playground
onMeshTargetChangedObservable: Observable<Nullable<AbstractMesh>>

Observable triggered when the mesh target has been changed on the camera.

panningAxis

Find examples in Playground
panningAxis: Vector3

Defines the allowed panning axis.

panningDistanceLimit

Find examples in Playground
panningDistanceLimit: Nullable<number>

Defines the maximum distance the camera can pan. This could help keeping the cammera always in your scene.

panningInertia

Find examples in Playground
panningInertia: number

Defines the value of the inertia used during panning. 0 would mean stop inertia and one would mean no decelleration at all.

panningOriginTarget

Find examples in Playground
panningOriginTarget: Vector3

Defines the target of the camera before paning.

panningSensibility

Find examples in Playground
panningSensibility: number

Gets or Set the pointer panning sensibility or how fast is the camera moving.

pinchDeltaPercentage

Find examples in Playground
pinchDeltaPercentage: number

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.

pinchPrecision

Find examples in Playground
pinchPrecision: number

Gets or Set the pointer pinch precision or how fast is the camera zooming.

pinchToPanMaxDistance

Find examples in Playground
pinchToPanMaxDistance: number

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.

position

Find examples in Playground
position: Vector3

Define the current local position of the camera in the scene

radius

Find examples in Playground
radius: number

Defines the radius of the camera from it s target point.

rotation

Find examples in Playground
rotation: Vector3

Define the current rotation of the camera

rotationQuaternion

Find examples in Playground
rotationQuaternion: Quaternion

Define the current rotation of the camera as a quaternion to prevent Gimbal lock

speed

Find examples in Playground
speed: number

Define the current speed of the camera

target

Find examples in Playground
target: Vector3

Defines the target point of the camera. The camera looks towards it form the radius distance.

targetScreenOffset

Find examples in Playground
targetScreenOffset: Vector2

Defines a screen offset for the camera position.

upVector

Find examples in Playground
upVector: Vector3

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.

updateUpVectorFromRotation

Find examples in Playground
updateUpVectorFromRotation: boolean

When set, the up vector of the camera will be updated by the rotation of the camera

upperAlphaLimit

Find examples in Playground
upperAlphaLimit: Nullable<number>

Maximum allowed angle on the longitudinal axis. This can help limiting how the Camera is able to move in the scene.

upperBetaLimit

Find examples in Playground
upperBetaLimit: number

Maximum allowed angle on the latitudinal axis. This can help limiting how the Camera is able to move in the scene.

upperRadiusLimit

Find examples in Playground
upperRadiusLimit: Nullable<number>

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.

useAutoRotationBehavior

Find examples in Playground
useAutoRotationBehavior: boolean

Defines if the auto rotation behavior of the camera is enabled on the camera.

see

http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior

useBouncingBehavior

Find examples in Playground
useBouncingBehavior: boolean

Defines if the bouncing behavior of the camera is enabled on the camera.

see

http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior

useFramingBehavior

Find examples in Playground
useFramingBehavior: boolean

Defines if the framing behavior of the camera is enabled on the camera.

see

http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior

useInputToRestoreState

Find examples in Playground
useInputToRestoreState: boolean

Define if double tap/click is used to restore the previously saved state of the camera.

wheelDeltaPercentage

Find examples in Playground
wheelDeltaPercentage: number

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.

wheelPrecision

Find examples in Playground
wheelPrecision: number

Gets or Set the mouse wheel precision or how fast is the camera zooming.

zoomOnFactor

Find examples in Playground
zoomOnFactor: number

Defines how much the radius should be scaled while zomming on a particular mesh (through the zoomOn function)

Methods

attachControl

Find examples in Playground
  • attachControl(element: HTMLElement, noPreventDefault?: boolean, useCtrlForPanning?: boolean, panningMouseButton?: number): void
  • Attached controls to the current camera.

    Parameters

    • element: HTMLElement

      Defines the element the controls should be listened from

    • Optional noPreventDefault: boolean

      Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)

    • Optional useCtrlForPanning: boolean

      Defines whether ctrl is used for paning within the controls

    • Optional panningMouseButton: number

      Defines whether panning is allowed through mouse click button

    Returns void

createRigCamera

Find examples in Playground
  • createRigCamera(name: string, cameraIndex: number): Camera
  • override

    Override Camera.createRigCamera

    Parameters

    • name: string
    • cameraIndex: number

    Returns Camera

detachControl

Find examples in Playground
  • detachControl(element: HTMLElement): void
  • Detach the current controls from the camera. The camera will stop reacting to inputs.

    Parameters

    • element: HTMLElement

      Defines the element to stop listening the inputs from

    Returns void

dispose

Find examples in Playground
  • dispose(): void
  • Destroy the camera and release the current resources hold by it.

    Returns void

focusOn

Find examples in Playground
  • focusOn(meshesOrMinMaxVectorAndDistance: AbstractMesh[] | object, doNotUpdateMaxZ?: boolean): void
  • 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

    Parameters

    • meshesOrMinMaxVectorAndDistance: AbstractMesh[] | object

      Defines the mesh or bounding info to focus on

    • Optional doNotUpdateMaxZ: boolean

      Defines 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)

    Returns void

getClassName

Find examples in Playground
  • getClassName(): string

getFrontPosition

Find examples in Playground
  • getFrontPosition(distance: number): Vector3
  • Gets the position in front of the camera at a given distance.

    Parameters

    • distance: number

      The distance from the camera we want the position to be

    Returns Vector3

    the position

getTarget

Find examples in Playground
  • Return the current target position of the camera. This value is expressed in local space.

    Returns Vector3

    the target position

rebuildAnglesAndRadius

Find examples in Playground
  • rebuildAnglesAndRadius(): void

setMatUp

Find examples in Playground
  • setMatUp(): void
  • Sets the Y-up to camera up-vector rotation matrix, and the up-vector to Y-up rotation matrix.

    Returns void

setPosition

Find examples in Playground
  • setPosition(position: Vector3): void
  • Use a position to define the current camera related information like aplha, beta and radius

    Parameters

    • position: Vector3

      Defines the position to set the camera at

    Returns void

setTarget

Find examples in Playground
  • setTarget(target: AbstractMesh | Vector3, toBoundingCenter?: boolean, allowSamePosition?: boolean): void
  • Defines the target the camera should look at. This will automatically adapt alpha beta and radius to fit within the new target.

    Parameters

    • target: AbstractMesh | Vector3

      Defines the new target as a Vector or a mesh

    • Optional toBoundingCenter: boolean

      In case of a mesh target, defines wether to target the mesh position or its bounding information center

    • Optional allowSamePosition: boolean

      If false, prevents reapplying the new computed position if it is identical to the current one (optim)

    Returns void

storeState

Find examples in Playground

zoomOn

Find examples in Playground
  • zoomOn(meshes?: AbstractMesh[], doNotUpdateMaxZ?: boolean): void
  • Zooms on a mesh to be at the min distance where we could see it fully in the current viewport.

    Parameters

    • Optional meshes: AbstractMesh[]

      Defines the mesh to zoom on

    • Optional doNotUpdateMaxZ: boolean

      Defines 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)

    Returns void

Generated using TypeDoc