123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <!DOCTYPE html>
- <html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>临港大屏</title>
- </head>
- <body style="text-align: center; padding: 0; border: 0; margin: 0;">
- <div id="unity-container" class="unity-desktop">
- <canvas id="unity-canvas" width=960 height=600 tabindex="-1" style="width: 960px; height: 600px; background: #231F20"></canvas>
- </div>
- <script src="Build/test.loader.js"></script>
- <script src="StreamingAssets/hls.min.js"></script>
- <script>
- function Test01(){
- window.alert("Test 03");
- wx.minProgram.navigateTo({url:'/pages/scan/scene-scan-render/index'});
- }
- function Test02(str){
- window.alert(JSON.stringify(str));
- }
- if (typeof wx !== 'undefined') {
- console.log("2321312312321312312321");
- }
- var container = document.querySelector("#unity-container");
- container.className = "unity-mobile";
-
- // if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
- // Mobile device style: fill the whole browser client area with the game canvas:
- var meta = document.createElement('meta');
- meta.name = 'viewport';
- meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
- document.getElementsByTagName('head')[0].appendChild(meta);
- var canvas = document.querySelector("#unity-canvas");
- canvas.style.width = "100%";
- canvas.style.height = "100%";
- canvas.style.position = "fixed";
- document.body.style.textAlign = "left";
- // }
- createUnityInstance(document.querySelector("#unity-canvas"), {
- dataUrl: "Build/test.data.unityweb",
- frameworkUrl: "Build/test.framework.js.unityweb",
- codeUrl: "Build/test.wasm.unityweb",
- symbolsUrl: "Build/test.symbols.json.unityweb",
- streamingAssetsUrl: "StreamingAssets",
- companyName: "DefaultCompany",
- productName: "临港大屏",
- productVersion: "0.1",
- // matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
- // devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
- }, (progress) => {
- }).then((unityInstance) => {
- window.unityInstance = unityInstance
- }).catch((message) => {
- alert(message);
- });
- </script>
- </body>
- </html>
|