forked from wangfeilong321/ExamplesforCesium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnimation.html
41 lines (35 loc) · 1.5 KB
/
Animation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<head>
<title>Animation</title>
<link href="../Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<link href="../Build/Cesium/Widgets/Animation/Animation.css" rel="stylesheet">
<link href="../Build/Cesium/Widgets/Animation/lighter.css" rel="stylesheet">
<script type="text/javascript" src="./js/require.min.js" data-main="./js/main"></script>
</head>
<body>
<div id="animationContainer" class="cesium-viewer-animationContainer" style="z-index:100">
</div>
<div id="cesiumContainer"></div>
<script>
function onload(Cesium) {
var viewer = new Cesium.Viewer('cesiumContainer',{animation:false,timeline:false});
//var clock = new Cesium.Clock();
var clockViewModel = new Cesium.ClockViewModel(viewer.cesiumWidget.clock);
var viewModel = new Cesium.AnimationViewModel(clockViewModel);
var widget = new Cesium.Animation('animationContainer', viewModel);
document.body.className = 'cesium-lighter';
widget.applyThemeChanges();
viewer.animation = widget;
function tick() {
clock.tick();
Cesium.requestAnimationFrame(tick);
}
Cesium.requestAnimationFrame(tick);
// viewer.animation.container.style.visibility = 'hidden';
// viewer.animation.container.style.visibility = 'hidden';
//
// viewer.timeline.container.style.visibility = 'visible';
// viewer.timeline.container.style.visibility = 'hidden';
}
</script>
</body>