index.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html lang="en-us">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <style>
  7. * {
  8. padding: 0;
  9. margin: 0;
  10. }
  11. html,
  12. body {
  13. width: 100%;
  14. height: 100%;
  15. overflow: hidden;
  16. }
  17. </style>
  18. <title>数字沙盘</title>
  19. </head>
  20. <body style="text-align: center">
  21. <canvas id="unity-canvas" width=1920 height=1080 style="width: 1920px; height: 1080px; background: #231F20"></canvas>
  22. <script src="Build/WebGl-3DMapPage.loader.js"></script>
  23. <script>
  24. createUnityInstance(document.querySelector("#unity-canvas"), {
  25. dataUrl: "Build/WebGl-3DMapPage.data",
  26. frameworkUrl: "Build/WebGl-3DMapPage.framework.js",
  27. codeUrl: "Build/WebGl-3DMapPage.wasm",
  28. streamingAssetsUrl: "StreamingAssets",
  29. companyName: "DefaultCompany",
  30. productName: "New Unity Project 1",
  31. productVersion: "0.1",
  32. // matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
  33. // devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
  34. }).then((unityInstance) => {
  35. window.unityInstance = unityInstance
  36. }).catch((message) => {
  37. });;
  38. </script>
  39. </body>
  40. </html>