Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationControls

Animation controls

Hierarchy

  • AnimationControls

Index

Constructors

constructor

Properties

animationList

animationList: Animation[] = []

controls

controls: ViewerControls

finishedList

finishedList: Animation[] = []

stage

stage: Stage

the stage object

viewer

viewer: Viewer

Accessors

paused

  • get paused(): boolean

Methods

add

clear

  • clear(): void

dispose

  • dispose(): void

move

  • move(moveTo: Vector3 | number[], duration?: undefined | number): Animation

moveComponent

  • moveComponent(component: Component, moveTo: Vector3 | number[], duration?: undefined | number): Animation

orient

  • orient(orientTo: Matrix4 | number[], duration?: undefined | number): AnimationList

pause

  • pause(): void

remove

resume

  • resume(): void

rock

  • rock(axis: Vector3 | number[], angle?: undefined | number, end?: undefined | number, duration?: undefined | number): Animation
  • Add a rock animation

    Parameters

    • axis: Vector3 | number[]

      axis to rock around

    • Optional angle: undefined | number

      amount to spin per frame, radians

    • Optional end: undefined | number

      maximum extend of motion, radians

    • Optional duration: undefined | number

      animation time in milliseconds

    Returns Animation

    the animation

rockComponent

  • rockComponent(component: Component, axis: Vector3 | number[], angle?: undefined | number, end?: undefined | number, duration?: undefined | number): Animation
  • Add a component rock animation

    Parameters

    • component: Component

      object to move

    • axis: Vector3 | number[]

      axis to rock around

    • Optional angle: undefined | number

      amount to spin per frame, radians

    • Optional end: undefined | number

      maximum extend of motion, radians

    • Optional duration: undefined | number

      animation time in milliseconds

    Returns Animation

    the animation

rotate

  • rotate(rotateTo: Quaternion | number[], duration?: undefined | number): Animation

run

  • run(stats: Stats): void

spin

  • spin(axis: Vector3 | number[], angle?: undefined | number, duration?: undefined | number): Animation
  • Add a spin animation

    Parameters

    • axis: Vector3 | number[]

      axis to spin around

    • Optional angle: undefined | number

      amount to spin per frame, radians

    • Optional duration: undefined | number

      animation time in milliseconds

    Returns Animation

    the animation

spinComponent

  • spinComponent(component: Component, axis?: Vector3 | number[], angle?: undefined | number, duration?: undefined | number): Animation
  • Add a component spin animation

    Parameters

    • component: Component

      object to move

    • Optional axis: Vector3 | number[]

      axis to spin around

    • Optional angle: undefined | number

      amount to spin per frame, radians

    • Optional duration: undefined | number

      animation time in milliseconds

    Returns Animation

    the animation

timeout

  • timeout(callback: Function, duration?: undefined | number): Animation

toggle

  • toggle(): void

value

  • value(valueFrom: number, valueTo: number, callback: Function, duration?: undefined | number): Animation
  • Add a value animation

    Parameters

    • valueFrom: number

      start value

    • valueTo: number

      target value

    • callback: Function

      called on every tick

    • Optional duration: undefined | number

      animation time in milliseconds

    Returns Animation

    the animation

zoom

  • zoom(zoomTo: number, duration?: undefined | number): Animation

zoomMove

  • zoomMove(moveTo: Vector3, zoomTo: number, duration?: undefined | number): AnimationList
  • Add a zoom and a move animation

    Parameters

    • moveTo: Vector3

      target position

    • zoomTo: number

      target distance

    • Optional duration: undefined | number

      animation time in milliseconds

    Returns AnimationList

    the animations

Generated using TypeDoc