-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunner.html
More file actions
89 lines (68 loc) · 2.87 KB
/
runner.html
File metadata and controls
89 lines (68 loc) · 2.87 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
<meta charset="utf-8">
<!-- Tell IE to use the latest, best version. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>My Constellation Sim!</title>
<script src="../../../Build/Cesium/Cesium.js"></script>
<script src="../../../node_modules/cesium-sensor-volumes/dist/cesium-sensor-volumes.min.js"></script>
<style>
@import url(../../../Build/Cesium/Widgets/widgets.css);
html,
body,
#cesiumContainer {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
</head>
<body>
<div id="cesiumContainer"></div>
<script src="cstar/js/easing.js"></script>
<script src="cstar/js/studio.js"></script>
<script src="cstar/js/debugger.js"></script>
<script src="cstar/js/dolly.js"></script>
<script src="cstar/js/auxrender.js"></script>
<script src="cstar/js/setupczml.js"></script>
<script>
// Kit's Bing maps api key below
Cesium.BingMapsApi.defaultKey = 'Agj5ndBXB0yXYb6uDBH1WniyN5mhOQNtI0Qx23E85he9zirUK-csAUI0Z0zG8zfM';
// add all the processors for custom CZML properties. See setupczml.js
pushCZMLProcessors();
// start loading czml file
var dataSourcePromise = Cesium.CzmlDataSource.load('app_data_files/sats_file.czml');
// fetch the list of objects in the simulation that need to be operated on by addCallbacks() below
var viz_objects_path = 'app_data_files/viz_objects.json';
var viz_objects_json;
fetch(viz_objects_path)
.then(result => result.json())
.then(obj => {
viz_objects_json = obj;
// console.log(viz_objects_json.callbacks.orientation[0]);
// add desired callbacks for the various objects in sats_file. See setupczml.js
dataSourcePromise = dataSourcePromise.then(result => addCallbacks(result,viz_objects_json));
});
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.dataSources.add(dataSourcePromise);
var grip = new Grip();
// grip.load('storyboard/storyboard.json');
// grip.attach();
var dolly = new Dolly();
dolly.attach();
var ar = new AuxRenderer();
ar.load('renderers/description.json');
ar.attach();
// var debug = new Debugger();
viewer.camera.flyHome(0);
var scene = viewer.scene;
// addOrientationCallback(ar);
</script>
</body>
</html>