FramingBehavior

The framing behavior (BABYLON.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.

see

http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior

Hierarchy

  • FramingBehavior

Implements

Index

Properties

autoCorrectCameraLimitsAndSensibility

Find examples in Playground
autoCorrectCameraLimitsAndSensibility: boolean

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

defaultElevation

Find examples in Playground
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.

elevationReturnTime

Find examples in Playground
elevationReturnTime: number

Gets the time (in milliseconds) taken to return to the default beta position. Negative value indicates camera should not return to default.

elevationReturnWaitTime

Find examples in Playground
elevationReturnWaitTime: number

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

framingTime

Find examples in Playground
framingTime: number

Gets the transition time when framing the mesh, in milliseconds

isUserIsMoving

Find examples in Playground
isUserIsMoving: boolean

Gets a value indicating if the user is moving the camera

mode

Find examples in Playground
mode: number

Gets current mode used by the behavior.

name

Find examples in Playground
name: string

Gets the name of the behavior.

positionScale

Find examples in Playground
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.

radiusScale

Find examples in Playground
radiusScale: number

Gets the scale applied to the radius

zoomStopsAnimation

Find examples in Playground
zoomStopsAnimation: boolean

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

Static EasingFunction

Find examples in Playground
EasingFunction: ExponentialEase

The easing function used by animations

Static EasingMode

Find examples in Playground
EasingMode: number

The easing mode used by animations

Static FitFrustumSidesMode

Find examples in Playground
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

Static IgnoreBoundsSizeMode

Find examples in Playground
IgnoreBoundsSizeMode: number

The camera can move all the way towards the mesh.

Methods

attach

Find examples in Playground
  • Attaches the behavior to its arc rotate camera.

    Parameters

    Returns void

detach

Find examples in Playground
  • detach(): void
  • Detaches the behavior from its current arc rotate camera.

    Returns void

init

Find examples in Playground
  • init(): void
  • Initializes the behavior.

    Returns void

stopAllAnimations

Find examples in Playground
  • stopAllAnimations(): void
  • Stops and removes all animations that have been applied to the camera

    Returns void

zoomOnBoundingInfo

Find examples in Playground
  • zoomOnBoundingInfo(minimumWorld: Vector3, maximumWorld: Vector3, focusOnOriginXZ?: boolean, onAnimationEnd?: Nullable<function>): void
  • 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<function>

      Callback triggered at the end of the framing animation

    Returns void

zoomOnMesh

Find examples in Playground
  • zoomOnMesh(mesh: AbstractMesh, focusOnOriginXZ?: boolean, onAnimationEnd?: Nullable<function>): void
  • 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<function>

      Callback triggered at the end of the framing animation

    Returns void

zoomOnMeshHierarchy

Find examples in Playground
  • zoomOnMeshHierarchy(mesh: AbstractMesh, focusOnOriginXZ?: boolean, onAnimationEnd?: Nullable<function>): void
  • 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<function>

      Callback triggered at the end of the framing animation

    Returns void

zoomOnMeshesHierarchy

Find examples in Playground
  • zoomOnMeshesHierarchy(meshes: AbstractMesh[], focusOnOriginXZ?: boolean, onAnimationEnd?: Nullable<function>): void
  • 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<function>

      Callback triggered at the end of the framing animation

    Returns void

Generated using TypeDoc