Class AnaglyphArcRotateCamera
Hierarchy
-
ArcRotateCamera
- AnaglyphArcRotateCamera
Index
Constructors
Properties
- allow
Upside Down - alpha
- beta
- camera
Direction - camera
Rotation - check
Collisions - collision
Radius - ignore
Parent Scaling - inertial
Alpha Offset - inertial
Beta Offset - inertial
PanningX - inertial
PanningY - inertial
Radius Offset - inputs
- inverse
Rotation Speed - invert
Rotation - locked
Target - lower
Alpha Limit - lower
Beta Limit - lower
Radius Limit - no
Rotation Constraint - on
Collide - on
Mesh Target Changed Observable - panning
Axis - panning
Distance Limit - panning
Inertia - panning
Origin Target - pinch
ToPan Max Distance - radius
- rotation
- rotation
Quaternion - speed
- target
Screen Offset - update
UpVector From Rotation - upper
Alpha Limit - upper
Beta Limit - upper
Radius Limit - use
Input ToRestore State - zoom
OnFactor
Accessors
- angular
SensibilityX - angular
SensibilityY - auto
Rotation Behavior - bouncing
Behavior - framing
Behavior - keys
Down - keys
Left - keys
Right - keys
Up - panning
Sensibility - pinch
Delta Percentage - pinch
Precision - position
- target
- up
Vector - use
Auto Rotation Behavior - use
Bouncing Behavior - use
Framing Behavior - use
Natural Pinch Zoom - wheel
Delta Percentage - wheel
Precision
Methods
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
-
scene: Scene
defines the hosting scene
Returns AnaglyphArcRotateCamera
-
Properties
allow Upside DownSearch playground for allowUpsideDown
Allows the camera to be completely reversed. If false the camera can not arrive upside down.
alphaSearch playground for alpha
Defines the rotation angle of the camera along the longitudinal axis.
betaSearch playground for beta
Defines the rotation angle of the camera along the latitudinal axis.
camera DirectionSearch playground for cameraDirection
Define the current direction the camera is moving to
camera RotationSearch playground for cameraRotation
Define the current rotation the camera is rotating to
check CollisionsSearch playground for checkCollisions
Defines whether the camera should check collision with the objects oh the scene.
collision RadiusSearch playground for collisionRadius
Defines the collision radius of the camera. This simulates a sphere around the camera.
ignore Parent ScalingSearch playground for ignoreParentScaling
Gets or sets a boolean indicating that the scaling of the parent hierarchy will not be taken in account by the camera
inertial Alpha OffsetSearch playground for inertialAlphaOffset
Current inertia value on the longitudinal axis. The bigger this number the longer it will take for the camera to stop.
inertial Beta OffsetSearch playground for inertialBetaOffset
Current inertia value on the latitudinal axis. The bigger this number the longer it will take for the camera to stop.
inertial PanningXSearch playground for inertialPanningX
Defines the current inertia value used during panning of the camera along the X axis.
inertial PanningYSearch playground for inertialPanningY
Defines the current inertia value used during panning of the camera along the Y axis.
inertial Radius OffsetSearch playground for inertialRadiusOffset
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.
inverse Rotation SpeedSearch playground for inverseRotationSpeed
Speed multiplier for inverse camera panning
invert RotationSearch playground for invertRotation
Reverses mouselook direction to 'natural' panning as opposed to traditional direct panning
locked TargetSearch playground for lockedTarget
Define the current target of the camera as an object or a position.
lower Alpha LimitSearch playground for lowerAlphaLimit
Minimum allowed angle on the longitudinal axis. This can help limiting how the Camera is able to move in the scene.
lower Beta LimitSearch playground for lowerBetaLimit
Minimum allowed angle on the latitudinal axis. This can help limiting how the Camera is able to move in the scene.
lower Radius LimitSearch playground for lowerRadiusLimit
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.
no Rotation ConstraintSearch playground for noRotationConstraint
Add constraint to the camera to prevent it to move freely in all directions and around all axis.
on CollideSearch playground for onCollide
Event raised when the camera is colliding with a mesh.
Type declaration
-
-
Parameters
-
collidedMesh: AbstractMesh
Returns void
-
-
on Mesh Target Changed ObservableSearch playground for onMeshTargetChangedObservable
Observable triggered when the mesh target has been changed on the camera.
panning AxisSearch playground for panningAxis
Defines the allowed panning axis.
panning Distance LimitSearch playground for panningDistanceLimit
Defines the maximum distance the camera can pan. This could help keeping the cammera always in your scene.
panning InertiaSearch playground for panningInertia
Defines the value of the inertia used during panning. 0 would mean stop inertia and one would mean no decelleration at all.
panning Origin TargetSearch playground for panningOriginTarget
Defines the target of the camera before paning.
pinch ToPan Max DistanceSearch playground for pinchToPanMaxDistance
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
Defines the radius of the camera from it s target point.
rotationSearch playground for rotation
Define the current rotation of the camera
rotation QuaternionSearch playground for rotationQuaternion
Define the current rotation of the camera as a quaternion to prevent Gimbal lock
speedSearch playground for speed
Define the current speed of the camera
target Screen OffsetSearch playground for targetScreenOffset
Defines a screen offset for the camera position.
update UpVector From RotationSearch playground for updateUpVectorFromRotation
When set, the up vector of the camera will be updated by the rotation of the camera
upper Alpha LimitSearch playground for upperAlphaLimit
Maximum allowed angle on the longitudinal axis. This can help limiting how the Camera is able to move in the scene.
upper Beta LimitSearch playground for upperBetaLimit
Maximum allowed angle on the latitudinal axis. This can help limiting how the Camera is able to move in the scene.
upper Radius LimitSearch playground for upperRadiusLimit
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.
use Input ToRestore StateSearch playground for useInputToRestoreState
Define if double tap/click is used to restore the previously saved state of the camera.
zoom OnFactorSearch playground for zoomOnFactor
Defines how much the radius should be scaled while zomming on a particular mesh (through the zoomOn function)
Accessors
angular SensibilityX
-
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
-
angular SensibilityY
-
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
-
auto Rotation Behavior
-
Gets the auto rotation behavior of the camera if it has been enabled.
Returns Nullable<AutoRotationBehavior>
bouncing Behavior
-
Gets the bouncing behavior of the camera if it has been enabled.
Returns Nullable<BouncingBehavior>
framing Behavior
-
Gets the framing behavior of the camera if it has been enabled.
Returns Nullable<FramingBehavior>
keys Down
-
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
-
keys Left
-
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
-
keys Right
-
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
-
keys Up
-
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
-
panning Sensibility
-
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
-
pinch Delta Percentage
-
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
-
pinch Precision
-
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
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
-
value: Vector3
Returns any
-
up Vector
-
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
-
vec: Vector3
Returns any
-
use Auto Rotation Behavior
-
Defines if the auto rotation behavior of the camera is enabled on the camera.
Returns boolean
-
Defines if the auto rotation behavior of the camera is enabled on the camera.
Parameters
-
value: boolean
Returns any
-
use Bouncing Behavior
-
Defines if the bouncing behavior of the camera is enabled on the camera.
Returns boolean
-
Defines if the bouncing behavior of the camera is enabled on the camera.
Parameters
-
value: boolean
Returns any
-
use Framing Behavior
-
Defines if the framing behavior of the camera is enabled on the camera.
Returns boolean
-
Defines if the framing behavior of the camera is enabled on the camera.
Parameters
-
value: boolean
Returns any
-
use Natural Pinch Zoom
-
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
-
wheel Delta Percentage
-
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
-
wheel Precision
-
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
-
Methods
attach ControlSearch playground for attachControl
-
Attach the input controls to a specific dom element to get the input from.
Parameters
-
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
-
-
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
-
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 paning within the controls
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 paning 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 paning within the controls
-
panningMouseButton: number
Defines whether panning is allowed through mouse click button
Returns void
-
create Rig CameraSearch playground for createRigCamera
-
Parameters
-
name: string
-
cameraIndex: number
Returns Camera
-
detach ControlSearch playground for detachControl
-
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
-
Destroy the camera and release the current resources hold by it.
Returns void
focus OnSearch playground for focusOn
-
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
-
get Class NameSearch playground for getClassName
-
Gets camera class name
Returns string
AnaglyphArcRotateCamera
get Front PositionSearch playground for getFrontPosition
-
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
-
get TargetSearch playground for getTarget
-
Return the current target position of the camera. This value is expressed in local space.
Returns Vector3
the target position
rebuild Angles And RadiusSearch playground for rebuildAnglesAndRadius
-
Rebuilds angles (alpha, beta) and radius from the give position and target
Returns void
set Mat UpSearch playground for setMatUp
-
Sets the Y-up to camera up-vector rotation matrix, and the up-vector to Y-up rotation matrix.
Returns void
set PositionSearch playground for setPosition
-
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
-
set TargetSearch playground for setTarget
-
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
-
store StateSearch playground for storeState
-
Stores the current state of the camera (alpha, beta, radius and target)
Returns Camera
the camera itself
zoom OnSearch playground for zoomOn
-
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
-
Camera used to simulate anaglyphic rendering (based on ArcRotateCamera)
https://doc.babylonjs.com/features/cameras#anaglyph-cameras