Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnaglyphArcRotateCamera

Camera used to simulate anaglyphic rendering (based on ArcRotateCamera)

see

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

Hierarchy

Index

Constructors

constructor

  • 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

    • Optional scene: Scene

      defines the hosting scene

    Returns AnaglyphArcRotateCamera

Properties

allowUpsideDownSearch playground for allowUpsideDown

allowUpsideDown: boolean

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

alphaSearch playground for alpha

alpha: number

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

betaSearch playground for beta

beta: number

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

cameraDirectionSearch playground for cameraDirection

cameraDirection: Vector3

Define the current direction the camera is moving to

cameraRotationSearch playground for cameraRotation

cameraRotation: Vector2

Define the current rotation the camera is rotating to

checkCollisionsSearch playground for checkCollisions

checkCollisions: boolean

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

see

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

collisionRadiusSearch playground for collisionRadius

collisionRadius: Vector3

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

see

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

ignoreParentScalingSearch playground for ignoreParentScaling

ignoreParentScaling: boolean

Gets or sets a boolean indicating that the scaling of the parent hierarchy will not be taken in account by the camera

inertialAlphaOffsetSearch playground for inertialAlphaOffset

inertialAlphaOffset: number

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

inertialBetaOffsetSearch playground for inertialBetaOffset

inertialBetaOffset: number

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

inertialPanningXSearch playground for inertialPanningX

inertialPanningX: number

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

inertialPanningYSearch playground for inertialPanningY

inertialPanningY: number

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

inertialRadiusOffsetSearch playground for inertialRadiusOffset

inertialRadiusOffset: number

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

inputsSearch playground for inputs

Defines the input associated to the camera.

inverseRotationSpeedSearch playground for inverseRotationSpeed

inverseRotationSpeed: number

Speed multiplier for inverse camera panning

invertRotationSearch playground for invertRotation

invertRotation: boolean

Reverses mouselook direction to 'natural' panning as opposed to traditional direct panning

lockedTargetSearch playground for lockedTarget

lockedTarget: any

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

lowerAlphaLimitSearch playground for lowerAlphaLimit

lowerAlphaLimit: Nullable<number>

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

lowerBetaLimitSearch playground for lowerBetaLimit

lowerBetaLimit: number

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

lowerRadiusLimitSearch playground for lowerRadiusLimit

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.

mapPanningSearch playground for mapPanning

mapPanning: boolean

Defines if camera will eliminate transform on y axis.

noRotationConstraintSearch playground for noRotationConstraint

noRotationConstraint: boolean

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

onCollideSearch playground for onCollide

onCollide: (collidedMesh: AbstractMesh) => void

Event raised when the camera is colliding with a mesh.

Type declaration

onMeshTargetChangedObservableSearch playground for onMeshTargetChangedObservable

onMeshTargetChangedObservable: Observable<Nullable<AbstractMesh>>

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

panningAxisSearch playground for panningAxis

panningAxis: Vector3

Defines the allowed panning axis.

panningDistanceLimitSearch playground for panningDistanceLimit

panningDistanceLimit: Nullable<number>

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

panningInertiaSearch playground for panningInertia

panningInertia: number

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

panningOriginTargetSearch playground for panningOriginTarget

panningOriginTarget: Vector3

Defines the target of the camera before panning.

pinchToPanMaxDistanceSearch playground for pinchToPanMaxDistance

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.

radiusSearch playground for radius

radius: number

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

rotationSearch playground for rotation

rotation: Vector3

Define the current rotation of the camera

rotationQuaternionSearch playground for rotationQuaternion

rotationQuaternion: Quaternion

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

speedSearch playground for speed

speed: number

Define the current speed of the camera

targetScreenOffsetSearch playground for targetScreenOffset

targetScreenOffset: Vector2

Defines a screen offset for the camera position.

updateUpVectorFromRotationSearch playground for updateUpVectorFromRotation

updateUpVectorFromRotation: boolean

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

upperAlphaLimitSearch playground for upperAlphaLimit

upperAlphaLimit: Nullable<number>

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

upperBetaLimitSearch playground for upperBetaLimit

upperBetaLimit: number

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

upperRadiusLimitSearch playground for upperRadiusLimit

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.

useInputToRestoreStateSearch playground for useInputToRestoreState

useInputToRestoreState: boolean

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

zoomOnFactorSearch playground for zoomOnFactor

zoomOnFactor: number

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

Accessors

angularSensibilityX

  • get angularSensibilityX(): number
  • set angularSensibilityX(value: number): any
  • Gets or Set the pointer angular sensibility along the X axis or how fast is the camera rotating.

    Returns number

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

    Parameters

    • value: number

    Returns any

angularSensibilityY

  • get angularSensibilityY(): number
  • set angularSensibilityY(value: number): any
  • Gets or Set the pointer angular sensibility along the Y axis or how fast is the camera rotating.

    Returns number

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

    Parameters

    • value: number

    Returns any

autoRotationBehavior

bouncingBehavior

framingBehavior

keysDown

  • get keysDown(): number[]
  • set keysDown(value: number[]): any
  • Gets or Set the list of keyboard keys used to control beta angle in a negative direction.

    Returns number[]

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

    Parameters

    • value: number[]

    Returns any

keysLeft

  • get keysLeft(): number[]
  • set keysLeft(value: number[]): any
  • Gets or Set the list of keyboard keys used to control alpha angle in a negative direction.

    Returns number[]

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

    Parameters

    • value: number[]

    Returns any

keysRight

  • get keysRight(): number[]
  • set keysRight(value: number[]): any
  • Gets or Set the list of keyboard keys used to control alpha angle in a positive direction.

    Returns number[]

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

    Parameters

    • value: number[]

    Returns any

