FramingBehavior

Hierarchy

  • FramingBehavior

Implements

Index

Properties

defaultElevation

defaultElevation: number

Sets the angle above/below the horizontal plane to return to when the return to default elevation idle behaviour is triggered, in radians.

elevationReturnTime

elevationReturnTime: number

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

elevationReturnWaitTime

elevationReturnWaitTime: number

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

framingTime

framingTime: number

Sets the transition time when framing the mesh, in milliseconds

isUserIsMoving

isUserIsMoving: boolean

Gets a value indicating if the user is moving the camera

mode

mode: number

Sets the current mode used by the behavior

name

name: string

positionScale

positionScale: 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.

radiusScale

radiusScale: number

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

zoomStopsAnimation

zoomStopsAnimation: boolean

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

Static EasingFunction

EasingFunction: ExponentialEase

The easing function used by animations

Static EasingMode

EasingMode: number

The easing mode used by animations

Static FitFrustumSidesMode

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

IgnoreBoundsSizeMode: number

The camera can move all the way towards the mesh.

Methods

attach

detach

  • detach(): void

init

  • init(): void

stopAllAnimations

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

    Returns void

zoomOnBoundingInfo

  • zoomOnBoundingInfo(minimumWorld: Vector3, maximumWorld: Vector3, focusOnOriginXZ?: boolean, onAnimationEnd?: Nullable<function>): void
  • Targets the given mesh and updates zoom level accordingly.

    Parameters

    • 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

    • Optional onAnimationEnd: Nullable<function>

      Callback triggered at the end of the framing animation

    Returns void

zoomOnMesh

  • 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

  • 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

  • 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