index.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <title>科学教育</title>
  7. <script type="text/javascript" src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  8. </head>
  9. <body style="text-align: center; padding: 0; border: 0; margin: 0;">
  10. <canvas id="unity-canvas" width=1280 height=720 tabindex="-1" style="width: 1280px; height: 720px; background: #FFFFFF"></canvas>
  11. <script src="Build/daping.loader.js"></script>
  12. <script>
  13. function Test01(){
  14. window.alert("Test 03");
  15. wx.minProgram.navigateTo({url:'/pages/scan/scene-scan-render/index'});
  16. }
  17. function Test02(str){
  18. window.alert(JSON.stringify(str));
  19. }
  20. if (typeof wx !== 'undefined') {
  21. console.log("2321312312321312312321");
  22. }
  23. // if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
  24. // Mobile device style: fill the whole browser client area with the game canvas:
  25. var meta = document.createElement('meta');
  26. meta.name = 'viewport';
  27. meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
  28. document.getElementsByTagName('head')[0].appendChild(meta);
  29. var canvas = document.querySelector("#unity-canvas");
  30. canvas.style.width = "100%";
  31. canvas.style.height = "100%";
  32. canvas.style.position = "fixed";
  33. document.body.style.textAlign = "left";
  34. // }
  35. createUnityInstance(document.querySelector("#unity-canvas"), {
  36. dataUrl: "Build/daping.data.unityweb",
  37. frameworkUrl: "Build/daping.framework.js.unityweb",
  38. codeUrl: "Build/daping.wasm.unityweb",
  39. streamingAssetsUrl: "StreamingAssets",
  40. companyName: "DefaultCompany",
  41. productName: "科学教育",
  42. productVersion: "0.1",
  43. // matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
  44. // devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
  45. });
  46. </script>
  47. </body>
  48. </html>