qd-changjing/public/static/Build/Documentation/AnimationViewModel.html

1877 lines
69 KiB
HTML
Raw Normal View History

2022-07-05 16:56:29 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>AnimationViewModel - Cesium Documentation</title>
<!--[if lt IE 9]>
<script src="javascript/html5.js"></script>
<![endif]-->
<link href="styles/jsdoc-default.css" rel="stylesheet">
<link href="styles/prism.css" rel="stylesheet">
</head>
<body>
<div id="main">
<h1 class="page-title">
<a href="index.html"><img src="Images/CesiumLogo.png" class="cesiumLogo"></a>
AnimationViewModel
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="AnimationViewModel">
<a href="#AnimationViewModel" class="doc-link"></a>
new Cesium.AnimationViewModel<span class="signature">(clockViewModel)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L101">Widgets/Animation/AnimationViewModel.js 101</a>
</div>
</h4>
</div>
<div class="description">
The view model for the <a href="Animation.html"><code>Animation</code></a> widget.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>clockViewModel</code></td>
<td class="type">
<span class="param-type"><a href="ClockViewModel.html">ClockViewModel</a></span>
</td>
<td class="description last">
The ClockViewModel instance to use.</td>
</tr>
</tbody>
</table>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Animation.html">Animation</a></li>
</ul>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id=".defaultDateFormatter">
<a href="#.defaultDateFormatter" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.AnimationViewModel.defaultDateFormatter<span class="type-signature"> : <a href="AnimationViewModel.html#.DateFormatter">AnimationViewModel.DateFormatter</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L384">Widgets/Animation/AnimationViewModel.js 384</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the default date formatter used by new instances.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".defaultTicks">
<a href="#.defaultTicks" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.AnimationViewModel.defaultTicks<span class="type-signature"> : Array.&lt;Number></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L395">Widgets/Animation/AnimationViewModel.js 395</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the default array of known clock multipliers associated with new instances of the shuttle ring.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".defaultTimeFormatter">
<a href="#.defaultTimeFormatter" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.AnimationViewModel.defaultTimeFormatter<span class="type-signature"> : <a href="AnimationViewModel.html#.TimeFormatter">AnimationViewModel.TimeFormatter</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L435">Widgets/Animation/AnimationViewModel.js 435</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the default time formatter used by new instances.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="clockViewModel">
<a href="#clockViewModel" class="doc-link"></a>
clockViewModel<span class="type-signature"> : <a href="ClockViewModel.html">ClockViewModel</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L537">Widgets/Animation/AnimationViewModel.js 537</a>
</div>
</h4>
</div>
<div class="description">
Gets the clock view model.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="dateFormatter">
<a href="#dateFormatter" class="doc-link"></a>
dateFormatter<span class="type-signature"> : <a href="AnimationViewModel.html#.DateFormatter">AnimationViewModel.DateFormatter</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L598">Widgets/Animation/AnimationViewModel.js 598</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the function which formats a date for display.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">AnimationViewModel.defaultDateFormatter</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="dateLabel">
<a href="#dateLabel" class="doc-link"></a>
dateLabel<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L155">Widgets/Animation/AnimationViewModel.js 155</a>
</div>
</h4>
</div>
<div class="description">
Gets the string representation of the current date. This property is observable.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="faster">
<a href="#faster" class="doc-link"></a>
faster<span class="type-signature"> : <a href="Command.html">Command</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L525">Widgets/Animation/AnimationViewModel.js 525</a>
</div>
</h4>
</div>
<div class="description">
Gets a command that increases the speed of animation.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="multiplierLabel">
<a href="#multiplierLabel" class="doc-link"></a>
multiplierLabel<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L164">Widgets/Animation/AnimationViewModel.js 164</a>
</div>
</h4>
</div>
<div class="description">
Gets the string representation of the current multiplier. This property is observable.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="pauseViewModel">
<a href="#pauseViewModel" class="doc-link"></a>
pauseViewModel<span class="type-signature"> : <a href="ToggleButtonViewModel.html">ToggleButtonViewModel</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L549">Widgets/Animation/AnimationViewModel.js 549</a>
</div>
</h4>
</div>
<div class="description">
Gets the pause toggle button view model.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="playForwardViewModel">
<a href="#playForwardViewModel" class="doc-link"></a>
playForwardViewModel<span class="type-signature"> : <a href="ToggleButtonViewModel.html">ToggleButtonViewModel</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L573">Widgets/Animation/AnimationViewModel.js 573</a>
</div>
</h4>
</div>
<div class="description">
Gets the play toggle button view model.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="playRealtimeViewModel">
<a href="#playRealtimeViewModel" class="doc-link"></a>
playRealtimeViewModel<span class="type-signature"> : <a href="ToggleButtonViewModel.html">ToggleButtonViewModel</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L585">Widgets/Animation/AnimationViewModel.js 585</a>
</div>
</h4>
</div>
<div class="description">
Gets the realtime toggle button view model.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="playReverseViewModel">
<a href="#playReverseViewModel" class="doc-link"></a>
playReverseViewModel<span class="type-signature"> : <a href="ToggleButtonViewModel.html">ToggleButtonViewModel</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L561">Widgets/Animation/AnimationViewModel.js 561</a>
</div>
</h4>
</div>
<div class="description">
Gets the reverse toggle button view model.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="shuttleRingAngle">
<a href="#shuttleRingAngle" class="doc-link"></a>
shuttleRingAngle<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L186">Widgets/Animation/AnimationViewModel.js 186</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the current shuttle ring angle. This property is observable.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="shuttleRingDragging">
<a href="#shuttleRingDragging" class="doc-link"></a>
shuttleRingDragging<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L119">Widgets/Animation/AnimationViewModel.js 119</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets whether the shuttle ring is currently being dragged. This property is observable.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">false</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="slower">
<a href="#slower" class="doc-link"></a>
slower<span class="type-signature"> : <a href="Command.html">Command</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L514">Widgets/Animation/AnimationViewModel.js 514</a>
</div>
</h4>
</div>
<div class="description">
Gets a command that decreases the speed of animation.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="snapToTicks">
<a href="#snapToTicks" class="doc-link"></a>
snapToTicks<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L128">Widgets/Animation/AnimationViewModel.js 128</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">false</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="timeFormatter">
<a href="#timeFormatter" class="doc-link"></a>
timeFormatter<span class="type-signature"> : <a href="AnimationViewModel.html#.TimeFormatter">AnimationViewModel.TimeFormatter</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L621">Widgets/Animation/AnimationViewModel.js 621</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the function which formats a time for display.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">AnimationViewModel.defaultTimeFormatter</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="timeLabel">
<a href="#timeLabel" class="doc-link"></a>
timeLabel<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L146">Widgets/Animation/AnimationViewModel.js 146</a>
</div>
</h4>
</div>
<div class="description">
Gets the string representation of the current time. This property is observable.
</div>
<dl class="details">
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id="getShuttleRingTicks">
<a href="#getShuttleRingTicks" class="doc-link"></a>
getShuttleRingTicks<span class="signature">()</span> &rarr; <span class="type-signature returnType">Array.&lt;Number></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L459">Widgets/Animation/AnimationViewModel.js 459</a>
</div>
</h4>
</div>
<div class="description">
Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.
</div>
<h5>Returns:</h5>
<div class="param-desc">
The array of known clock multipliers associated with the shuttle ring.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="setShuttleRingTicks">
<a href="#setShuttleRingTicks" class="doc-link"></a>
setShuttleRingTicks<span class="signature">(positiveTicks)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L472">Widgets/Animation/AnimationViewModel.js 472</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>positiveTicks</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
The list of known positive clock multipliers to associate with the shuttle ring.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h3 class="subsection-title">Type Definitions</h3>
<div class="nameContainer">
<h4 class="name" id=".DateFormatter">
<a href="#.DateFormatter" class="doc-link"></a>
Cesium.AnimationViewModel.DateFormatter<span class="signature">(date, viewModel)</span> &rarr; <span class="type-signature returnType">String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L642">Widgets/Animation/AnimationViewModel.js 642</a>
</div>
</h4>
</div>
<div class="description">
A function that formats a date for display.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
The date to be formatted</td>
</tr>
<tr>
<td class="name"><code>viewModel</code></td>
<td class="type">
<span class="param-type"><a href="AnimationViewModel.html">AnimationViewModel</a></span>
</td>
<td class="description last">
The AnimationViewModel instance requesting formatting.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The string representation of the calendar date portion of the provided date.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".TimeFormatter">
<a href="#.TimeFormatter" class="doc-link"></a>
Cesium.AnimationViewModel.TimeFormatter<span class="signature">(date, viewModel)</span> &rarr; <span class="type-signature returnType">String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/Animation/AnimationViewModel.js#L651">Widgets/Animation/AnimationViewModel.js 651</a>
</div>
</h4>
</div>
<div class="description">
A function that formats a time for display.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
The date to be formatted</td>
</tr>
<tr>
<td class="name"><code>viewModel</code></td>
<td class="type">
<span class="param-type"><a href="AnimationViewModel.html">AnimationViewModel</a></span>
</td>
<td class="description last">
The AnimationViewModel instance requesting formatting.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The string representation of the time portion of the provided date.
</div>
<dl class="details">
</dl>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a>
</footer>
</div>
<div class="nav">
<div class="menu">
<input type="text" class="classFilter" id="ClassFilter" placeholder="Search">
<ul id="ClassList"><li data-name="Animation"><a href="Animation.html">Animation</a></li><li data-name="AnimationViewModel"><a href="AnimationViewModel.html">AnimationViewModel</a></li><li data-name="Appearance"><a href="Appearance.html">Appearance</a></li><li data-name="ArcGisMapServerImageryProvider"><a href="ArcGisMapServerImageryProvider.html">ArcGisMapServerImageryProvider</a></li><li data-name="ArcGISTiledElevationTerrainProvider"><a href="ArcGISTiledElevationTerrainProvider.html">ArcGISTiledElevationTerrainProvider</a></li><li data-name="ArcType"><a href="global.html#ArcType">ArcType</a></li><li data-name="AssociativeArray"><a href="AssociativeArray.html">AssociativeArray</a></li><li data-name="Axis"><a href="global.html#Axis">Axis</a></li><li data-name="AxisAlignedBoundingBox"><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li><li data-name="backFaceCulling"><a href="global.html#backFaceCulling">backFaceCulling</a></li><li data-name="barycentricCoordinates"><a href="global.html#barycentricCoordinates">barycentricCoordinates</a></li><li data-name="BaseLayerPicker"><a href="BaseLayerPicker.html">BaseLayerPicker</a></li><li data-name="BaseLayerPickerViewModel"><a href="BaseLayerPickerViewModel.html">BaseLayerPickerViewModel</a></li><li data-name="Billboard"><a href="Billboard.html">Billboard</a></li><li data-name="BillboardCollection"><a href="BillboardCollection.html">BillboardCollection</a></li><li data-name="BillboardGraphics"><a href="BillboardGraphics.html">BillboardGraphics</a></li><li data-name="BillboardVisualizer"><a href="BillboardVisualizer.html">BillboardVisualizer</a></li><li data-name="binarySearch"><a href="global.html#binarySearch">binarySearch</a></li><li data-name="binarySearchComparator"><a href="global.html#binarySearchComparator">binarySearchComparator</a></li><li data-name="BingMapsGeocoderService"><a href="BingMapsGeocoderService.html">BingMapsGeocoderService</a></li><li data-name="BingMapsImageryProvider"><a href="BingMapsImageryProvider.html">BingMapsImageryProvider</a></li><li data-name="BingMapsStyle"><a href="global.html#BingMapsStyle">BingMapsStyle</a></li><li data-name="BlendEquation"><a href="global.html#BlendEquation">BlendEquation</a></li><li data-name="BlendFunction"><a href="global.html#BlendFunction">BlendFunction</a></li><li data-name="BlendingState"><a href="BlendingState.html">BlendingState</a></li><li data-name="BlendOption"><a href="global.html#BlendOption">BlendOption</a></li><li data-name="BoundingRectangle"><a href="BoundingRectangle.html">BoundingRectangle</a></li><li data-name="BoundingSphere"><a href="BoundingSphere.html">BoundingSphere</a></li><li data-name="boundingSphere"><a href="global.html#boundingSphere">boundingSphere</a></li><li data-name="BoxEmitter"><a href="BoxEmitter.html">BoxEmitter</a></li><li data-name="BoxGeometry"><a href="BoxGeometry.html">BoxGeometry</a></li><li data-name="BoxGeometryUpdater"><a href="BoxGeometryUpdater.html">BoxGeometryUpdater</a></li><li data-name="BoxGraphics"><a href="BoxGraphics.html">BoxGraphics</a></li><li data-name="BoxOutlineGeometry"><a href="BoxOutlineGeometry.html">BoxOutlineGeometry</a></li><li data-name="buildModuleUrl"><a href="global.html#buildModuleUrl">buildModuleUrl</a></li><li data-name="CallbackProperty"><a href="CallbackProperty.html">CallbackProperty</a></li><li data-name="Camera"><a href="Camera.html">Camera</a></li><li data-name="CameraEventAggregator"><a href="CameraEventAggregator.html">CameraEventAggregator</a></li><li data-name="CameraEventType"><a href="global.html#CameraEventType">CameraEventType</a></li><li data-name="cancelAnimationFrame"><a href="global.html#cancelAnimationFrame">cancelAnimationFrame</a></li><li data-name="Cartesian2"><a href="Cartesian2.html">Cartesian2</a></li><li data-name="Cartesian3"><a href="Cartesian3.html">Cartesian3</a></li><li data-name="Cartesian4"><a href="Cartesian4.html">Cartesian4</a></li><li data-name="Cartographic"><a href="Cartographic.html">Cartographic</a></li><li data-name="CartographicGeocoderService"><a href="CartographicGeocoderServic
</div>
</div>
<script>
if (window.frameElement) {
document.body.className = 'embedded';
var ele = document.createElement('a');
ele.className = 'popout';
ele.target = '_blank';
ele.href = window.location.href;
ele.title = 'Pop out';
document.getElementById('main').appendChild(ele);
}
// Set targets on external links. Sandcastle and GitHub shouldn't be embedded in any iframe.
Array.prototype.forEach.call(document.getElementsByTagName('a'), function(a) {
if (/^https?:/i.test(a.getAttribute('href'))) {
a.target='_blank';
}
});
</script>
<script src="javascript/prism.js"></script>
<script src="javascript/cesiumDoc.js"></script>
</body>
</html>