File size: 3,095 Bytes
35ecd17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12afe16
 
 
35ecd17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en-us">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>LocalVoiceLLM | WebGPU AI</title>
    <link rel="shortcut icon" href="TemplateData/favicon.ico">
    <link rel="stylesheet" href="TemplateData/style.css">
  </head>
  <body>
    <div id="unity-container">
      <canvas id="unity-canvas" width=1280 height=720 tabindex="-1"></canvas>
      
      <div id="custom-loader">
          <div class="glass-panel">
              <div class="loader-header">
                <div class="ai-pulse"></div>
                <h2>LocalVoiceLLM INITIALIZING</h2>
              </div>
              <div class="progress-track">
                  <div class="progress-fill" id="progress-bar"></div>
              </div>
              <div class="status-text" id="loading-text">Loading WebGPU Kernels...</div>
          </div>
      </div>

      <div id="about-panel" class="hidden">
          <div class="glass-panel license-scroll">
              <button class="close-btn" onclick="toggleAbout(false)">×</button>
              <h3>Third Party Notices</h3>
              <pre>
SimpleOffline Engine
Copyright (c) 2026 David Addis. All rights reserved.

AI Models (Running Locally via ONNX/Sentis):
• Whisper: MIT License (OpenAI)
• SmolLM2: Apache 2.0 (HuggingFaceTB)
• Supertonic-2: OpenRAIL-M (Supertone Inc.)

Full license texts are available in THIRD_PARTY_NOTICES.txt
              </pre>
          </div>
      </div>
    </div>

    <script>
      var canvas = document.querySelector("#unity-canvas");
      var loaderOverlay = document.querySelector("#custom-loader");
      var progressBar = document.querySelector("#progress-bar");
      var loadingText = document.querySelector("#loading-text");
      var aboutPanel = document.querySelector("#about-panel");

      function toggleAbout(show) {
          aboutPanel.className = show ? "visible" : "hidden";
      }

      var buildUrl = "Build";
      var loaderUrl = buildUrl + "/WebGL.loader.js";
      var config = {
        dataUrl: buildUrl + "/WebGL.data.br",
        frameworkUrl: buildUrl + "/WebGL.framework.js.br",
        codeUrl: buildUrl + "/WebGL.wasm.br",
        streamingAssetsUrl: "StreamingAssets",
        companyName: "David Addis",
        productName: "LocalVoiceLLM",
        productVersion: "0.2.3",
      };

      var script = document.createElement("script");
      script.src = loaderUrl;
      script.onload = () => {
        createUnityInstance(canvas, config, (progress) => {
          progressBar.style.width = 100 * progress + "%";
          loadingText.innerText = "Downloading Assets: " + Math.round(100 * progress) + "%";
        }).then((unityInstance) => {
          loaderOverlay.style.opacity = "0";
          setTimeout(() => { loaderOverlay.style.display = "none"; }, 500);
          
          // Attach instance to window so Unity can call JS functions
          window.unityInstance = unityInstance; 
        });
      };
      document.body.appendChild(script);
    </script>
  </body>
</html>