keysUp

  • get keysUp(): number[]
  • set keysUp(value: number[]): any
  • Gets or Set the list of keyboard keys used to control beta angle in a positive direction.

    Returns number[]

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

    Parameters

    • value: number[]

    Returns any

panningSensibility

  • get panningSensibility(): number
  • set panningSensibility(value: number): any
  • Gets or Set the pointer panning sensibility or how fast is the camera moving.

    Returns number

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

    Parameters

    • value: number

    Returns any

pinchDeltaPercentage

  • get pinchDeltaPercentage(): number
  • set pinchDeltaPercentage(value: number): any
  • 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.

    Returns 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.

    Parameters

    • value: number

    Returns any

pinchPrecision

  • get pinchPrecision(): number
  • set pinchPrecision(value: number): any
  • Gets or Set the pointer pinch precision or how fast is the camera zooming.

    Returns number

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

    Parameters

    • value: number

    Returns any

position

  • Define the current local position of the camera in the scene

    Returns Vector3

  • Define the current local position of the camera in the scene

    Parameters

    Returns any

target

  • Defines the target point of the camera. The camera looks towards it form the radius distance. Please note that you can set the target to a mesh and thus the target will be copied from mesh.position

    Returns Vector3

  • Defines the target point of the camera. The camera looks towards it form the radius distance. Please note that you can set the target to a mesh and thus the target will be copied from mesh.position

    Parameters

    Returns any

targetHost

upVector

  • 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.

    Returns 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.

    Parameters

    Returns any

useAutoRotationBehavior

  • get useAutoRotationBehavior(): boolean
  • set useAutoRotationBehavior(value: boolean): any

useBouncingBehavior

  • get useBouncingBehavior(): boolean
  • set useBouncingBehavior(value: boolean): any

useFramingBehavior

  • get useFramingBehavior(): boolean
  • set useFramingBehavior(value: boolean): any

useNaturalPinchZoom

  • get useNaturalPinchZoom(): boolean
  • set useNaturalPinchZoom(value: boolean): any
  • 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.

    Returns boolean

  • 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.

    Parameters

    • value: boolean

    Returns any

wheelDeltaPercentage

  • get wheelDeltaPercentage(): number
  • set wheelDeltaPercentage(value: number): any
  • 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.

    Returns 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.

    Parameters

    • value: number

    Returns any

wheelPrecision

  • get wheelPrecision(): number
  • set wheelPrecision(value: number): any
  • Gets or Set the mouse wheel precision or how fast is the camera zooming.

    Returns number

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

    Parameters

    • value: number

    Returns any

zoomToMouseLocation

  • get zoomToMouseLocation(): boolean
  • set zoomToMouseLocation(value: boolean): any
  • 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.

    Returns boolean

  • 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.

    Parameters

    • value: boolean

    Returns any

Methods

attachControlSearch playground for attachControl

  • attachControl(noPreventDefault?: boolean): void
  • attachControl(ignored: any, noPreventDefault?: boolean): void
  • attachControl(noPreventDefault: boolean, useCtrlForPanning: boolean): void
  • attachControl(ignored: any, noPreventDefault: boolean, useCtrlForPanning: boolean): void
  • attachControl(noPreventDefault: boolean, useCtrlForPanning: boolean, panningMouseButton: number): void
  • Attach the input controls to a specific dom element to get the input from.

    Parameters

    Returns void

  • Attach the input controls to a specific dom element to get the input from.

    Parameters

    • ignored: any

      defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

    • Optional noPreventDefault: boolean

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

    Returns void

  • Attached controls to the current camera.

    Parameters

    Returns void

  • Attached controls to the current camera.

    Parameters

    • ignored: any

      defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

    • noPreventDefault: boolean

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

    • useCtrlForPanning: boolean

      Defines whether ctrl is used for panning within the controls

    Returns void

  • Attached controls to the current camera.

    Parameters

    • noPreventDefault: boolean

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

    • useCtrlForPanning: boolean

      Defines whether ctrl is used for panning within the controls

    • panningMouseButton: number

      Defines whether panning is allowed through mouse click button

    Returns void

createRigCameraSearch playground for createRigCamera

  • createRigCamera(name: string, cameraIndex: number): Camera
  • override

    Override Camera.createRigCamera

    Parameters

    • name: string
    • cameraIndex: number

    Returns Camera

detachControlSearch playground for detachControl

  • detachControl(): void
  • detachControl(ignored: any): void
  • Detach the current controls from the specified dom element.

    Returns void

  • Detach the current controls from the specified dom element.

    Parameters

    • ignored: any

      defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

    Returns void

disposeSearch playground for dispose

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

    Returns void

focusOnSearch playground for focusOn

  • focusOn(meshesOrMinMaxVectorAndDistance: AbstractMesh[] | { distance: number; max: Vector3; min: Vector3 }, 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[] | { distance: number; max: Vector3; min: Vector3 }

      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

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Gets camera class name

    Returns string

    AnaglyphArcRotateCamera

getFrontPositionSearch playground for getFrontPosition

  • 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

getTargetSearch playground for getTarget

rebuildAnglesAndRadiusSearch playground for rebuildAnglesAndRadius

  • rebuildAnglesAndRadius(): void
  • Rebuilds angles (alpha, beta) and radius from the give position and target

    Returns void

setMatUpSearch playground for setMatUp

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

    Returns void

setPositionSearch playground for setPosition

  • setPosition(position: Vector3): void
  • Use a position to define the current camera related information like alpha, beta and radius

    Parameters

    • position: Vector3

      Defines the position to set the camera at

    Returns void

setTargetSearch playground for setTarget

  • 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 whether 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

storeStateSearch playground for storeState

zoomOnSearch playground for zoomOn

  • 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

Legend

  • Constructor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static property
  • Static method