bill 9 月之前
父节点
当前提交
a370eac779
共有 5 个文件被更改,包括 17448 次插入0 次删除
  1. 24 0
      .gitignore
  2. 3 0
      .vscode/extensions.json
  3. 52 0
      cesium.html
  4. 16027 0
      js/Cesium.js
  5. 1342 0
      js/widgets.css

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 3 - 0
.vscode/extensions.json

@@ -0,0 +1,3 @@
+{
+  "recommendations": ["Vue.volar"]
+}

+ 52 - 0
cesium.html

@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <!-- Include the CesiumJS JavaScript and CSS files -->
+  <script src="./js/Cesium.js"></script>
+  <link href="./js/widgets.css" rel="stylesheet">
+  <style>
+
+    * {
+      margin: 0;
+      padding: 0;
+      border: 0;
+      
+    }
+    #cesiumContainer  {
+      width: 100vw;
+      height: 100vh;
+    }
+    .cesium-viewer-toolbar {
+      display: none;
+    }
+  </style>
+</head>
+<body>
+  <div id="cesiumContainer"></div>
+  <script type="module">
+    // https://cesium.com/downloads/cesiumjs/releases/1.123/Build/Cesium/Widgets
+    // Your access token can be found at: https://ion.cesium.com/tokens.
+    // Replace `your_access_token` with your Cesium ion access token.
+
+    Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxOGJlY2NkYy04NGZiLTQ2MzYtYWJmZi0xNzNlNDk0N2Q2YjAiLCJpZCI6MjUyOTI2LCJpYXQiOjE3MzA3ODY3MTN9.GiCzHsI5RCIWSPp5aiI7mvsu0emeCtjrTNOpwyIK7zw';
+
+    // window.CESIUM_BASE_URL = 'https://sandcastle.cesium.com/CesiumUnminified/';
+    // Initialize the Cesium Viewer in the HTML element with the `cesiumContainer` ID.
+    const viewer = new Cesium.Viewer('cesiumContainer', {
+      terrain: Cesium.Terrain.fromWorldTerrain(),
+      vrButton:true
+    });    
+
+// Fly the camera to Denver, Colorado at the given longitude, latitude, and height.
+viewer.camera.flyTo({
+  destination: Cesium.Cartesian3.fromDegrees(-104.9965, 39.74248, 4000)
+});
+
+// Add Cesium OSM Buildings.
+const buildingsTileset = await Cesium.createOsmBuildingsAsync();
+viewer.scene.primitives.add(buildingsTileset);
+  </script>
+ </div>
+</body>
+</html>

文件差异内容过多而无法显示
+ 16027 - 0
js/Cesium.js


文件差异内容过多而无法显示
+ 1342 - 0
js/widgets.css