Delete index.html
Browse files- index.html +0 -213
index.html
DELETED
@@ -1,213 +0,0 @@
|
|
1 |
-
<!-- Zappar WebGL template for Unity 2020 and above versions -->
|
2 |
-
<!-- NFYNT -->
|
3 |
-
<!DOCTYPE html>
|
4 |
-
<html lang="en-us">
|
5 |
-
|
6 |
-
<head>
|
7 |
-
<meta charset="utf-8">
|
8 |
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
9 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
10 |
-
<link rel="shortcut icon" href="favicon.ico">
|
11 |
-
<title>TryOn</title>
|
12 |
-
<style>
|
13 |
-
html {
|
14 |
-
box-sizing: border-box;
|
15 |
-
}
|
16 |
-
|
17 |
-
*,
|
18 |
-
*:before,
|
19 |
-
*:after {
|
20 |
-
box-sizing: inherit;
|
21 |
-
}
|
22 |
-
|
23 |
-
html,
|
24 |
-
body {
|
25 |
-
position: fixed;
|
26 |
-
top: 0; left: 0; right: 0; bottom: 0;
|
27 |
-
}
|
28 |
-
|
29 |
-
canvas {
|
30 |
-
display: block;
|
31 |
-
}
|
32 |
-
|
33 |
-
body {
|
34 |
-
margin: 0;
|
35 |
-
}
|
36 |
-
|
37 |
-
#unity-container {
|
38 |
-
width: 100%;
|
39 |
-
height: 100%;
|
40 |
-
}
|
41 |
-
|
42 |
-
#unity-canvas {
|
43 |
-
width: 100%;
|
44 |
-
height: 100%;
|
45 |
-
|
46 |
-
background: #231F20;
|
47 |
-
}
|
48 |
-
|
49 |
-
#loading-cover {
|
50 |
-
position: absolute;
|
51 |
-
top: 0;
|
52 |
-
left: 0;
|
53 |
-
width: 100%;
|
54 |
-
height: 100%;
|
55 |
-
display: flex;
|
56 |
-
justify-content: center;
|
57 |
-
align-items: center;
|
58 |
-
}
|
59 |
-
|
60 |
-
#unity-loading-bar {
|
61 |
-
flex: 1 1 auto;
|
62 |
-
display: flex;
|
63 |
-
flex-direction: column;
|
64 |
-
justify-content: center;
|
65 |
-
align-items: center;
|
66 |
-
}
|
67 |
-
|
68 |
-
#unity-progress-bar-empty {
|
69 |
-
width: 80%;
|
70 |
-
height: 24px;
|
71 |
-
margin: 10px 20px 20px 10px;
|
72 |
-
text-align: left;
|
73 |
-
border: 1px solid white;
|
74 |
-
padding: 2px;
|
75 |
-
}
|
76 |
-
|
77 |
-
#unity-progress-bar-full {
|
78 |
-
width: 0%;
|
79 |
-
height: 100%;
|
80 |
-
background: white;
|
81 |
-
}
|
82 |
-
|
83 |
-
.light #unity-progress-bar-empty {
|
84 |
-
border-color: black;
|
85 |
-
}
|
86 |
-
|
87 |
-
.light #unity-progress-bar-full {
|
88 |
-
background: black;
|
89 |
-
}
|
90 |
-
|
91 |
-
.spinner,
|
92 |
-
.spinner:after {
|
93 |
-
border-radius: 50%;
|
94 |
-
width: 5em;
|
95 |
-
height: 5em;
|
96 |
-
}
|
97 |
-
|
98 |
-
.spinner {
|
99 |
-
margin: 10px;
|
100 |
-
font-size: 10px;
|
101 |
-
position: relative;
|
102 |
-
text-indent: -9999em;
|
103 |
-
border-top: 1.1em solid rgba(255, 255, 255, 0.2);
|
104 |
-
border-right: 1.1em solid rgba(255, 255, 255, 0.2);
|
105 |
-
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
|
106 |
-
border-left: 1.1em solid #ffffff;
|
107 |
-
transform: translateZ(0);
|
108 |
-
animation: spinner-spin 1.1s infinite linear;
|
109 |
-
}
|
110 |
-
|
111 |
-
@keyframes spinner-spin {
|
112 |
-
0% {
|
113 |
-
transform: rotate(0deg);
|
114 |
-
}
|
115 |
-
|
116 |
-
100% {
|
117 |
-
transform: rotate(360deg);
|
118 |
-
}
|
119 |
-
}
|
120 |
-
</style>
|
121 |
-
</head>
|
122 |
-
|
123 |
-
<body class="dark">
|
124 |
-
<div id="unity-container" class="unity-desktop">
|
125 |
-
<canvas id="unity-canvas"></canvas>
|
126 |
-
</div>
|
127 |
-
<div id="loading-cover" style="display:none;">
|
128 |
-
<div id="unity-loading-bar">
|
129 |
-
<div id="unity-progress-bar-empty" style="display: none;">
|
130 |
-
<div id="unity-progress-bar-full"></div>
|
131 |
-
</div>
|
132 |
-
<div class="spinner"></div>
|
133 |
-
</div>
|
134 |
-
</div>
|
135 |
-
<script type="text/javascript" src="zappar-cv.js"></script>
|
136 |
-
<script>
|
137 |
-
var db = indexedDB.open("dummy_indexdb", 1); // iOS 14.6 fix; the call to open indexdb hangs forever otherwise
|
138 |
-
|
139 |
-
const buildUrl = "Build";
|
140 |
-
const loaderUrl = buildUrl + "/Build.loader.js";
|
141 |
-
const config = {
|
142 |
-
dataUrl: buildUrl + "/Build.data",
|
143 |
-
frameworkUrl: buildUrl + "/Build.framework.js",
|
144 |
-
codeUrl: buildUrl + "/Build.wasm",
|
145 |
-
streamingAssetsUrl: "StreamingAssets",
|
146 |
-
companyName: "DefaultCompany",
|
147 |
-
productName: "TryOn",
|
148 |
-
productVersion: "0.1",
|
149 |
-
//Useful when used along with Filename as Hashes option
|
150 |
-
cacheControl: function (url) {
|
151 |
-
// typically includes: .data, .bundle, .zpt
|
152 |
-
if (url.match(/\.data/) || url.match(/\.bundle/) || url.match(/\.zpt/)) {
|
153 |
-
return "must-revalidate";
|
154 |
-
}
|
155 |
-
|
156 |
-
if (url.match(/\.mp4/) || url.match(/\.custom/) || url.match(/\.zbin/)) {
|
157 |
-
return "immutable";
|
158 |
-
}
|
159 |
-
// Disable explicit caching for all other files.
|
160 |
-
// Note: the default browser cache may cache them anyway.
|
161 |
-
return "no-store";
|
162 |
-
},
|
163 |
-
};
|
164 |
-
|
165 |
-
const container = document.querySelector("#unity-container");
|
166 |
-
const canvas = document.querySelector("#unity-canvas");
|
167 |
-
const loadingCover = document.querySelector("#loading-cover");
|
168 |
-
const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");
|
169 |
-
const progressBarFull = document.querySelector("#unity-progress-bar-full");
|
170 |
-
const spinner = document.querySelector('.spinner');
|
171 |
-
|
172 |
-
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
173 |
-
container.className = "unity-mobile";
|
174 |
-
//config.matchWebGLToCanvasSize = false;
|
175 |
-
//set devicePixelRatio=1; to avoid draining fillrate performance on mobile and override low DPI mode
|
176 |
-
config.devicePixelRatio = window.devicePixelRatio;
|
177 |
-
}
|
178 |
-
loadingCover.style.display = "";
|
179 |
-
|
180 |
-
window.zappar = ZCV.initialize();
|
181 |
-
|
182 |
-
const script = document.createElement("script");
|
183 |
-
script.src = loaderUrl;
|
184 |
-
//script.onload = () => { CreateUnityLoader(); };
|
185 |
-
document.body.appendChild(script);
|
186 |
-
|
187 |
-
window.zappar.permission_request_ui_promise().then(WaitForZCVLoad);
|
188 |
-
|
189 |
-
function WaitForZCVLoad() {
|
190 |
-
if (zappar.loaded()) {
|
191 |
-
CreateUnityLoader();
|
192 |
-
return;
|
193 |
-
}
|
194 |
-
setTimeout(WaitForZCVLoad, 500);
|
195 |
-
}
|
196 |
-
|
197 |
-
function CreateUnityLoader() {
|
198 |
-
createUnityInstance(canvas, config, (progress) => {
|
199 |
-
spinner.style.display = "none";
|
200 |
-
progressBarEmpty.style.display = "";
|
201 |
-
progressBarFull.style.width = `${100 * progress}%`;
|
202 |
-
}).then((unityInstance) => {
|
203 |
-
loadingCover.style.display = "none";
|
204 |
-
window.uarGameInstance = unityInstance;
|
205 |
-
}).catch((message) => {
|
206 |
-
alert(message);
|
207 |
-
});
|
208 |
-
}
|
209 |
-
|
210 |
-
</script>
|
211 |
-
</body>
|
212 |
-
|
213 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|