CLASSES
TagsA - Z

FramingBehavior

Description

class FramingBehavior

Members

name : string

static : ExponentialEase

The easing function used by animations

static EasingMode : number

The easing mode used by animations

mode : number

Gets current mode used by the behavior.

Sets the current mode used by the behavior

radiusScale : number

Gets the scale applied to the radius

Sets the scale applied to the radius (1 by default)

positionScale : number

Gets the scale to apply on Y axis to position camera focus. 0.5 by default which means the center of the bounding box.

Sets the scale to apply on Y axis to position camera focus. 0.5 by default which means the center of the bounding box.

defaultElevation : number

Gets the angle above/below the horizontal plane to return to when the return to default elevation idle

behaviour is triggered, in radians.

Sets the angle above/below the horizontal plane to return to when the return to default elevation idle

behaviour is triggered, in radians.

elevationReturnTime : number

Gets the time (in milliseconds) taken to return to the default beta position.

Negative value indicates camera should not return to default.

Sets the time (in milliseconds) taken to return to the default beta position.

Negative value indicates camera should not return to default.

elevationReturnWaitTime : number

Gets the delay (in milliseconds) taken before the camera returns to the default beta position.

Sets the delay (in milliseconds) taken before the camera returns to the default beta position.

zoomStopsAnimation : boolean

Gets the flag that indicates if user zooming should stop animation.

Sets the flag that indicates if user zooming should stop animation.

framingTime : number

Gets the transition time when framing the mesh, in milliseconds

Sets the transition time when framing the mesh, in milliseconds

isUserIsMoving : boolean

Gets a value indicating if the user is moving the camera

static IgnoreBoundsSizeMode : number

The camera can move all the way towards the mesh.

static FitFrustumSidesMode : number

The camera is not allowed to zoom closer to the mesh than the point at which the adjusted bounding sphere touches the frustum sides

Methods

attach(camera) void

Parameters

Name Type Description
camera ArcRotateCamera

detach() void

zoomOnMesh(mesh, focusOnOriginXZ, onAnimationEnd) void

Targets the given mesh and updates zoom level accordingly.

Parameters

Name Type Description
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

zoomOnBoundingInfo(minimumWorld, maximumWorld, focusOnOriginXZ, onAnimationEnd) void

Targets the given mesh and updates zoom level accordingly.

Parameters

Name Type Description
minimumWorld Vector3
maximumWorld Vector3
optional focusOnOriginXZ boolean Determines if the camera should focus on 0 in the X and Z axis instead of the mesh

stopAllAnimations() void

Stops and removes all animations that have been applied to the camera