# AnimationViewModel

#### new Cesium.AnimationViewModel(clockViewModel)
Widgets/Animation/AnimationViewModel.js 105

  The view model for the `Animation` widget.

  Name | Type | Description
  --- | --- | ---
  `clockViewModel` | ClockViewModel | The ClockViewModel instance to use.

  ##### See:

  - Animation

### Members

#### staticCesium.AnimationViewModel.defaultDateFormatter : AnimationViewModel~DateFormatter
Widgets/Animation/AnimationViewModel.js 360

  Gets or sets the default date formatter used by new instances.

#### staticCesium.AnimationViewModel.defaultTicks : Array.<Number>
Widgets/Animation/AnimationViewModel.js 369

  Gets or sets the default array of known clock multipliers associated with new instances of the shuttle ring.

#### staticCesium.AnimationViewModel.defaultTimeFormatter : AnimationViewModel~TimeFormatter
Widgets/Animation/AnimationViewModel.js 380

  Gets or sets the default time formatter used by new instances.

#### clockViewModel : ClockViewModel
Widgets/Animation/AnimationViewModel.js 472

  Gets the clock view model.

#### dateFormatter : AnimationViewModel~DateFormatter
Widgets/Animation/AnimationViewModel.js 533

  Gets or sets the function which formats a date for display.
  Default Value: `AnimationViewModel.defaultDateFormatter`

#### dateLabel : String
Widgets/Animation/AnimationViewModel.js 153

  Gets the string representation of the current date. This property is observable.

#### faster : Command
Widgets/Animation/AnimationViewModel.js 460

  Gets a command that increases the speed of animation.

#### multiplierLabel : String
Widgets/Animation/AnimationViewModel.js 162

  Gets the string representation of the current multiplier. This property is observable.

#### pauseViewModel : ToggleButtonViewModel
Widgets/Animation/AnimationViewModel.js 484

  Gets the pause toggle button view model.

#### playForwardViewModel : ToggleButtonViewModel
Widgets/Animation/AnimationViewModel.js 508

  Gets the play toggle button view model.

#### playRealtimeViewModel : ToggleButtonViewModel
Widgets/Animation/AnimationViewModel.js 520

  Gets the realtime toggle button view model.

#### playReverseViewModel : ToggleButtonViewModel
Widgets/Animation/AnimationViewModel.js 496

  Gets the reverse toggle button view model.

#### shuttleRingAngle : Number
Widgets/Animation/AnimationViewModel.js 184

  Gets or sets the current shuttle ring angle. This property is observable.

#### shuttleRingDragging : Boolean
Widgets/Animation/AnimationViewModel.js 123

  Gets or sets whether the shuttle ring is currently being dragged. This property is observable.
  Default Value: `false`

#### slower : Command
Widgets/Animation/AnimationViewModel.js 449

  Gets a command that decreases the speed of animation.

#### snapToTicks : Boolean
Widgets/Animation/AnimationViewModel.js 132

  Gets or sets whether dragging the shuttle ring should cause the multiplier to snap to the defined tick values rather than interpolating between them. This property is observable.
  Default Value: `false`

#### timeFormatter : AnimationViewModel~TimeFormatter
Widgets/Animation/AnimationViewModel.js 556

  Gets or sets the function which formats a time for display.
  Default Value: `AnimationViewModel.defaultTimeFormatter`

#### timeLabel : String
Widgets/Animation/AnimationViewModel.js 144

  Gets the string representation of the current time. This property is observable.

### Methods

#### getShuttleRingTicks() → Array.<Number>
Widgets/Animation/AnimationViewModel.js 394

  Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.

  ##### Returns:

  The array of known clock multipliers associated with the shuttle ring.

#### setShuttleRingTicks(positiveTicks)
Widgets/Animation/AnimationViewModel.js 407

  Sets the array of positive known clock multipliers to associate with the shuttle ring. These values will have negative equivalents created for them and sets both the minimum and maximum range of values for the shuttle ring as well as the values that are snapped to when a single click is made. The values need not be in order, as they will be sorted automatically, and duplicate values will be removed.

  Name | Type | Description
  --- | --- | ---
  `positiveTicks` | Array.<Number> | The list of known positive clock multipliers to associate with the shuttle ring.

### Type Definitions

#### DateFormatter(date, viewModel) → String
Widgets/Animation/AnimationViewModel.js 577

  A function that formats a date for display.

  Name | Type | Description
  --- | --- | ---
  `date` | JulianDate | The date to be formatted
  `viewModel` | AnimationViewModel | The AnimationViewModel instance requesting formatting.

  ##### Returns:

  The string representation of the calendar date portion of the provided date.

#### TimeFormatter(date, viewModel) → String
Widgets/Animation/AnimationViewModel.js 586

  A function that formats a time for display.

  Name | Type | Description
  --- | --- | ---
  `date` | JulianDate | The date to be formatted
  `viewModel` | AnimationViewModel | The AnimationViewModel instance requesting formatting.

  ##### Returns:

  The string representation of the time portion of the provided date.