API

Class FramingBehavior

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.

Implements

Index
autoCorrectCameraLimitsAndSensibility: boolean = true

Define if the behavior should automatically change the configured camera limits and sensibilities.

onTargetFramingAnimationEndObservable: Observable<void> = ...

An event triggered when the animation to zoom on target mesh has ended

EasingFunction: ExponentialEase = ...

The easing function used by animations

EasingMode: number = EasingFunction.EASINGMODE_EASEINOUT

The easing mode used by animations

FitFrustumSidesMode: number = 1

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

IgnoreBoundsSizeMode: number = 0

The camera can move all the way towards the mesh.

  • 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

    • focusOnOriginXZ: boolean = false

      Determines if the camera should focus on 0 in the X and Z axis instead of the mesh

    • onAnimationEnd: Nullable<() => void> = null

      Callback triggered at the end of the framing animation

    Returns boolean

    true if the zoom was done

  • Targets the given mesh and updates zoom level accordingly.

    Parameters

    • mesh: AbstractMesh

      The mesh to target.

    • focusOnOriginXZ: boolean = false

      Determines if the camera should focus on 0 in the X and Z axis instead of the mesh

    • onAnimationEnd: Nullable<() => void> = null

      Callback triggered at the end of the framing animation

    Returns void

  • Targets the given meshes with their children and updates zoom level accordingly.

    Parameters

    • meshes: AbstractMesh[]

      The mesh to target.

    • focusOnOriginXZ: boolean = false

      Determines if the camera should focus on 0 in the X and Z axis instead of the mesh

    • onAnimationEnd: Nullable<() => void> = null

      Callback triggered at the end of the framing animation

    Returns void

  • Targets the given mesh with its children and updates zoom level accordingly.

    Parameters

    • mesh: AbstractMesh

      The mesh to target.

    • focusOnOriginXZ: boolean = false

      Determines if the camera should focus on 0 in the X and Z axis instead of the mesh

    • onAnimationEnd: Nullable<() => void> = null

      Callback triggered at the end of the framing animation

    Returns void