-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (46 loc) · 1.8 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!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>3D Tile Location Editor</title>
<link rel="stylesheet" href="https://cesiumjs.org/releases/1.70.1/Build/Cesium/Widgets/widgets.css">
<link rel="stylesheet" href="https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/templates/bucket.css">
<script src="https://cesiumjs.org/releases/1.70.1/Build/Cesium/Cesium.js"></script>
<!-- <script src = "./Cesium-1.70.1/Build/CesiumUnminified/Cesium.js"></script>-->
<script src = "https://sandcastle.cesium.com/Sandcastle-header.js"></script>
<style>
</style>
</head>
<body>
<div id="cesiumContainer" class="fullSize"></div>
<div id="toolbar">
</div>
<script src = "./Cesium3DTileLocationEditor.js"></script>
<script>
const worldTerrain = Cesium.createWorldTerrain({
requestWaterMask: true,
requestVertexNormals: true,
});
const viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: worldTerrain,
});
var tileset = new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(40866),
});
viewer.scene.primitives.add(tileset);
tileset.readyPromise
.then(function (tileset) {
viewer.zoomTo(tileset);
var tilesetLocationEditor = new Cesium3dTilesetLocationEditor(viewer, tileset);
})
.otherwise(function (error) {
console.log(error);
});
</script>
</body>
</html>