Spaces:
Sleeping
Sleeping
Upload 11 files
Browse files- .gitattributes +1 -0
- html/Build/d28a453ed81d6e2f8f1ddbc09ade6577.data.br +3 -0
- html/index.html +223 -171
- html/zappar-cv.js +54 -7
.gitattributes
CHANGED
@@ -39,3 +39,4 @@ html/Build/bb3e19fd173f5e78feb18f847810bc42.data.br filter=lfs diff=lfs merge=lf
|
|
39 |
html/StreamingAssets/generated_1.zpt filter=lfs diff=lfs merge=lfs -text
|
40 |
html/StreamingAssets/rocks.zpt filter=lfs diff=lfs merge=lfs -text
|
41 |
html/StreamingAssets/track_0.zpt filter=lfs diff=lfs merge=lfs -text
|
|
|
|
39 |
html/StreamingAssets/generated_1.zpt filter=lfs diff=lfs merge=lfs -text
|
40 |
html/StreamingAssets/rocks.zpt filter=lfs diff=lfs merge=lfs -text
|
41 |
html/StreamingAssets/track_0.zpt filter=lfs diff=lfs merge=lfs -text
|
42 |
+
html/Build/d28a453ed81d6e2f8f1ddbc09ade6577.data.br filter=lfs diff=lfs merge=lfs -text
|
html/Build/d28a453ed81d6e2f8f1ddbc09ade6577.data.br
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b25205b3938cf6376fce3d1b07344a0386492ca736a3942543855563259fcdba
|
3 |
+
size 47005771
|
html/index.html
CHANGED
@@ -2,212 +2,264 @@
|
|
2 |
<!-- NFYNT -->
|
3 |
<!DOCTYPE html>
|
4 |
<html lang="en-us">
|
5 |
-
|
6 |
-
<
|
7 |
-
<meta charset=
|
8 |
-
<meta
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
<title>VirtualTryOn</title>
|
12 |
<style>
|
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 |
-
|
88 |
-
|
89 |
-
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
109 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
120 |
</style>
|
121 |
-
</head>
|
122 |
|
123 |
-
<body class="dark">
|
124 |
<div id="unity-container" class="unity-desktop">
|
125 |
-
|
|
|
|
|
|
|
126 |
</div>
|
127 |
-
<div id="loading-cover" style="display:none
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
<div class="spinner"></div>
|
133 |
</div>
|
|
|
|
|
|
|
134 |
</div>
|
135 |
<script type="text/javascript" src="zappar-cv.js"></script>
|
136 |
<script>
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
return "immutable";
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
186 |
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
|
190 |
-
if (zappar.loaded()) {
|
191 |
-
CreateUnityLoader();
|
192 |
-
return;
|
193 |
-
}
|
194 |
-
setTimeout(WaitForZCVLoad, 500);
|
195 |
-
}
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
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 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<!-- NFYNT -->
|
3 |
<!DOCTYPE html>
|
4 |
<html lang="en-us">
|
5 |
+
<head>
|
6 |
+
<meta charset="utf-8" />
|
7 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8 |
+
<meta
|
9 |
+
name="viewport"
|
10 |
+
content="width=device-width, initial-scale=1.0, user-scalable=no"
|
11 |
+
/>
|
12 |
+
<link rel="shortcut icon" href="favicon.ico" />
|
13 |
<title>VirtualTryOn</title>
|
14 |
<style>
|
15 |
+
html {
|
16 |
+
box-sizing: border-box;
|
17 |
+
}
|
18 |
|
19 |
+
*,
|
20 |
+
*:before,
|
21 |
+
*:after {
|
22 |
+
box-sizing: inherit;
|
23 |
+
}
|
24 |
|
25 |
+
html,
|
26 |
+
body {
|
27 |
+
position: fixed;
|
28 |
+
top: 0;
|
29 |
+
left: 0;
|
30 |
+
right: 0;
|
31 |
+
bottom: 0;
|
32 |
+
}
|
33 |
|
34 |
+
canvas {
|
35 |
+
display: block;
|
36 |
+
}
|
37 |
|
38 |
+
body {
|
39 |
+
margin: 0;
|
40 |
+
}
|
41 |
|
42 |
+
#unity-container {
|
43 |
+
width: 100%;
|
44 |
+
height: 100%;
|
45 |
+
}
|
46 |
|
47 |
+
#unity-canvas {
|
48 |
+
width: 100%;
|
49 |
+
height: 100%;
|
50 |
|
51 |
+
/*background: #80747D;*/
|
52 |
+
background: rgba(248, 225, 244, 1);
|
53 |
+
}
|
54 |
|
55 |
+
#loading-cover {
|
56 |
+
position: absolute;
|
57 |
+
top: 0;
|
58 |
+
left: 0;
|
59 |
+
width: 100%;
|
60 |
+
height: 100%;
|
61 |
+
display: flex;
|
62 |
+
justify-content: center;
|
63 |
+
align-items: flex-end;
|
64 |
+
padding-bottom: 40px;
|
65 |
+
}
|
66 |
|
67 |
+
.spinner-container {
|
68 |
+
position: absolute;
|
69 |
+
top: 0;
|
70 |
+
left: 0;
|
71 |
+
width: 100%;
|
72 |
+
height: 100%;
|
73 |
+
display: flex;
|
74 |
+
justify-content: center;
|
75 |
+
align-items: center;
|
76 |
+
}
|
77 |
|
78 |
+
#unity-loading-bar {
|
79 |
+
flex: 1 1 auto;
|
80 |
+
display: flex;
|
81 |
+
flex-direction: column;
|
82 |
+
justify-content: center;
|
83 |
+
align-items: center;
|
84 |
+
}
|
|
|
85 |
|
86 |
+
#unity-progress-bar-empty {
|
87 |
+
width: 80%;
|
88 |
+
height: 24px;
|
89 |
+
margin: 0px 20px 5px 10px;
|
90 |
+
text-align: left;
|
91 |
+
border: 1px solid #3a457d;
|
92 |
+
padding: 2px;
|
93 |
+
}
|
94 |
|
95 |
+
#unity-progress-bar-full {
|
96 |
+
width: 0%;
|
97 |
+
height: 100%;
|
98 |
+
background: #3a457d;
|
99 |
+
}
|
100 |
|
101 |
+
.light #unity-progress-bar-empty {
|
102 |
+
border-color: black;
|
103 |
+
}
|
104 |
|
105 |
+
.light #unity-progress-bar-full {
|
106 |
+
background: black;
|
107 |
+
}
|
108 |
+
|
109 |
+
#progress-text {
|
110 |
+
color: #3a457d;
|
111 |
+
font-family: "Bai Jamjuree", sans-serif;
|
112 |
+
font-size: 16px;
|
113 |
+
width: 80%;
|
114 |
+
height: 24px;
|
115 |
+
margin: 0px 20px 0px 10px;
|
116 |
+
text-align: right;
|
117 |
+
font-weight: bold;
|
118 |
+
}
|
119 |
|
120 |
+
#loading-text {
|
121 |
+
color: #3a457d;
|
122 |
+
font-family: "Bai Jamjuree", sans-serif;
|
123 |
+
font-size: 14px;
|
124 |
+
width: 80%;
|
125 |
+
height: 24px;
|
126 |
+
margin: 0px 20px 0px 10px;
|
127 |
+
text-align: left;
|
128 |
+
text-transform: uppercase;
|
129 |
+
animation: blink 2s infinite;
|
130 |
+
}
|
131 |
+
|
132 |
+
@keyframes blink {
|
133 |
+
50% {
|
134 |
+
opacity: 0;
|
135 |
}
|
136 |
+
}
|
137 |
+
|
138 |
+
.spinner,
|
139 |
+
.spinner:after {
|
140 |
+
border-radius: 50%;
|
141 |
+
width: 5em;
|
142 |
+
height: 5em;
|
143 |
+
}
|
144 |
|
145 |
+
.spinner {
|
146 |
+
margin: 10px;
|
147 |
+
font-size: 10px;
|
148 |
+
position: relative;
|
149 |
+
text-indent: -9999em;
|
150 |
+
border-top: 1.1em solid rgba(255, 255, 255, 0.2);
|
151 |
+
border-right: 1.1em solid rgba(255, 255, 255, 0.2);
|
152 |
+
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
|
153 |
+
border-left: 1.1em solid #ffffff;
|
154 |
+
transform: translateZ(0);
|
155 |
+
animation: spinner-spin 1.1s infinite linear;
|
156 |
+
}
|
157 |
|
158 |
+
@keyframes spinner-spin {
|
159 |
+
0% {
|
160 |
+
transform: rotate(0deg);
|
161 |
}
|
162 |
+
|
163 |
+
100% {
|
164 |
+
transform: rotate(360deg);
|
165 |
+
}
|
166 |
+
}
|
167 |
</style>
|
168 |
+
</head>
|
169 |
|
170 |
+
<body class="dark">
|
171 |
<div id="unity-container" class="unity-desktop">
|
172 |
+
<canvas id="unity-canvas"></canvas>
|
173 |
+
</div>
|
174 |
+
<div class="spinner-container">
|
175 |
+
<div class="spinner"></div>
|
176 |
</div>
|
177 |
+
<div id="loading-cover" style="display: none">
|
178 |
+
<div id="unity-loading-bar">
|
179 |
+
<div id="progress-text">0%</div>
|
180 |
+
<div id="unity-progress-bar-empty" style="display: none">
|
181 |
+
<div id="unity-progress-bar-full"></div>
|
|
|
182 |
</div>
|
183 |
+
<div id="loading-text">Loading...</div>
|
184 |
+
<!--<div class="spinner"></div>-->
|
185 |
+
</div>
|
186 |
</div>
|
187 |
<script type="text/javascript" src="zappar-cv.js"></script>
|
188 |
<script>
|
189 |
+
var db = indexedDB.open("dummy_indexdb", 1); // iOS 14.6 fix; the call to open indexdb hangs forever otherwise
|
190 |
+
|
191 |
+
const buildUrl = "Build";
|
192 |
+
const loaderUrl = buildUrl + "/33050ea7c3fd0dc8ee2d4c1203e4541f.loader.js";
|
193 |
+
const config = {
|
194 |
+
dataUrl: buildUrl + "/d28a453ed81d6e2f8f1ddbc09ade6577.data.br",
|
195 |
+
frameworkUrl: buildUrl + "/2bf33c6bee1953a469e389a9b96b6b2f.framework.js.br",
|
196 |
+
codeUrl: buildUrl + "/261f404da3aefa4b1766740784d17a3c.wasm.br",
|
197 |
+
streamingAssetsUrl: "StreamingAssets",
|
198 |
+
companyName: "DefaultCompany",
|
199 |
+
productName: "VirtualTryOn",
|
200 |
+
productVersion: "0.1",
|
201 |
+
//Useful when used along with Filename as Hashes option
|
202 |
+
cacheControl: function (url) {
|
203 |
+
// typically includes: .data, .bundle, .zpt
|
204 |
+
if (url.match(/\.data/) || url.match(/\.bundle/) || url.match(/\.zpt/)) {
|
205 |
return "immutable";
|
206 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
+
if (url.match(/\.mp4/) || url.match(/\.custom/) || url.match(/\.zbin/)) {
|
209 |
+
return "immutable";
|
210 |
+
}
|
211 |
+
// Disable explicit caching for all other files.
|
212 |
+
// Note: the default browser cache may cache them anyway.
|
213 |
+
return "no-store";
|
214 |
+
},
|
215 |
+
};
|
216 |
|
217 |
+
const container = document.querySelector("#unity-container");
|
218 |
+
const canvas = document.querySelector("#unity-canvas");
|
219 |
+
const loadingCover = document.querySelector("#loading-cover");
|
220 |
+
const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");
|
221 |
+
const progressBarFull = document.querySelector("#unity-progress-bar-full");
|
222 |
+
const progressText = document.querySelector("#progress-text");
|
223 |
+
const spinner = document.querySelector('.spinner');
|
224 |
|
225 |
+
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
226 |
+
container.className = "unity-mobile";
|
227 |
+
//config.matchWebGLToCanvasSize = false;
|
228 |
+
//set devicePixelRatio=1; to avoid draining fillrate performance on mobile and override low DPI mode
|
229 |
+
config.devicePixelRatio = window.devicePixelRatio;
|
230 |
+
}
|
231 |
+
loadingCover.style.display = "";
|
232 |
|
233 |
+
window.zappar = ZCV.initialize();
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
|
235 |
+
const script = document.createElement("script");
|
236 |
+
script.src = loaderUrl;
|
237 |
+
//script.onload = () => { CreateUnityLoader(); };
|
238 |
+
document.body.appendChild(script);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
+
window.zappar.permission_request_ui_promise().then(WaitForZCVLoad);
|
241 |
+
|
242 |
+
function WaitForZCVLoad() {
|
243 |
+
if (zappar.loaded()) {
|
244 |
+
CreateUnityLoader();
|
245 |
+
return;
|
246 |
+
}
|
247 |
+
setTimeout(WaitForZCVLoad, 500);
|
248 |
+
}
|
249 |
|
250 |
+
function CreateUnityLoader() {
|
251 |
+
createUnityInstance(canvas, config, (progress) => {
|
252 |
+
spinner.style.display = "none";
|
253 |
+
progressBarEmpty.style.display = "";
|
254 |
+
progressBarFull.style.width = `${100 * progress}%`;
|
255 |
+
progressText.textContent = `${Math.round(100 * progress)}%`;
|
256 |
+
}).then((unityInstance) => {
|
257 |
+
loadingCover.style.display = "none";
|
258 |
+
window.uarGameInstance = unityInstance;
|
259 |
+
}).catch((message) => {
|
260 |
+
alert(message);
|
261 |
+
});
|
262 |
+
}
|
263 |
+
</script>
|
264 |
+
</body>
|
265 |
+
</html>
|
html/zappar-cv.js
CHANGED
@@ -2688,13 +2688,60 @@
|
|
2688 |
if ((yield re(), _e())) return !0;
|
2689 |
let e = document.createElement("div");
|
2690 |
e.classList.add("zappar-permission-request"),
|
2691 |
-
(e.innerHTML =
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2698 |
document.body.append(e);
|
2699 |
let t = e.querySelector("#zappar-permission-request-button");
|
2700 |
return yield new Promise((r) => {
|
|
|
2688 |
if ((yield re(), _e())) return !0;
|
2689 |
let e = document.createElement("div");
|
2690 |
e.classList.add("zappar-permission-request"),
|
2691 |
+
(e.innerHTML = `
|
2692 |
+
<style>
|
2693 |
+
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@500&display=swap');
|
2694 |
+
|
2695 |
+
.zappar-permission-request {
|
2696 |
+
position: fixed;
|
2697 |
+
width: 100%;
|
2698 |
+
height: 100%;
|
2699 |
+
top: 0px;
|
2700 |
+
left: 0px;
|
2701 |
+
z-index: 1000;
|
2702 |
+
background-color: rgba(248, 225, 244, 1);
|
2703 |
+
font-family: 'Bai Jamjuree', sans-serif;
|
2704 |
+
color: #3A457D;
|
2705 |
+
display: flex;
|
2706 |
+
flex-direction: column;
|
2707 |
+
align-items: center;
|
2708 |
+
justify-content: center;
|
2709 |
+
}
|
2710 |
+
.zappar-inner {
|
2711 |
+
max-width: 400px;
|
2712 |
+
text-align: center;
|
2713 |
+
}
|
2714 |
+
.zappar-title {
|
2715 |
+
font-size: 20px;
|
2716 |
+
}
|
2717 |
+
.zappar-text {
|
2718 |
+
font-size: 14px;
|
2719 |
+
padding: 15px;
|
2720 |
+
}
|
2721 |
+
.zappar-inner > button {
|
2722 |
+
background-color: white;
|
2723 |
+
outline: none;
|
2724 |
+
border: 1px solid #3A457D;
|
2725 |
+
border-radius: 5px;
|
2726 |
+
color: #3A457D;
|
2727 |
+
padding: 10px 40px;
|
2728 |
+
font-family: 'Bai Jamjuree', sans-serif;
|
2729 |
+
text-transform: uppercase;
|
2730 |
+
box-shadow: 4px 4px #3A457D;
|
2731 |
+
}
|
2732 |
+
.zappar-inner > button:active {
|
2733 |
+
transform: translate(4px, 4px);
|
2734 |
+
box-shadow: 0 0px #3A457D;
|
2735 |
+
}
|
2736 |
+
</style>
|
2737 |
+
<div class="zappar-inner">
|
2738 |
+
<div class="zappar-title">${Z(Y.PermissionTitle)}</div>
|
2739 |
+
<div class="zappar-text">${Z(Y.PermissionDescription)}</div>
|
2740 |
+
<button id="zappar-permission-request-button">${Z(
|
2741 |
+
Y.PermissionButton
|
2742 |
+
)}</button>
|
2743 |
+
</div>
|
2744 |
+
`),
|
2745 |
document.body.append(e);
|
2746 |
let t = e.querySelector("#zappar-permission-request-button");
|
2747 |
return yield new Promise((r) => {
|