Clone04 commited on
Commit
92c6416
·
verified ·
1 Parent(s): 8423c15

Upload 11 files

Browse files
.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
- <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>VirtualTryOn</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 + "/33050ea7c3fd0dc8ee2d4c1203e4541f.loader.js";
141
- const config = {
142
- dataUrl: buildUrl + "/3af75ddd8c2802fdd7fbf1eb48a2b37e.data.br",
143
- frameworkUrl: buildUrl + "/2bf33c6bee1953a469e389a9b96b6b2f.framework.js.br",
144
- codeUrl: buildUrl + "/261f404da3aefa4b1766740784d17a3c.wasm.br",
145
- streamingAssetsUrl: "StreamingAssets",
146
- companyName: "DefaultCompany",
147
- productName: "VirtualTryOn",
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 "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
- 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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 = `\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n max-width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">${Z(
2692
- Y.PermissionTitle
2693
- )}</div>\n <div class="zappar-text">${Z(
2694
- Y.PermissionDescription
2695
- )}</div>\n <button id="zappar-permission-request-button">${Z(
2696
- Y.PermissionButton
2697
- )}</button>\n </div>\n`),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) => {