AnimationViewModel

new Cesium.AnimationViewModel(clockViewModel)

The view model for the Animation widget.
参数名称 类型 描述信息
clockViewModel ClockViewModel The ClockViewModel instance to use.
参考:

成员(属性)

static Cesium.AnimationViewModel.defaultDateFormatter : AnimationViewModel.DateFormatter

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

static Cesium.AnimationViewModel.defaultTicks : Array.<number>

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

static Cesium.AnimationViewModel.defaultTimeFormatter : AnimationViewModel.TimeFormatter

Gets or sets the default time formatter used by new instances.
Gets the clock view model.
Gets or sets the function which formats a date for display.
默认值: AnimationViewModel.defaultDateFormatter
Gets the string representation of the current date. This property is observable.
Gets a command that increases the speed of animation.
Gets the string representation of the current multiplier. This property is observable.
Gets the pause toggle button view model.
Gets the play toggle button view model.
Gets the realtime toggle button view model.
Gets the reverse toggle button view model.
Gets or sets the current shuttle ring angle. This property is observable.
Gets or sets whether the shuttle ring is currently being dragged. This property is observable.
默认值: false
Gets a command that decreases the speed of animation.
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.
默认值: false
Gets or sets the function which formats a time for display.
默认值: AnimationViewModel.defaultTimeFormatter
Gets the string representation of the current time. This property is observable.

方法

getShuttleRingTicks()Array.<number>

Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.
返回值:
The array of known clock multipliers associated with the shuttle ring.

setShuttleRingTicks(positiveTicks)

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.
参数名称 类型 描述信息
positiveTicks Array.<number> The list of known positive clock multipliers to associate with the shuttle ring.

定义的类型

Cesium.AnimationViewModel.DateFormatter(date, viewModel)string

A function that formats a date for display.
参数名称 类型 描述信息
date JulianDate The date to be formatted
viewModel AnimationViewModel The AnimationViewModel instance requesting formatting.
返回值:
The string representation of the calendar date portion of the provided date.

Cesium.AnimationViewModel.TimeFormatter(date, viewModel)string

A function that formats a time for display.
参数名称 类型 描述信息
date JulianDate The date to be formatted
viewModel AnimationViewModel The AnimationViewModel instance requesting formatting.
返回值:
The string representation of the time portion of the provided date.