Class FramingBehavior
Hierarchy
- FramingBehavior
Implements
Index
Properties
Accessors
Methods
Properties
auto Correct Camera Limits And SensibilitySearch playground for autoCorrectCameraLimitsAndSensibility
Define if the behavior should automatically change the configured camera limits and sensibilities.
Static Easing FunctionSearch playground for EasingFunction
The easing function used by animations
Static Easing ModeSearch playground for EasingMode
The easing mode used by animations
Static Fit Frustum Sides ModeSearch playground for FitFrustumSidesMode
The camera is not allowed to zoom closer to the mesh than the point at which the adjusted bounding sphere touches the frustum sides
Static Ignore Bounds Size ModeSearch playground for IgnoreBoundsSizeMode
The camera can move all the way towards the mesh.
Accessors
default Elevation
-
Gets the angle above/below the horizontal plane to return to when the return to default elevation idle behaviour is triggered, in radians.
Returns number
-
Sets the angle above/below the horizontal plane to return to when the return to default elevation idle behaviour is triggered, in radians.
Parameters
-
elevation: number
Returns any
-
elevation Return Time
-
Gets the time (in milliseconds) taken to return to the default beta position. Negative value indicates camera should not return to default.
Returns number
-
Sets the time (in milliseconds) taken to return to the default beta position. Negative value indicates camera should not return to default.
Parameters
-
speed: number
Returns any
-
elevation Return Wait Time
-
Gets the delay (in milliseconds) taken before the camera returns to the default beta position.
Returns number
-
Sets the delay (in milliseconds) taken before the camera returns to the default beta position.
Parameters
-
time: number
Returns any
-
framing Time
-
Gets the transition time when framing the mesh, in milliseconds
Returns number
-
Sets the transition time when framing the mesh, in milliseconds
Parameters
-
time: number
Returns any
-
is User IsMoving
-
Gets a value indicating if the user is moving the camera
Returns boolean
mode
-
Gets current mode used by the behavior.
Returns number
-
Sets the current mode used by the behavior
Parameters
-
mode: number
Returns any
-
name
-
Gets the name of the behavior.
Returns string
position Scale
-
Gets the scale to apply on Y axis to position camera focus. 0.5 by default which means the center of the bounding box.
Returns number
-
Sets the scale to apply on Y axis to position camera focus. 0.5 by default which means the center of the bounding box.
Parameters
-
scale: number
Returns any
-
radius Scale
-
Gets the scale applied to the radius
Returns number
-
Sets the scale applied to the radius (1 by default)
Parameters
-
radius: number
Returns any
-
zoom Stops Animation
-
Gets the flag that indicates if user zooming should stop animation.
Returns boolean
-
Sets the flag that indicates if user zooming should stop animation.
Parameters
-
flag: boolean
Returns any
-
Methods
attachSearch playground for attach
-
Attaches the behavior to its arc rotate camera.
Parameters
-
camera: ArcRotateCamera
Defines the camera to attach the behavior to
Returns void
-
detachSearch playground for detach
-
Detaches the behavior from its current arc rotate camera.
Returns void
initSearch playground for init
-
Initializes the behavior.
Returns void
stop All AnimationsSearch playground for stopAllAnimations
-
Stops and removes all animations that have been applied to the camera
Returns void
zoom OnBounding InfoSearch playground for zoomOnBoundingInfo
-
Targets the bounding box info defined by its extends and updates zoom level accordingly.
Parameters
-
minimumWorld: Vector3
Determines the smaller position of the bounding box extend
-
maximumWorld: Vector3
Determines the bigger position of the bounding box extend
-
Optional focusOnOriginXZ: boolean
Determines if the camera should focus on 0 in the X and Z axis instead of the mesh
-
Optional onAnimationEnd: Nullable<() => void>
Callback triggered at the end of the framing animation
Returns void
-
zoom OnMeshSearch playground for zoomOnMesh
-
Targets the given mesh and updates zoom level accordingly.
Parameters
-
mesh: AbstractMesh
The mesh to target.
-
Optional focusOnOriginXZ: boolean
Determines if the camera should focus on 0 in the X and Z axis instead of the mesh
-
Optional onAnimationEnd: Nullable<() => void>
Callback triggered at the end of the framing animation
Returns void
-
zoom OnMesh HierarchySearch playground for zoomOnMeshHierarchy
-
Targets the given mesh with its children and updates zoom level accordingly.
Parameters
-
mesh: AbstractMesh
The mesh to target.
-
Optional focusOnOriginXZ: boolean
Determines if the camera should focus on 0 in the X and Z axis instead of the mesh
-
Optional onAnimationEnd: Nullable<() => void>
Callback triggered at the end of the framing animation
Returns void
-
zoom OnMeshes HierarchySearch playground for zoomOnMeshesHierarchy
-
Targets the given meshes with their children and updates zoom level accordingly.
Parameters
-
meshes: AbstractMesh[]
The mesh to target.
-
Optional focusOnOriginXZ: boolean
Determines if the camera should focus on 0 in the X and Z axis instead of the mesh
-
Optional onAnimationEnd: Nullable<() => void>
Callback triggered at the end of the framing animation
Returns void
-
The framing behavior (FramingBehavior) is designed to automatically position an ArcRotateCamera when its target is set to a mesh. It is also useful if you want to prevent the camera to go under a virtual horizontal plane.
https://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior