-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunner_leo_geo.html
More file actions
102 lines (78 loc) · 3.4 KB
/
runner_leo_geo.html
File metadata and controls
102 lines (78 loc) · 3.4 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
90
91
92
93
94
95
96
97
98
99
100
101
102
<!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_leo_geo.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_leo_geo.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_leo_geo.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);
// Central African Republic
// scene.primitives.add(new Cesium.Rectangle(-10, -10, 10, 10));
var canv = document.getElementsByTagName('canvas');
console.log(canv.toString())
console.log(canv.length.toString())
canv.width = 1200
// document.getElementById("cesiumContainer").style.width = "50%";
// var ctx = document.getElementById("cesiumContainer").getContext('2d');
// ctx.scale(2, 2);
// setDPI(viewer.container, 100)
</script>
</body>
</html>