jbilcke-hf HF staff commited on
Commit
2b96520
·
verified ·
1 Parent(s): 432cf7e

Upload 39 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ screenshot.jpg filter=lfs diff=lfs merge=lfs -text
background.jpg ADDED
fonts/MrEavesXLModNarOT-Bold.woff ADDED
Binary file (55.1 kB). View file
 
fonts/MrEavesXLModNarOT-Bold.woff2 ADDED
Binary file (38 kB). View file
 
fonts/MrEavesXLModNarOT-Book.woff ADDED
Binary file (55.3 kB). View file
 
fonts/MrEavesXLModNarOT-Book.woff2 ADDED
Binary file (37.3 kB). View file
 
fonts/MrEavesXLModNarOT-Light.woff ADDED
Binary file (54.7 kB). View file
 
fonts/MrEavesXLModNarOT-Light.woff2 ADDED
Binary file (37.3 kB). View file
 
fonts/MrEavesXLModNarOT-Reg.woff ADDED
Binary file (55.2 kB). View file
 
fonts/MrEavesXLModNarOT-Reg.woff2 ADDED
Binary file (37.9 kB). View file
 
fonts/MrEavesXLModNarOT-Thin.woff ADDED
Binary file (55.7 kB). View file
 
fonts/MrEavesXLModNarOT-Thin.woff2 ADDED
Binary file (37.8 kB). View file
 
fonts/MrEavesXLModOT-Bold.woff ADDED
Binary file (54.7 kB). View file
 
fonts/MrEavesXLModOT-Bold.woff2 ADDED
Binary file (37.3 kB). View file
 
fonts/MrEavesXLModOT-Book.woff ADDED
Binary file (55.3 kB). View file
 
fonts/MrEavesXLModOT-Book.woff2 ADDED
Binary file (38 kB). View file
 
fonts/MrEavesXLModOT-Light.woff ADDED
Binary file (55.9 kB). View file
 
fonts/MrEavesXLModOT-Light.woff2 ADDED
Binary file (38 kB). View file
 
fonts/MrEavesXLModOT-Reg.woff ADDED
Binary file (54.1 kB). View file
 
fonts/MrEavesXLModOT-Reg.woff2 ADDED
Binary file (37.3 kB). View file
 
fonts/MrEavesXLModOT-Thin.woff ADDED
Binary file (55.8 kB). View file
 
fonts/MrEavesXLModOT-Thin.woff2 ADDED
Binary file (38.2 kB). View file
 
fonts/demo.html ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <meta name="robots" content="noindex, noarchive">
8
+ <meta name="format-detection" content="telephone=no">
9
+ <title>Transfonter demo</title>
10
+ <link href="stylesheet.css" rel="stylesheet">
11
+ <style>
12
+ /*
13
+ http://meyerweb.com/eric/tools/css/reset/
14
+ v2.0 | 20110126
15
+ License: none (public domain)
16
+ */
17
+ html, body, div, span, applet, object, iframe,
18
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
19
+ a, abbr, acronym, address, big, cite, code,
20
+ del, dfn, em, img, ins, kbd, q, s, samp,
21
+ small, strike, strong, sub, sup, tt, var,
22
+ b, u, i, center,
23
+ dl, dt, dd, ol, ul, li,
24
+ fieldset, form, label, legend,
25
+ table, caption, tbody, tfoot, thead, tr, th, td,
26
+ article, aside, canvas, details, embed,
27
+ figure, figcaption, footer, header, hgroup,
28
+ menu, nav, output, ruby, section, summary,
29
+ time, mark, audio, video {
30
+ margin: 0;
31
+ padding: 0;
32
+ border: 0;
33
+ font-size: 100%;
34
+ font: inherit;
35
+ vertical-align: baseline;
36
+ }
37
+ /* HTML5 display-role reset for older browsers */
38
+ article, aside, details, figcaption, figure,
39
+ footer, header, hgroup, menu, nav, section {
40
+ display: block;
41
+ }
42
+ body {
43
+ line-height: 1;
44
+ }
45
+ ol, ul {
46
+ list-style: none;
47
+ }
48
+ blockquote, q {
49
+ quotes: none;
50
+ }
51
+ blockquote:before, blockquote:after,
52
+ q:before, q:after {
53
+ content: '';
54
+ content: none;
55
+ }
56
+ table {
57
+ border-collapse: collapse;
58
+ border-spacing: 0;
59
+ }
60
+ /* demo styles */
61
+ body {
62
+ background: #f0f0f0;
63
+ color: #000;
64
+ }
65
+ .page {
66
+ background: #fff;
67
+ width: 920px;
68
+ margin: 0 auto;
69
+ padding: 20px 20px 0 20px;
70
+ overflow: hidden;
71
+ }
72
+ .font-container {
73
+ overflow-x: auto;
74
+ overflow-y: hidden;
75
+ margin-bottom: 40px;
76
+ line-height: 1.3;
77
+ white-space: nowrap;
78
+ padding-bottom: 5px;
79
+ }
80
+ h1 {
81
+ position: relative;
82
+ background: #444;
83
+ font-size: 32px;
84
+ color: #fff;
85
+ padding: 10px 20px;
86
+ margin: 0 -20px 12px -20px;
87
+ }
88
+ .letters {
89
+ font-size: 25px;
90
+ margin-bottom: 20px;
91
+ }
92
+ .s10:before {
93
+ content: '10px';
94
+ }
95
+ .s11:before {
96
+ content: '11px';
97
+ }
98
+ .s12:before {
99
+ content: '12px';
100
+ }
101
+ .s14:before {
102
+ content: '14px';
103
+ }
104
+ .s18:before {
105
+ content: '18px';
106
+ }
107
+ .s24:before {
108
+ content: '24px';
109
+ }
110
+ .s30:before {
111
+ content: '30px';
112
+ }
113
+ .s36:before {
114
+ content: '36px';
115
+ }
116
+ .s48:before {
117
+ content: '48px';
118
+ }
119
+ .s60:before {
120
+ content: '60px';
121
+ }
122
+ .s72:before {
123
+ content: '72px';
124
+ }
125
+ .s10:before, .s11:before, .s12:before, .s14:before,
126
+ .s18:before, .s24:before, .s30:before, .s36:before,
127
+ .s48:before, .s60:before, .s72:before {
128
+ font-family: Arial, sans-serif;
129
+ font-size: 10px;
130
+ font-weight: normal;
131
+ font-style: normal;
132
+ color: #999;
133
+ padding-right: 6px;
134
+ }
135
+ pre {
136
+ display: block;
137
+ padding: 9px;
138
+ margin: 0 0 12px;
139
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
140
+ font-size: 13px;
141
+ line-height: 1.428571429;
142
+ color: #333;
143
+ font-weight: normal;
144
+ font-style: normal;
145
+ background-color: #f5f5f5;
146
+ border: 1px solid #ccc;
147
+ overflow-x: auto;
148
+ border-radius: 4px;
149
+ }
150
+ /* responsive */
151
+ @media (max-width: 959px) {
152
+ .page {
153
+ width: auto;
154
+ margin: 0;
155
+ }
156
+ }
157
+ </style>
158
+ </head>
159
+ <body>
160
+ <div class="page">
161
+ <div class="demo">
162
+ <h1 style="font-family: 'MrEavesXLModOT-Book'; font-weight: normal; font-style: normal;">☞MrEavesXLModOT-Book</h1>
163
+ <pre title="Usage">.your-style {
164
+ font-family: 'MrEavesXLModOT-Book';
165
+ font-weight: normal;
166
+ font-style: normal;
167
+ }</pre>
168
+ <pre title="Preload (optional)">
169
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModOT-Book.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
170
+ <div class="font-container" style="font-family: 'MrEavesXLModOT-Book'; font-weight: normal; font-style: normal;">
171
+ <p class="letters">
172
+ abcdefghijklmnopqrstuvwxyz<br>
173
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
174
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
175
+ </p>
176
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
177
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
178
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
179
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
180
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
181
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
182
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
183
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
184
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
185
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
186
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
187
+ </div>
188
+ </div>
189
+
190
+ <div class="demo">
191
+ <h1 style="font-family: 'MrEavesXLModNarOT'; font-weight: 100; font-style: normal;">☞MrEavesXLModNarOT-Thin</h1>
192
+ <pre title="Usage">.your-style {
193
+ font-family: 'MrEavesXLModNarOT';
194
+ font-weight: 100;
195
+ font-style: normal;
196
+ }</pre>
197
+ <pre title="Preload (optional)">
198
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModNarOT-Thin.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
199
+ <div class="font-container" style="font-family: 'MrEavesXLModNarOT'; font-weight: 100; font-style: normal;">
200
+ <p class="letters">
201
+ abcdefghijklmnopqrstuvwxyz<br>
202
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
203
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
204
+ </p>
205
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
206
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
207
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
208
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
209
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
210
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
211
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
212
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
213
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
214
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
215
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
216
+ </div>
217
+ </div>
218
+
219
+ <div class="demo">
220
+ <h1 style="font-family: 'MrEavesXLModOT'; font-weight: bold; font-style: normal;">☞MrEavesXLModOT-Bold</h1>
221
+ <pre title="Usage">.your-style {
222
+ font-family: 'MrEavesXLModOT';
223
+ font-weight: bold;
224
+ font-style: normal;
225
+ }</pre>
226
+ <pre title="Preload (optional)">
227
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModOT-Bold.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
228
+ <div class="font-container" style="font-family: 'MrEavesXLModOT'; font-weight: bold; font-style: normal;">
229
+ <p class="letters">
230
+ abcdefghijklmnopqrstuvwxyz<br>
231
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
232
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
233
+ </p>
234
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
235
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
236
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
237
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
238
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
239
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
240
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
241
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
242
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
243
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
244
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
245
+ </div>
246
+ </div>
247
+
248
+ <div class="demo">
249
+ <h1 style="font-family: 'MrEavesXLModNarOT'; font-weight: bold; font-style: normal;">☞MrEavesXLModNarOT-Bold</h1>
250
+ <pre title="Usage">.your-style {
251
+ font-family: 'MrEavesXLModNarOT';
252
+ font-weight: bold;
253
+ font-style: normal;
254
+ }</pre>
255
+ <pre title="Preload (optional)">
256
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModNarOT-Bold.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
257
+ <div class="font-container" style="font-family: 'MrEavesXLModNarOT'; font-weight: bold; font-style: normal;">
258
+ <p class="letters">
259
+ abcdefghijklmnopqrstuvwxyz<br>
260
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
261
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
262
+ </p>
263
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
264
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
265
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
266
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
267
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
268
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
269
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
270
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
271
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
272
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
273
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
274
+ </div>
275
+ </div>
276
+
277
+ <div class="demo">
278
+ <h1 style="font-family: 'MrEavesXLModNarOT-Reg'; font-weight: normal; font-style: normal;">☞MrEavesXLModNarOT-Reg</h1>
279
+ <pre title="Usage">.your-style {
280
+ font-family: 'MrEavesXLModNarOT-Reg';
281
+ font-weight: normal;
282
+ font-style: normal;
283
+ }</pre>
284
+ <pre title="Preload (optional)">
285
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModNarOT-Reg.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
286
+ <div class="font-container" style="font-family: 'MrEavesXLModNarOT-Reg'; font-weight: normal; font-style: normal;">
287
+ <p class="letters">
288
+ abcdefghijklmnopqrstuvwxyz<br>
289
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
290
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
291
+ </p>
292
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
293
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
294
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
295
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
296
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
297
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
298
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
299
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
300
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
301
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
302
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
303
+ </div>
304
+ </div>
305
+
306
+ <div class="demo">
307
+ <h1 style="font-family: 'MrEavesXLModOT'; font-weight: 100; font-style: normal;">☞MrEavesXLModOT-Thin</h1>
308
+ <pre title="Usage">.your-style {
309
+ font-family: 'MrEavesXLModOT';
310
+ font-weight: 100;
311
+ font-style: normal;
312
+ }</pre>
313
+ <pre title="Preload (optional)">
314
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModOT-Thin.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
315
+ <div class="font-container" style="font-family: 'MrEavesXLModOT'; font-weight: 100; font-style: normal;">
316
+ <p class="letters">
317
+ abcdefghijklmnopqrstuvwxyz<br>
318
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
319
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
320
+ </p>
321
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
322
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
323
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
324
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
325
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
326
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
327
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
328
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
329
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
330
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
331
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
332
+ </div>
333
+ </div>
334
+
335
+ <div class="demo">
336
+ <h1 style="font-family: 'MrEavesXLModOT'; font-weight: 300; font-style: normal;">☞MrEavesXLModOT-Light</h1>
337
+ <pre title="Usage">.your-style {
338
+ font-family: 'MrEavesXLModOT';
339
+ font-weight: 300;
340
+ font-style: normal;
341
+ }</pre>
342
+ <pre title="Preload (optional)">
343
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModOT-Light.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
344
+ <div class="font-container" style="font-family: 'MrEavesXLModOT'; font-weight: 300; font-style: normal;">
345
+ <p class="letters">
346
+ abcdefghijklmnopqrstuvwxyz<br>
347
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
348
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
349
+ </p>
350
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
351
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
352
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
353
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
354
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
355
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
356
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
357
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
358
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
359
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
360
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
361
+ </div>
362
+ </div>
363
+
364
+ <div class="demo">
365
+ <h1 style="font-family: 'MrEavesXLModNarOT-Book'; font-weight: normal; font-style: normal;">☞MrEavesXLModNarOT-Book</h1>
366
+ <pre title="Usage">.your-style {
367
+ font-family: 'MrEavesXLModNarOT-Book';
368
+ font-weight: normal;
369
+ font-style: normal;
370
+ }</pre>
371
+ <pre title="Preload (optional)">
372
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModNarOT-Book.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
373
+ <div class="font-container" style="font-family: 'MrEavesXLModNarOT-Book'; font-weight: normal; font-style: normal;">
374
+ <p class="letters">
375
+ abcdefghijklmnopqrstuvwxyz<br>
376
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
377
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
378
+ </p>
379
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
380
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
381
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
382
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
383
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
384
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
385
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
386
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
387
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
388
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
389
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
390
+ </div>
391
+ </div>
392
+
393
+ <div class="demo">
394
+ <h1 style="font-family: 'MrEavesXLModNarOT'; font-weight: 300; font-style: normal;">☞MrEavesXLModNarOT-Light</h1>
395
+ <pre title="Usage">.your-style {
396
+ font-family: 'MrEavesXLModNarOT';
397
+ font-weight: 300;
398
+ font-style: normal;
399
+ }</pre>
400
+ <pre title="Preload (optional)">
401
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModNarOT-Light.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
402
+ <div class="font-container" style="font-family: 'MrEavesXLModNarOT'; font-weight: 300; font-style: normal;">
403
+ <p class="letters">
404
+ abcdefghijklmnopqrstuvwxyz<br>
405
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
406
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
407
+ </p>
408
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
409
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
410
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
411
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
412
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
413
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
414
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
415
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
416
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
417
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
418
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
419
+ </div>
420
+ </div>
421
+
422
+ <div class="demo">
423
+ <h1 style="font-family: 'MrEavesXLModOT-Reg'; font-weight: normal; font-style: normal;">☞MrEavesXLModOT-Reg</h1>
424
+ <pre title="Usage">.your-style {
425
+ font-family: 'MrEavesXLModOT-Reg';
426
+ font-weight: normal;
427
+ font-style: normal;
428
+ }</pre>
429
+ <pre title="Preload (optional)">
430
+ &lt;link rel=&quot;preload&quot; href=&quot;MrEavesXLModOT-Reg.woff2&quot; as=&quot;font&quot; type=&quot;font/woff2&quot; crossorigin&gt;</pre>
431
+ <div class="font-container" style="font-family: 'MrEavesXLModOT-Reg'; font-weight: normal; font-style: normal;">
432
+ <p class="letters">
433
+ abcdefghijklmnopqrstuvwxyz<br>
434
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
435
+ 0123456789.:,;()*!?'@#&lt;&gt;$%&^+-=~
436
+ </p>
437
+ <p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
438
+ <p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
439
+ <p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
440
+ <p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
441
+ <p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
442
+ <p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
443
+ <p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
444
+ <p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
445
+ <p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
446
+ <p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
447
+ <p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
448
+ </div>
449
+ </div>
450
+
451
+ </div>
452
+ </body>
453
+ </html>
fonts/stylesheet.css ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'MrEavesXLModOT-Book';
3
+ src: url('MrEavesXLModOT-Book.woff2') format('woff2'),
4
+ url('MrEavesXLModOT-Book.woff') format('woff');
5
+ font-weight: normal;
6
+ font-style: normal;
7
+ font-display: swap;
8
+ }
9
+
10
+ @font-face {
11
+ font-family: 'MrEavesXLModNarOT';
12
+ src: url('MrEavesXLModNarOT-Thin.woff2') format('woff2'),
13
+ url('MrEavesXLModNarOT-Thin.woff') format('woff');
14
+ font-weight: 100;
15
+ font-style: normal;
16
+ font-display: swap;
17
+ }
18
+
19
+ @font-face {
20
+ font-family: 'MrEavesXLModOT';
21
+ src: url('MrEavesXLModOT-Bold.woff2') format('woff2'),
22
+ url('MrEavesXLModOT-Bold.woff') format('woff');
23
+ font-weight: bold;
24
+ font-style: normal;
25
+ font-display: swap;
26
+ }
27
+
28
+ @font-face {
29
+ font-family: 'MrEavesXLModNarOT';
30
+ src: url('MrEavesXLModNarOT-Bold.woff2') format('woff2'),
31
+ url('MrEavesXLModNarOT-Bold.woff') format('woff');
32
+ font-weight: bold;
33
+ font-style: normal;
34
+ font-display: swap;
35
+ }
36
+
37
+ @font-face {
38
+ font-family: 'MrEavesXLModNarOT-Reg';
39
+ src: url('MrEavesXLModNarOT-Reg.woff2') format('woff2'),
40
+ url('MrEavesXLModNarOT-Reg.woff') format('woff');
41
+ font-weight: normal;
42
+ font-style: normal;
43
+ font-display: swap;
44
+ }
45
+
46
+ @font-face {
47
+ font-family: 'MrEavesXLModOT';
48
+ src: url('MrEavesXLModOT-Thin.woff2') format('woff2'),
49
+ url('MrEavesXLModOT-Thin.woff') format('woff');
50
+ font-weight: 100;
51
+ font-style: normal;
52
+ font-display: swap;
53
+ }
54
+
55
+ @font-face {
56
+ font-family: 'MrEavesXLModOT';
57
+ src: url('MrEavesXLModOT-Light.woff2') format('woff2'),
58
+ url('MrEavesXLModOT-Light.woff') format('woff');
59
+ font-weight: 300;
60
+ font-style: normal;
61
+ font-display: swap;
62
+ }
63
+
64
+ @font-face {
65
+ font-family: 'MrEavesXLModNarOT-Book';
66
+ src: url('MrEavesXLModNarOT-Book.woff2') format('woff2'),
67
+ url('MrEavesXLModNarOT-Book.woff') format('woff');
68
+ font-weight: normal;
69
+ font-style: normal;
70
+ font-display: swap;
71
+ }
72
+
73
+ @font-face {
74
+ font-family: 'MrEavesXLModNarOT';
75
+ src: url('MrEavesXLModNarOT-Light.woff2') format('woff2'),
76
+ url('MrEavesXLModNarOT-Light.woff') format('woff');
77
+ font-weight: 300;
78
+ font-style: normal;
79
+ font-display: swap;
80
+ }
81
+
82
+ @font-face {
83
+ font-family: 'MrEavesXLModOT-Reg';
84
+ src: url('MrEavesXLModOT-Reg.woff2') format('woff2'),
85
+ url('MrEavesXLModOT-Reg.woff') format('woff');
86
+ font-weight: normal;
87
+ font-style: normal;
88
+ font-display: swap;
89
+ }
90
+
index.html CHANGED
@@ -1,19 +1,850 @@
1
- <!doctype html>
2
  <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
  <html>
3
+
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+
7
+ <title>Compliance</title>
8
+
9
+ <link rel="preload" href="fonts/MrEavesXLModOT-Book.woff2" as="font" type="font/woff2" crossorigin>
10
+ <link rel="preload" href="fonts/MrEavesXLModNarOT-Thin.woff2" as="font" type="font/woff2" crossorigin>
11
+ <link rel="preload" href="fonts/MrEavesXLModOT-Bold.woff2" as="font" type="font/woff2" crossorigin>
12
+ <link rel="preload" href="fonts/MrEavesXLModNarOT-Bold.woff2" as="font" type="font/woff2" crossorigin>
13
+ <link rel="preload" href="fonts/MrEavesXLModNarOT-Reg.woff2" as="font" type="font/woff2" crossorigin>
14
+ <link rel="preload" href="fonts/MrEavesXLModOT-Thin.woff2" as="font" type="font/woff2" crossorigin>
15
+ <link rel="preload" href="fonts/MrEavesXLModOT-Light.woff2" as="font" type="font/woff2" crossorigin>
16
+ <link rel="preload" href="fonts/MrEavesXLModNarOT-Book.woff2" as="font" type="font/woff2" crossorigin>
17
+ <link rel="preload" href="fonts/MrEavesXLModNarOT-Light.woff2" as="font" type="font/woff2" crossorigin>
18
+ <link rel="preload" href="fonts/MrEavesXLModOT-Reg.woff2" as="font" type="font/woff2" crossorigin>
19
+
20
+ <script src="libs/dat.gui.min.js"></script>
21
+ <script src="libs/ammo.js"></script>
22
+ <script src="libs/cannon.js"></script>
23
+ <script src="libs/Oimo.js"></script>
24
+ <script src="libs/earcut.min.js"></script>
25
+ <script src="libs/babylon.js"></script>
26
+ <script src="libs/babylonjs.materials.min.js"></script>
27
+ <script src="libs/babylonjs.proceduralTextures.min.js"></script>
28
+ <script src="libs/babylonjs.postProcess.min.js"></script>
29
+ <script src="libs/babylonjs.loaders.js"></script>
30
+ <script src="libs/babylonjs.serializers.min.js"></script>
31
+ <script src="libs/babylon.gui.min.js"></script>
32
+ <script src="libs/babylon.inspector.bundle.js"></script>
33
+ <link href="fonts/stylesheet.css" rel="stylesheet">
34
+ <style>
35
+ /*
36
+ all this CSS is just quick & dirty, support of multiple resolutions is not a focus right now
37
+ also it is pretty difficult to do, since we use a virtual resolution to replicate a CRT,
38
+ so some resolutions will display a moiré effect and similar weird other patterns
39
+ */
40
+ html,
41
+ body {
42
+ overflow: hidden;
43
+ width: 100%;
44
+ height: 100%;
45
+ margin: 0;
46
+ padding: 0;
47
+ background-color: rgb(0, 11, 31);
48
+ background-image: url(./background.jpg);
49
+ background-position-y: -200px;
50
+ background-position-x: -392px;
51
+ background-size: 2980px;
52
+
53
+ font-family: 'MrEavesXLModNarOT-Reg';
54
+ font-weight: normal;
55
+ font-style: normal;
56
+ }
57
+
58
+ .wrapper {
59
+ position: fixed;
60
+ top: 0px;
61
+ left: 135px;
62
+
63
+ overflow: hidden;
64
+ /* width: 100%;
65
+ height: 100%;
66
+ */
67
+ margin: 0;
68
+ padding: 0;
69
+ outline: none;
70
+ }
71
+
72
+ #renderCanvas {
73
+ /* screen ratio is 4:3 (1.33)
74
+ width: 426px;
75
+ height: 320px;
76
+
77
+ width: 1024px;
78
+ height: 820px;
79
+ */
80
+ width: 1280px;
81
+ height: 1024px;
82
+
83
+ touch-action: none;
84
+ outline: none;
85
+ border-radius: 120px;
86
+
87
+ /* transform: scale(0.8); */
88
+ }
89
+
90
+ /*
91
+ @media only screen and (max-width: 600px) {
92
+ #renderCanvas {
93
+ width: 511px;
94
+ height: 384px;
95
+ }
96
+ }
97
+
98
+ @media only screen and (min-width: 600px) {
99
+ #renderCanvas {
100
+ width: 640px;
101
+ height: 480px;
102
+ }
103
+ }
104
+
105
+ @media only screen and (min-width: 800px) {
106
+ #renderCanvas {
107
+ width: 800px;
108
+ height: 640px;
109
+ }
110
+ }
111
+
112
+ @media only screen and (min-width: 1024px) {
113
+ #renderCanvas {
114
+ width: 1024px;
115
+ height: 820px;
116
+ }
117
+ }
118
+ */
119
+ </style>
120
+ </head>
121
+
122
+ <body>
123
+ <div class="wrapper"><canvas id="renderCanvas"></canvas></div>
124
+ <script>
125
+ const config = {
126
+ // CRET screen resolution needs to be half of the actual resolution
127
+ crt: {
128
+ screenResolution: {
129
+ width: 800, // 486, 512, 640
130
+ height: 800, // 320, 480, 512, 640
131
+ }
132
+ },
133
+ window: {
134
+ width: 1280,
135
+ height: 1024
136
+ }
137
+ };
138
+ function toggleFullScreen() {
139
+ if (!document.fullscreenElement) {
140
+ document.documentElement.requestFullscreen();
141
+ } else {
142
+ if (document.exitFullscreen) {
143
+ document.exitFullscreen();
144
+ }
145
+ }
146
+ }
147
+
148
+ document.addEventListener("keydown", function(e) {
149
+ if (e.keyCode == 13) {
150
+ toggleFullScreen();
151
+ }
152
+ }, false);
153
+
154
+ const randomMutation = (value, probability = 1) => {
155
+ const r = Math.random();
156
+ return (r < probability || typeof value !== 'number') ? r : value;
157
+ }
158
+
159
+ const newRandomDigit = (digit) => {
160
+ digit.randomWobbleAmplitudeX = Math.random();
161
+ digit.randomWobbleAmplitudeY = Math.random();
162
+ digit.randomTimeShiftX = Math.random();
163
+ digit.randomTimeShiftY = Math.random();
164
+ digit.randomWobbleSpeedX = Math.random();
165
+ digit.randomWobbleSpeedY = Math.random();
166
+ }
167
+
168
+ const randomDigitMutation = (digit, probability) => {
169
+ digit.randomWobbleSpeedX = randomMutation(digit.randomWobbleSpeedX, probability);
170
+ digit.randomWobbleSpeedY = randomMutation(digit.randomWobbleSpeedY, probability);
171
+ }
172
+
173
+ var canvas = document.getElementById("renderCanvas");
174
+
175
+ var startRenderLoop = function (engine, canvas) {
176
+ engine.runRenderLoop(function () {
177
+ if (sceneToRender && sceneToRender.activeCamera) {
178
+ sceneToRender.render();
179
+ }
180
+ });
181
+ };
182
+
183
+ // get an "ajusted" size in pixel
184
+ // eg. if we want 9 "virtual pixels" we will need to have a larger size
185
+ const getFontSize = (size) => {
186
+ return Math.round(size * (window.innerHeight / config.crt.screenResolution.height));
187
+ }
188
+
189
+ // get an "ajusted" size in pixel
190
+ // eg. if we want 9 "virtual pixels" we will need to have a larger size
191
+ const getSize = (x, y) => {
192
+ var wRatio = window.innerWidth / config.crt.screenResolution.width;
193
+ var hRatio = window.innerHeight / config.crt.screenResolution.height;
194
+ return {
195
+ x: Math.round(x * wRatio),
196
+ y: Math.round(y * hRatio),
197
+ };
198
+ }
199
+
200
+
201
+ var engine = null;
202
+ var scene = null;
203
+ var sceneToRender = null;
204
+ var createDefaultEngine = function () {
205
+ return new BABYLON.Engine(canvas, true, { preserveDrawingBuffer: true, stencil: true, disableWebGL2Support: false });
206
+ };
207
+ var createScene = function () {
208
+
209
+ // engine.setHardwareScalingLevel(1);
210
+
211
+ var scene = new BABYLON.Scene(engine);
212
+ var gl = new BABYLON.GlowLayer("glow", scene);
213
+ gl.intensity = 0.5;
214
+
215
+ const backgroundBlue = new BABYLON.Color3(0, 0.04, 0.07);
216
+ const darkBlue = new BABYLON.Color3(0, 0.16, 0.28);
217
+ const deepBlue = new BABYLON.Color3(0, 0.156, 0.313);
218
+ const lightBlue = new BABYLON.Color3(0.062, 0.564, 0.690);
219
+ const brightBlue = new BABYLON.Color3(0.360, 0.768, 0.823);
220
+
221
+
222
+ scene.clearColor = backgroundBlue;
223
+
224
+ // This creates and positions a free camera (non-mesh)
225
+ var camera = new BABYLON.UniversalCamera("UniversalCamera", new BABYLON.Vector3(0, 0, -10), scene);
226
+ camera.lowerRadiusLimit = camera.radius;
227
+ camera.upperRadiusLimit = camera.radius;
228
+
229
+ // This targets the camera to scene origin
230
+ camera.setTarget(BABYLON.Vector3.Zero());
231
+
232
+ // This attaches the camera to the canvas
233
+ camera.attachControl(canvas, true);
234
+
235
+ // This creates a light, aiming 0,1,0 - to the sky (non-mesh)
236
+ var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
237
+
238
+ // Default intensity is 1. Let's dim the light a small amount
239
+ light.intensity = 1;
240
+
241
+
242
+ // Our built-in 'ground' shape.
243
+ // var ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 6, height: 6 }, scene);
244
+ // Ground
245
+ const width = 100;
246
+ const height = 100;
247
+ const subdivisions = 100;
248
+ var ground = BABYLON.MeshBuilder.CreateGround("ground", { width, height, subdivisions }, scene, false);
249
+ var groundMaterial = new BABYLON.GridMaterial("ground", scene);
250
+ ground.material = groundMaterial;
251
+ ground.updateFacetData();
252
+
253
+
254
+ // GUI
255
+ const advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
256
+
257
+
258
+ /*
259
+ var button = BABYLON.GUI.Button.CreateImageButton("but", "Click Me");
260
+ button.width = 0.2;
261
+ button.height = "80px";
262
+ button.color = "white";
263
+ button.background = "green";
264
+ advancedTexture.addControl(button);
265
+ */
266
+
267
+ const matrix = [];
268
+ const matrixSize = 28;
269
+
270
+ let matrixTop = -500;
271
+ let matrixLeft = -500;
272
+ const matrixSpacing = 24;
273
+
274
+ let isDragging = false;
275
+ let isSelecting = false;
276
+
277
+ let lastMouseX = 0;
278
+ let lastMouseY = 0;
279
+
280
+ // speed of the wobble effect
281
+ const minWobbleAmplitude = 0;
282
+ const maxWobbleAmplitude = 10;
283
+
284
+ const lowFreqWobbleTimeMin = 0.001;
285
+ const lowFreqWobbleTimeMax = 0.005;
286
+
287
+ // speed of the wobble effect
288
+ const minWobbleSpeed = 0.0005;
289
+ const maxWobbleSpeed = 0.0010;
290
+
291
+ // we want to "desync" wobble effect by giving them different time periods (not just different speeds)
292
+ const minTimeShift = 5000; // may individual shift for animation
293
+ const maxTimeShift = 7000; // may individual shift for animation
294
+
295
+
296
+
297
+ let scale = 2; // between 0 and 200
298
+
299
+ for (let i = 0; i < matrixSize; i++) {
300
+ const row = [];
301
+ for (let j = 0; j < matrixSize; j++) {
302
+ var digit = new BABYLON.GUI.TextBlock();
303
+ row.push(digit);
304
+ digit.value = Math.round(Math.random() * 9);
305
+
306
+ digit.color = "rgb(50, 253, 254)";
307
+ digit.height = `${Math.round(scale * 128)}px`;
308
+
309
+ // Style
310
+ const style = advancedTexture.createStyle();
311
+ style.fontSize = getFontSize(12);
312
+ style.fontFamily = 'MrEavesXLModOT-Book';
313
+ // style.fontStyle = "bold";
314
+ digit.style = style;
315
+
316
+ digit.top = `${Math.round(scale * (matrixTop + i * matrixSpacing))}px`;
317
+ digit.left = `${Math.round(scale * (matrixLeft + j * matrixSpacing))}px`;
318
+
319
+ digit.text = `${digit.value}`;
320
+ // digit.text = `(${digit.left}, ${digit.top})`;
321
+ digit.selected = false;
322
+
323
+ // force random mutation upon all digit variable fields
324
+ newRandomDigit(digit);
325
+
326
+ advancedTexture.addControl(digit);
327
+ }
328
+ matrix.push(row);
329
+ }
330
+
331
+ const bgColor = "rgb(0, 10, 17)";
332
+ const fgColor = "rgb(50, 253, 254)";
333
+ const dbgColor = "rgb(200, 80, 20)";
334
+
335
+ const engineWidth = engine.getRenderWidth();
336
+ const engineHeight = engine.getRenderHeight();
337
+
338
+ const header = new BABYLON.GUI.Rectangle();
339
+ // header.left = 0;
340
+ // header.top = 0;
341
+ header.width = "100%";
342
+ header.height = `${Math.round(engineHeight * 0.20)}px`;
343
+ header.thickness = 0;
344
+ header.background = bgColor; // "rgb(0, 10, 17)"; // "transparent";
345
+ // header.paddingBottom = 5;
346
+ // header.paddingRight = 5;
347
+ header.horizontalAlignment = 0;
348
+ header.verticalAlignment = 0;
349
+ advancedTexture.addControl(header);
350
+
351
+ const titleBox = new BABYLON.GUI.Rectangle();
352
+ titleBox.left = "-5%";
353
+ titleBox.top = `${70}px`;
354
+ titleBox.width = "90%";
355
+ titleBox.height = `${70}px`;
356
+ titleBox.color = fgColor;
357
+ titleBox.thickness = 2;
358
+ titleBox.background = "transparent";
359
+ titleBox.horizontalAlignment = 1;
360
+ titleBox.verticalAlignment = 0; // 3;
361
+
362
+ header.addControl(titleBox);
363
+
364
+
365
+ var titleText = new BABYLON.GUI.TextBlock();
366
+
367
+ titleText.color = fgColor;
368
+ titleText.height = `${100}px`;
369
+
370
+ // Style
371
+ const titleStyle = advancedTexture.createStyle();
372
+ titleStyle.fontSize = getFontSize(45);
373
+ titleStyle.fontFamily = 'MrEavesXLModOT-Book';
374
+ // titleStyle.fontStyle = "bold";
375
+ titleText.style = titleStyle;
376
+ titleText.top = `2px`;
377
+ titleText.left = `-43%`;
378
+ titleText.text = `Siena`;
379
+ titleBox.addControl(titleText);
380
+
381
+
382
+
383
+ const headerDoubleBorder = new BABYLON.GUI.Rectangle();
384
+ headerDoubleBorder.left = "-5%";
385
+ headerDoubleBorder.top = `${Math.round((engineHeight * 0.185))}px`;
386
+ headerDoubleBorder.width = "110%";
387
+ headerDoubleBorder.height = "10px";
388
+ headerDoubleBorder.color = fgColor;
389
+ headerDoubleBorder.thickness = 2;
390
+ headerDoubleBorder.background = "transparent";
391
+ headerDoubleBorder.horizontalAlignment = 0;
392
+ headerDoubleBorder.verticalAlignment = 3; // 3;
393
+
394
+ header.addControl(headerDoubleBorder);
395
+
396
+ const footer = new BABYLON.GUI.Rectangle();
397
+ footer.left = 0;
398
+ footer.top = `${Math.round(engineHeight * 0.82)}px`;
399
+ footer.width = "100%";
400
+ footer.height = engineHeight * 0.40;
401
+ footer.thickness = 0;
402
+ footer.background = bgColor; // "rgb(0, 10, 17)"; // "transparent";
403
+ // rect1.paddingBottom = 5;
404
+ // rect1.paddingRight = 5;
405
+ footer.horizontalAlignment = 0;
406
+ footer.verticalAlignment = 0;
407
+ advancedTexture.addControl(footer);
408
+
409
+
410
+ const footerDoubleBorder = new BABYLON.GUI.Rectangle();
411
+ footerDoubleBorder.left = "-5%";
412
+ footerDoubleBorder.top = 0;
413
+ footerDoubleBorder.width = "110%";
414
+ footerDoubleBorder.height = "12px";
415
+ footerDoubleBorder.color = fgColor;
416
+ footerDoubleBorder.thickness = 2;
417
+ footerDoubleBorder.background = "transparent";
418
+ footerDoubleBorder.horizontalAlignment = 0;
419
+ footerDoubleBorder.verticalAlignment = 0; // 3;
420
+
421
+ footer.addControl(footerDoubleBorder);
422
+
423
+
424
+ const dropzones = [];
425
+ const completions = [];
426
+
427
+ const boxesMarginL = engineWidth * 0.06;
428
+ const boxWidth = engineWidth * 0.18;
429
+ const boxSpacingL = engineWidth * 0.008;
430
+
431
+ for (let i = 0; i < 5; i++) {
432
+ const left = boxesMarginL + (i * (boxWidth + boxSpacingL));
433
+ const width = "15%";
434
+ const thickness = 3;
435
+
436
+ const dropzone = new BABYLON.GUI.Rectangle();
437
+ dropzone.left = left;
438
+ dropzone.top = 23;
439
+ dropzone.width = width;
440
+ dropzone.height = `51px`;
441
+ dropzone.cornerRadius = 2;
442
+ dropzone.color = fgColor;
443
+ dropzone.thickness = thickness;
444
+ dropzone.background = "transparent";
445
+ // rect1.paddingBottom = 5;
446
+ // rect1.paddingRight = 5;
447
+ dropzone.horizontalAlignment = 0;
448
+ dropzone.verticalAlignment = 0;
449
+
450
+ footer.addControl(dropzone);
451
+ dropzones.push(dropzone);
452
+
453
+
454
+
455
+ var category = new BABYLON.GUI.TextBlock();
456
+
457
+ category.color = fgColor;
458
+ category.height = `${100}px`;
459
+
460
+ // Style
461
+ const categoryStyle = advancedTexture.createStyle();
462
+ categoryStyle.fontSize = getFontSize(31);
463
+ categoryStyle.fontFamily = 'Arial';
464
+ // categoryStyle.fontStyle = "bold";
465
+ category.style = categoryStyle;
466
+
467
+ category.top = `2px`;
468
+ category.left = `0px`;
469
+ category.text = `0${i + 1}`;
470
+ dropzone.addControl(category);
471
+
472
+
473
+ const completion = new BABYLON.GUI.Rectangle();
474
+ completion.left = left;
475
+ completion.top = 86;
476
+ completion.width = width;
477
+ completion.height = `40px`;
478
+ completion.cornerRadius = 2;
479
+ completion.color = fgColor;
480
+ completion.thickness = thickness;
481
+ completion.background = "transparent";
482
+ // rect1.paddingBottom = 5;
483
+ // rect1.paddingRight = 5;
484
+ completion.horizontalAlignment = 0;
485
+ completion.verticalAlignment = 0;
486
+
487
+ footer.addControl(completion);
488
+ completions.push(completion);
489
+
490
+ var completionRate = new BABYLON.GUI.TextBlock();
491
+
492
+ completionRate.color = fgColor;
493
+ completionRate.height = `${Math.round(scale * 100)}px`;
494
+
495
+ // Style
496
+ const completionStyle = advancedTexture.createStyle();
497
+ completionStyle.fontSize = getFontSize(32);
498
+ completionStyle.fontFamily = 'MrEavesXLModOT-Book';
499
+ // completionStyle.fontStyle = "bold";
500
+ completionRate.style = completionStyle;
501
+ completionRate.top = `2px`;
502
+ completionRate.left = `-${Math.round(engineWidth * 0.048)}px`;
503
+ completionRate.text = `${0}%`;
504
+ completion.addControl(completionRate);
505
+
506
+ }
507
+
508
+ const footerSeparator = new BABYLON.GUI.Rectangle();
509
+ footerSeparator.left = "-5%";
510
+ footerSeparator.top = 137;
511
+ footerSeparator.width = "110%";
512
+ footerSeparator.height = "2px";
513
+ // rect1.cornerRadius = 20;
514
+ footerSeparator.color = fgColor;
515
+ footerSeparator.thickness = 6;
516
+ footerSeparator.background = "transparent";
517
+ // rect1.paddingBottom = 5;
518
+ // rect1.paddingRight = 5;
519
+ footerSeparator.horizontalAlignment = 0;
520
+ footerSeparator.verticalAlignment = 0;
521
+
522
+ footer.addControl(footerSeparator);
523
+
524
+
525
+ scene.onPointerObservable.add((pointerInfo) => {
526
+ switch (pointerInfo.type) {
527
+ case BABYLON.PointerEventTypes.POINTERDOWN:
528
+ console.log("POINTER DOWN", pointerInfo.event);
529
+ if (pointerInfo.event.button === 0) {
530
+ isSelecting = true;
531
+ isDragging = false;
532
+ } else if (pointerInfo.event.button === 2) {
533
+ isDragging = true;
534
+ isSelecting = false;
535
+ }
536
+ lastMouseX = scene.pointerX;
537
+ lastMouseY = scene.pointerY;
538
+ break;
539
+ case BABYLON.PointerEventTypes.POINTERUP:
540
+ console.log("POINTER UP");
541
+ isSelecting = false;
542
+ isDragging = false;
543
+ break;
544
+ case BABYLON.PointerEventTypes.POINTERMOVE:
545
+ console.log("POINTER MOVE");
546
+ /*
547
+ var pickingInfo = scene.pick(scene.pointerX, scene.pointerY);
548
+ console.log('pointer:', {
549
+ pointerX: scene.pointerX,
550
+ pointerY: scene.pointerY
551
+ });
552
+ */
553
+
554
+ if (isDragging) {
555
+ matrixLeft += (scene.pointerX - lastMouseX) / scale;
556
+ matrixTop += (scene.pointerY - lastMouseY) / scale;
557
+ lastMouseX = scene.pointerX;
558
+ lastMouseY = scene.pointerY;
559
+ }
560
+ break;
561
+ case BABYLON.PointerEventTypes.POINTERWHEEL:
562
+ console.log("POINTER WHEEL");
563
+ break;
564
+ case BABYLON.PointerEventTypes.POINTERPICK:
565
+ console.log("POINTER PICK");
566
+ break;
567
+ case BABYLON.PointerEventTypes.POINTERTAP:
568
+ console.log("POINTER TAP");
569
+ break;
570
+ case BABYLON.PointerEventTypes.POINTERDOUBLETAP:
571
+ console.log("POINTER DOUBLE-TAP");
572
+ break;
573
+ }
574
+ });
575
+
576
+ document.querySelector('#renderCanvas').onwheel = (event) => {
577
+ event.preventDefault();
578
+
579
+ scale += event.deltaY * -0.0005;
580
+
581
+ // Restrict scale
582
+ scale = Math.min(Math.max(2, scale), 6);
583
+ }
584
+
585
+ // TODO should implement virtualization to give the feeling of infinite array
586
+
587
+ scene.onBeforeRenderObservable.add(() => {
588
+ const ts = new Date().getTime();
589
+ // console.log('pop');
590
+ for (let i = 0; i < matrixSize; i++) {
591
+ const row = [];
592
+ for (let j = 0; j < matrixSize; j++) {
593
+ const digit = matrix[i][j];
594
+
595
+ // from time to time, we randomize some of the digit parameters
596
+ // EDIT: disabled, doesn't work like I would like it to be
597
+ // randomDigitMutation(digit, 0.001);
598
+
599
+ // some kind of "CRT" like jitter
600
+ // EDIT: disabled
601
+ const highFreqJitterX = 0; // Math.random() * 1;
602
+ const highFreqJitterY = 0; // Math.random() * 1;
603
+
604
+ // we want to "unsync" digits
605
+ const timeShiftX = minTimeShift + digit.randomTimeShiftX * maxTimeShift;
606
+ const timeShiftY = minTimeShift + digit.randomTimeShiftY * maxTimeShift;
607
+
608
+ // wobble speed
609
+ const wobbleSpeedX = minWobbleSpeed + digit.randomWobbleSpeedX * maxWobbleSpeed;
610
+ const wobbleSpeedY = minWobbleSpeed + digit.randomWobbleSpeedY * maxWobbleSpeed;
611
+
612
+ const wobbleAmplitudeX = minWobbleAmplitude + (digit.randomWobbleAmplitudeX - 0.5) * maxWobbleAmplitude;
613
+ const wobbleAmplitudeY = minWobbleAmplitude + (digit.randomWobbleAmplitudeY - 0.5) * maxWobbleAmplitude;
614
+
615
+ const lowFreqWobbleX = (wobbleAmplitudeX) * Math.cos((timeShiftX + ts) * wobbleSpeedX);
616
+ const lowFreqWobbleY = (wobbleAmplitudeY) * Math.cos((timeShiftY + ts) * wobbleSpeedY);
617
+
618
+ const randomX = highFreqJitterX + lowFreqWobbleX;
619
+ const randomY = highFreqJitterY + lowFreqWobbleY;
620
+
621
+ const newTop = scale * (matrixTop + i * matrixSpacing + randomY);
622
+ const newLeft = scale * (matrixLeft + j * matrixSpacing + randomX);
623
+
624
+ digit.top = `${Math.round(newTop)}px`;
625
+ digit.left = `${Math.round(newLeft)}px`;
626
+
627
+ const screenMouseX = scene.pointerX - engine.getRenderWidth() / 2;
628
+ const screenMouseY = scene.pointerY - engine.getRenderHeight() / 2;
629
+
630
+ const dx = screenMouseX - newLeft;
631
+ const dy = screenMouseY - newTop;
632
+
633
+ const screenDistance = Math.sqrt(dx * dx + dy * dy);
634
+
635
+ // we need to adjust cutoff for the current zoom level
636
+ const cutoff = 40 * scale;
637
+
638
+ // compute the adjusted distance (based on zoom)
639
+ let distance = 1 - (Math.max(1, Math.min(cutoff, screenDistance)) / cutoff);
640
+
641
+ if (isSelecting && (distance > 0.7)) {
642
+ digit.selected = true;
643
+ }
644
+
645
+ // hold selected items
646
+ distance = digit.selected ? 1 : distance;
647
+
648
+ // an hover effect based on mouse distance
649
+ const minHover = 62;
650
+ const maxHover = 74;
651
+ const hoverAmount = minHover + distance * maxHover;
652
+
653
+ digit.height = `${Math.round(scale * (120))}px`;
654
+ digit.style.fontSize = getFontSize(scale * 0.12 * (hoverAmount));
655
+ }
656
+ }
657
+ });
658
+
659
+ BABYLON.Effect.ShadersStore["crtFragmentShader"] = `
660
+ #ifdef GL_ES
661
+ precision highp float;
662
+ #endif
663
+
664
+ #define PI 3.1415926538
665
+
666
+ // Samplers
667
+ varying vec2 vUV;
668
+ uniform sampler2D textureSampler;
669
+
670
+ // Parameters
671
+ uniform vec2 curvature;
672
+ uniform vec2 screenResolution;
673
+ uniform vec2 scanLineOpacity;
674
+ uniform float vignetteOpacity;
675
+ uniform float brightness;
676
+ uniform float vignetteRoundness;
677
+
678
+
679
+ vec2 curveRemapUV(vec2 uv)
680
+ {
681
+ // as we near the edge of our screen apply greater distortion using a sinusoid.
682
+
683
+ uv = uv * 2.0 - 1.0;
684
+ vec2 offset = abs(uv.yx) / vec2(curvature.x, curvature.y);
685
+ uv = uv + uv * offset * offset;
686
+ uv = uv * 0.5 + 0.5;
687
+ return uv;
688
+ }
689
+
690
+ vec4 scanLineIntensity(float uv, float resolution, float opacity)
691
+ {
692
+ float intensity = sin(uv * resolution * PI * 2.0);
693
+ intensity = ((0.5 * intensity) + 0.5) * 0.9 + 0.1;
694
+ return vec4(vec3(pow(intensity, opacity)), 1.0);
695
+ }
696
+
697
+ vec4 vignetteIntensity(vec2 uv, vec2 resolution, float opacity, float roundness)
698
+ {
699
+ float intensity = uv.x * uv.y * (1.0 - uv.x) * (1.0 - uv.y);
700
+ return vec4(vec3(clamp(pow((resolution.x / roundness) * intensity, opacity), 0.0, 1.0)), 1.0);
701
+ }
702
+
703
+ void main(void)
704
+ {
705
+ vec2 remappedUV = curveRemapUV(vec2(vUV.x, vUV.y));
706
+ vec4 baseColor = texture2D(textureSampler, remappedUV);
707
+
708
+ baseColor *= vignetteIntensity(remappedUV, screenResolution, vignetteOpacity, vignetteRoundness);
709
+
710
+ baseColor *= scanLineIntensity(remappedUV.x, screenResolution.y, scanLineOpacity.x);
711
+ baseColor *= scanLineIntensity(remappedUV.y, screenResolution.x, scanLineOpacity.y);
712
+
713
+ baseColor *= vec4(vec3(brightness), 1.0);
714
+
715
+ if (remappedUV.x < 0.0 || remappedUV.y < 0.0 || remappedUV.x > 1.0 || remappedUV.y > 1.0){
716
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
717
+ } else {
718
+ gl_FragColor = baseColor;
719
+ }
720
+ }
721
+ `;
722
+
723
+ var postProcess1 = new BABYLON.PostProcess("CRTShaderPostProcess", "crt", ["curvature", "screenResolution", "scanLineOpacity", "vignetteOpacity", "brightness", "vignetteRoundness"], null, 0.25, camera);
724
+ postProcess1.onApply = function (effect) {
725
+ // having a curvature is nice, but this should happen AFTER the pixelation and blur effect
726
+ effect.setFloat2("curvature", 255.0, 255.0);
727
+ effect.setFloat2("screenResolution", config.crt.screenResolution.width, config.crt.screenResolution.height);
728
+ effect.setFloat2("scanLineOpacity", 0.1, 0.1);
729
+ effect.setFloat("vignetteOpacity", 0.2); // was 0.3
730
+ effect.setFloat("brightness", 1);
731
+ effect.setFloat("vignetteRoundness", 20.0);
732
+ };
733
+
734
+
735
+ // ----------- BLUR EFFECT ----------
736
+ var postProcess2 = new BABYLON.BlurPostProcess("Horizontal blur", new BABYLON.Vector2(0.7, 0), 4.0, 0.5, camera);
737
+ var postProcess3 = new BABYLON.BlurPostProcess("Vertical blur", new BABYLON.Vector2(0, 0.7), 4.0, 0.5, camera);
738
+
739
+ BABYLON.Effect.ShadersStore["curveFragmentShader"] = `
740
+ #ifdef GL_ES
741
+ precision highp float;
742
+ #endif
743
+
744
+ #define PI 3.1415926538
745
+
746
+ // Samplers
747
+ varying vec2 vUV;
748
+ uniform sampler2D textureSampler;
749
+
750
+ // Parameters
751
+ uniform vec2 curvature;
752
+ uniform vec2 screenResolution;
753
+ uniform vec2 scanLineOpacity;
754
+ uniform float vignetteOpacity;
755
+ uniform float brightness;
756
+ uniform float vignetteRoundness;
757
+
758
+
759
+ vec2 curveRemapUV(vec2 uv)
760
+ {
761
+ // as we near the edge of our screen apply greater distortion using a sinusoid.
762
+
763
+ uv = uv * 2.0 - 1.0;
764
+ vec2 offset = abs(uv.yx) / vec2(curvature.x, curvature.y);
765
+ uv = uv + uv * offset * offset;
766
+ uv = uv * 0.5 + 0.5;
767
+ return uv;
768
+ }
769
+
770
+ vec4 scanLineIntensity(float uv, float resolution, float opacity)
771
+ {
772
+ float intensity = sin(uv * resolution * PI * 2.0);
773
+ intensity = ((0.5 * intensity) + 0.5) * 0.9 + 0.1;
774
+ return vec4(vec3(pow(intensity, opacity)), 1.0);
775
+ }
776
+
777
+ vec4 vignetteIntensity(vec2 uv, vec2 resolution, float opacity, float roundness)
778
+ {
779
+ float intensity = uv.x * uv.y * (1.0 - uv.x) * (1.0 - uv.y);
780
+ return vec4(vec3(clamp(pow((resolution.x / roundness) * intensity, opacity), 0.0, 1.0)), 1.0);
781
+ }
782
+
783
+ void main(void)
784
+ {
785
+ vec2 remappedUV = curveRemapUV(vec2(vUV.x, vUV.y));
786
+ vec4 baseColor = texture2D(textureSampler, remappedUV);
787
+
788
+ baseColor *= vignetteIntensity(remappedUV, screenResolution, vignetteOpacity, vignetteRoundness);
789
+
790
+ baseColor *= scanLineIntensity(remappedUV.x, screenResolution.y, scanLineOpacity.x);
791
+ baseColor *= scanLineIntensity(remappedUV.y, screenResolution.x, scanLineOpacity.y);
792
+
793
+ baseColor *= vec4(vec3(brightness), 1.0);
794
+
795
+ if (remappedUV.x < 0.0 || remappedUV.y < 0.0 || remappedUV.x > 1.0 || remappedUV.y > 1.0){
796
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
797
+ } else {
798
+ gl_FragColor = baseColor;
799
+ }
800
+ }
801
+ `;
802
+
803
+ var postProcess4 = new BABYLON.PostProcess("CurveShaderPostProcess", "curve", ["curvature", "screenResolution", "scanLineOpacity", "vignetteOpacity", "brightness", "vignetteRoundness"], null, 0.25, camera);
804
+ postProcess4.onApply = function (effect) {
805
+ // having a curvature is nice, but this should happen AFTER the pixelation and blur effect
806
+ effect.setFloat2("curvature", 255.0, 255.0);
807
+ effect.setFloat2("screenResolution", config.crt.screenResolution.width, config.crt.screenResolution.height);
808
+ effect.setFloat2("scanLineOpacity", 0.2, 0.2);
809
+ effect.setFloat("vignetteOpacity", 0.3); // was 0.3
810
+ effect.setFloat("brightness", 8);
811
+ effect.setFloat("vignetteRoundness", 20.0);
812
+ };
813
+
814
+
815
+ var postProcess5 = new BABYLON.BlurPostProcess("Horizontal blur", new BABYLON.Vector2(1.0, 0), 2.0, 0.86, camera);
816
+ var postProcess6 = new BABYLON.BlurPostProcess("Vertical blur", new BABYLON.Vector2(0, 1.0), 2.0, 0.86, camera);
817
+
818
+ // var postProcess6 = new BABYLON.BlurPostProcess("Horizontal blur", new BABYLON.Vector2(1.0, 0), 2.0, 0.85, camera);
819
+ // var postProcess7 = new BABYLON.BlurPostProcess("Vertical blur", new BABYLON.Vector2(0, 1.0), 2.0, 0.85, camera);
820
+
821
+
822
+ return scene;
823
+ };
824
+ window.initFunction = async function () {
825
+ var asyncEngineCreation = async function () {
826
+ try {
827
+ return createDefaultEngine();
828
+ } catch (e) {
829
+ console.log("the available createEngine function failed. Creating the default engine instead");
830
+ return createDefaultEngine();
831
+ }
832
+ };
833
+
834
+ window.engine = await asyncEngineCreation();
835
+ if (!engine) throw "engine should not be null.";
836
+ startRenderLoop(engine, canvas);
837
+ window.scene = createScene();
838
+ };
839
+ initFunction().then(() => {
840
+ sceneToRender = scene;
841
+ });
842
+
843
+ // Resize
844
+ window.addEventListener("resize", function () {
845
+ engine.resize();
846
+ });
847
+ </script>
848
+ </body>
849
+
850
+ </html>
libs/Oimo.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/ammo.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/babylon.gui.min.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/babylon.inspector.bundle.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/babylon.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/babylonjs.loaders.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/babylonjs.materials.min.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/babylonjs.postProcess.min.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-post-process",["babylonjs"],e):"object"==typeof exports?exports["babylonjs-post-process"]=e(require("babylonjs")):t.POSTPROCESSES=e(t.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}));
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */
16
+ var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function r(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}Object.create;Object.create},function(t,e,n){"use strict";n.r(e),n.d(e,"AsciiArtFontTexture",(function(){return a})),n.d(e,"AsciiArtPostProcess",(function(){return l}));var o=n(1),i=n(0),r="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D asciiArtFont;\n\nuniform vec4 asciiArtFontInfos;\nuniform vec4 asciiArtOptions;\n\nfloat getLuminance(vec3 color)\n{\nreturn clamp(dot(color,vec3(0.2126,0.7152,0.0722)),0.,1.);\n}\n\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\nfloat caracterSize=asciiArtFontInfos.x;\nfloat numChar=asciiArtFontInfos.y-1.0;\nfloat fontx=asciiArtFontInfos.z;\nfloat fonty=asciiArtFontInfos.w;\nfloat screenx=asciiArtOptions.x;\nfloat screeny=asciiArtOptions.y;\nfloat tileX=float(floor((gl_FragCoord.x)/caracterSize))*caracterSize/screenx;\nfloat tileY=float(floor((gl_FragCoord.y)/caracterSize))*caracterSize/screeny;\nvec2 tileUV=vec2(tileX,tileY);\nvec4 tileColor=texture2D(textureSampler,tileUV);\nvec4 baseColor=texture2D(textureSampler,vUV);\nfloat tileLuminance=getLuminance(tileColor.rgb);\nfloat offsetx=(float(floor(tileLuminance*numChar)))*caracterSize/fontx;\nfloat offsety=0.0;\nfloat x=float(mod(gl_FragCoord.x,caracterSize))/fontx;\nfloat y=float(mod(gl_FragCoord.y,caracterSize))/fonty;\nvec4 finalColor=texture2D(asciiArtFont,vec2(offsetx+x,offsety+(caracterSize/fonty-y)));\nfinalColor.rgb*=tileColor.rgb;\nfinalColor.a=1.0;\nfinalColor=mix(finalColor,tileColor,asciiArtOptions.w);\nfinalColor=mix(finalColor,baseColor,asciiArtOptions.z);\ngl_FragColor=finalColor;\n}";i.ShaderStore.ShadersStore.asciiartPixelShader=r;var a=function(t){function e(e,n,o,r){void 0===r&&(r=null);var a=t.call(this,r)||this;if(!(r=a.getScene()))return a;a.name=e,a._text,a._font,a.wrapU=i.Texture.CLAMP_ADDRESSMODE,a.wrapV=i.Texture.CLAMP_ADDRESSMODE;var l=a.getFontHeight(n),c=a.getFontWidth(n);a._charSize=Math.max(l.height,c);var f=Math.ceil(a._charSize*o.length),u=a._charSize;a._texture=r.getEngine().createDynamicTexture(f,u,!1,i.Texture.NEAREST_SAMPLINGMODE);var s=a.getSize(),d=document.createElement("canvas");d.width=s.width,d.height=s.height;var g=d.getContext("2d");g.textBaseline="top",g.font=n,g.fillStyle="white",g.imageSmoothingEnabled=!1;for(var h=0;h<o.length;h++)g.fillText(o[h],h*a._charSize,-l.offset);return r.getEngine().updateDynamicTexture(a._texture,d,!1,!0),a}return Object(o.b)(e,t),Object.defineProperty(e.prototype,"charSize",{get:function(){return this._charSize},enumerable:!1,configurable:!0}),e.prototype.getFontWidth=function(t){var e=document.createElement("canvas").getContext("2d");return e.fillStyle="white",e.font=t,e.measureText("W").width},e.prototype.getFontHeight=function(t){var e=document.createElement("canvas"),n=e.getContext("2d");n.fillRect(0,0,e.width,e.height),n.textBaseline="top",n.fillStyle="white",n.font=t,n.fillText("jH|",0,0);for(var o=n.getImageData(0,0,e.width,e.height).data,i=-1,r=-1,a=0;a<e.height;a++)for(var l=0;l<e.width;l++){if(0!==o[4*(a*e.width+l)]){-1===i&&(i=a);break}if(l===e.width-1&&-1!==i){r=a,a=e.height;break}}return{height:r-i+1,offset:i-1}},e.prototype.clone=function(){return new e(this.name,this._font,this._text,this.getScene())},e.Parse=function(t,n){return i.SerializationHelper.Parse((function(){return new e(t.name,t.font,t.text,n)}),t,n,null)},Object(o.a)([Object(i.serialize)("font")],e.prototype,"_font",void 0),Object(o.a)([Object(i.serialize)("text")],e.prototype,"_text",void 0),e}(i.BaseTexture),l=function(t){function e(e,n,o){var r=t.call(this,e,"asciiart",["asciiArtFontInfos","asciiArtOptions"],["asciiArtFont"],{width:n.getEngine().getRenderWidth(),height:n.getEngine().getRenderHeight()},n,i.Texture.TRILINEAR_SAMPLINGMODE,n.getEngine(),!0)||this;r.mixToTile=0,r.mixToNormal=0;var l="40px Monospace",c=" `-.'_:,\"=^;<+!*?/cL\\zrs7TivJtC{3F)Il(xZfY5S2eajo14[nuyE]P6V9kXpKwGhqAUbOd8#HRDB0$mgMW&Q%N@";o&&("string"==typeof o?l=o:(l=o.font||l,c=o.characterSet||c,r.mixToTile=o.mixToTile||r.mixToTile,r.mixToNormal=o.mixToNormal||r.mixToNormal)),r._asciiArtFontTexture=new a(e,l,c,n.getScene());var f=r._asciiArtFontTexture.getSize();return r.onApply=function(t){t.setTexture("asciiArtFont",r._asciiArtFontTexture),t.setFloat4("asciiArtFontInfos",r._asciiArtFontTexture.charSize,c.length,f.width,f.height),t.setFloat4("asciiArtOptions",r.width,r.height,r.mixToNormal,r.mixToTile)},r}return Object(o.b)(e,t),e}(i.PostProcess)},function(t,e,n){"use strict";n.r(e),n.d(e,"DigitalRainFontTexture",(function(){return a})),n.d(e,"DigitalRainPostProcess",(function(){return l}));var o=n(1),i=n(0),r="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D digitalRainFont;\n\nuniform vec4 digitalRainFontInfos;\nuniform vec4 digitalRainOptions;\nuniform mat4 matrixSpeed;\nuniform float cosTimeZeroOne;\n\nfloat getLuminance(vec3 color)\n{\nreturn clamp(dot(color,vec3(0.2126,0.7152,0.0722)),0.,1.);\n}\n\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\nfloat caracterSize=digitalRainFontInfos.x;\nfloat numChar=digitalRainFontInfos.y-1.0;\nfloat fontx=digitalRainFontInfos.z;\nfloat fonty=digitalRainFontInfos.w;\nfloat screenx=digitalRainOptions.x;\nfloat screeny=digitalRainOptions.y;\nfloat ratio=screeny/fonty;\nfloat columnx=float(floor((gl_FragCoord.x)/caracterSize));\nfloat tileX=float(floor((gl_FragCoord.x)/caracterSize))*caracterSize/screenx;\nfloat tileY=float(floor((gl_FragCoord.y)/caracterSize))*caracterSize/screeny;\nvec2 tileUV=vec2(tileX,tileY);\nvec4 tileColor=texture2D(textureSampler,tileUV);\nvec4 baseColor=texture2D(textureSampler,vUV);\nfloat tileLuminance=getLuminance(tileColor.rgb);\nint st=int(mod(columnx,4.0));\nfloat speed=cosTimeZeroOne*(sin(tileX*314.5)*0.5+0.6);\nfloat x=float(mod(gl_FragCoord.x,caracterSize))/fontx;\nfloat y=float(mod(speed+gl_FragCoord.y/screeny,1.0));\ny*=ratio;\nvec4 finalColor=texture2D(digitalRainFont,vec2(x,1.0-y));\nvec3 high=finalColor.rgb*(vec3(1.2,1.2,1.2)*pow(1.0-y,30.0));\nfinalColor.rgb*=vec3(pow(tileLuminance,5.0),pow(tileLuminance,1.5),pow(tileLuminance,3.0));\nfinalColor.rgb+=high;\nfinalColor.rgb=clamp(finalColor.rgb,0.,1.);\nfinalColor.a=1.0;\nfinalColor=mix(finalColor,tileColor,digitalRainOptions.w);\nfinalColor=mix(finalColor,baseColor,digitalRainOptions.z);\ngl_FragColor=finalColor;\n}";i.ShaderStore.ShadersStore.digitalrainPixelShader=r;var a=function(t){function e(e,n,o,r){void 0===r&&(r=null);var a=t.call(this,r)||this;if(!(r=a.getScene()))return a;a.name=e,a._text,a._font,a.wrapU=i.Texture.CLAMP_ADDRESSMODE,a.wrapV=i.Texture.CLAMP_ADDRESSMODE;var l=a.getFontHeight(n),c=a.getFontWidth(n);a._charSize=Math.max(l.height,c);var f=a._charSize,u=Math.ceil(a._charSize*o.length);a._texture=r.getEngine().createDynamicTexture(f,u,!1,i.Texture.NEAREST_SAMPLINGMODE);var s=a.getSize(),d=document.createElement("canvas");d.width=s.width,d.height=s.height;var g=d.getContext("2d");g.textBaseline="top",g.font=n,g.fillStyle="white",g.imageSmoothingEnabled=!1;for(var h=0;h<o.length;h++)g.fillText(o[h],0,h*a._charSize-l.offset);return r.getEngine().updateDynamicTexture(a._texture,d,!1,!0),a}return Object(o.b)(e,t),Object.defineProperty(e.prototype,"charSize",{get:function(){return this._charSize},enumerable:!1,configurable:!0}),e.prototype.getFontWidth=function(t){var e=document.createElement("canvas").getContext("2d");return e.fillStyle="white",e.font=t,e.measureText("W").width},e.prototype.getFontHeight=function(t){var e=document.createElement("canvas"),n=e.getContext("2d");n.fillRect(0,0,e.width,e.height),n.textBaseline="top",n.fillStyle="white",n.font=t,n.fillText("jH|",0,0);for(var o=n.getImageData(0,0,e.width,e.height).data,i=-1,r=-1,a=0;a<e.height;a++)for(var l=0;l<e.width;l++){if(0!==o[4*(a*e.width+l)]){-1===i&&(i=a);break}if(l===e.width-1&&-1!==i){r=a,a=e.height;break}}return{height:r-i+1,offset:i-1}},e.prototype.clone=function(){return new e(this.name,this._font,this._text,this.getScene())},e.Parse=function(t,n){return i.SerializationHelper.Parse((function(){return new e(t.name,t.font,t.text,n)}),t,n,null)},Object(o.a)([Object(i.serialize)("font")],e.prototype,"_font",void 0),Object(o.a)([Object(i.serialize)("text")],e.prototype,"_text",void 0),e}(i.BaseTexture),l=function(t){function e(e,n,o){var r=t.call(this,e,"digitalrain",["digitalRainFontInfos","digitalRainOptions","cosTimeZeroOne","matrixSpeed"],["digitalRainFont"],{width:n.getEngine().getRenderWidth(),height:n.getEngine().getRenderHeight()},n,i.Texture.TRILINEAR_SAMPLINGMODE,n.getEngine(),!0)||this;r.mixToTile=0,r.mixToNormal=0,r.speed=.003;var l="15px Monospace",c="古池や蛙飛び込む水の音ふるいけやかわずとびこむみずのおと初しぐれ猿も小蓑をほしげ也はつしぐれさるもこみのをほしげなり江戸の雨何石呑んだ時鳥えどのあめなんごくのんだほととぎす";o&&("string"==typeof o?l=o:(l=o.font||l,r.mixToTile=o.mixToTile||r.mixToTile,r.mixToNormal=o.mixToNormal||r.mixToNormal)),r._digitalRainFontTexture=new a(e,l,c,n.getScene());var f=r._digitalRainFontTexture.getSize(),u=0,s=0,d=i.Matrix.FromValues(Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random(),Math.random());return r.onApply=function(t){t.setTexture("digitalRainFont",r._digitalRainFontTexture),t.setFloat4("digitalRainFontInfos",r._digitalRainFontTexture.charSize,c.length,f.width,f.height),t.setFloat4("digitalRainOptions",r.width,r.height,r.mixToNormal,r.mixToTile),t.setMatrix("matrixSpeed",d),u+=r.speed,s=u,t.setFloat("cosTimeZeroOne",s)},r}return Object(o.b)(e,t),e}(i.PostProcess)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);var o=n(2);n.d(e,"AsciiArtFontTexture",(function(){return o.AsciiArtFontTexture})),n.d(e,"AsciiArtPostProcess",(function(){return o.AsciiArtPostProcess}));var i=n(3);n.d(e,"DigitalRainFontTexture",(function(){return i.DigitalRainFontTexture})),n.d(e,"DigitalRainPostProcess",(function(){return i.DigitalRainPostProcess}))},function(t,e,n){"use strict";n.r(e),function(t){var o=n(5);n.d(e,"AsciiArtFontTexture",(function(){return o.AsciiArtFontTexture})),n.d(e,"AsciiArtPostProcess",(function(){return o.AsciiArtPostProcess})),n.d(e,"DigitalRainFontTexture",(function(){return o.DigitalRainFontTexture})),n.d(e,"DigitalRainPostProcess",(function(){return o.DigitalRainPostProcess}));var i=void 0!==t?t:"undefined"!=typeof window?window:void 0;if(void 0!==i)for(var r in o)i.BABYLON[r]=o[r]}.call(this,n(4))}])}));
libs/babylonjs.proceduralTextures.min.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-procedural-textures",["babylonjs"],r):"object"==typeof exports?exports["babylonjs-procedural-textures"]=r(require("babylonjs")):e.PROCEDURALTEXTURES=r(e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(e){return function(e){var r={};function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)t.d(o,n,function(r){return e[r]}.bind(null,n));return o},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=14)}([function(r,t){r.exports=e},function(e,r,t){"use strict";t.d(r,"b",(function(){return n})),t.d(r,"a",(function(){return i}));
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */
16
+ var o=function(e,r){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function n(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}o(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function i(e,r,t,o){var n,i=arguments.length,a=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,r,t,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(i<3?n(a):i>3?n(r,t,a):n(r,t))||a);return i>3&&a&&Object.defineProperty(r,t,a),a}Object.create;Object.create},function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,r,t){"use strict";t.r(r),t.d(r,"BrickProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nvarying vec2 vPosition;\nvarying vec2 vUV;\nuniform float numberOfBricksHeight;\nuniform float numberOfBricksWidth;\nuniform vec3 brickColor;\nuniform vec3 jointColor;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,amplitude=1.0;\nfor (int i=0; i<4; i++) {\ntotal+=noise(n)*amplitude;\nn+=n;\namplitude*=0.5;\n}\nreturn total;\n}\nfloat roundF(float number){\nreturn sign(number)*floor(abs(number)+0.5);\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\nfloat brickW=1.0/numberOfBricksWidth;\nfloat brickH=1.0/numberOfBricksHeight;\nfloat jointWPercentage=0.01;\nfloat jointHPercentage=0.05;\nvec3 color=brickColor;\nfloat yi=vUV.y/brickH;\nfloat nyi=roundF(yi);\nfloat xi=vUV.x/brickW;\nif (mod(floor(yi),2.0) == 0.0){\nxi=xi-0.5;\n}\nfloat nxi=roundF(xi);\nvec2 brickvUV=vec2((xi-floor(xi))/brickH,(yi-floor(yi))/brickW);\nif (yi<nyi+jointHPercentage && yi>nyi-jointHPercentage){\ncolor=mix(jointColor,vec3(0.37,0.25,0.25),(yi-nyi)/jointHPercentage+0.2);\n}\nelse if (xi<nxi+jointWPercentage && xi>nxi-jointWPercentage){\ncolor=mix(jointColor,vec3(0.44,0.44,0.44),(xi-nxi)/jointWPercentage+0.2);\n}\nelse {\nfloat brickColorSwitch=mod(floor(yi)+floor(xi),3.0);\nif (brickColorSwitch == 0.0)\ncolor=mix(color,vec3(0.33,0.33,0.33),0.3);\nelse if (brickColorSwitch == 2.0)\ncolor=mix(color,vec3(0.11,0.11,0.11),0.3);\n}\ngl_FragColor=vec4(color,1.0);\n}";n.ShaderStore.ShadersStore.brickProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,i,a){void 0===o&&(o=null);var l=e.call(this,r,t,"brickProceduralTexture",o,i,a)||this;return l._numberOfBricksHeight=15,l._numberOfBricksWidth=5,l._jointColor=new n.Color3(.72,.72,.72),l._brickColor=new n.Color3(.77,.47,.4),l.updateShaderUniforms(),l}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setFloat("numberOfBricksHeight",this._numberOfBricksHeight),this.setFloat("numberOfBricksWidth",this._numberOfBricksWidth),this.setColor3("brickColor",this._brickColor),this.setColor3("jointColor",this._jointColor)},Object.defineProperty(r.prototype,"numberOfBricksHeight",{get:function(){return this._numberOfBricksHeight},set:function(e){this._numberOfBricksHeight=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"numberOfBricksWidth",{get:function(){return this._numberOfBricksWidth},set:function(e){this._numberOfBricksWidth=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"jointColor",{get:function(){return this._jointColor},set:function(e){this._jointColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"brickColor",{get:function(){return this._brickColor},set:function(e){this._brickColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.BrickProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serialize)()],r.prototype,"numberOfBricksHeight",null),Object(o.a)([Object(n.serialize)()],r.prototype,"numberOfBricksWidth",null),Object(o.a)([Object(n.serializeAsColor3)()],r.prototype,"jointColor",null),Object(o.a)([Object(n.serializeAsColor3)()],r.prototype,"brickColor",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.BrickProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"CloudProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nvarying vec2 vUV;\nuniform vec4 skyColor;\nuniform vec4 cloudColor;\nuniform float amplitude;\nuniform int numOctaves;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,ampl=amplitude;\n#ifdef WEBGL2\nfor (int i=0; i<numOctaves; i++) {\n#else\nfor (int i=0; i<4; i++) {\n#endif\ntotal+=noise(n)*ampl;\nn+=n;\nampl*=0.5;\n}\nreturn total;\n}\nvoid main() {\nvec2 p=vUV*12.0;\nvec4 c=mix(skyColor,cloudColor,fbm(p));\ngl_FragColor=c;\n}\n";n.ShaderStore.ShadersStore.cloudProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,i,a){void 0===o&&(o=null);var l=e.call(this,r,t,"cloudProceduralTexture",o,i,a)||this;return l._skyColor=new n.Color4(.15,.68,1,1),l._cloudColor=new n.Color4(1,1,1,1),l._amplitude=1,l._numOctaves=4,l.updateShaderUniforms(),l}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setColor4("skyColor",this._skyColor),this.setColor4("cloudColor",this._cloudColor),this.setFloat("amplitude",this._amplitude),this.setInt("numOctaves",this._numOctaves)},Object.defineProperty(r.prototype,"skyColor",{get:function(){return this._skyColor},set:function(e){this._skyColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cloudColor",{get:function(){return this._cloudColor},set:function(e){this._cloudColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"amplitude",{get:function(){return this._amplitude},set:function(e){this._amplitude=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"numOctaves",{get:function(){return this._numOctaves},set:function(e){this._numOctaves=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.CloudProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serializeAsColor4)()],r.prototype,"skyColor",null),Object(o.a)([Object(n.serializeAsColor4)()],r.prototype,"cloudColor",null),Object(o.a)([Object(n.serialize)()],r.prototype,"amplitude",null),Object(o.a)([Object(n.serialize)()],r.prototype,"numOctaves",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.CloudProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"FireProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nuniform float time;\nuniform vec3 c1;\nuniform vec3 c2;\nuniform vec3 c3;\nuniform vec3 c4;\nuniform vec3 c5;\nuniform vec3 c6;\nuniform vec2 speed;\nuniform float shift;\nuniform float alphaThreshold;\nvarying vec2 vUV;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,amplitude=1.0;\nfor (int i=0; i<4; i++) {\ntotal+=noise(n)*amplitude;\nn+=n;\namplitude*=0.5;\n}\nreturn total;\n}\nvoid main() {\nvec2 p=vUV*8.0;\nfloat q=fbm(p-time*0.1);\nvec2 r=vec2(fbm(p+q+time*speed.x-p.x-p.y),fbm(p+q-time*speed.y));\nvec3 c=mix(c1,c2,fbm(p+r))+mix(c3,c4,r.x)-mix(c5,c6,r.y);\nvec3 color=c*cos(shift*vUV.y);\nfloat luminance=dot(color.rgb,vec3(0.3,0.59,0.11));\ngl_FragColor=vec4(color,luminance*alphaThreshold+(1.0-alphaThreshold));\n}";n.ShaderStore.ShadersStore.fireProceduralTexturePixelShader=i;var a=function(e){function r(t,o,i,a,l){void 0===i&&(i=null);var u=e.call(this,t,o,"fireProceduralTexture",i,a,l)||this;return u._time=0,u._speed=new n.Vector2(.5,.3),u._autoGenerateTime=!0,u._alphaThreshold=.5,u._fireColors=r.RedFireColors,u.updateShaderUniforms(),u}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setFloat("time",this._time),this.setVector2("speed",this._speed),this.setColor3("c1",this._fireColors[0]),this.setColor3("c2",this._fireColors[1]),this.setColor3("c3",this._fireColors[2]),this.setColor3("c4",this._fireColors[3]),this.setColor3("c5",this._fireColors[4]),this.setColor3("c6",this._fireColors[5]),this.setFloat("alphaThreshold",this._alphaThreshold)},r.prototype.render=function(r){var t=this.getScene();this._autoGenerateTime&&t&&(this._time+=.03*t.getAnimationRatio(),this.updateShaderUniforms()),e.prototype.render.call(this,r)},Object.defineProperty(r,"PurpleFireColors",{get:function(){return[new n.Color3(.5,0,1),new n.Color3(.9,0,1),new n.Color3(.2,0,1),new n.Color3(1,.9,1),new n.Color3(.1,.1,1),new n.Color3(.9,.9,1)]},enumerable:!1,configurable:!0}),Object.defineProperty(r,"GreenFireColors",{get:function(){return[new n.Color3(.5,1,0),new n.Color3(.5,1,0),new n.Color3(.3,.4,0),new n.Color3(.5,1,0),new n.Color3(.2,0,0),new n.Color3(.5,1,0)]},enumerable:!1,configurable:!0}),Object.defineProperty(r,"RedFireColors",{get:function(){return[new n.Color3(.5,0,.1),new n.Color3(.9,0,0),new n.Color3(.2,0,0),new n.Color3(1,.9,0),new n.Color3(.1,.1,.1),new n.Color3(.9,.9,.9)]},enumerable:!1,configurable:!0}),Object.defineProperty(r,"BlueFireColors",{get:function(){return[new n.Color3(.1,0,.5),new n.Color3(0,0,.5),new n.Color3(.1,0,.2),new n.Color3(0,0,1),new n.Color3(.1,.2,.3),new n.Color3(0,.2,.9)]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"autoGenerateTime",{get:function(){return this._autoGenerateTime},set:function(e){this._autoGenerateTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fireColors",{get:function(){return this._fireColors},set:function(e){this._fireColors=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"time",{get:function(){return this._time},set:function(e){this._time=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"alphaThreshold",{get:function(){return this._alphaThreshold},set:function(e){this._alphaThreshold=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));r.customType="BABYLON.FireProceduralTexture",r.fireColors=[];for(var t=0;t<this._fireColors.length;t++)r.fireColors.push(this._fireColors[t].asArray());return r},r.Parse=function(e,t,o){for(var i=n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o),a=[],l=0;l<e.fireColors.length;l++)a.push(n.Color3.FromArray(e.fireColors[l]));return i.fireColors=a,i},Object(o.a)([Object(n.serialize)()],r.prototype,"autoGenerateTime",null),Object(o.a)([Object(n.serialize)()],r.prototype,"time",null),Object(o.a)([Object(n.serializeAsVector2)()],r.prototype,"speed",null),Object(o.a)([Object(n.serialize)()],r.prototype,"alphaThreshold",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.FireProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"GrassProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nvarying vec2 vPosition;\nvarying vec2 vUV;\nuniform vec3 herb1Color;\nuniform vec3 herb2Color;\nuniform vec3 herb3Color;\nuniform vec3 groundColor;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,amplitude=1.0;\nfor (int i=0; i<4; i++) {\ntotal+=noise(n)*amplitude;\nn+=n;\namplitude*=0.5;\n}\nreturn total;\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec3 color=mix(groundColor,herb1Color,rand(gl_FragCoord.xy*4.0));\ncolor=mix(color,herb2Color,rand(gl_FragCoord.xy*8.0));\ncolor=mix(color,herb3Color,rand(gl_FragCoord.xy));\ncolor=mix(color,herb1Color,fbm(gl_FragCoord.xy*16.0));\ngl_FragColor=vec4(color,1.0);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";n.ShaderStore.ShadersStore.grassProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,i,a){void 0===o&&(o=null);var l=e.call(this,r,t,"grassProceduralTexture",o,i,a)||this;return l._groundColor=new n.Color3(1,1,1),l._grassColors=[new n.Color3(.29,.38,.02),new n.Color3(.36,.49,.09),new n.Color3(.51,.6,.28)],l.updateShaderUniforms(),l}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setColor3("herb1Color",this._grassColors[0]),this.setColor3("herb2Color",this._grassColors[1]),this.setColor3("herb3Color",this._grassColors[2]),this.setColor3("groundColor",this._groundColor)},Object.defineProperty(r.prototype,"grassColors",{get:function(){return this._grassColors},set:function(e){this._grassColors=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundColor",{get:function(){return this._groundColor},set:function(e){this._groundColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));r.customType="BABYLON.GrassProceduralTexture",r.grassColors=[];for(var t=0;t<this._grassColors.length;t++)r.grassColors.push(this._grassColors[t].asArray());return r},r.Parse=function(e,t,o){for(var i=n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o),a=[],l=0;l<e.grassColors.length;l++)a.push(n.Color3.FromArray(e.grassColors[l]));return i.grassColors=a,i},Object(o.a)([Object(n.serializeAsColor3)()],r.prototype,"groundColor",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.GrassProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"MarbleProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nvarying vec2 vPosition;\nvarying vec2 vUV;\nuniform float numberOfTilesHeight;\nuniform float numberOfTilesWidth;\nuniform float amplitude;\nuniform vec3 marbleColor;\nuniform vec3 jointColor;\nconst vec3 tileSize=vec3(1.1,1.0,1.1);\nconst vec3 tilePct=vec3(0.98,1.0,0.98);\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat turbulence(vec2 P)\n{\nfloat val=0.0;\nfloat freq=1.0;\nfor (int i=0; i<4; i++)\n{\nval+=abs(noise(P*freq)/freq);\nfreq*=2.07;\n}\nreturn val;\n}\nfloat roundF(float number){\nreturn sign(number)*floor(abs(number)+0.5);\n}\nvec3 marble_color(float x)\n{\nvec3 col;\nx=0.5*(x+1.);\nx=sqrt(x);\nx=sqrt(x);\nx=sqrt(x);\ncol=vec3(.2+.75*x);\ncol.b*=0.95;\nreturn col;\n}\nvoid main()\n{\nfloat brickW=1.0/numberOfTilesWidth;\nfloat brickH=1.0/numberOfTilesHeight;\nfloat jointWPercentage=0.01;\nfloat jointHPercentage=0.01;\nvec3 color=marbleColor;\nfloat yi=vUV.y/brickH;\nfloat nyi=roundF(yi);\nfloat xi=vUV.x/brickW;\nif (mod(floor(yi),2.0) == 0.0){\nxi=xi-0.5;\n}\nfloat nxi=roundF(xi);\nvec2 brickvUV=vec2((xi-floor(xi))/brickH,(yi-floor(yi))/brickW);\nif (yi<nyi+jointHPercentage && yi>nyi-jointHPercentage){\ncolor=mix(jointColor,vec3(0.37,0.25,0.25),(yi-nyi)/jointHPercentage+0.2);\n}\nelse if (xi<nxi+jointWPercentage && xi>nxi-jointWPercentage){\ncolor=mix(jointColor,vec3(0.44,0.44,0.44),(xi-nxi)/jointWPercentage+0.2);\n}\nelse {\nfloat t=6.28*brickvUV.x/(tileSize.x+noise(vec2(vUV)*6.0));\nt+=amplitude*turbulence(brickvUV.xy);\nt=sin(t);\ncolor=marble_color(t);\n}\ngl_FragColor=vec4(color,0.0);\n}";n.ShaderStore.ShadersStore.marbleProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,i,a){void 0===o&&(o=null);var l=e.call(this,r,t,"marbleProceduralTexture",o,i,a)||this;return l._numberOfTilesHeight=3,l._numberOfTilesWidth=3,l._amplitude=9,l._jointColor=new n.Color3(.72,.72,.72),l.updateShaderUniforms(),l}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setFloat("numberOfTilesHeight",this._numberOfTilesHeight),this.setFloat("numberOfTilesWidth",this._numberOfTilesWidth),this.setFloat("amplitude",this._amplitude),this.setColor3("jointColor",this._jointColor)},Object.defineProperty(r.prototype,"numberOfTilesHeight",{get:function(){return this._numberOfTilesHeight},set:function(e){this._numberOfTilesHeight=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"amplitude",{get:function(){return this._amplitude},set:function(e){this._amplitude=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"numberOfTilesWidth",{get:function(){return this._numberOfTilesWidth},set:function(e){this._numberOfTilesWidth=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"jointColor",{get:function(){return this._jointColor},set:function(e){this._jointColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.MarbleProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serialize)()],r.prototype,"numberOfTilesHeight",null),Object(o.a)([Object(n.serialize)()],r.prototype,"amplitude",null),Object(o.a)([Object(n.serialize)()],r.prototype,"numberOfTilesWidth",null),Object(o.a)([Object(n.serialize)()],r.prototype,"jointColor",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.MarbleProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"NormalMapProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\n\nuniform sampler2D baseSampler;\nuniform float size;\n\nvarying vec2 vUV;\n\nconst vec3 LUMA_COEFFICIENT=vec3(0.2126,0.7152,0.0722);\nfloat lumaAtCoord(vec2 coord)\n{\nvec3 pixel=texture2D(baseSampler,coord).rgb;\nfloat luma=dot(pixel,LUMA_COEFFICIENT);\nreturn luma;\n}\nvoid main()\n{\nfloat lumaU0=lumaAtCoord(vUV+vec2(-1.0,0.0)/size);\nfloat lumaU1=lumaAtCoord(vUV+vec2( 1.0,0.0)/size);\nfloat lumaV0=lumaAtCoord(vUV+vec2( 0.0,-1.0)/size);\nfloat lumaV1=lumaAtCoord(vUV+vec2( 0.0,1.0)/size);\nvec2 slope=(vec2(lumaU0-lumaU1,lumaV0-lumaV1)+1.0)*0.5;\ngl_FragColor=vec4(slope,1.0,1.0);\n}\n";n.ShaderStore.ShadersStore.normalMapProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,n,i){void 0===o&&(o=null);var a=e.call(this,r,t,"normalMapProceduralTexture",o,n,i)||this;return a.updateShaderUniforms(),a}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setTexture("baseSampler",this._baseTexture),this.setFloat("size",this.getRenderSize())},r.prototype.render=function(r){e.prototype.render.call(this,r)},r.prototype.resize=function(r,t){e.prototype.resize.call(this,r,t),this.updateShaderUniforms()},r.prototype.isReady=function(){return!(!this._baseTexture||!this._baseTexture.isReady())&&e.prototype.isReady.call(this)},Object.defineProperty(r.prototype,"baseTexture",{get:function(){return this._baseTexture},set:function(e){this._baseTexture=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.NormalMapProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serializeAsTexture)()],r.prototype,"baseTexture",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.NormalMapProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"PerlinNoiseProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="\nprecision highp float;\n\nuniform float size;\nuniform float time;\nuniform float translationSpeed;\n\nvarying vec2 vUV;\n\nfloat r(float n)\n{\nreturn fract(cos(n*89.42)*343.42);\n}\nvec2 r(vec2 n)\n{\nreturn vec2(r(n.x*23.62-300.0+n.y*34.35),r(n.x*45.13+256.0+n.y*38.89));\n}\nfloat worley(vec2 n,float s)\n{\nfloat dis=1.0;\nfor(int x=-1; x<=1; x++)\n{\nfor(int y=-1; y<=1; y++)\n{\nvec2 p=floor(n/s)+vec2(x,y);\nfloat d=length(r(p)+vec2(x,y)-fract(n/s));\nif (dis>d)\ndis=d;\n}\n}\nreturn 1.0-dis;\n}\nvec3 hash33(vec3 p3)\n{\np3=fract(p3*vec3(0.1031,0.11369,0.13787));\np3+=dot(p3,p3.yxz+19.19);\nreturn -1.0+2.0*fract(vec3((p3.x+p3.y)*p3.z,(p3.x+p3.z)*p3.y,(p3.y+p3.z)*p3.x));\n}\nfloat perlinNoise(vec3 p)\n{\nvec3 pi=floor(p);\nvec3 pf=p-pi;\nvec3 w=pf*pf*(3.0-2.0*pf);\nreturn mix(\nmix(\nmix(\ndot(pf-vec3(0,0,0),hash33(pi+vec3(0,0,0))),\ndot(pf-vec3(1,0,0),hash33(pi+vec3(1,0,0))),\nw.x\n),\nmix(\ndot(pf-vec3(0,0,1),hash33(pi+vec3(0,0,1))),\ndot(pf-vec3(1,0,1),hash33(pi+vec3(1,0,1))),\nw.x\n),\nw.z\n),\nmix(\nmix(\ndot(pf-vec3(0,1,0),hash33(pi+vec3(0,1,0))),\ndot(pf-vec3(1,1,0),hash33(pi+vec3(1,1,0))),\nw.x\n),\nmix(\ndot(pf-vec3(0,1,1),hash33(pi+vec3(0,1,1))),\ndot(pf-vec3(1,1,1),hash33(pi+vec3(1,1,1))),\nw.x\n),\nw.z\n),\nw.y\n);\n}\n\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\nvec2 uv=gl_FragCoord.xy+translationSpeed;\nfloat dis=(\n1.0+perlinNoise(vec3(uv/vec2(size,size),time*0.05)*8.0))\n*(1.0+(worley(uv,32.0)+ 0.5*worley(2.0*uv,32.0)+0.25*worley(4.0*uv,32.0))\n);\ngl_FragColor=vec4(vec3(dis/4.0),1.0);\n}\n";n.ShaderStore.ShadersStore.perlinNoiseProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,n,i){void 0===o&&(o=null);var a=e.call(this,r,t,"perlinNoiseProceduralTexture",o,n,i)||this;return a.time=0,a.timeScale=1,a.translationSpeed=1,a._currentTranslation=0,a.updateShaderUniforms(),a}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setFloat("size",this.getRenderSize());var e=this.getScene();if(e){var r=e.getEngine().getDeltaTime();this.time+=r,this.setFloat("time",this.time*this.timeScale/1e3),this._currentTranslation+=r*this.translationSpeed/1e3,this.setFloat("translationSpeed",this._currentTranslation)}},r.prototype.render=function(r){this.updateShaderUniforms(),e.prototype.render.call(this,r)},r.prototype.resize=function(r,t){e.prototype.resize.call(this,r,t)},r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.PerlinNoiseProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serialize)()],r.prototype,"time",void 0),Object(o.a)([Object(n.serialize)()],r.prototype,"timeScale",void 0),Object(o.a)([Object(n.serialize)()],r.prototype,"translationSpeed",void 0),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.PerlinNoiseProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"RoadProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nvarying vec2 vUV;\nuniform vec3 roadColor;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,amplitude=1.0;\nfor (int i=0; i<4; i++) {\ntotal+=noise(n)*amplitude;\nn+=n;\namplitude*=0.5;\n}\nreturn total;\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nfloat ratioy=mod(gl_FragCoord.y*100.0 ,fbm(vUV*2.0));\nvec3 color=roadColor*ratioy;\ngl_FragColor=vec4(color,1.0);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";n.ShaderStore.ShadersStore.roadProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,i,a){void 0===o&&(o=null);var l=e.call(this,r,t,"roadProceduralTexture",o,i,a)||this;return l._roadColor=new n.Color3(.53,.53,.53),l.updateShaderUniforms(),l}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setColor3("roadColor",this._roadColor)},Object.defineProperty(r.prototype,"roadColor",{get:function(){return this._roadColor},set:function(e){this._roadColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.RoadProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serializeAsColor3)()],r.prototype,"roadColor",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.RoadProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"StarfieldProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\n\n#define volsteps 20\n#define iterations 15\nvarying vec2 vPosition;\nvarying vec2 vUV;\nuniform float time;\nuniform float alpha;\nuniform float beta;\nuniform float zoom;\nuniform float formuparam;\nuniform float stepsize;\nuniform float tile;\nuniform float brightness;\nuniform float darkmatter;\nuniform float distfading;\nuniform float saturation;\nvoid main()\n{\nvec3 dir=vec3(vUV*zoom,1.);\nfloat localTime=time*0.0001;\n\nmat2 rot1=mat2(cos(alpha),sin(alpha),-sin(alpha),cos(alpha));\nmat2 rot2=mat2(cos(beta),sin(beta),-sin(beta),cos(beta));\ndir.xz*=rot1;\ndir.xy*=rot2;\nvec3 from=vec3(1.,.5,0.5);\nfrom+=vec3(-2.,localTime*2.,localTime);\nfrom.xz*=rot1;\nfrom.xy*=rot2;\n\nfloat s=0.1,fade=1.;\nvec3 v=vec3(0.);\nfor (int r=0; r<volsteps; r++) {\nvec3 p=from+s*dir*.5;\np=abs(vec3(tile)-mod(p,vec3(tile*2.)));\nfloat pa,a=pa=0.;\nfor (int i=0; i<iterations; i++) {\np=abs(p)/dot(p,p)-formuparam;\na+=abs(length(p)-pa);\npa=length(p);\n}\nfloat dm=max(0.,darkmatter-a*a*.001);\na*=a*a;\nif (r>6) fade*=1.-dm;\n\nv+=fade;\nv+=vec3(s,s*s,s*s*s*s)*a*brightness*fade;\nfade*=distfading;\ns+=stepsize;\n}\nv=mix(vec3(length(v)),v,saturation);\ngl_FragColor=vec4(v*.01,1.);\n}";n.ShaderStore.ShadersStore.starfieldProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,n,i){void 0===o&&(o=null);var a=e.call(this,r,t,"starfieldProceduralTexture",o,n,i)||this;return a._time=1,a._alpha=.5,a._beta=.8,a._zoom=.8,a._formuparam=.53,a._stepsize=.1,a._tile=.85,a._brightness=.0015,a._darkmatter=.4,a._distfading=.73,a._saturation=.85,a.updateShaderUniforms(),a}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setFloat("time",this._time),this.setFloat("alpha",this._alpha),this.setFloat("beta",this._beta),this.setFloat("zoom",this._zoom),this.setFloat("formuparam",this._formuparam),this.setFloat("stepsize",this._stepsize),this.setFloat("tile",this._tile),this.setFloat("brightness",this._brightness),this.setFloat("darkmatter",this._darkmatter),this.setFloat("distfading",this._distfading),this.setFloat("saturation",this._saturation)},Object.defineProperty(r.prototype,"time",{get:function(){return this._time},set:function(e){this._time=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"alpha",{get:function(){return this._alpha},set:function(e){this._alpha=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"beta",{get:function(){return this._beta},set:function(e){this._beta=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"formuparam",{get:function(){return this._formuparam},set:function(e){this._formuparam=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stepsize",{get:function(){return this._stepsize},set:function(e){this._stepsize=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"zoom",{get:function(){return this._zoom},set:function(e){this._zoom=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tile",{get:function(){return this._tile},set:function(e){this._tile=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"brightness",{get:function(){return this._brightness},set:function(e){this._brightness=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"darkmatter",{get:function(){return this._darkmatter},set:function(e){this._darkmatter=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"distfading",{get:function(){return this._distfading},set:function(e){this._distfading=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"saturation",{get:function(){return this._saturation},set:function(e){this._saturation=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.StarfieldProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serialize)()],r.prototype,"time",null),Object(o.a)([Object(n.serialize)()],r.prototype,"alpha",null),Object(o.a)([Object(n.serialize)()],r.prototype,"beta",null),Object(o.a)([Object(n.serialize)()],r.prototype,"formuparam",null),Object(o.a)([Object(n.serialize)()],r.prototype,"stepsize",null),Object(o.a)([Object(n.serialize)()],r.prototype,"zoom",null),Object(o.a)([Object(n.serialize)()],r.prototype,"tile",null),Object(o.a)([Object(n.serialize)()],r.prototype,"brightness",null),Object(o.a)([Object(n.serialize)()],r.prototype,"darkmatter",null),Object(o.a)([Object(n.serialize)()],r.prototype,"distfading",null),Object(o.a)([Object(n.serialize)()],r.prototype,"saturation",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.StarfieldProceduralTexture",a)},function(e,r,t){"use strict";t.r(r),t.d(r,"WoodProceduralTexture",(function(){return a}));var o=t(1),n=t(0),i="precision highp float;\nvarying vec2 vPosition;\nvarying vec2 vUV;\nuniform float ampScale;\nuniform vec3 woodColor;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,amplitude=1.0;\nfor (int i=0; i<4; i++) {\ntotal+=noise(n)*amplitude;\nn+=n;\namplitude*=0.5;\n}\nreturn total;\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nfloat ratioy=mod(vUV.x*ampScale,2.0+fbm(vUV*0.8));\nvec3 wood=woodColor*ratioy;\ngl_FragColor=vec4(wood,1.0);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";n.ShaderStore.ShadersStore.woodProceduralTexturePixelShader=i;var a=function(e){function r(r,t,o,i,a){void 0===o&&(o=null);var l=e.call(this,r,t,"woodProceduralTexture",o,i,a)||this;return l._ampScale=100,l._woodColor=new n.Color3(.32,.17,.09),l.updateShaderUniforms(),l}return Object(o.b)(r,e),r.prototype.updateShaderUniforms=function(){this.setFloat("ampScale",this._ampScale),this.setColor3("woodColor",this._woodColor)},Object.defineProperty(r.prototype,"ampScale",{get:function(){return this._ampScale},set:function(e){this._ampScale=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"woodColor",{get:function(){return this._woodColor},set:function(e){this._woodColor=e,this.updateShaderUniforms()},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var r=n.SerializationHelper.Serialize(this,e.prototype.serialize.call(this));return r.customType="BABYLON.WoodProceduralTexture",r},r.Parse=function(e,t,o){return n.SerializationHelper.Parse((function(){return new r(e.name,e._size,t,void 0,e._generateMipMaps)}),e,t,o)},Object(o.a)([Object(n.serialize)()],r.prototype,"ampScale",null),Object(o.a)([Object(n.serializeAsColor3)()],r.prototype,"woodColor",null),r}(n.ProceduralTexture);Object(n.RegisterClass)("BABYLON.WoodProceduralTexture",a)},function(e,r,t){"use strict";t.r(r);var o=t(3);t.d(r,"BrickProceduralTexture",(function(){return o.BrickProceduralTexture}));var n=t(4);t.d(r,"CloudProceduralTexture",(function(){return n.CloudProceduralTexture}));var i=t(5);t.d(r,"FireProceduralTexture",(function(){return i.FireProceduralTexture}));var a=t(6);t.d(r,"GrassProceduralTexture",(function(){return a.GrassProceduralTexture}));var l=t(7);t.d(r,"MarbleProceduralTexture",(function(){return l.MarbleProceduralTexture}));var u=t(8);t.d(r,"NormalMapProceduralTexture",(function(){return u.NormalMapProceduralTexture}));var s=t(9);t.d(r,"PerlinNoiseProceduralTexture",(function(){return s.PerlinNoiseProceduralTexture}));var c=t(10);t.d(r,"RoadProceduralTexture",(function(){return c.RoadProceduralTexture}));var f=t(11);t.d(r,"StarfieldProceduralTexture",(function(){return f.StarfieldProceduralTexture}));var d=t(12);t.d(r,"WoodProceduralTexture",(function(){return d.WoodProceduralTexture}))},function(e,r,t){"use strict";t.r(r),function(e){var o=t(13);t.d(r,"BrickProceduralTexture",(function(){return o.BrickProceduralTexture})),t.d(r,"CloudProceduralTexture",(function(){return o.CloudProceduralTexture})),t.d(r,"FireProceduralTexture",(function(){return o.FireProceduralTexture})),t.d(r,"GrassProceduralTexture",(function(){return o.GrassProceduralTexture})),t.d(r,"MarbleProceduralTexture",(function(){return o.MarbleProceduralTexture})),t.d(r,"NormalMapProceduralTexture",(function(){return o.NormalMapProceduralTexture})),t.d(r,"PerlinNoiseProceduralTexture",(function(){return o.PerlinNoiseProceduralTexture})),t.d(r,"RoadProceduralTexture",(function(){return o.RoadProceduralTexture})),t.d(r,"StarfieldProceduralTexture",(function(){return o.StarfieldProceduralTexture})),t.d(r,"WoodProceduralTexture",(function(){return o.WoodProceduralTexture}));var n=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==n)for(var i in n.BABYLON=n.BABYLON||{},o)n.BABYLON[i]=o[i]}.call(this,t(2))}])}));
libs/babylonjs.serializers.min.js ADDED
@@ -0,0 +1 @@
 
 
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-serializers",["babylonjs"],t):"object"==typeof exports?exports["babylonjs-serializers"]=t(require("babylonjs")):e.SERIALIZERS=t(e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),a=function(){function e(){}return e._CreateBufferView=function(e,t,r,n,a){var o={buffer:e,byteLength:r};return t&&(o.byteOffset=t),a&&(o.name=a),n&&(o.byteStride=n),o},e._CreateAccessor=function(e,t,r,n,a,o,i,s){var u={name:t,bufferView:e,componentType:n,count:a,type:r};return null!=i&&(u.min=i),null!=s&&(u.max=s),null!=o&&(u.byteOffset=o),u},e._CalculateMinMaxPositions=function(t,r,a,o){var i,s,u,l=[1/0,1/0,1/0],c=[-1/0,-1/0,-1/0];if(a)for(var f=r,h=r+a;f<h;++f){i=3*f,s=n.Vector3.FromArray(t,i),o&&e._GetRightHandedPositionVector3FromRef(s),u=s.asArray();for(var p=0;p<3;++p){var d=u[p];d<l[p]&&(l[p]=d),d>c[p]&&(c[p]=d),++i}}return{min:l,max:c}},e._GetRightHandedPositionVector3=function(e){return new n.Vector3(e.x,e.y,-e.z)},e._GetRightHandedPositionVector3FromRef=function(e){e.z*=-1},e._GetRightHandedPositionArray3FromRef=function(e){e[2]*=-1},e._GetRightHandedNormalVector3=function(e){return new n.Vector3(e.x,e.y,-e.z)},e._GetRightHandedNormalVector3FromRef=function(e){e.z*=-1},e._GetRightHandedNormalArray3FromRef=function(e){e[2]*=-1},e._GetRightHandedVector4FromRef=function(e){e.z*=-1,e.w*=-1},e._GetRightHandedArray4FromRef=function(e){e[2]*=-1,e[3]*=-1},e._GetRightHandedQuaternionFromRef=function(e){e.x*=-1,e.y*=-1},e._GetRightHandedQuaternionArrayFromRef=function(e){e[0]*=-1,e[1]*=-1},e._NormalizeTangentFromRef=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);t>0&&(e.x/=t,e.y/=t,e.z/=t)},e._GetDataAccessorElementCount=function(e){switch(e){case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16;case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":return 4}},e}()},function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return c}));var n=r(3),a=r(0),o=r(11),i=r(1),s=r(4),u=r(8),l=function(){function e(e,t){this._includeCoordinateSystemConversionNodes=!1,this._extensions={},this._glTF={asset:{generator:"BabylonJS",version:"2.0"}},(e=e||a.EngineStore.LastCreatedScene)&&(this._babylonScene=e,this._bufferViews=[],this._accessors=[],this._meshes=[],this._scenes=[],this._cameras=[],this._nodes=[],this._images=[],this._materials=[],this._materialMap=[],this._textures=[],this._samplers=[],this._skins=[],this._animations=[],this._imageData={},this._orderedImageData=[],this._options=t||{},this._animationSampleRate=t&&t.animationSampleRate?t.animationSampleRate:1/60,this._includeCoordinateSystemConversionNodes=!(!t||!t.includeCoordinateSystemConversionNodes),this._glTFMaterialExporter=new o.a(this),this._loadExtensions())}return e.prototype._applyExtension=function(e,t,r,n){var a=this;if(r>=t.length)return Promise.resolve(e);var o=n(t[r],e);return o?o.then((function(e){return a._applyExtension(e,t,r+1,n)})):this._applyExtension(e,t,r+1,n)},e.prototype._applyExtensions=function(t,r){for(var n=[],a=0,o=e._ExtensionNames;a<o.length;a++){var i=o[a];n.push(this._extensions[i])}return this._applyExtension(t,n,0,r)},e.prototype._extensionsPreExportTextureAsync=function(e,t,r){return this._applyExtensions(t,(function(t,n){return t.preExportTextureAsync&&t.preExportTextureAsync(e,n,r)}))},e.prototype._extensionsPostExportMeshPrimitiveAsync=function(e,t,r,n){return this._applyExtensions(t,(function(t,a){return t.postExportMeshPrimitiveAsync&&t.postExportMeshPrimitiveAsync(e,a,r,n)}))},e.prototype._extensionsPostExportNodeAsync=function(e,t,r,n){return this._applyExtensions(t,(function(t,a){return t.postExportNodeAsync&&t.postExportNodeAsync(e,a,r,n)}))},e.prototype._extensionsPostExportMaterialAsync=function(e,t,r){return this._applyExtensions(t,(function(t,n){return t.postExportMaterialAsync&&t.postExportMaterialAsync(e,n,r)}))},e.prototype._extensionsPostExportMaterialAdditionalTextures=function(t,r,n){for(var a=[],o=0,i=e._ExtensionNames;o<i.length;o++){var s=i[o],u=this._extensions[s];u.postExportMaterialAdditionalTextures&&a.push.apply(a,u.postExportMaterialAdditionalTextures(t,r,n))}return a},e.prototype._extensionsPostExportTextures=function(t,r,n){for(var a=0,o=e._ExtensionNames;a<o.length;a++){var i=o[a],s=this._extensions[i];s.postExportTexture&&s.postExportTexture(t,r,n)}},e.prototype._forEachExtensions=function(t){for(var r=0,n=e._ExtensionNames;r<n.length;r++){var a=n[r],o=this._extensions[a];o.enabled&&t(o)}},e.prototype._extensionsOnExporting=function(){var e=this;this._forEachExtensions((function(t){t.wasUsed&&(null==e._glTF.extensionsUsed&&(e._glTF.extensionsUsed=[]),-1===e._glTF.extensionsUsed.indexOf(t.name)&&e._glTF.extensionsUsed.push(t.name),t.required&&(null==e._glTF.extensionsRequired&&(e._glTF.extensionsRequired=[]),-1===e._glTF.extensionsRequired.indexOf(t.name)&&e._glTF.extensionsRequired.push(t.name)),null==e._glTF.extensions&&(e._glTF.extensions={}),t.onExporting&&t.onExporting())}))},e.prototype._loadExtensions=function(){for(var t=0,r=e._ExtensionNames;t<r.length;t++){var n=r[t],a=e._ExtensionFactories[n](this);this._extensions[n]=a}},e.prototype.dispose=function(){for(var e in this._extensions){this._extensions[e].dispose()}},e.RegisterExtension=function(t,r){e.UnregisterExtension(t)&&a.Tools.Warn("Extension with the name ".concat(t," already exists")),e._ExtensionFactories[t]=r,e._ExtensionNames.push(t)},e.UnregisterExtension=function(t){if(!e._ExtensionFactories[t])return!1;delete e._ExtensionFactories[t];var r=e._ExtensionNames.indexOf(t);return-1!==r&&e._ExtensionNames.splice(r,1),!0},e.prototype.reorderIndicesBasedOnPrimitiveMode=function(e,t,r,n,o){switch(t){case a.Material.TriangleFillMode:n||(n=0);for(var i=e.indexStart,s=e.indexStart+e.indexCount;i<s;i+=3){var u=n+4*i,l=o.getUInt32(u+4),c=o.getUInt32(u+8);o.setUInt32(c,u+4),o.setUInt32(l,u+8)}break;case a.Material.TriangleFanDrawMode:i=e.indexStart+e.indexCount-1;for(var f=e.indexStart;i>=f;--i)o.setUInt32(r[i],n),n+=4;break;case a.Material.TriangleStripDrawMode:e.indexCount>=3&&(o.setUInt32(r[e.indexStart+2],n+4),o.setUInt32(r[e.indexStart+1],n+8))}},e.prototype.reorderVertexAttributeDataBasedOnPrimitiveMode=function(e,t,r,n,o,i,s,u){if(u&&r===a.Material.ClockWiseSideOrientation)switch(t){case a.Material.TriangleFillMode:this.reorderTriangleFillMode(e,t,r,n,o,i,s,u);break;case a.Material.TriangleStripDrawMode:this.reorderTriangleStripDrawMode(e,t,r,n,o,i,s,u);break;case a.Material.TriangleFanDrawMode:this.reorderTriangleFanMode(e,t,r,n,o,i,s,u)}},e.prototype.reorderTriangleFillMode=function(e,t,r,n,o,i,s,u){var l=this.getVertexBufferFromMesh(n,e.getMesh());if(l){var c=l.byteStride/a.VertexBuffer.GetTypeByteLength(l.type);if(e.verticesCount%3!=0)a.Tools.Error("The submesh vertices for the triangle fill mode is not divisible by 3!");else{var f=[],h=0;switch(n){case a.VertexBuffer.PositionKind:case a.VertexBuffer.NormalKind:for(var p=e.verticesStart;p<e.verticesStart+e.verticesCount;p+=3)h=p*c,f.push(a.Vector3.FromArray(o,h)),f.push(a.Vector3.FromArray(o,h+2*c)),f.push(a.Vector3.FromArray(o,h+c));break;case a.VertexBuffer.TangentKind:for(p=e.verticesStart;p<e.verticesStart+e.verticesCount;p+=3)h=p*c,f.push(a.Vector4.FromArray(o,h)),f.push(a.Vector4.FromArray(o,h+2*c)),f.push(a.Vector4.FromArray(o,h+c));break;case a.VertexBuffer.ColorKind:var d=l.getSize();for(p=e.verticesStart;p<e.verticesStart+e.verticesCount;p+=d)h=p*c,4===d?(f.push(a.Vector4.FromArray(o,h)),f.push(a.Vector4.FromArray(o,h+2*c)),f.push(a.Vector4.FromArray(o,h+c))):(f.push(a.Vector3.FromArray(o,h)),f.push(a.Vector3.FromArray(o,h+2*c)),f.push(a.Vector3.FromArray(o,h+c)));break;case a.VertexBuffer.UVKind:case a.VertexBuffer.UV2Kind:for(p=e.verticesStart;p<e.verticesStart+e.verticesCount;p+=3)h=p*c,f.push(a.Vector2.FromArray(o,h)),f.push(a.Vector2.FromArray(o,h+2*c)),f.push(a.Vector2.FromArray(o,h+c));break;default:a.Tools.Error("Unsupported Vertex Buffer type: ".concat(n))}this.writeVertexAttributeData(f,i,n,o,s,u)}}else a.Tools.Warn("reorderTriangleFillMode: Vertex Buffer Kind ".concat(n," not present!"))},e.prototype.reorderTriangleStripDrawMode=function(e,t,r,n,o,i,s,u){var l=this.getVertexBufferFromMesh(n,e.getMesh());if(l){var c=l.byteStride/a.VertexBuffer.GetTypeByteLength(l.type),f=[],h=0;switch(n){case a.VertexBuffer.PositionKind:case a.VertexBuffer.NormalKind:h=e.verticesStart,f.push(a.Vector3.FromArray(o,h+2*c)),f.push(a.Vector3.FromArray(o,h+c));break;case a.VertexBuffer.TangentKind:for(var p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector4.FromArray(o,h));break;case a.VertexBuffer.ColorKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,4===l.getSize()?f.push(a.Vector4.FromArray(o,h)):f.push(a.Vector3.FromArray(o,h));break;case a.VertexBuffer.UVKind:case a.VertexBuffer.UV2Kind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector2.FromArray(o,h));break;default:a.Tools.Error("Unsupported Vertex Buffer type: ".concat(n))}this.writeVertexAttributeData(f,i+12,n,o,s,u)}else a.Tools.Warn("reorderTriangleStripDrawMode: Vertex buffer kind ".concat(n," not present!"))},e.prototype.reorderTriangleFanMode=function(e,t,r,n,o,i,s,u){var l=this.getVertexBufferFromMesh(n,e.getMesh());if(l){var c=l.byteStride/a.VertexBuffer.GetTypeByteLength(l.type),f=[],h=0;switch(n){case a.VertexBuffer.PositionKind:case a.VertexBuffer.NormalKind:for(var p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector3.FromArray(o,h));break;case a.VertexBuffer.TangentKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector4.FromArray(o,h));break;case a.VertexBuffer.ColorKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector4.FromArray(o,h)),4===l.getSize()?f.push(a.Vector4.FromArray(o,h)):f.push(a.Vector3.FromArray(o,h));break;case a.VertexBuffer.UVKind:case a.VertexBuffer.UV2Kind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector2.FromArray(o,h));break;default:a.Tools.Error("Unsupported Vertex Buffer type: ".concat(n))}this.writeVertexAttributeData(f,i,n,o,s,u)}else a.Tools.Warn("reorderTriangleFanMode: Vertex buffer kind ".concat(n," not present!"))},e.prototype.writeVertexAttributeData=function(e,t,r,n,o,s){for(var u=0,l=e;u<l.length;u++){var c=l[u];!s||r===a.VertexBuffer.ColorKind||c instanceof a.Vector2||(c instanceof a.Vector3?r===a.VertexBuffer.NormalKind?i.a._GetRightHandedNormalVector3FromRef(c):r===a.VertexBuffer.PositionKind?i.a._GetRightHandedPositionVector3FromRef(c):a.Tools.Error("Unsupported vertex attribute kind!"):i.a._GetRightHandedVector4FromRef(c)),r===a.VertexBuffer.NormalKind?c.normalize():r===a.VertexBuffer.TangentKind&&c instanceof a.Vector4&&i.a._NormalizeTangentFromRef(c);for(var f=0,h=c.asArray();f<h.length;f++){var p=h[f];o.setFloat32(p,t),t+=4}}},e.prototype.writeAttributeData=function(e,t,r,n,o,s,u){var l,c,f=[];switch(e){case a.VertexBuffer.PositionKind:for(var h=0,p=r.length/n;h<p;++h){l=h*n;var d=a.Vector3.FromArray(r,l);s&&i.a._GetRightHandedPositionVector3FromRef(d),f.push(d.asArray())}break;case a.VertexBuffer.NormalKind:h=0;for(var m=r.length/n;h<m;++h){l=h*n;d=a.Vector3.FromArray(r,l);s&&i.a._GetRightHandedNormalVector3FromRef(d),d.normalize(),f.push(d.asArray())}break;case a.VertexBuffer.TangentKind:h=0;for(var g=r.length/n;h<g;++h){l=h*n;d=a.Vector4.FromArray(r,l);s&&i.a._GetRightHandedVector4FromRef(d),i.a._NormalizeTangentFromRef(d),f.push(d.asArray())}break;case a.VertexBuffer.ColorKind:for(var _=u.material,x=!_||"StandardMaterial"===_.getClassName(),y=(d=3===n?new a.Color3:new a.Color4,h=0,r.length/n);h<y;++h)l=h*n,3===n?(a.Color3.FromArrayToRef(r,l,d),x&&d.toLinearSpaceToRef(d)):(a.Color4.FromArrayToRef(r,l,d),x&&d.toLinearSpaceToRef(d)),f.push(d.asArray());break;case a.VertexBuffer.UVKind:case a.VertexBuffer.UV2Kind:h=0;for(var T=r.length/n;h<T;++h)l=h*n,f.push([r[l],r[l+1]]);break;case a.VertexBuffer.MatricesIndicesKind:case a.VertexBuffer.MatricesIndicesExtraKind:h=0;for(var v=r.length/n;h<v;++h){l=h*n;d=a.Vector4.FromArray(r,l);f.push(d.asArray())}break;case a.VertexBuffer.MatricesWeightsKind:case a.VertexBuffer.MatricesWeightsExtraKind:h=0;for(var b=r.length/n;h<b;++h){l=h*n;d=a.Vector4.FromArray(r,l);f.push(d.asArray())}break;default:a.Tools.Warn("Unsupported Vertex Buffer Type: "+e),f=[]}switch(t){case 5121:c=o.setUInt8.bind(o);break;case 5123:c=o.setUInt16.bind(o);break;case 5125:c=o.setUInt32.bind(o);case 5126:c=o.setFloat32.bind(o);break;default:return void a.Tools.Warn("Unsupported Attribute Component kind: "+t)}for(var A=0,F=f;A<F.length;A++)for(var E=0,M=F[A];E<M.length;E++){c(M[E])}},e.prototype.writeMorphTargetAttributeData=function(e,t,r,n,o,s,u,l,c,f){var h,p,d=[],m=new a.Vector3,g=new a.Vector4(0,0,0,0);switch(e){case a.VertexBuffer.PositionKind:for(var _=r.verticesStart;_<r.verticesCount;++_){h=r.indexStart+_*u;var x=a.Vector3.FromArray(o,h);m=(y=a.Vector3.FromArray(s,h)).subtractToRef(x,m),c&&i.a._GetRightHandedPositionVector3FromRef(m),f&&(f.min.copyFromFloats(Math.min(m.x,f.min.x),Math.min(m.y,f.min.y),Math.min(m.z,f.min.z)),f.max.copyFromFloats(Math.max(m.x,f.max.x),Math.max(m.y,f.max.y),Math.max(m.z,f.max.z))),d.push(m.asArray())}break;case a.VertexBuffer.NormalKind:for(_=r.verticesStart;_<r.verticesCount;++_){h=r.indexStart+_*u,(x=a.Vector3.FromArray(o,h)).normalize(),(y=a.Vector3.FromArray(s,h)).normalize(),m=y.subtractToRef(x,m),c&&i.a._GetRightHandedNormalVector3FromRef(m),d.push(m.asArray())}break;case a.VertexBuffer.TangentKind:for(_=r.verticesStart;_<r.verticesCount;++_){h=r.indexStart+_*(u+1);x=a.Vector4.FromArray(o,h);i.a._NormalizeTangentFromRef(x);var y=a.Vector4.FromArray(s,h);i.a._NormalizeTangentFromRef(y),g=y.subtractToRef(x,g),c&&i.a._GetRightHandedVector4FromRef(g),d.push([g.x,g.y,g.z])}break;default:a.Tools.Warn("Unsupported Vertex Buffer Type: "+e),d=[]}switch(t){case 5121:p=l.setUInt8.bind(l);break;case 5123:p=l.setUInt16.bind(l);break;case 5125:p=l.setUInt32.bind(l);case 5126:p=l.setFloat32.bind(l);break;default:return void a.Tools.Warn("Unsupported Attribute Component kind: "+t)}for(var T=0,v=d;T<v.length;T++)for(var b=0,A=v[T];b<A.length;b++){p(A[b])}},e.prototype.generateJSON=function(e,t,r){var n,a,o,s=this,u={byteLength:this._totalByteLength},l=this._totalByteLength;return u.byteLength&&(this._glTF.buffers=[u]),this._nodes&&this._nodes.length&&(this._glTF.nodes=this._nodes),this._meshes&&this._meshes.length&&(this._glTF.meshes=this._meshes),this._scenes&&this._scenes.length&&(this._glTF.scenes=this._scenes,this._glTF.scene=0),this._cameras&&this._cameras.length&&(this._glTF.cameras=this._cameras),this._bufferViews&&this._bufferViews.length&&(this._glTF.bufferViews=this._bufferViews),this._accessors&&this._accessors.length&&(this._glTF.accessors=this._accessors),this._animations&&this._animations.length&&(this._glTF.animations=this._animations),this._materials&&this._materials.length&&(this._glTF.materials=this._materials),this._textures&&this._textures.length&&(this._glTF.textures=this._textures),this._samplers&&this._samplers.length&&(this._glTF.samplers=this._samplers),this._skins&&this._skins.length&&(this._glTF.skins=this._skins),this._images&&this._images.length&&(e?(this._glTF.images=[],this._images.forEach((function(e){e.uri&&(a=s._imageData[e.uri],s._orderedImageData.push(a),n=e.uri.split(".")[0]+" image",o=i.a._CreateBufferView(0,l,a.data.length,void 0,n),l+=a.data.buffer.byteLength,s._bufferViews.push(o),e.bufferView=s._bufferViews.length-1,e.name=n,e.mimeType=a.mimeType,e.uri=void 0,s._glTF.images||(s._glTF.images=[]),s._glTF.images.push(e))})),u.byteLength=l):this._glTF.images=this._images),e||(u.uri=t+".bin"),r?JSON.stringify(this._glTF,null,2):JSON.stringify(this._glTF)},e.prototype._generateGLTFAsync=function(e,t){var r=this;return void 0===t&&(t=!0),this._generateBinaryAsync().then((function(n){r._extensionsOnExporting();var a=r.generateJSON(!1,e,!0),o=new Blob([n],{type:"application/octet-stream"}),i=e+".gltf",u=e+".bin",l=new s.GLTFData;if(l.glTFFiles[i]=a,l.glTFFiles[u]=o,r._imageData)for(var c in r._imageData)l.glTFFiles[c]=new Blob([r._imageData[c].data],{type:r._imageData[c].mimeType});return t&&r.dispose(),l}))},e.prototype._generateBinaryAsync=function(){var e=this,t=new c(4);return this.createSceneAsync(this._babylonScene,t).then((function(){return e._localEngine&&e._localEngine.dispose(),t.getArrayBuffer()}))},e.prototype._getPadding=function(e){var t=e%4;return 0===t?t:4-t},e.prototype._generateGLBAsync=function(e,t){var r=this;return void 0===t&&(t=!0),this._generateBinaryAsync().then((function(n){r._extensionsOnExporting();var a,o=r.generateJSON(!0),i=e+".glb",u=o.length,l=0;"undefined"!=typeof TextEncoder&&(u=(a=(new TextEncoder).encode(o)).length);for(var c=0;c<r._orderedImageData.length;++c)l+=r._orderedImageData[c].data.byteLength;var f=r._getPadding(u),h=r._getPadding(n.byteLength),p=r._getPadding(l),d=28+u+f+n.byteLength+h+l+p,m=new ArrayBuffer(12),g=new DataView(m);g.setUint32(0,1179937895,!0),g.setUint32(4,2,!0),g.setUint32(8,d,!0);var _=new ArrayBuffer(8+u+f),x=new DataView(_);x.setUint32(0,u+f,!0),x.setUint32(4,1313821514,!0);var y=new Uint8Array(_,8);if(a)y.set(a);else{var T="_".charCodeAt(0);for(c=0;c<u;++c){var v=o.charCodeAt(c);v!=o.codePointAt(c)?y[c]=T:y[c]=v}}var b=new Uint8Array(_,8+u);for(c=0;c<f;++c)b[c]=32;var A=new ArrayBuffer(8),F=new DataView(A);F.setUint32(0,n.byteLength+l+p,!0),F.setUint32(4,5130562,!0);var E=new ArrayBuffer(h),M=new Uint8Array(E);for(c=0;c<h;++c)M[c]=0;var R=new ArrayBuffer(p),C=new Uint8Array(R);for(c=0;c<p;++c)C[c]=0;var V=[m,_,A,n];for(c=0;c<r._orderedImageData.length;++c)V.push(r._orderedImageData[c].data.buffer);V.push(E),V.push(R);var w=new Blob(V,{type:"application/octet-stream"}),S=new s.GLTFData;return S.glTFFiles[i]=w,null!=r._localEngine&&r._localEngine.dispose(),t&&r.dispose(),S}))},e.prototype.setNodeTransformation=function(e,t,r){t.getPivotPoint().equalsToFloats(0,0,0)||a.Tools.Warn("Pivot points are not supported in the glTF serializer"),t.position.equalsToFloats(0,0,0)||(e.translation=r?i.a._GetRightHandedPositionVector3(t.position).asArray():t.position.asArray()),t.scaling.equalsToFloats(1,1,1)||(e.scale=t.scaling.asArray());var n=a.Quaternion.RotationYawPitchRoll(t.rotation.y,t.rotation.x,t.rotation.z);t.rotationQuaternion&&n.multiplyInPlace(t.rotationQuaternion),a.Quaternion.IsIdentity(n)||(r&&i.a._GetRightHandedQuaternionFromRef(n),e.rotation=n.normalize().asArray())},e.prototype.setCameraTransformation=function(e,t,r){t.position.equalsToFloats(0,0,0)||(e.translation=r?i.a._GetRightHandedPositionVector3(t.position).asArray():t.position.asArray());var n=t.absoluteRotation;a.Quaternion.IsIdentity(n)||(r&&i.a._GetRightHandedQuaternionFromRef(n),e.rotation=n.normalize().asArray())},e.prototype.getVertexBufferFromMesh=function(e,t){if(t.isVerticesDataPresent(e)){var r=t.getVertexBuffer(e);if(r)return r}return null},e.prototype.createBufferViewKind=function(e,t,r,n,o,s){var u=r instanceof a.Mesh?r:r instanceof a.InstancedMesh?r.sourceMesh:null;if(u){var l=u.getVertexBuffer(e),c=u.getVerticesData(e);if(l&&c){var f=a.VertexBuffer.GetTypeByteLength(t),h=c.length*f,p=i.a._CreateBufferView(0,n.getByteOffset(),h,o,e+" - "+u.name);this._bufferViews.push(p),this.writeAttributeData(e,t,c,o/f,n,s,r)}}},e.prototype.setMorphTargetAttributes=function(e,t,r,n,o){if(r){t.targets||(t.targets=[]);var s={};if(r.hasNormals){var u=e.getMesh().getVerticesData(a.VertexBuffer.NormalKind),l=r.getNormals(),c=(_=e.verticesCount)*(x=12),f=i.a._CreateBufferView(0,n.getByteOffset(),c,x,r.name+"_NORMAL");this._bufferViews.push(f);var h=this._bufferViews.length-1,p=i.a._CreateAccessor(h,r.name+" - NORMAL","VEC3",5126,_,0,null,null);this._accessors.push(p),s.NORMAL=this._accessors.length-1,this.writeMorphTargetAttributeData(a.VertexBuffer.NormalKind,5126,e,r,u,l,x/4,n,o)}if(r.hasPositions){var d=e.getMesh().getVerticesData(a.VertexBuffer.PositionKind),m=r.getPositions();c=(_=e.verticesCount)*(x=12),f=i.a._CreateBufferView(0,n.getByteOffset(),c,x,r.name+"_POSITION");this._bufferViews.push(f);h=this._bufferViews.length-1;var g={min:new a.Vector3(1/0,1/0,1/0),max:new a.Vector3(-1/0,-1/0,-1/0)};p=i.a._CreateAccessor(h,r.name+" - POSITION","VEC3",5126,_,0,null,null);this._accessors.push(p),s.POSITION=this._accessors.length-1,this.writeMorphTargetAttributeData(a.VertexBuffer.PositionKind,5126,e,r,d,m,x/4,n,o,g),p.min=g.min.asArray(),p.max=g.max.asArray()}if(r.hasTangents){var _,x,y=e.getMesh().getVerticesData(a.VertexBuffer.TangentKind),T=r.getTangents();c=(_=e.verticesCount)*(x=12),f=i.a._CreateBufferView(0,n.getByteOffset(),c,x,r.name+"_NORMAL");this._bufferViews.push(f);h=this._bufferViews.length-1,p=i.a._CreateAccessor(h,r.name+" - TANGENT","VEC3",5126,_,0,null,null);this._accessors.push(p),s.TANGENT=this._accessors.length-1,this.writeMorphTargetAttributeData(a.VertexBuffer.TangentKind,5126,e,r,y,T,x/4,n,o)}t.targets.push(s)}},e.prototype.getMeshPrimitiveMode=function(e){return e instanceof a.LinesMesh?a.Material.LineListDrawMode:e.material?e.material.fillMode:a.Material.TriangleFillMode},e.prototype.setPrimitiveMode=function(e,t){switch(t){case a.Material.TriangleFillMode:break;case a.Material.TriangleStripDrawMode:e.mode=5;break;case a.Material.TriangleFanDrawMode:e.mode=6;break;case a.Material.PointListDrawMode:e.mode=0;case a.Material.PointFillMode:e.mode=0;break;case a.Material.LineLoopDrawMode:e.mode=2;break;case a.Material.LineListDrawMode:e.mode=1;break;case a.Material.LineStripDrawMode:e.mode=3}},e.prototype.setAttributeKind=function(e,t){switch(t){case a.VertexBuffer.PositionKind:e.attributes.POSITION=this._accessors.length-1;break;case a.VertexBuffer.NormalKind:e.attributes.NORMAL=this._accessors.length-1;break;case a.VertexBuffer.ColorKind:e.attributes.COLOR_0=this._accessors.length-1;break;case a.VertexBuffer.TangentKind:e.attributes.TANGENT=this._accessors.length-1;break;case a.VertexBuffer.UVKind:e.attributes.TEXCOORD_0=this._accessors.length-1;break;case a.VertexBuffer.UV2Kind:e.attributes.TEXCOORD_1=this._accessors.length-1;break;case a.VertexBuffer.MatricesIndicesKind:e.attributes.JOINTS_0=this._accessors.length-1;break;case a.VertexBuffer.MatricesIndicesExtraKind:e.attributes.JOINTS_1=this._accessors.length-1;break;case a.VertexBuffer.MatricesWeightsKind:e.attributes.WEIGHTS_0=this._accessors.length-1;break;case a.VertexBuffer.MatricesWeightsExtraKind:e.attributes.WEIGHTS_1=this._accessors.length-1;break;default:a.Tools.Warn("Unsupported Vertex Buffer Type: "+t)}},e.prototype.setPrimitiveAttributesAsync=function(e,t,r,n){var o,s,u,l=[],c=null;t instanceof a.Mesh?c=t:t instanceof a.InstancedMesh&&(c=t.sourceMesh);var f=[{kind:a.VertexBuffer.PositionKind,accessorType:"VEC3",accessorComponentType:5126,byteStride:12},{kind:a.VertexBuffer.NormalKind,accessorType:"VEC3",accessorComponentType:5126,byteStride:12},{kind:a.VertexBuffer.ColorKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16},{kind:a.VertexBuffer.TangentKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16},{kind:a.VertexBuffer.UVKind,accessorType:"VEC2",accessorComponentType:5126,byteStride:8},{kind:a.VertexBuffer.UV2Kind,accessorType:"VEC2",accessorComponentType:5126,byteStride:8},{kind:a.VertexBuffer.MatricesIndicesKind,accessorType:"VEC4",accessorComponentType:5123,byteStride:8},{kind:a.VertexBuffer.MatricesIndicesExtraKind,accessorType:"VEC4",accessorComponentType:5123,byteStride:8},{kind:a.VertexBuffer.MatricesWeightsKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16},{kind:a.VertexBuffer.MatricesWeightsExtraKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16}];if(c){for(var h=null,p=this.getMeshPrimitiveMode(c),d={},m=c.morphTargetManager,g=0,_=f;g<_.length;g++){var x=(W=_[g]).kind,y=W.accessorComponentType;if(c.isVerticesDataPresent(x)){var T=this.getVertexBufferFromMesh(x,c);W.byteStride=T?T.getSize()*a.VertexBuffer.GetTypeByteLength(W.accessorComponentType):4*a.VertexBuffer.DeduceStride(x),12===W.byteStride&&(W.accessorType="VEC3"),this.createBufferViewKind(x,y,t,r,W.byteStride,n),W.bufferViewIndex=this._bufferViews.length-1,d[x]=W.bufferViewIndex}}if(c.getTotalIndices()){var v=c.getIndices();if(v){var b=4*v.length;s=i.a._CreateBufferView(0,r.getByteOffset(),b,void 0,"Indices - "+c.name),this._bufferViews.push(s),h=this._bufferViews.length-1;for(var A=0,F=v.length;A<F;++A)r.setUInt32(v[A])}}if(c.subMeshes)for(var E=0,M=c.subMeshes;E<M.length;E++){var R=M[E],C=R.getMaterial()||c.getScene().defaultMaterial,V=null;if(C)if(c instanceof a.LinesMesh){var w={name:c.name+" material"};(!c.color.equals(a.Color3.White())||c.alpha<1)&&(w.pbrMetallicRoughness={baseColorFactor:c.color.asArray().concat([c.alpha])}),this._materials.push(w),V=this._materials.length-1}else if("MultiMaterial"===C.getClassName()){var S=C.subMaterials[R.materialIndex];S&&(C=S,V=this._materialMap[C.uniqueId])}else V=this._materialMap[C.uniqueId];var B=null!=V?this._materials[V]:null,I={attributes:{}};this.setPrimitiveMode(I,p);for(var P=0,N=f;P<N.length;P++){if((x=(W=N[P]).kind)!==a.VertexBuffer.UVKind&&x!==a.VertexBuffer.UV2Kind||this._options.exportUnusedUVs||B&&this._glTFMaterialExporter._hasTexturesPresent(B))if(z=c.getVerticesData(x))if(T=this.getVertexBufferFromMesh(x,c)){var L=T.getSize(),O=W.bufferViewIndex;if(null!=O){u={min:null,max:null},x==a.VertexBuffer.PositionKind&&(u=i.a._CalculateMinMaxPositions(z,0,z.length/L,n));var G=i.a._CreateAccessor(O,x+" - "+t.name,W.accessorType,W.accessorComponentType,z.length/L,0,u.min,u.max);this._accessors.push(G),this.setAttributeKind(I,x)}}}if(h){G=i.a._CreateAccessor(h,"indices - "+t.name,"SCALAR",5125,R.indexCount,4*R.indexStart,null,null);this._accessors.push(G),I.indices=this._accessors.length-1}if(null!=V&&Object.keys(I.attributes).length>0){var K=null!==c.overrideMaterialSideOrientation?c.overrideMaterialSideOrientation:C.sideOrientation;if(K==a.Material.ClockWiseSideOrientation&&this._babylonScene.useRightHandedSystem||K==a.Material.ClockWiseSideOrientation&&n&&c.overrideMaterialSideOrientation!==(null===(o=c.material)||void 0===o?void 0:o.sideOrientation)){var k=null!=h?this._bufferViews[h].byteOffset:null;null==k&&(k=0);var U=null;if(null!=h&&(U=c.getIndices()),U)this.reorderIndicesBasedOnPrimitiveMode(R,p,U,k,r);else for(var D=0,H=f;D<H.length;D++){var z,W=H[D];if(z=c.getVerticesData(W.kind)){var j=this._bufferViews[d[W.kind]].byteOffset;j||(j=0),this.reorderVertexAttributeDataBasedOnPrimitiveMode(R,p,K,W.kind,z,j,r,n)}}}I.material=V}if(m)for(var q=void 0,Q=0;Q<m.numTargets;++Q)q=m.getTarget(Q),this.setMorphTargetAttributes(R,I,q,r,n);e.primitives.push(I),this._extensionsPostExportMeshPrimitiveAsync("postExport",I,R,r),l.push()}}return Promise.all(l).then((function(){}))},e.prototype.isBabylonCoordinateSystemConvertingNode=function(e){return e instanceof a.TransformNode&&("__root__"===e.name&&(1!==e.getWorldMatrix().determinant()&&(!(e instanceof a.Mesh&&null!==e.geometry||e instanceof a.InstancedMesh&&null!==e.sourceMesh.geometry)&&!this._includeCoordinateSystemConversionNodes)))},e.prototype.createSceneAsync=function(e,t){var r,o,i,s=this,u={nodes:[]},l=Object(n.c)(Object(n.c)(Object(n.c)(Object(n.c)([],e.transformNodes,!0),e.meshes,!0),e.lights,!0),e.cameras,!0),c=[];this._convertToRightHandedSystem=!e.useRightHandedSystem,this._convertToRightHandedSystemMap={},e.rootNodes.forEach((function(e){s._convertToRightHandedSystemMap[e.uniqueId]=s._convertToRightHandedSystem,e.getDescendants(!1).forEach((function(e){s._convertToRightHandedSystemMap[e.uniqueId]=s._convertToRightHandedSystem}))})),e.rootNodes.forEach((function(e){if(s.isBabylonCoordinateSystemConvertingNode(e)){c.push(e);var t=l.indexOf(e);-1!==t&&l.splice(t,1),e.getDescendants(!1).forEach((function(e){s._convertToRightHandedSystemMap[e.uniqueId]=!1}))}}));var f=new Map;e.cameras.forEach((function(e){var t={type:e.mode===a.Camera.PERSPECTIVE_CAMERA?"perspective":"orthographic"};if(e.name&&(t.name=e.name),"perspective"===t.type)t.perspective={aspectRatio:e.getEngine().getAspectRatio(e),yfov:e._cache.fovMode===a.Camera.FOVMODE_VERTICAL_FIXED?e.fov:e.fov*e._cache.aspectRatio,znear:e.minZ,zfar:e.maxZ};else if("orthographic"===t.type){var r=e.orthoLeft&&e.orthoRight?.5*(e.orthoRight-e.orthoLeft):.5*e.getEngine().getRenderWidth(),n=e.orthoBottom&&e.orthoTop?.5*(e.orthoTop-e.orthoBottom):.5*e.getEngine().getRenderHeight();t.orthographic={xmag:r,ymag:n,znear:e.minZ,zfar:e.maxZ}}f.set(e,s._cameras.length),s._cameras.push(t)}));var h=this.getExportNodes(l),p=h[0],d=h[1];return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(d,"image/png",!0).then((function(){return s.createNodeMapAndAnimationsAsync(e,p,t).then((function(n){return s.createSkinsAsync(e,n,t).then((function(e){if(s._nodeMap=n,s._totalByteLength=t.getByteOffset(),null==s._totalByteLength)throw new Error("undefined byte length!");for(var h=0,p=l;h<p.length;h++){var d=p[h];if(void 0!==(r=s._nodeMap[d.uniqueId])){if(o=s._nodes[r],d.metadata&&(s._options.metadataSelector?o.extras=s._options.metadataSelector(d.metadata):d.metadata.gltf&&(o.extras=d.metadata.gltf.extras)),d instanceof a.Camera&&(o.camera=f.get(d)),!d.parent||-1!==c.indexOf(d.parent))if(s._options.shouldExportNode&&!s._options.shouldExportNode(d))a.Tools.Log("Omitting "+d.name+" from scene.");else s._convertToRightHandedSystemMap[d.uniqueId]&&(o.translation&&(o.translation[2]*=-1,o.translation[0]*=-1),o.rotation=o.rotation?a.Quaternion.FromArray([0,1,0,0]).multiply(a.Quaternion.FromArray(o.rotation)).asArray():a.Quaternion.FromArray([0,1,0,0]).asArray()),u.nodes.push(r);if(d instanceof a.Mesh){var m=d;m.skeleton&&(o.skin=e[m.skeleton.uniqueId])}if(i=d.getDescendants(!0),!o.children&&i&&i.length){for(var g=[],_=0,x=i;_<x.length;_++){var y=x[_];null!=s._nodeMap[y.uniqueId]&&g.push(s._nodeMap[y.uniqueId])}g.length&&(o.children=g)}}}u.nodes.length&&s._scenes.push(u)}))}))}))},e.prototype.getExportNodes=function(e){for(var t=[],r=new Set,n=0,a=e;n<a.length;n++){var o=a[n];if(!this._options.shouldExportNode||this._options.shouldExportNode(o))if(t.push(o),"Mesh"===o.getClassName())(u=o).material&&r.add(u.material);else for(var i=0,s=o.getChildMeshes(!1);i<s.length;i++){var u;(u=s[i]).material&&r.add(u.material)}else"Excluding node ".concat(o.name)}return[t,r]},e.prototype.createNodeMapAndAnimationsAsync=function(e,t,r){for(var n,o=this,i=Promise.resolve(),s={},l={name:"runtime animations",channels:[],samplers:[]},c=[],f=function(t){i=i.then((function(){var i=o._convertToRightHandedSystemMap[t.uniqueId];return o.createNodeAsync(t,r,i,s).then((function(f){var h=o._extensionsPostExportNodeAsync("createNodeAsync",f,t,s);return null==h?(a.Tools.Warn("Not exporting node ".concat(t.name)),Promise.resolve()):h.then((function(a){a&&(o._nodes.push(a),n=o._nodes.length-1,s[t.uniqueId]=n,e.animationGroups.length||(u.a._CreateMorphTargetAnimationFromMorphTargetAnimations(t,l,c,s,o._nodes,r,o._bufferViews,o._accessors,i,o._animationSampleRate),t.animations.length&&u.a._CreateNodeAnimationFromNodeAnimations(t,l,c,s,o._nodes,r,o._bufferViews,o._accessors,i,o._animationSampleRate)))}))}))}))},h=0,p=t;h<p.length;h++){f(p[h])}return i.then((function(){return l.channels.length&&l.samplers.length&&o._animations.push(l),c.forEach((function(e){e.channels.length&&e.samplers.length&&o._animations.push(e)})),e.animationGroups.length&&u.a._CreateNodeAndMorphAnimationFromAnimationGroups(e,o._animations,s,o._nodes,r,o._bufferViews,o._accessors,o._convertToRightHandedSystemMap,o._animationSampleRate),s}))},e.prototype.createNodeAsync=function(e,t,r,n){var o=this;return Promise.resolve().then((function(){var n={},i={primitives:[]};if(e.name&&(n.name=e.name),e instanceof a.TransformNode){if(o.setNodeTransformation(n,e,r),e instanceof a.Mesh){var s=e.morphTargetManager;if(s&&s.numTargets>0){i.weights=[];for(var u=0;u<s.numTargets;++u)i.weights.push(s.getTarget(u).influence)}}return o.setPrimitiveAttributesAsync(i,e,t,r).then((function(){return i.primitives.length&&(o._meshes.push(i),n.mesh=o._meshes.length-1),n}))}return e instanceof a.Camera?(o.setCameraTransformation(n,e,r),n):n}))},e.prototype.createSkinsAsync=function(e,t,r){for(var n,o=Promise.resolve(),s={},u=0,l=e.skeletons;u<l.length;u++){for(var c=l[u],f={joints:[]},h=[],p={},d=-1,m=0;m<c.bones.length;++m){-1!==(g=null!==(n=(_=c.bones[m]).getIndex())&&void 0!==n?n:m)&&(p[g]=_,g>d&&(d=g))}for(var g=0;g<=d;++g){var _=p[g];h.push(_.getInvertedAbsoluteTransform());var x=_.getTransformNode();x?f.joints.push(t[x.uniqueId]):a.Tools.Warn("Exporting a bone without a linked transform node is currently unsupported")}var y=64*h.length,T=r.getByteOffset(),v=i.a._CreateBufferView(0,T,y,void 0,"InverseBindMatrices - "+c.name);this._bufferViews.push(v);var b=this._bufferViews.length-1,A=i.a._CreateAccessor(b,"InverseBindMatrices - "+c.name,"MAT4",5126,h.length,null,null,null),F=this._accessors.push(A)-1;f.inverseBindMatrices=F,this._skins.push(f),s[c.uniqueId]=this._skins.length-1,h.forEach((function(e){e.m.forEach((function(e){r.setFloat32(e)}))}))}return o.then((function(){return s}))},e._ExtensionNames=new Array,e._ExtensionFactories={},e}(),c=function(){function e(e){this._arrayBuffer=new ArrayBuffer(e),this._dataView=new DataView(this._arrayBuffer),this._byteOffset=0}return e.prototype.resizeBuffer=function(e){for(var t=new ArrayBuffer(e),r=new Uint8Array(this._arrayBuffer),n=new Uint8Array(t),a=0,o=n.byteLength;a<o;++a)n[a]=r[a];return this._arrayBuffer=t,this._dataView=new DataView(this._arrayBuffer),t},e.prototype.getArrayBuffer=function(){return this.resizeBuffer(this.getByteOffset())},e.prototype.getByteOffset=function(){if(null==this._byteOffset)throw new Error("Byte offset is undefined!");return this._byteOffset},e.prototype.setUInt8=function(e,t){null!=t?t<this._byteOffset?this._dataView.setUint8(t,e):a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+1>this._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint8(this._byteOffset,e),this._byteOffset+=1)},e.prototype.setUInt16=function(e,t){null!=t?t<this._byteOffset?this._dataView.setUint16(t,e,!0):a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+2>this._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint16(this._byteOffset,e,!0),this._byteOffset+=2)},e.prototype.getUInt32=function(e){if(e<this._byteOffset)return this._dataView.getUint32(e,!0);throw a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"),new Error("BinaryWriter: byteoffset is greater than the current binary buffer length!")},e.prototype.getVector3Float32FromRef=function(e,t){t+8>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0))},e.prototype.setVector3Float32FromRef=function(e,t){t+8>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0))},e.prototype.getVector4Float32FromRef=function(e,t){t+12>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0),e.w=this._dataView.getFloat32(t+12,!0))},e.prototype.setVector4Float32FromRef=function(e,t){t+12>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0),this._dataView.setFloat32(t+12,e.w,!0))},e.prototype.setFloat32=function(e,t){isNaN(e)&&a.Tools.Error("Invalid data being written!"),null!=t&&(t<this._byteOffset?this._dataView.setFloat32(t,e,!0):a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary length!")),this._byteOffset+4>this._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setFloat32(this._byteOffset,e,!0),this._byteOffset+=4},e.prototype.setUInt32=function(e,t){null!=t?t<this._byteOffset?this._dataView.setUint32(t,e,!0):a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+4>this._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint32(this._byteOffset,e,!0),this._byteOffset+=4)},e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o}));function n(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function o(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}Object.create},function(e,t,r){"use strict";r.r(t),r.d(t,"GLTFData",(function(){return n}));var n=function(){function e(){this.glTFFiles={}}return e.prototype.downloadFiles=function(){function e(e,t){return-1!==e.indexOf(t,e.length-t.length)}for(var t in this.glTFFiles){var r=document.createElement("a");document.body.appendChild(r),r.setAttribute("type","hidden"),r.download=t;var n=this.glTFFiles[t],a=void 0;e(t,".glb")?a={type:"model/gltf-binary"}:e(t,".bin")?a={type:"application/octet-stream"}:e(t,".gltf")?a={type:"model/gltf+json"}:e(t,".jpeg")||e(t,".jpg")?a={type:"image/jpeg"}:e(t,".png")&&(a={type:"image/png"}),r.href=window.URL.createObjectURL(new Blob([n],a)),r.click()}},e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"__IGLTFExporterExtension",(function(){return n}));var n=0},function(e,t,r){"use strict";r.r(t),r.d(t,"OBJExport",(function(){return a}));var n=r(0),a=function(){function e(){}return e.OBJ=function(e,t,r,a){var o=[],i=1,s=1;t&&(r||(r="mat"),o.push("mtllib "+r+".mtl"));for(var u=0;u<e.length;u++){o.push("g object"+u),o.push("o object_"+u);var l=null;if(a){var c=e[u].computeWorldMatrix(!0);l=new n.Matrix,c.invertToRef(l),e[u].bakeTransformIntoVertices(c)}if(t){var f=e[u].material;f&&o.push("usemtl "+f.id)}var h=e[u].geometry;if(h){var p=h.getVerticesData("position"),d=h.getVerticesData("normal"),m=h.getVerticesData("uv"),g=h.getIndices(),_=0,x=0;if(p&&g){for(var y=0;y<p.length;y+=3)e[0].getScene().useRightHandedSystem?o.push("v "+p[y]+" "+p[y+1]+" "+p[y+2]):o.push("v "+p[y]+" "+p[y+1]+" "+-p[y+2]),_++;if(null!=d)for(y=0;y<d.length;y+=3)o.push("vn "+d[y]+" "+d[y+1]+" "+d[y+2]);if(null!=m)for(y=0;y<m.length;y+=2)o.push("vt "+m[y]+" "+m[y+1]),x++;for(y=0;y<g.length;y+=3){var T=[String(g[y+2]+i),String(g[y+1]+i),String(g[y]+i)],v=[String(g[y+2]+s),String(g[y+1]+s),String(g[y]+s)],b=["","",""],A=T,F=null!=m?v:b,E=null!=d?T:b;o.push("f "+A[0]+"/"+F[0]+"/"+E[0]+" "+A[1]+"/"+F[1]+"/"+E[1]+" "+A[2]+"/"+F[2]+"/"+E[2])}a&&l&&e[u].bakeTransformIntoVertices(l),i+=_,s+=x}else n.Tools.Warn("There are no position vertices or indices on the mesh!")}else n.Tools.Warn("No geometry is present on the mesh")}return o.join("\n")},e.MTL=function(e){var t=[],r=e.material;t.push("newmtl mat1"),t.push(" Ns "+r.specularPower.toFixed(4)),t.push(" Ni 1.5000"),t.push(" d "+r.alpha.toFixed(4)),t.push(" Tr 0.0000"),t.push(" Tf 1.0000 1.0000 1.0000"),t.push(" illum 2"),t.push(" Ka "+r.ambientColor.r.toFixed(4)+" "+r.ambientColor.g.toFixed(4)+" "+r.ambientColor.b.toFixed(4)),t.push(" Kd "+r.diffuseColor.r.toFixed(4)+" "+r.diffuseColor.g.toFixed(4)+" "+r.diffuseColor.b.toFixed(4)),t.push(" Ks "+r.specularColor.r.toFixed(4)+" "+r.specularColor.g.toFixed(4)+" "+r.specularColor.b.toFixed(4)),t.push(" Ke "+r.emissiveColor.r.toFixed(4)+" "+r.emissiveColor.g.toFixed(4)+" "+r.emissiveColor.b.toFixed(4));return r.ambientTexture&&t.push(" map_Ka "+r.ambientTexture.name),r.diffuseTexture&&t.push(" map_Kd "+r.diffuseTexture.name),r.specularTexture&&t.push(" map_Ks "+r.specularTexture.name),r.bumpTexture&&t.push(" map_bump -imfchan z "+r.bumpTexture.name),r.opacityTexture&&t.push(" map_d "+r.opacityTexture.name),t.join("\n")},e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"_GLTFAnimation",(function(){return n.a})),r.d(t,"GLTFData",(function(){return a.GLTFData})),r.d(t,"_Exporter",(function(){return o.b})),r.d(t,"_BinaryWriter",(function(){return o.a})),r.d(t,"__IGLTFExporterExtensionV2",(function(){return i})),r.d(t,"_GLTFMaterialExporter",(function(){return s.a})),r.d(t,"GLTF2Export",(function(){return u.GLTF2Export})),r.d(t,"_GLTFUtilities",(function(){return l.a})),r.d(t,"KHR_texture_transform",(function(){return c.KHR_texture_transform})),r.d(t,"KHR_lights_punctual",(function(){return c.KHR_lights_punctual})),r.d(t,"KHR_materials_clearcoat",(function(){return c.KHR_materials_clearcoat})),r.d(t,"KHR_materials_sheen",(function(){return c.KHR_materials_sheen})),r.d(t,"KHR_materials_unlit",(function(){return c.KHR_materials_unlit}));var n=r(8),a=r(4),o=r(2),i=0,s=r(11),u=r(9),l=r(1),c=r(10)},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n,a=r(0),o=r(1);!function(e){e[e.INTANGENT=0]="INTANGENT",e[e.OUTTANGENT=1]="OUTTANGENT"}(n||(n={}));var i=function(){function e(){}return e._CreateNodeAnimation=function(t,r,n,o,i,s){var u=[],l=[],c=r.getKeys(),f=e.calculateMinMaxKeyFrames(c),h=e._DeduceInterpolation(c,n,i),p=f.max-f.min,d=h.interpolationType,m=h.shouldBakeAnimation;return m?e._CreateBakedAnimation(t,r,n,f.min,f.max,r.framePerSecond,s,u,l,f,o,i):"LINEAR"===d||"STEP"===d?e._CreateLinearOrStepAnimation(t,r,n,p,u,l,o,i):"CUBICSPLINE"===d?e._CreateCubicSplineAnimation(t,r,n,p,u,l,o,i):e._CreateBakedAnimation(t,r,n,f.min,f.max,r.framePerSecond,s,u,l,f,o,i),u.length&&l.length?{inputs:u,outputs:l,samplerInterpolation:d,inputsMin:m?f.min:a.Tools.FloatRound(f.min/r.framePerSecond),inputsMax:m?f.max:a.Tools.FloatRound(f.max/r.framePerSecond)}:null},e._DeduceAnimationInfo=function(e){var t=null,r="VEC3",n=!1,o=e.targetProperty.split(".");switch(o[0]){case"scaling":t="scale";break;case"position":t="translation";break;case"rotation":r="VEC4",t="rotation";break;case"rotationQuaternion":r="VEC4",n=!0,t="rotation";break;case"influence":r="SCALAR",t="weights";break;default:a.Tools.Error("Unsupported animatable property ".concat(o[0]))}return t?{animationChannelTargetPath:t,dataAccessorType:r,useQuaternion:n}:(a.Tools.Error("animation channel target path and data accessor type could be deduced"),null)},e._CreateNodeAnimationFromNodeAnimations=function(t,r,n,o,i,s,u,l,c,f){var h;if(t instanceof a.TransformNode&&t.animations)for(var p=0,d=t.animations;p<d.length;p++){var m=d[p],g=e._DeduceAnimationInfo(m);g&&(h={name:m.name,samplers:[],channels:[]},e.AddAnimation("".concat(m.name),m.hasRunningRuntimeAnimations?r:h,t,m,g.dataAccessorType,g.animationChannelTargetPath,o,s,u,l,c,g.useQuaternion,f),h.samplers.length&&h.channels.length&&n.push(h))}},e._CreateMorphTargetAnimationFromMorphTargetAnimations=function(t,r,n,o,i,s,u,l,c,f){var h;if(t instanceof a.Mesh){var p=t.morphTargetManager;if(p)for(var d=0;d<p.numTargets;++d)for(var m=0,g=p.getTarget(d).animations;m<g.length;m++){for(var _=g[m],x=new a.Animation("".concat(_.name),"influence",_.framePerSecond,_.dataType,_.loopMode,_.enableBlending),y=[],T=_.getKeys(),v=0;v<T.length;++v)for(var b=T[v],A=0;A<p.numTargets;++A)A==d?y.push(b):y.push({frame:b.frame,value:0});x.setKeys(y);var F=e._DeduceAnimationInfo(x);F&&(h={name:x.name,samplers:[],channels:[]},e.AddAnimation(_.name,_.hasRunningRuntimeAnimations?r:h,t,x,F.dataAccessorType,F.animationChannelTargetPath,o,s,u,l,c,F.useQuaternion,f,p.numTargets),h.samplers.length&&h.channels.length&&n.push(h))}}},e._CreateNodeAndMorphAnimationFromAnimationGroups=function(t,r,n,o,i,s,u,l,c){var f,h;if(t.animationGroups)for(var p=function(o){var p=new Map,d=new Map,m=new Set,g=o.to-o.from;h={name:o.name,channels:[],samplers:[]};for(var _=function(r){var g=o.targetedAnimations[r],_=g.target,x=g.animation;if(_ instanceof a.TransformNode||1===_.length&&_[0]instanceof a.TransformNode){if(v=e._DeduceAnimationInfo(g.animation)){var y=_ instanceof a.TransformNode?_:_[0],T=l[y.uniqueId];e.AddAnimation("".concat(x.name),h,y,x,v.dataAccessorType,v.animationChannelTargetPath,n,i,s,u,T,v.useQuaternion,c)}}else if(_ instanceof a.MorphTarget||1===_.length&&_[0]instanceof a.MorphTarget){var v;if(v=e._DeduceAnimationInfo(g.animation)){var b=_ instanceof a.MorphTarget?_:_[0];if(b){var A=t.morphTargetManagers.find((function(e){for(var t=0;t<e.numTargets;++t)if(e.getTarget(t)===b)return!0;return!1}));if(A){var F=t.meshes.find((function(e){return e.morphTargetManager===A}));F&&(p.has(F)||p.set(F,new Map),null===(f=p.get(F))||void 0===f||f.set(b,x),m.add(F),d.set(F,x))}}}}},x=0;x<o.targetedAnimations.length;++x)_(x);m.forEach((function(t){for(var r=t.morphTargetManager,l=null,f=[],m=d.get(t).getKeys(),_=m.length,x=0;x<_;++x)for(var y=0;y<r.numTargets;++y){var T=r.getTarget(y),v=p.get(t);if(v){var b=v.get(T);b?(l||(l=new a.Animation("".concat(o.name,"_").concat(t.name,"_MorphWeightAnimation"),"influence",b.framePerSecond,a.Animation.ANIMATIONTYPE_FLOAT,b.loopMode,b.enableBlending)),f.push(b.getKeys()[x])):f.push({frame:o.from+g/_*x,value:T.influence,inTangent:m[0].inTangent?0:void 0,outTangent:m[0].outTangent?0:void 0})}}l.setKeys(f);var A=e._DeduceAnimationInfo(l);A&&e.AddAnimation("".concat(o.name,"_").concat(t.name,"_MorphWeightAnimation"),h,t,l,A.dataAccessorType,A.animationChannelTargetPath,n,i,s,u,!1,A.useQuaternion,c,null==r?void 0:r.numTargets)})),h.channels.length&&h.samplers.length&&r.push(h)},d=0,m=t.animationGroups;d<m.length;d++){p(m[d])}},e.AddAnimation=function(t,r,n,a,i,s,u,l,c,f,h,p,d,m){var g,_,x,y,T,v,b,A=e._CreateNodeAnimation(n,a,s,h,p,d);if(A){if(m){for(var F=0,E=0,M=[];A.inputs.length>0;)E=A.inputs.shift(),F%m==0&&M.push(E),F++;A.inputs=M}var R=u[n.uniqueId],C=4*A.inputs.length;g=o.a._CreateBufferView(0,l.getByteOffset(),C,void 0,"".concat(t," keyframe data view")),c.push(g),A.inputs.forEach((function(e){l.setFloat32(e)})),_=o.a._CreateAccessor(c.length-1,"".concat(t," keyframes"),"SCALAR",5126,A.inputs.length,null,[A.inputsMin],[A.inputsMax]),f.push(_),x=f.length-1,T=A.outputs.length,C=4*o.a._GetDataAccessorElementCount(i)*A.outputs.length,g=o.a._CreateBufferView(0,l.getByteOffset(),C,void 0,"".concat(t," data view")),c.push(g),A.outputs.forEach((function(e){e.forEach((function(e){l.setFloat32(e)}))})),_=o.a._CreateAccessor(c.length-1,"".concat(t," data"),i,5126,T,null,null,null),f.push(_),y=f.length-1,v={interpolation:A.samplerInterpolation,input:x,output:y},r.samplers.push(v),b={sampler:r.samplers.length-1,target:{node:R,path:s}},r.channels.push(b)}},e._CreateBakedAnimation=function(t,r,n,o,i,s,u,l,c,f,h,p){var d,m,g=a.Quaternion.Identity(),_=null,x=null,y=null,T=null,v=null,b=null;f.min=a.Tools.FloatRound(o/s);for(var A=r.getKeys(),F=0,E=A.length;F<E;++F){if(b=null,y=A[F],F+1<E)if(T=A[F+1],y.value.equals&&y.value.equals(T.value)||y.value===T.value){if(0!==F)continue;b=y.frame}else b=T.frame;else{if(v=A[F-1],y.value.equals&&y.value.equals(v.value)||y.value===v.value)continue;b=i}if(b)for(var M=y.frame;M<=b;M+=u)if((m=a.Tools.FloatRound(M/s))!==_){_=m,x=m;var R={key:0,repeatCount:0,loopMode:r.loopMode};d=r._interpolate(M,R),e._SetInterpolatedValue(t,d,m,r,n,g,l,c,h,p)}}x&&(f.max=x)},e._ConvertFactorToVector3OrQuaternion=function(t,r,n,o,i,s,u){var l,c,f=null,h=e._GetBasePositionRotationOrScale(r,i,s,u);if(o===a.Animation.ANIMATIONTYPE_FLOAT)switch(c=(l=n.targetProperty.split("."))?l[1]:"",f=u?a.Quaternion.FromArray(h).normalize():a.Vector3.FromArray(h),c){case"x":case"y":f[c]=s&&u&&"scale"!==i?-t:t;break;case"z":f[c]=s&&!u&&"scale"!==i?-t:t;break;case"w":f.w=t;break;default:a.Tools.Error('glTFAnimation: Unsupported component type "'.concat(c,'" for scale animation!'))}return f},e._SetInterpolatedValue=function(e,t,r,n,i,s,u,l,c,f){var h,p=n.dataType;u.push(r),"number"==typeof t&&e instanceof a.TransformNode&&(t=this._ConvertFactorToVector3OrQuaternion(t,e,n,p,i,c,f)),t&&("rotation"===i?(f?s=t:(h=t,a.Quaternion.RotationYawPitchRollToRef(h.y,h.x,h.z,s)),c&&(o.a._GetRightHandedQuaternionFromRef(s),e.parent||(s=a.Quaternion.FromArray([0,1,0,0]).multiply(s))),l.push(s.asArray())):"weights"===i?l.push([t]):(h=t,c&&"scale"!==i&&(o.a._GetRightHandedPositionVector3FromRef(h),e.parent||(h.x*=-1,h.z*=-1)),l.push(h.asArray())))},e._CreateLinearOrStepAnimation=function(t,r,n,a,o,i,s,u){for(var l=0,c=r.getKeys();l<c.length;l++){var f=c[l];o.push(f.frame/r.framePerSecond),e._AddKeyframeValue(f,r,i,n,t,s,u)}},e._CreateCubicSplineAnimation=function(t,r,a,o,i,s,u,l){r.getKeys().forEach((function(c){i.push(c.frame/r.framePerSecond),e.AddSplineTangent(t,n.INTANGENT,s,a,"CUBICSPLINE",c,o,l,u),e._AddKeyframeValue(c,r,s,a,t,u,l),e.AddSplineTangent(t,n.OUTTANGENT,s,a,"CUBICSPLINE",c,o,l,u)}))},e._GetBasePositionRotationOrScale=function(e,t,r,n){var i;return"rotation"===t?n?e.rotationQuaternion?(i=e.rotationQuaternion.asArray(),r&&(o.a._GetRightHandedQuaternionArrayFromRef(i),e.parent||(i=a.Quaternion.FromArray([0,1,0,0]).multiply(a.Quaternion.FromArray(i)).asArray()))):i=a.Quaternion.Identity().asArray():(i=e.rotation.asArray(),o.a._GetRightHandedNormalArray3FromRef(i)):"translation"===t?(i=e.position.asArray(),r&&o.a._GetRightHandedPositionArray3FromRef(i)):i=e.scaling.asArray(),i},e._AddKeyframeValue=function(e,t,r,n,i,s,u){var l,c,f=t.dataType;if(f===a.Animation.ANIMATIONTYPE_VECTOR3){if(l=e.value.asArray(),"rotation"===n){var h=a.Vector3.FromArray(l),p=a.Quaternion.RotationYawPitchRoll(h.y,h.x,h.z);s&&(o.a._GetRightHandedQuaternionFromRef(p),i.parent||(p=a.Quaternion.FromArray([0,1,0,0]).multiply(p))),l=p.asArray()}else"translation"===n&&s&&(o.a._GetRightHandedNormalArray3FromRef(l),i.parent||(l[0]*=-1,l[2]*=-1));r.push(l)}else if(f===a.Animation.ANIMATIONTYPE_FLOAT){if("weights"===n)r.push([e.value]);else if(c=this._ConvertFactorToVector3OrQuaternion(e.value,i,t,f,n,s,u)){if("rotation"===n){var d=u?c:a.Quaternion.RotationYawPitchRoll(c.y,c.x,c.z).normalize();s&&(o.a._GetRightHandedQuaternionFromRef(d),i.parent||(d=a.Quaternion.FromArray([0,1,0,0]).multiply(d))),r.push(d.asArray())}else"translation"===n&&s&&(o.a._GetRightHandedNormalVector3FromRef(c),i.parent||(c.x*=-1,c.z*=-1));r.push(c.asArray())}}else f===a.Animation.ANIMATIONTYPE_QUATERNION?(l=e.value.normalize().asArray(),s&&(o.a._GetRightHandedQuaternionArrayFromRef(l),i.parent||(l=a.Quaternion.FromArray([0,1,0,0]).multiply(a.Quaternion.FromArray(l)).asArray())),r.push(l)):a.Tools.Error("glTFAnimation: Unsupported key frame values for animation!")},e._DeduceInterpolation=function(e,t,r){var n,o,i=!1;if("rotation"===t&&!r)return{interpolationType:"LINEAR",shouldBakeAnimation:!0};for(var s=0,u=e.length;s<u;++s)if((o=e[s]).inTangent||o.outTangent)if(n){if("CUBICSPLINE"!==n){n="LINEAR",i=!0;break}}else n="CUBICSPLINE";else if(n){if("CUBICSPLINE"===n||o.interpolation&&o.interpolation===a.AnimationKeyInterpolation.STEP&&"STEP"!==n){n="LINEAR",i=!0;break}}else n=o.interpolation&&o.interpolation===a.AnimationKeyInterpolation.STEP?"STEP":"LINEAR";return n||(n="LINEAR"),{interpolationType:n,shouldBakeAnimation:i}},e.AddSplineTangent=function(e,t,r,i,s,u,l,c,f){var h,p=t===n.INTANGENT?u.inTangent:u.outTangent;if("CUBICSPLINE"===s){if("rotation"===i)if(p){if(c)h=p.asArray();else{var d=p;h=a.Quaternion.RotationYawPitchRoll(d.y,d.x,d.z).asArray()}f&&(o.a._GetRightHandedQuaternionArrayFromRef(h),e.parent||(h=a.Quaternion.FromArray([0,1,0,0]).multiply(a.Quaternion.FromArray(h)).asArray()))}else h=[0,0,0,0];else"weights"===i?h=p?[p]:[0]:p?(h=p.asArray(),f&&"translation"===i&&(o.a._GetRightHandedPositionArray3FromRef(h),e.parent||(h[0]*=-1,h[2]*=-1))):h=[0,0,0];r.push(h)}},e.calculateMinMaxKeyFrames=function(e){var t=1/0,r=-1/0;return e.forEach((function(e){t=Math.min(t,e.frame),r=Math.max(r,e.frame)})),{min:t,max:r}},e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"GLTF2Export",(function(){return a}));var n=r(2),a=function(){function e(){}return e.GLTFAsync=function(e,t,r){return e.whenReadyAsync().then((function(){var a=t.replace(/\.[^/.]+$/,"");return new n.b(e,r)._generateGLTFAsync(a)}))},e._PreExportAsync=function(e,t){return Promise.resolve().then((function(){return t&&t.exportWithoutWaitingForScene?Promise.resolve():e.whenReadyAsync()}))},e._PostExportAsync=function(e,t,r){return Promise.resolve().then((function(){return r&&r.exportWithoutWaitingForScene,t}))},e.GLBAsync=function(e,t,r){var a=this;return this._PreExportAsync(e,r).then((function(){var o=t.replace(/\.[^/.]+$/,"");return new n.b(e,r)._generateGLBAsync(o).then((function(t){return a._PostExportAsync(e,t,r)}))}))},e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"KHR_texture_transform",(function(){return s})),r.d(t,"KHR_lights_punctual",(function(){return l})),r.d(t,"KHR_materials_clearcoat",(function(){return c})),r.d(t,"KHR_materials_sheen",(function(){return f})),r.d(t,"KHR_materials_unlit",(function(){return h}));var n=r(0),a=r(2),o="precision highp float;\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform mat4 textureTransformMat;\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec2 uvTransformed=(textureTransformMat*vec4(vUV.xy,1,1)).xy;\ngl_FragColor=texture2D(textureSampler,uvTransformed);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";n.ShaderStore.ShadersStore.textureTransformPixelShader=o;var i="KHR_texture_transform",s=function(){function e(e){this._recordedTextures=[],this.name=i,this.enabled=!0,this.required=!1,this._wasUsed=!1}return e.prototype.dispose=function(){for(var e=0,t=this._recordedTextures;e<t.length;e++){t[e].dispose()}},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportTexture=function(e,t,r){if(r&&(0===r.uAng&&0===r.wAng&&0===r.vAng||0===r.uRotationCenter&&0===r.vRotationCenter)){var n={},a=!1;if(0===r.uOffset&&0===r.vOffset||(n.offset=[r.uOffset,r.vOffset],a=!0),1===r.uScale&&1===r.vScale||(n.scale=[r.uScale,r.vScale],a=!0),0!==r.wAng&&(n.rotation=r.wAng,a=!0),0!==r.coordinatesIndex&&(n.texCoord=r.coordinatesIndex,a=!0),!a)return;this._wasUsed=!0,t.extensions||(t.extensions={}),t.extensions[i]=n}},e.prototype.preExportTextureAsync=function(e,t,r){var n=this;return new Promise((function(r,a){var o=t.getScene();if(o){var i=!1;if(0===t.uAng&&0===t.wAng&&0===t.vAng||0===t.uRotationCenter&&0===t.vRotationCenter||(i=!0),i)return n._textureTransformTextureAsync(t,o).then((function(e){r(e)})).catch((function(e){a(e)}));r(t)}else a("".concat(e,': "scene" is not defined for Babylon texture ').concat(t.name,"!"))}))},e.prototype._textureTransformTextureAsync=function(e,t){var r=this;return new Promise((function(a){var o=new n.ProceduralTexture("".concat(e.name),e.getSize(),"textureTransform",t);o||(n.Tools.Log("Cannot create procedural texture for ".concat(e.name,"!")),a(e)),o.reservedDataStore={hidden:!0,source:e},r._recordedTextures.push(o),o.coordinatesIndex=e.coordinatesIndex,o.setTexture("textureSampler",e),o.setMatrix("textureTransformMat",e.getTextureMatrix()),o.isReady()?(o.render(),a(o)):o.getEffect().executeWhenCompiled((function(){o.render(),a(o)}))}))},e}();a.b.RegisterExtension(i,(function(e){return new s(e)}));var u=r(1),l=function(){function e(e){this.name="KHR_lights_punctual",this.enabled=!0,this.required=!1,this._exporter=e}return e.prototype.dispose=function(){this._lights=null},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return!!this._lights},enumerable:!1,configurable:!0}),e.prototype.onExporting=function(){this._exporter._glTF.extensions.KHR_lights_punctual=this._lights},e.prototype.postExportNodeAsync=function(e,t,r,a){var o=this;return new Promise((function(i,s){if(t&&r instanceof n.ShadowLight){var l=r,c=void 0,f=l.getTypeID()==n.Light.LIGHTTYPEID_POINTLIGHT?"point":l.getTypeID()==n.Light.LIGHTTYPEID_DIRECTIONALLIGHT?"directional":l.getTypeID()==n.Light.LIGHTTYPEID_SPOTLIGHT?"spot":null;if(null==f)n.Logger.Warn("".concat(e,": Light ").concat(l.name," is not supported in ").concat("KHR_lights_punctual"));else{var h=l.position.clone(),p=o._exporter._convertToRightHandedSystemMap[r.uniqueId];if(h.equals(n.Vector3.Zero())||(p&&u.a._GetRightHandedPositionVector3FromRef(h),t.translation=h.asArray()),"point"!==f){var d=l.direction,m=-Math.atan2(d.z*(o._exporter._babylonScene.useRightHandedSystem?-1:1),d.x)+Math.PI/2,g=Math.sqrt(d.x*d.x+d.z*d.z),_=-Math.atan2(d.y,g),x=n.Quaternion.RotationYawPitchRoll(m,_,0);p&&u.a._GetRightHandedQuaternionFromRef(x),x.equals(n.Quaternion.Identity())||(t.rotation=x.asArray())}if(l.falloffType!==n.Light.FALLOFF_GLTF&&n.Logger.Warn("".concat(e,": Light falloff for ").concat(l.name," does not match the ").concat("KHR_lights_punctual"," specification!")),c={type:f},l.diffuse.equals(n.Color3.White())||(c.color=l.diffuse.asArray()),1!==l.intensity&&(c.intensity=l.intensity),l.range!==Number.MAX_VALUE&&(c.range=l.range),"spot"===f){var y=l;y.angle!==Math.PI/2&&(null==c.spot&&(c.spot={}),c.spot.outerConeAngle=y.angle/2),0!==y.innerAngle&&(null==c.spot&&(c.spot={}),c.spot.innerConeAngle=y.innerAngle/2)}null==o._lights&&(o._lights={lights:[]}),o._lights.lights.push(c);var T={light:o._lights.lights.length-1},v=r.parent;if(v&&1==v.getChildren().length){var b=o._exporter._nodes[a[v.uniqueId]];if(b){var A=n.TmpVectors.Matrix[0],F=n.TmpVectors.Matrix[1],E=b.translation?new n.Vector3(b.translation[0],b.translation[1],b.translation[2]):n.Vector3.Zero(),M=b.rotation?new n.Quaternion(b.rotation[0],b.rotation[1],b.rotation[2],b.rotation[3]):n.Quaternion.Identity(),R=b.scale?new n.Vector3(b.scale[0],b.scale[1],b.scale[2]):n.Vector3.One();n.Matrix.ComposeToRef(R,M,E,A),A.invertToRef(F);var C=n.TmpVectors.Matrix[2],V=t.translation?new n.Vector3(t.translation[0],t.translation[1],t.translation[2]):n.Vector3.Zero();l instanceof n.DirectionalLight&&V.subtractInPlace(o._exporter._babylonScene.useRightHandedSystem?l.direction:u.a._GetRightHandedPositionVector3(l.direction));var w=o._exporter._babylonScene.useRightHandedSystem?n.Quaternion.Identity():new n.Quaternion(0,1,0,0);t.rotation&&w.multiplyInPlace(new n.Quaternion(t.rotation[0],t.rotation[1],t.rotation[2],t.rotation[3]));var S=t.scale?new n.Vector3(t.scale[0],t.scale[1],t.scale[2]):n.Vector3.One();n.Matrix.ComposeToRef(S,w,V,C),C.multiplyToRef(F,C);var B=n.TmpVectors.Vector3[0],I=n.TmpVectors.Quaternion[0],P=n.TmpVectors.Vector3[1];return C.decompose(B,I,P),b.scale=B.asArray(),b.rotation=I.asArray(),b.translation=P.asArray(),null==b.extensions&&(b.extensions={}),b.extensions.KHR_lights_punctual=T,void i(null)}}null==t.extensions&&(t.extensions={}),t.extensions.KHR_lights_punctual=T}}i(t)}))},e}();a.b.RegisterExtension("KHR_lights_punctual",(function(e){return new l(e)}));var c=function(){function e(e){this.name="KHR_materials_clearcoat",this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var a=[];return r instanceof n.PBRBaseMaterial&&r.clearCoat.isEnabled?(r.clearCoat.texture&&a.push(r.clearCoat.texture),!r.clearCoat.useRoughnessFromMainTexture&&r.clearCoat.textureRoughness&&a.push(r.clearCoat.textureRoughness),r.clearCoat.bumpTexture&&a.push(r.clearCoat.bumpTexture),a):[]},e.prototype.postExportMaterialAsync=function(e,t,r){var a=this;return new Promise((function(e,o){if(r instanceof n.PBRBaseMaterial){if(!r.clearCoat.isEnabled)return void e(t);a._wasUsed=!0,t.extensions=t.extensions||{};var i=a._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.texture),s=void 0;s=r.clearCoat.useRoughnessFromMainTexture?a._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.texture):a._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.textureRoughness),r.clearCoat.isTintEnabled&&n.Tools.Warn("Clear Color tint is not supported for glTF export. Ignoring for: ".concat(r.name)),r.clearCoat.remapF0OnInterfaceChange&&n.Tools.Warn("Clear Color F0 remapping is not supported for glTF export. Ignoring for: ".concat(r.name));var u=a._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.bumpTexture),l={clearcoatFactor:r.clearCoat.intensity,clearcoatTexture:null!=i?i:void 0,clearcoatRoughnessFactor:r.clearCoat.roughness,clearcoatRoughnessTexture:null!=s?s:void 0,clearcoatNormalTexture:null!=u?u:void 0,hasTextures:function(){return null!==l.clearcoatTexture||null!==l.clearcoatRoughnessTexture||null!==l.clearcoatRoughnessTexture}};t.extensions.KHR_materials_clearcoat=l}e(t)}))},e}();a.b.RegisterExtension("KHR_materials_clearcoat",(function(e){return new c(e)}));var f=function(){function e(e){this.name="KHR_materials_sheen",this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){return r instanceof n.PBRMaterial&&r.sheen.isEnabled&&r.sheen.texture?[r.sheen.texture]:[]},e.prototype.postExportMaterialAsync=function(e,t,r){var a=this;return new Promise((function(e,o){var i,s,u,l;if(r instanceof n.PBRMaterial){if(!r.sheen.isEnabled)return void e(t);a._wasUsed=!0,null==t.extensions&&(t.extensions={});var c={sheenColorFactor:r.sheen.color.asArray(),sheenRoughnessFactor:null!==(i=r.sheen.roughness)&&void 0!==i?i:0,hasTextures:function(){return null!==c.sheenColorTexture||null!==c.sheenRoughnessTexture}};r.sheen.texture&&(c.sheenColorTexture=null!==(s=a._exporter._glTFMaterialExporter._getTextureInfo(r.sheen.texture))&&void 0!==s?s:void 0),r.sheen.textureRoughness&&!r.sheen.useRoughnessFromMainTexture?c.sheenRoughnessTexture=null!==(u=a._exporter._glTFMaterialExporter._getTextureInfo(r.sheen.textureRoughness))&&void 0!==u?u:void 0:r.sheen.texture&&r.sheen.useRoughnessFromMainTexture&&(c.sheenRoughnessTexture=null!==(l=a._exporter._glTFMaterialExporter._getTextureInfo(r.sheen.texture))&&void 0!==l?l:void 0),t.extensions.KHR_materials_sheen=c}e(t)}))},e}();a.b.RegisterExtension("KHR_materials_sheen",(function(e){return new f(e)}));var h=function(){function e(e){this.name="KHR_materials_unlit",this.enabled=!0,this.required=!1,this._wasUsed=!1}return Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){},e.prototype.postExportMaterialAsync=function(e,t,r){var a=this;return new Promise((function(e,o){var i=!1;r instanceof n.PBRMaterial?i=r.unlit:r instanceof n.StandardMaterial&&(i=r.disableLighting),i&&(a._wasUsed=!0,null==t.extensions&&(t.extensions={}),t.extensions.KHR_materials_unlit={}),e(t)}))},e}();a.b.RegisterExtension("KHR_materials_unlit",(function(e){return new h(e)}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3),a=r(0),o=function(){function e(e){this._textureMap={},this._textureMap={},this._exporter=e}return e.FuzzyEquals=function(e,t,r){return a.Scalar.WithinEpsilon(e.r,t.r,r)&&a.Scalar.WithinEpsilon(e.g,t.g,r)&&a.Scalar.WithinEpsilon(e.b,t.b,r)},e.prototype._convertMaterialsToGLTFAsync=function(e,t,r){var n=this,o=[];return e.forEach((function(e){"StandardMaterial"===e.getClassName()?o.push(n._convertStandardMaterialAsync(e,t,r)):-1!==e.getClassName().indexOf("PBR")?o.push(n._convertPBRMaterialAsync(e,t,r)):a.Tools.Warn("Unsupported material type: ".concat(e.name))})),Promise.all(o).then((function(){}))},e.prototype._stripTexturesFromMaterial=function(e){var t={};if(e){t.name=e.name,t.doubleSided=e.doubleSided,t.alphaMode=e.alphaMode,t.alphaCutoff=e.alphaCutoff,t.emissiveFactor=e.emissiveFactor;var r=e.pbrMetallicRoughness;r&&(t.pbrMetallicRoughness={},t.pbrMetallicRoughness.baseColorFactor=r.baseColorFactor,t.pbrMetallicRoughness.metallicFactor=r.metallicFactor,t.pbrMetallicRoughness.roughnessFactor=r.roughnessFactor)}return t},e.prototype._hasTexturesPresent=function(e){var t;if(e.emissiveTexture||e.normalTexture||e.occlusionTexture)return!0;var r=e.pbrMetallicRoughness;if(r&&(r.baseColorTexture||r.metallicRoughnessTexture))return!0;if(e.extensions)for(var n in e.extensions){var a=e.extensions[n];if(a)return null===(t=a.hasTextures)||void 0===t?void 0:t.call(a)}return!1},e.prototype._getTextureInfo=function(e){if(e){var t=e.uid;if(t in this._textureMap)return this._textureMap[t]}return null},e.prototype._convertToGLTFPBRMetallicRoughness=function(t){var r=new a.Vector2(0,1),n=new a.Vector2(0,.1),o=new a.Vector2(0,.1),i=new a.Vector2(1300,.1);var s=t.diffuseColor.toLinearSpace().scale(.5),u=t.alpha,l=function(e){return function(e,t,r,n,a){return(1-e)*(1-e)*(1-e)*t+3*(1-e)*(1-e)*e*r+3*(1-e)*e*e*n+e*e*e*a}(Math.pow(e/i.x,.333333),r.y,n.y,o.y,i.y)}(a.Scalar.Clamp(t.specularPower,0,e._MaxSpecularPower));return{baseColorFactor:[s.r,s.g,s.b,u],metallicFactor:0,roughnessFactor:l}},e._SolveMetallic=function(e,t,r){if(t<this._DielectricSpecular.r)return this._DielectricSpecular,0;var n=this._DielectricSpecular.r,o=e*r/(1-this._DielectricSpecular.r)+t-2*this._DielectricSpecular.r,i=o*o-4*n*(this._DielectricSpecular.r-t);return a.Scalar.Clamp((-o+Math.sqrt(i))/(2*n),0,1)},e._SetAlphaMode=function(e,t){t.needAlphaBlending()?e.alphaMode="BLEND":t.needAlphaTesting()&&(e.alphaMode="MASK",e.alphaCutoff=t.alphaCutOff)},e.prototype._convertStandardMaterialAsync=function(t,r,n){var o=this._exporter._materialMap,i=this._exporter._materials,s=[],u=this._convertToGLTFPBRMetallicRoughness(t),l={name:t.name};return null==t.backFaceCulling||t.backFaceCulling||(t.twoSidedLighting||a.Tools.Warn(t.name+": Back-face culling enabled and two-sided lighting disabled is not supported in glTF."),l.doubleSided=!0),n&&(t.diffuseTexture&&s.push(this._exportTextureAsync(t.diffuseTexture,r).then((function(e){e&&(u.baseColorTexture=e)}))),t.bumpTexture&&s.push(this._exportTextureAsync(t.bumpTexture,r).then((function(e){e&&(l.normalTexture=e,null!=t.bumpTexture&&1!==t.bumpTexture.level&&(l.normalTexture.scale=t.bumpTexture.level))}))),t.emissiveTexture&&(l.emissiveFactor=[1,1,1],s.push(this._exportTextureAsync(t.emissiveTexture,r).then((function(e){e&&(l.emissiveTexture=e)})))),t.ambientTexture&&s.push(this._exportTextureAsync(t.ambientTexture,r).then((function(e){if(e){var t={index:e.index};l.occlusionTexture=t,t.strength=1}})))),(t.alpha<1||t.opacityTexture)&&(t.alphaMode===a.Constants.ALPHA_COMBINE?l.alphaMode="BLEND":a.Tools.Warn(t.name+": glTF 2.0 does not support alpha mode: "+t.alphaMode.toString())),t.emissiveColor&&!e.FuzzyEquals(t.emissiveColor,a.Color3.Black(),e._Epsilon)&&(l.emissiveFactor=t.emissiveColor.asArray()),l.pbrMetallicRoughness=u,e._SetAlphaMode(l,t),i.push(l),o[t.uniqueId]=i.length-1,this._finishMaterial(s,l,t,r)},e.prototype._finishMaterial=function(e,t,r,n){var a=this;return Promise.all(e).then((function(){for(var e=null,o=0,i=a._exporter._extensionsPostExportMaterialAdditionalTextures("exportMaterial",t,r);o<i.length;o++){var s=i[o];e||(e=[]),e.push(a._exportTextureAsync(s,n))}return e||(e=[Promise.resolve(null)]),Promise.all(e).then((function(){var e=a._exporter._extensionsPostExportMaterialAsync("exportMaterial",t,r);return e?e.then((function(){return t})):t}))}))},e.prototype._convertPBRMetallicRoughnessMaterialAsync=function(t,r,n){var o=this._exporter._materialMap,i=this._exporter._materials,s=[],u={};t.baseColor&&(u.baseColorFactor=[t.baseColor.r,t.baseColor.g,t.baseColor.b,t.alpha]),null!=t.metallic&&1!==t.metallic&&(u.metallicFactor=t.metallic),null!=t.roughness&&1!==t.roughness&&(u.roughnessFactor=t.roughness);var l={name:t.name};return t.doubleSided&&(l.doubleSided=t.doubleSided),e._SetAlphaMode(l,t),n&&(null!=t.baseTexture&&s.push(this._exportTextureAsync(t.baseTexture,r).then((function(e){e&&(u.baseColorTexture=e)}))),t.normalTexture&&s.push(this._exportTextureAsync(t.normalTexture,r).then((function(e){e&&(l.normalTexture=e,1!==t.normalTexture.level&&(l.normalTexture.scale=t.normalTexture.level))}))),t.occlusionTexture&&s.push(this._exportTextureAsync(t.occlusionTexture,r).then((function(e){e&&(l.occlusionTexture=e,null!=t.occlusionStrength&&(l.occlusionTexture.strength=t.occlusionStrength))}))),t.emissiveTexture&&s.push(this._exportTextureAsync(t.emissiveTexture,r).then((function(e){e&&(l.emissiveTexture=e)})))),e.FuzzyEquals(t.emissiveColor,a.Color3.Black(),e._Epsilon)&&(l.emissiveFactor=t.emissiveColor.asArray()),l.pbrMetallicRoughness=u,i.push(l),o[t.uniqueId]=i.length-1,this._finishMaterial(s,l,t,r)},e.prototype._createBase64FromCanvasAsync=function(e,t,r,o){var i=this;return new Promise((function(s,u){return Object(n.a)(i,void 0,void 0,(function(){var i,u,l,c,f,h;return Object(n.b)(this,(function(n){switch(n.label){case 0:return i=a.Constants.TEXTURETYPE_UNSIGNED_INT,u=this._exporter._babylonScene,l=u.getEngine(),c=l.createRawTexture(e,t,r,a.Constants.TEXTUREFORMAT_RGBA,!1,!0,a.Texture.NEAREST_SAMPLINGMODE,null,i),[4,a.TextureTools.ApplyPostProcess("pass",c,u,i,a.Constants.TEXTURE_NEAREST_SAMPLINGMODE,a.Constants.TEXTUREFORMAT_RGBA)];case 1:return n.sent(),[4,l._readTexturePixels(c,t,r)];case 2:return f=n.sent(),[4,a.Tools.DumpDataAsync(t,r,f,o,void 0,!0,!1)];case 3:return h=n.sent(),s(h),[2]}}))}))}))},e.prototype._createWhiteTexture=function(e,t,r){for(var n=new Uint8Array(e*t*4),o=0;o<n.length;o+=4)n[o]=n[o+1]=n[o+2]=n[o+3]=255;return a.RawTexture.CreateRGBATexture(n,e,t,r)},e.prototype._resizeTexturesToSameDimensions=function(e,t,r){var n,o,i=e?e.getSize():{width:0,height:0},s=t?t.getSize():{width:0,height:0};return i.width<s.width?(n=e&&e instanceof a.Texture?a.TextureTools.CreateResizedCopy(e,s.width,s.height,!0):this._createWhiteTexture(s.width,s.height,r),o=t):i.width>s.width?(o=t&&t instanceof a.Texture?a.TextureTools.CreateResizedCopy(t,i.width,i.height,!0):this._createWhiteTexture(i.width,i.height,r),n=e):(n=e,o=t),{texture1:n,texture2:o}},e.prototype._convertPixelArrayToFloat32=function(e){if(e instanceof Uint8Array){for(var t=e.length,r=new Float32Array(e.length),n=0;n<t;++n)r[n]=e[n]/255;return r}if(e instanceof Float32Array)return e;throw new Error("Unsupported pixel format!")},e.prototype._convertSpecularGlossinessTexturesToMetallicRoughnessAsync=function(t,r,o,i){var s;return Object(n.a)(this,void 0,void 0,(function(){var u,l,c,f,h,p,d,m,g,_,x,y,T,v,b,A,F,E,M,R,C,V,w,S,B,I,P,N,L,O,G,K;return Object(n.b)(this,(function(n){switch(n.label){case 0:return u=[],t||r?(l=t?t.getScene():r?r.getScene():null)?(c=this._resizeTexturesToSameDimensions(t,r,l),f=null===(s=c.texture1)||void 0===s?void 0:s.getSize(),h=void 0,p=void 0,d=f.width,m=f.height,[4,c.texture1.readPixels()]):[3,3]:[2,Promise.reject("_ConvertSpecularGlosinessTexturesToMetallicRoughness: diffuse and specular glossiness textures are not defined!")];case 1:return g=n.sent(),[4,c.texture2.readPixels()];case 2:if(_=n.sent(),!g)return[2,Promise.reject("Failed to retrieve pixels from diffuse texture!")];if(h=this._convertPixelArrayToFloat32(g),!_)return[2,Promise.reject("Failed to retrieve pixels from specular glossiness texture!")];for(p=this._convertPixelArrayToFloat32(_),x=p.byteLength,y=new Uint8Array(x),T=new Uint8Array(x),4,v=a.Color3.Black(),b=0,A=0,I=0;I<m;++I)for(P=0;P<d;++P)F=4*(d*I+P),E=new a.Color3(h[F],h[F+1],h[F+2]).toLinearSpace().multiply(o.diffuseColor),M=new a.Color3(p[F],p[F+1],p[F+2]).toLinearSpace().multiply(o.specularColor),R=p[F+3]*o.glossiness,C={diffuseColor:E,specularColor:M,glossiness:R},V=this._convertSpecularGlossinessToMetallicRoughness(C),v.r=Math.max(v.r,V.baseColor.r),v.g=Math.max(v.g,V.baseColor.g),v.b=Math.max(v.b,V.baseColor.b),b=Math.max(b,V.metallic),A=Math.max(A,V.roughness),T[F]=255*V.baseColor.r,T[F+1]=255*V.baseColor.g,T[F+2]=255*V.baseColor.b,T[F+3]=c.texture1.hasAlpha?255*h[F+3]:255,y[F]=0,y[F+1]=255*V.roughness,y[F+2]=255*V.metallic,y[F+3]=255;for(w={baseColor:v,metallic:b,roughness:A},S=!1,B=!1,I=0;I<m;++I)for(P=0;P<d;++P)T[N=4*(d*I+P)]/=w.baseColor.r>e._Epsilon?w.baseColor.r:1,T[N+1]/=w.baseColor.g>e._Epsilon?w.baseColor.g:1,T[N+2]/=w.baseColor.b>e._Epsilon?w.baseColor.b:1,L=a.Color3.FromInts(T[N],T[N+1],T[N+2]),O=L.toGammaSpace(),T[N]=255*O.r,T[N+1]=255*O.g,T[N+2]=255*O.b,e.FuzzyEquals(O,a.Color3.White(),e._Epsilon)||(B=!0),y[N+1]/=w.roughness>e._Epsilon?w.roughness:1,y[N+2]/=w.metallic>e._Epsilon?w.metallic:1,G=a.Color3.FromInts(255,y[N+1],y[N+2]),e.FuzzyEquals(G,a.Color3.White(),e._Epsilon)||(S=!0);return S&&(K=this._createBase64FromCanvasAsync(y,d,m,i).then((function(e){w.metallicRoughnessTextureBase64=e})),u.push(K)),B&&(K=this._createBase64FromCanvasAsync(T,d,m,i).then((function(e){w.baseColorTextureBase64=e})),u.push(K)),[2,Promise.all(u).then((function(){return w}))];case 3:return[2,Promise.reject("_ConvertSpecularGlossinessTexturesToMetallicRoughness: Scene from textures is missing!")]}}))}))},e.prototype._convertSpecularGlossinessToMetallicRoughness=function(t){var r=this._getPerceivedBrightness(t.diffuseColor),n=this._getPerceivedBrightness(t.specularColor),o=1-this._getMaxComponent(t.specularColor),i=e._SolveMetallic(r,n,o),s=t.diffuseColor.scale(o/(1-e._DielectricSpecular.r)/Math.max(1-i,e._Epsilon)),u=t.specularColor.subtract(e._DielectricSpecular.scale(1-i)).scale(1/Math.max(i,e._Epsilon)),l=a.Color3.Lerp(s,u,i*i);return{baseColor:l=l.clampToRef(0,1,l),metallic:i,roughness:1-t.glossiness}},e.prototype._getPerceivedBrightness=function(e){return e?Math.sqrt(.299*e.r*e.r+.587*e.g*e.g+.114*e.b*e.b):0},e.prototype._getMaxComponent=function(e){return e?Math.max(e.r,Math.max(e.g,e.b)):0},e.prototype._convertMetalRoughFactorsToMetallicRoughnessAsync=function(e,t,r,n){var a=[],o={baseColor:e._albedoColor,metallic:e._metallic,roughness:e._roughness};if(n){e._albedoTexture&&a.push(this._exportTextureAsync(e._albedoTexture,t).then((function(e){e&&(r.baseColorTexture=e)})));var i=e._metallicTexture;i&&a.push(this._exportTextureAsync(i,t).then((function(e){e&&(r.metallicRoughnessTexture=e)})))}return Promise.all(a).then((function(){return o}))},e.prototype._getGLTFTextureSampler=function(e){var t=this._getGLTFTextureWrapModesSampler(e),r=e instanceof a.Texture?e.samplingMode:null;if(null!=r)switch(r){case a.Texture.LINEAR_LINEAR:t.magFilter=9729,t.minFilter=9729;break;case a.Texture.LINEAR_NEAREST:t.magFilter=9729,t.minFilter=9728;break;case a.Texture.NEAREST_LINEAR:t.magFilter=9728,t.minFilter=9729;break;case a.Texture.NEAREST_LINEAR_MIPLINEAR:t.magFilter=9728,t.minFilter=9987;break;case a.Texture.NEAREST_NEAREST:t.magFilter=9728,t.minFilter=9728;break;case a.Texture.NEAREST_LINEAR_MIPNEAREST:t.magFilter=9728,t.minFilter=9985;break;case a.Texture.LINEAR_NEAREST_MIPNEAREST:t.magFilter=9729,t.minFilter=9984;break;case a.Texture.LINEAR_NEAREST_MIPLINEAR:t.magFilter=9729,t.minFilter=9986;break;case a.Texture.NEAREST_NEAREST_MIPLINEAR:t.magFilter=9728,t.minFilter=9986;break;case a.Texture.LINEAR_LINEAR_MIPLINEAR:t.magFilter=9729,t.minFilter=9987;break;case a.Texture.LINEAR_LINEAR_MIPNEAREST:t.magFilter=9729,t.minFilter=9985;break;case a.Texture.NEAREST_NEAREST_MIPNEAREST:t.magFilter=9728,t.minFilter=9984}return t},e.prototype._getGLTFTextureWrapMode=function(e){switch(e){case a.Texture.WRAP_ADDRESSMODE:return 10497;case a.Texture.CLAMP_ADDRESSMODE:return 33071;case a.Texture.MIRROR_ADDRESSMODE:return 33648;default:return a.Tools.Error("Unsupported Texture Wrap Mode ".concat(e,"!")),10497}},e.prototype._getGLTFTextureWrapModesSampler=function(e){var t=this._getGLTFTextureWrapMode(e instanceof a.Texture?e.wrapU:a.Texture.WRAP_ADDRESSMODE),r=this._getGLTFTextureWrapMode(e instanceof a.Texture?e.wrapV:a.Texture.WRAP_ADDRESSMODE);return 10497===t&&10497===r?{}:{wrapS:t,wrapT:r}},e.prototype._convertSpecGlossFactorsToMetallicRoughnessAsync=function(e,t,r,n){var a=this;return Promise.resolve().then((function(){var o=a._exporter._samplers,i=a._exporter._textures,s={diffuseColor:e._albedoColor,specularColor:e._reflectivityColor,glossiness:e._microSurface},u=null,l=e._albedoTexture,c=e._reflectivityTexture;if(l){var f=a._getGLTFTextureSampler(l);null!=f.magFilter&&null!=f.minFilter&&null!=f.wrapS&&null!=f.wrapT&&(o.push(f),u=o.length-1)}var h=e._useMicroSurfaceFromReflectivityMapAlpha;return c&&!h?Promise.reject("_ConvertPBRMaterial: Glossiness values not included in the reflectivity texture are currently not supported"):(l||c)&&n?a._convertSpecularGlossinessTexturesToMetallicRoughnessAsync(l,c,s,t).then((function(e){if(e.baseColorTextureBase64){var n=a._getTextureInfoFromBase64(e.baseColorTextureBase64,"bjsBaseColorTexture_"+i.length+".png",t,l?l.coordinatesIndex:null,u);n&&(r.baseColorTexture=n)}if(e.metallicRoughnessTextureBase64){var o=a._getTextureInfoFromBase64(e.metallicRoughnessTextureBase64,"bjsMetallicRoughnessTexture_"+i.length+".png",t,c?c.coordinatesIndex:null,u);o&&(r.metallicRoughnessTexture=o)}return e})):a._convertSpecularGlossinessToMetallicRoughness(s)}))},e.prototype._convertPBRMaterialAsync=function(e,t,r){var n=this,a={},o={name:e.name};if(e.isMetallicWorkflow()){var i=e._albedoColor,s=e.alpha;return i&&(a.baseColorFactor=[i.r,i.g,i.b,s]),this._convertMetalRoughFactorsToMetallicRoughnessAsync(e,t,a,r).then((function(i){return n.setMetallicRoughnessPbrMaterial(i,e,o,a,t,r)}))}return this._convertSpecGlossFactorsToMetallicRoughnessAsync(e,t,a,r).then((function(i){return n.setMetallicRoughnessPbrMaterial(i,e,o,a,t,r)}))},e.prototype.setMetallicRoughnessPbrMaterial=function(t,r,n,o,i,s){var u=this._exporter._materialMap,l=this._exporter._materials,c=[];if(t){if(e._SetAlphaMode(n,r),e.FuzzyEquals(t.baseColor,a.Color3.White(),e._Epsilon)&&r.alpha>=e._Epsilon||(o.baseColorFactor=[t.baseColor.r,t.baseColor.g,t.baseColor.b,r.alpha]),null!=t.metallic&&1!==t.metallic&&(o.metallicFactor=t.metallic),null!=t.roughness&&1!==t.roughness&&(o.roughnessFactor=t.roughness),null==r.backFaceCulling||r.backFaceCulling||(r._twoSidedLighting||a.Tools.Warn(r.name+": Back-face culling enabled and two-sided lighting disabled is not supported in glTF."),n.doubleSided=!0),s){var f=r._bumpTexture;if(f){var h=this._exportTextureAsync(f,i).then((function(e){e&&(n.normalTexture=e,1!==f.level&&(n.normalTexture.scale=f.level))}));c.push(h)}var p=r._ambientTexture;if(p){h=this._exportTextureAsync(p,i).then((function(e){if(e){var t={index:e.index,texCoord:e.texCoord};n.occlusionTexture=t;var a=r._ambientTextureStrength;a&&(t.strength=a)}}));c.push(h)}var d=r._emissiveTexture;if(d){h=this._exportTextureAsync(d,i).then((function(e){e&&(n.emissiveTexture=e)}));c.push(h)}}var m=r._emissiveColor;e.FuzzyEquals(m,a.Color3.Black(),e._Epsilon)||(n.emissiveFactor=m.asArray()),n.pbrMetallicRoughness=o,l.push(n),u[r.uniqueId]=l.length-1}return this._finishMaterial(c,n,r,i)},e.prototype.getPixelsFromTexture=function(e){return e.textureType,a.Constants.TEXTURETYPE_UNSIGNED_INT,e.readPixels()},e.prototype._exportTextureAsync=function(e,t){var r=this,n=this._exporter._extensionsPreExportTextureAsync("exporter",e,t);return n?n.then((function(n){return n?r._exportTextureInfoAsync(n,t):r._exportTextureInfoAsync(e,t)})):this._exportTextureInfoAsync(e,t)},e.prototype._exportTextureInfoAsync=function(e,t){var r=this;return Promise.resolve().then((function(){return Object(n.a)(r,void 0,void 0,(function(){var r,a,o,i,s,u,l,c,f,h=this;return Object(n.b)(this,(function(n){switch(n.label){case 0:return(r=e.uid)in this._textureMap?[2,this._textureMap[r]]:[3,1];case 1:return[4,this.getPixelsFromTexture(e)];case 2:if(!(a=n.sent()))return[2,null];for(o=this._exporter._samplers,i=this._getGLTFTextureSampler(e),s=null,u=null,l=0;l<o.length;++l)if((c=o[l]).minFilter===i.minFilter&&c.magFilter===i.magFilter&&c.wrapS===i.wrapS&&c.wrapT===i.wrapT){u=l;break}if(null==u?(o.push(i),s=o.length-1):s=u,f=e.getSize(),e.mimeType)switch(e.mimeType){case"image/jpeg":t="image/jpeg";break;case"image/png":t="image/png"}return[2,this._createBase64FromCanvasAsync(a,f.width,f.height,t).then((function(n){var a=h._getTextureInfoFromBase64(n,e.name.replace(/\.\/|\/|\.\\|\\/g,"_"),t,e.coordinatesIndex,s);return a&&(h._textureMap[r]=a,h._exporter._extensionsPostExportTextures("linkTextureInfo",a,e)),a}))]}}))}))}))},e.prototype._getTextureInfoFromBase64=function(e,t,r,n,o){var i=this._exporter._textures,s=this._exporter._images,u=this._exporter._imageData,l=null,c={source:s.length,name:t};null!=o&&(c.sampler=o);for(var f=atob(e.split(",")[1]),h=new ArrayBuffer(f.length),p=new Uint8Array(h),d=0,m=f.length;d<m;++d)p[d]=f.charCodeAt(d);var g={data:p,mimeType:r},_="image/jpeg"===r?".jpeg":".png",x=t+_,y=x;if(x in u&&(x="".concat(t,"_").concat(a.Tools.RandomId()).concat(_)),u[x]=g,"image/jpeg"===r||"image/png"===r){var T={name:t,uri:x},v=null;for(d=0;d<s.length;++d)if(s[d].uri===y){v=d;break}null==v?(s.push(T),c.source=s.length-1):c.source=v,i.push(c),l={index:i.length-1},null!=n&&(l.texCoord=n)}else a.Tools.Error("Unsupported texture mime type ".concat(r));return l},e._DielectricSpecular=new a.Color3(.04,.04,.04),e._MaxSpecularPower=1024,e._Epsilon=1e-6,e}()},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r.r(t),r.d(t,"STLExport",(function(){return a}));var n=r(0),a=function(){function e(){}return e.CreateSTL=function(e,t,r,a,o,i){void 0===t&&(t=!0),void 0===r&&(r="stlmesh"),void 0===a&&(a=!1),void 0===o&&(o=!0),void 0===i&&(i=!1);var s,u=function(e,t,r){var a=[3*e[r],3*e[r+1],3*e[r+2]],o=[new n.Vector3(t[a[0]],t[a[0]+2],t[a[0]+1]),new n.Vector3(t[a[1]],t[a[1]+2],t[a[1]+1]),new n.Vector3(t[a[2]],t[a[2]+2],t[a[2]+1])],i=o[0].subtract(o[1]),s=o[2].subtract(o[1]);return{v:o,n:n.Vector3.Cross(s,i).normalize()}},l=function(e,t,r,n){return t=c(e,t,r.x,n),t=c(e,t,r.y,n),c(e,t,r.z,n)},c=function(e,t,r,n){return e.setFloat32(t,r,n),t+4},f=0,h=0;if(a){for(var p=0;p<e.length;p++){f+=(_=(m=e[p]).getIndices())?_.length/3:0}var d=new ArrayBuffer(84+50*f);h+=80,(s=new DataView(d)).setUint32(h,f,o),h+=4}else s="solid stlmesh\r\n";for(p=0;p<e.length;p++){var m=e[p];i||m.bakeCurrentTransformIntoVertices();for(var g=m.getVerticesData(n.VertexBuffer.PositionKind)||[],_=m.getIndices()||[],x=0;x<_.length;x+=3){var y=u(_,g,x);a?(h=l(s,h,y.n,o),h=l(s,h,y.v[0],o),h=l(s,h,y.v[1],o),h=l(s,h,y.v[2],o),h+=2):(s+="facet normal "+y.n.x+" "+y.n.y+" "+y.n.z+"\r\n",s+="\touter loop\r\n",s+="\t\tvertex "+y.v[0].x+" "+y.v[0].y+" "+y.v[0].z+"\r\n",s+="\t\tvertex "+y.v[1].x+" "+y.v[1].y+" "+y.v[1].z+"\r\n",s+="\t\tvertex "+y.v[2].x+" "+y.v[2].y+" "+y.v[2].z+"\r\n",s+="\tendloop\r\n",s+="endfacet\r\n")}}if(a||(s+="endsolid stlmesh"),t){var T=document.createElement("a"),v=new Blob([s],{type:"application/octet-stream"});T.href=window.URL.createObjectURL(v),T.download=r+".stl",T.click()}return s},e}()},function(e,t,r){"use strict";r.r(t),function(e){var n=r(5),a=r(4),o=r(9),i=r(10),s=r(7);r.d(t,"__IGLTFExporterExtension",(function(){return n.__IGLTFExporterExtension})),r.d(t,"_GLTFAnimation",(function(){return s._GLTFAnimation})),r.d(t,"GLTFData",(function(){return s.GLTFData})),r.d(t,"_Exporter",(function(){return s._Exporter})),r.d(t,"_BinaryWriter",(function(){return s._BinaryWriter})),r.d(t,"__IGLTFExporterExtensionV2",(function(){return s.__IGLTFExporterExtensionV2})),r.d(t,"_GLTFMaterialExporter",(function(){return s._GLTFMaterialExporter})),r.d(t,"GLTF2Export",(function(){return s.GLTF2Export})),r.d(t,"_GLTFUtilities",(function(){return s._GLTFUtilities})),r.d(t,"KHR_texture_transform",(function(){return s.KHR_texture_transform})),r.d(t,"KHR_lights_punctual",(function(){return s.KHR_lights_punctual})),r.d(t,"KHR_materials_clearcoat",(function(){return s.KHR_materials_clearcoat})),r.d(t,"KHR_materials_sheen",(function(){return s.KHR_materials_sheen})),r.d(t,"KHR_materials_unlit",(function(){return s.KHR_materials_unlit}));var u=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==u){u.BABYLON=u.BABYLON||{};var l=u.BABYLON;l.GLTF2=l.GLTF2||{},l.GLTF2.Exporter=l.GLTF2.Exporter||{},l.GLTF2.Exporter.Extensions=l.GLTF2.Exporter.Extensions||{};var c=[];for(var f in n)l[f]=n[f],c.push(f);for(var f in a)l[f]=a[f],c.push(f);for(var f in o)l[f]=o[f],c.push(f);for(var f in i)l.GLTF2.Exporter.Extensions[f]=i[f],c.push(f);for(var f in s)c.indexOf(f)>-1||(l.GLTF2.Exporter[f]=s[f])}}.call(this,r(12))},function(e,t,r){"use strict";r.r(t),function(e){var n=r(6);r.d(t,"OBJExport",(function(){return n.OBJExport}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==a)for(var o in n)a.BABYLON[o]=n[o]}.call(this,r(12))},function(e,t,r){"use strict";(function(e){var n=r(13);r.d(t,"a",(function(){return n.STLExport}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==a)for(var o in n)a.BABYLON[o]=n[o]}).call(this,r(12))},function(e,t,r){"use strict";r.r(t),r.d(t,"__IGLTFExporterExtension",(function(){return n.__IGLTFExporterExtension})),r.d(t,"_GLTFAnimation",(function(){return n._GLTFAnimation})),r.d(t,"GLTFData",(function(){return n.GLTFData})),r.d(t,"_Exporter",(function(){return n._Exporter})),r.d(t,"_BinaryWriter",(function(){return n._BinaryWriter})),r.d(t,"__IGLTFExporterExtensionV2",(function(){return n.__IGLTFExporterExtensionV2})),r.d(t,"_GLTFMaterialExporter",(function(){return n._GLTFMaterialExporter})),r.d(t,"GLTF2Export",(function(){return n.GLTF2Export})),r.d(t,"_GLTFUtilities",(function(){return n._GLTFUtilities})),r.d(t,"KHR_texture_transform",(function(){return n.KHR_texture_transform})),r.d(t,"KHR_lights_punctual",(function(){return n.KHR_lights_punctual})),r.d(t,"KHR_materials_clearcoat",(function(){return n.KHR_materials_clearcoat})),r.d(t,"KHR_materials_sheen",(function(){return n.KHR_materials_sheen})),r.d(t,"KHR_materials_unlit",(function(){return n.KHR_materials_unlit})),r.d(t,"OBJExport",(function(){return a.OBJExport})),r.d(t,"STLExport",(function(){return o.a}));r(6),r(5),r(7),r(13);var n=r(14),a=r(15),o=r(16)}])}));
libs/cannon.js ADDED
The diff for this file is too large to render. See raw diff
 
libs/dat.gui.min.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dat=t():e.dat=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=o(i);e.exports=r["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(2),r=o(i),a=n(6),l=o(a),s=n(3),u=o(s),d=n(7),c=o(d),f=n(8),_=o(f),p=n(10),h=o(p),m=n(11),b=o(m),g=n(12),v=o(g),y=n(13),w=o(y),x=n(14),E=o(x),C=n(15),A=o(C),S=n(16),k=o(S),O=n(9),T=o(O),R=n(17),L=o(R);t["default"]={color:{Color:r["default"],math:l["default"],interpret:u["default"]},controllers:{Controller:c["default"],BooleanController:_["default"],OptionController:h["default"],StringController:b["default"],NumberController:v["default"],NumberControllerBox:w["default"],NumberControllerSlider:E["default"],FunctionController:A["default"],ColorController:k["default"]},dom:{dom:T["default"]},gui:{GUI:L["default"]},GUI:L["default"]}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space?this.__state[t]:(h.recalculateRGB(this,t,n),this.__state[t])},set:function(e){"RGB"!==this.__state.space&&(h.recalculateRGB(this,t,n),this.__state.space="RGB"),this.__state[t]=e}})}function a(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space?this.__state[t]:(h.recalculateHSV(this),this.__state[t])},set:function(e){"HSV"!==this.__state.space&&(h.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}t.__esModule=!0;var l=n(3),s=o(l),u=n(6),d=o(u),c=n(4),f=o(c),_=n(5),p=o(_),h=function(){function e(){if(i(this,e),this.__state=s["default"].apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return e.prototype.toString=function(){return(0,f["default"])(this)},e.prototype.toHexString=function(){return(0,f["default"])(this,!0)},e.prototype.toOriginal=function(){return this.__state.conversion.write(this)},e}();h.recalculateRGB=function(e,t,n){if("HEX"===e.__state.space)e.__state[t]=d["default"].component_from_hex(e.__state.hex,n);else{if("HSV"!==e.__state.space)throw new Error("Corrupted color state");p["default"].extend(e.__state,d["default"].hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}},h.recalculateHSV=function(e){var t=d["default"].rgb_to_hsv(e.r,e.g,e.b);p["default"].extend(e.__state,{s:t.s,v:t.v}),p["default"].isNaN(t.h)?p["default"].isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h},h.COMPONENTS=["r","g","b","h","s","v","hex","a"],r(h.prototype,"r",2),r(h.prototype,"g",1),r(h.prototype,"b",0),a(h.prototype,"h"),a(h.prototype,"s"),a(h.prototype,"v"),Object.defineProperty(h.prototype,"a",{get:function(){return this.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(h.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=d["default"].rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}}),t["default"]=h},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(4),r=o(i),a=n(5),l=o(a),s=[{litmus:l["default"].isString,conversions:{THREE_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:r["default"]},SIX_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9]{6})$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:r["default"]},CSS_RGB:{read:function(e){var t=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:r["default"]},CSS_RGBA:{read:function(e){var t=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:r["default"]}}},{litmus:l["default"].isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){return e.hex}}}},{litmus:l["default"].isArray,conversions:{RGB_ARRAY:{read:function(e){return 3===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2]}},write:function(e){return[e.r,e.g,e.b]}},RGBA_ARRAY:{read:function(e){return 4===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2],a:e[3]}},write:function(e){return[e.r,e.g,e.b,e.a]}}}},{litmus:l["default"].isObject,conversions:{RGBA_OBJ:{read:function(e){return!!(l["default"].isNumber(e.r)&&l["default"].isNumber(e.g)&&l["default"].isNumber(e.b)&&l["default"].isNumber(e.a))&&{space:"RGB",r:e.r,g:e.g,b:e.b,a:e.a}},write:function(e){return{r:e.r,g:e.g,b:e.b,a:e.a}}},RGB_OBJ:{read:function(e){return!!(l["default"].isNumber(e.r)&&l["default"].isNumber(e.g)&&l["default"].isNumber(e.b))&&{space:"RGB",r:e.r,g:e.g,b:e.b}},write:function(e){return{r:e.r,g:e.g,b:e.b}}},HSVA_OBJ:{read:function(e){return!!(l["default"].isNumber(e.h)&&l["default"].isNumber(e.s)&&l["default"].isNumber(e.v)&&l["default"].isNumber(e.a))&&{space:"HSV",h:e.h,s:e.s,v:e.v,a:e.a}},write:function(e){return{h:e.h,s:e.s,v:e.v,a:e.a}}},HSV_OBJ:{read:function(e){return!!(l["default"].isNumber(e.h)&&l["default"].isNumber(e.s)&&l["default"].isNumber(e.v))&&{space:"HSV",h:e.h,s:e.s,v:e.v}},write:function(e){return{h:e.h,s:e.s,v:e.v}}}}}],u=void 0,d=void 0,c=function(){d=!1;var e=arguments.length>1?l["default"].toArray(arguments):arguments[0];return l["default"].each(s,function(t){if(t.litmus(e))return l["default"].each(t.conversions,function(t,n){if(u=t.read(e),d===!1&&u!==!1)return d=u,u.conversionName=n,u.conversion=t,l["default"].BREAK}),l["default"].BREAK}),d};t["default"]=c},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){var n=e.__state.conversionName.toString(),o=Math.round(e.r),i=Math.round(e.g),r=Math.round(e.b),a=e.a,l=Math.round(e.h),s=e.s.toFixed(1),u=e.v.toFixed(1);if(t||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var d=e.hex.toString(16);d.length<6;)d="0"+d;return"#"+d}return"CSS_RGB"===n?"rgb("+o+","+i+","+r+")":"CSS_RGBA"===n?"rgba("+o+","+i+","+r+","+a+")":"HEX"===n?"0x"+e.hex.toString(16):"RGB_ARRAY"===n?"["+o+","+i+","+r+"]":"RGBA_ARRAY"===n?"["+o+","+i+","+r+","+a+"]":"RGB_OBJ"===n?"{r:"+o+",g:"+i+",b:"+r+"}":"RGBA_OBJ"===n?"{r:"+o+",g:"+i+",b:"+r+",a:"+a+"}":"HSV_OBJ"===n?"{h:"+l+",s:"+s+",v:"+u+"}":"HSVA_OBJ"===n?"{h:"+l+",s:"+s+",v:"+u+",a:"+a+"}":"unknown format"}},function(e,t){"use strict";t.__esModule=!0;var n=Array.prototype.forEach,o=Array.prototype.slice,i={BREAK:{},extend:function(e){return this.each(o.call(arguments,1),function(t){var n=this.isObject(t)?Object.keys(t):[];n.forEach(function(n){this.isUndefined(t[n])||(e[n]=t[n])}.bind(this))},this),e},defaults:function(e){return this.each(o.call(arguments,1),function(t){var n=this.isObject(t)?Object.keys(t):[];n.forEach(function(n){this.isUndefined(e[n])&&(e[n]=t[n])}.bind(this))},this),e},compose:function(){var e=o.call(arguments);return function(){for(var t=o.call(arguments),n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,o){if(e)if(n&&e.forEach&&e.forEach===n)e.forEach(t,o);else if(e.length===e.length+0){var i=void 0,r=void 0;for(i=0,r=e.length;i<r;i++)if(i in e&&t.call(o,e[i],i)===this.BREAK)return}else for(var a in e)if(t.call(o,e[a],a)===this.BREAK)return},defer:function(e){setTimeout(e,0)},debounce:function(e,t){var n=void 0;return function(){function o(){n=null}var i=this,r=arguments,a=!n;clearTimeout(n),n=setTimeout(o,t),a&&e.apply(i,r)}},toArray:function(e){return e.toArray?e.toArray():o.call(e)},isUndefined:function(e){return void 0===e},isNull:function(e){return null===e},isNaN:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return isNaN(e)}),isArray:Array.isArray||function(e){return e.constructor===Array},isObject:function(e){return e===Object(e)},isNumber:function(e){return e===e+0},isString:function(e){return e===e+""},isBoolean:function(e){return e===!1||e===!0},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)}};t["default"]=i},function(e,t){"use strict";t.__esModule=!0;var n=void 0,o={hsv_to_rgb:function(e,t,n){var o=Math.floor(e/60)%6,i=e/60-Math.floor(e/60),r=n*(1-t),a=n*(1-i*t),l=n*(1-(1-i)*t),s=[[n,l,r],[a,n,r],[r,n,l],[r,a,n],[l,r,n],[n,r,a]][o];return{r:255*s[0],g:255*s[1],b:255*s[2]}},rgb_to_hsv:function(e,t,n){var o=Math.min(e,t,n),i=Math.max(e,t,n),r=i-o,a=void 0,l=void 0;return 0===i?{h:NaN,s:0,v:0}:(l=r/i,a=e===i?(t-n)/r:t===i?2+(n-e)/r:4+(e-t)/r,a/=6,a<0&&(a+=1),{h:360*a,s:l,v:i/255})},rgb_to_hex:function(e,t,n){var o=this.hex_with_component(0,2,e);return o=this.hex_with_component(o,1,t),o=this.hex_with_component(o,0,n)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,o){return o<<(n=8*t)|e&~(255<<n)}};t["default"]=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(t,o){n(this,e),this.initialValue=t[o],this.domElement=document.createElement("div"),this.object=t,this.property=o,this.__onChange=void 0,this.__onFinishChange=void 0}return e.prototype.onChange=function(e){return this.__onChange=e,this},e.prototype.onFinishChange=function(e){return this.__onFinishChange=e,this},e.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},e.prototype.getValue=function(){return this.object[this.property]},e.prototype.updateDisplay=function(){return this},e.prototype.isModified=function(){return this.initialValue!==this.getValue()},e}();t["default"]=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=n(7),s=o(l),u=n(9),d=o(u),c=function(e){function t(n,o){function a(){s.setValue(!s.__prev)}i(this,t);var l=r(this,e.call(this,n,o)),s=l;return l.__prev=l.getValue(),l.__checkbox=document.createElement("input"),l.__checkbox.setAttribute("type","checkbox"),d["default"].bind(l.__checkbox,"change",a,!1),l.domElement.appendChild(l.__checkbox),l.updateDisplay(),l}return a(t,e),t.prototype.setValue=function(t){var n=e.prototype.setValue.call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n},t.prototype.updateDisplay=function(){return this.getValue()===!0?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0):this.__checkbox.checked=!1,e.prototype.updateDisplay.call(this)},t}(s["default"]);t["default"]=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e){if("0"===e||a["default"].isUndefined(e))return 0;var t=e.match(u);return a["default"].isNull(t)?0:parseFloat(t[1])}t.__esModule=!0;var r=n(5),a=o(r),l={HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},s={};a["default"].each(l,function(e,t){a["default"].each(e,function(e){s[e]=t})});var u=/(\d+(\.\d+)?)px/,d={makeSelectable:function(e,t){void 0!==e&&void 0!==e.style&&(e.onselectstart=t?function(){return!1}:function(){},e.style.MozUserSelect=t?"auto":"none",e.style.KhtmlUserSelect=t?"auto":"none",e.unselectable=t?"on":"off")},makeFullscreen:function(e,t,n){var o=n,i=t;a["default"].isUndefined(i)&&(i=!0),a["default"].isUndefined(o)&&(o=!0),e.style.position="absolute",i&&(e.style.left=0,e.style.right=0),o&&(e.style.top=0,e.style.bottom=0)},fakeEvent:function(e,t,n,o){var i=n||{},r=s[t];if(!r)throw new Error("Event type "+t+" not supported.");var l=document.createEvent(r);switch(r){case"MouseEvents":var u=i.x||i.clientX||0,d=i.y||i.clientY||0;l.initMouseEvent(t,i.bubbles||!1,i.cancelable||!0,window,i.clickCount||1,0,0,u,d,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var c=l.initKeyboardEvent||l.initKeyEvent;a["default"].defaults(i,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),c(t,i.bubbles||!1,i.cancelable,window,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.keyCode,i.charCode);break;default:l.initEvent(t,i.bubbles||!1,i.cancelable||!0)}a["default"].defaults(l,o),e.dispatchEvent(l)},bind:function(e,t,n,o){var i=o||!1;return e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on"+t,n),d},unbind:function(e,t,n,o){var i=o||!1;return e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent&&e.detachEvent("on"+t,n),d},addClass:function(e,t){if(void 0===e.className)e.className=t;else if(e.className!==t){var n=e.className.split(/ +/);n.indexOf(t)===-1&&(n.push(t),e.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return d},removeClass:function(e,t){if(t)if(e.className===t)e.removeAttribute("class");else{var n=e.className.split(/ +/),o=n.indexOf(t);o!==-1&&(n.splice(o,1),e.className=n.join(" "))}else e.className=void 0;return d},hasClass:function(e,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(e.className)||!1},getWidth:function(e){var t=getComputedStyle(e);return i(t["border-left-width"])+i(t["border-right-width"])+i(t["padding-left"])+i(t["padding-right"])+i(t.width)},getHeight:function(e){var t=getComputedStyle(e);return i(t["border-top-width"])+i(t["border-bottom-width"])+i(t["padding-top"])+i(t["padding-bottom"])+i(t.height)},getOffset:function(e){var t=e,n={left:0,top:0};if(t.offsetParent)do n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;while(t);return n},isActive:function(e){return e===document.activeElement&&(e.type||e.href)}};t["default"]=d},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=n(7),s=o(l),u=n(9),d=o(u),c=n(5),f=o(c),_=function(e){function t(n,o,a){i(this,t);var l=r(this,e.call(this,n,o)),s=a,u=l;return l.__select=document.createElement("select"),f["default"].isArray(s)&&!function(){var e={};f["default"].each(s,function(t){e[t]=t}),s=e}(),f["default"].each(s,function(e,t){var n=document.createElement("option");n.innerHTML=t,n.setAttribute("value",e),u.__select.appendChild(n)}),l.updateDisplay(),d["default"].bind(l.__select,"change",function(){var e=this.options[this.selectedIndex].value;u.setValue(e)}),l.domElement.appendChild(l.__select),l}return a(t,e),t.prototype.setValue=function(t){var n=e.prototype.setValue.call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n},t.prototype.updateDisplay=function(){return d["default"].isActive(this.__select)?this:(this.__select.value=this.getValue(),e.prototype.updateDisplay.call(this))},t}(s["default"]);t["default"]=_},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=n(7),s=o(l),u=n(9),d=o(u),c=function(e){function t(n,o){function a(){u.setValue(u.__input.value)}function l(){u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())}i(this,t);var s=r(this,e.call(this,n,o)),u=s;return s.__input=document.createElement("input"),s.__input.setAttribute("type","text"),d["default"].bind(s.__input,"keyup",a),d["default"].bind(s.__input,"change",a),d["default"].bind(s.__input,"blur",l),d["default"].bind(s.__input,"keydown",function(e){13===e.keyCode&&this.blur()}),s.updateDisplay(),s.domElement.appendChild(s.__input),s}return a(t,e),t.prototype.updateDisplay=function(){return d["default"].isActive(this.__input)||(this.__input.value=this.getValue()),e.prototype.updateDisplay.call(this)},t}(s["default"]);t["default"]=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.toString();return t.indexOf(".")>-1?t.length-t.indexOf(".")-1:0}t.__esModule=!0;var s=n(7),u=o(s),d=n(5),c=o(d),f=function(e){function t(n,o,a){i(this,t);var s=r(this,e.call(this,n,o)),u=a||{};return s.__min=u.min,s.__max=u.max,s.__step=u.step,c["default"].isUndefined(s.__step)?0===s.initialValue?s.__impliedStep=1:s.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(s.initialValue))/Math.LN10))/10:s.__impliedStep=s.__step,s.__precision=l(s.__impliedStep),s}return a(t,e),t.prototype.setValue=function(t){var n=t;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!==0&&(n=Math.round(n/this.__step)*this.__step),e.prototype.setValue.call(this,n)},t.prototype.min=function(e){return this.__min=e,this},t.prototype.max=function(e){return this.__max=e,this},t.prototype.step=function(e){return this.__step=e,this.__impliedStep=e,this.__precision=l(e),this},t}(u["default"]);t["default"]=f},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}t.__esModule=!0;var s=n(12),u=o(s),d=n(9),c=o(d),f=n(5),_=o(f),p=function(e){function t(n,o,a){function l(){var e=parseFloat(m.__input.value);_["default"].isNaN(e)||m.setValue(e)}function s(){m.__onFinishChange&&m.__onFinishChange.call(m,m.getValue())}function u(){s()}function d(e){var t=b-e.clientY;m.setValue(m.getValue()+t*m.__impliedStep),b=e.clientY}function f(){c["default"].unbind(window,"mousemove",d),c["default"].unbind(window,"mouseup",f),s()}function p(e){c["default"].bind(window,"mousemove",d),c["default"].bind(window,"mouseup",f),b=e.clientY}i(this,t);var h=r(this,e.call(this,n,o,a));h.__truncationSuspended=!1;var m=h,b=void 0;return h.__input=document.createElement("input"),h.__input.setAttribute("type","text"),c["default"].bind(h.__input,"change",l),c["default"].bind(h.__input,"blur",u),c["default"].bind(h.__input,"mousedown",p),c["default"].bind(h.__input,"keydown",function(e){13===e.keyCode&&(m.__truncationSuspended=!0,this.blur(),m.__truncationSuspended=!1,s())}),h.updateDisplay(),h.domElement.appendChild(h.__input),h}return a(t,e),t.prototype.updateDisplay=function(){return this.__input.value=this.__truncationSuspended?this.getValue():l(this.getValue(),this.__precision),e.prototype.updateDisplay.call(this)},t}(u["default"]);t["default"]=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n,o,i){return o+(i-o)*((e-t)/(n-t))}t.__esModule=!0;var s=n(12),u=o(s),d=n(9),c=o(d),f=function(e){function t(n,o,a,s,u){function d(e){document.activeElement.blur(),c["default"].bind(window,"mousemove",f),c["default"].bind(window,"mouseup",_),f(e)}function f(e){e.preventDefault();var t=h.__background.getBoundingClientRect();return h.setValue(l(e.clientX,t.left,t.right,h.__min,h.__max)),!1}function _(){c["default"].unbind(window,"mousemove",f),c["default"].unbind(window,"mouseup",_),h.__onFinishChange&&h.__onFinishChange.call(h,h.getValue())}i(this,t);var p=r(this,e.call(this,n,o,{min:a,max:s,step:u})),h=p;return p.__background=document.createElement("div"),p.__foreground=document.createElement("div"),c["default"].bind(p.__background,"mousedown",d),c["default"].addClass(p.__background,"slider"),c["default"].addClass(p.__foreground,"slider-fg"),p.updateDisplay(),p.__background.appendChild(p.__foreground),p.domElement.appendChild(p.__background),p}return a(t,e),t.prototype.updateDisplay=function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",e.prototype.updateDisplay.call(this)},t}(u["default"]);t["default"]=f},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=n(7),s=o(l),u=n(9),d=o(u),c=function(e){function t(n,o,a){i(this,t);var l=r(this,e.call(this,n,o)),s=l;return l.__button=document.createElement("div"),l.__button.innerHTML=void 0===a?"Fire":a,d["default"].bind(l.__button,"click",function(e){return e.preventDefault(),s.fire(),!1}),d["default"].addClass(l.__button,"button"),l.domElement.appendChild(l.__button),l}return a(t,e),t.prototype.fire=function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())},t}(s["default"]);t["default"]=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n,o){e.style.background="",g["default"].each(y,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function s(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var u=n(7),d=o(u),c=n(9),f=o(c),_=n(2),p=o(_),h=n(3),m=o(h),b=n(5),g=o(b),v=function(e){function t(n,o){function a(e){h(e),f["default"].bind(window,"mousemove",h),f["default"].bind(window,"mouseup",u)}function u(){f["default"].unbind(window,"mousemove",h),f["default"].unbind(window,"mouseup",u),_()}function d(){var e=(0,m["default"])(this.value);e!==!1?(y.__color.__state=e,y.setValue(y.__color.toOriginal())):this.value=y.__color.toString()}function c(){f["default"].unbind(window,"mousemove",b),f["default"].unbind(window,"mouseup",c),_()}function _(){y.__onFinishChange&&y.__onFinishChange.call(y,y.__color.toOriginal())}function h(e){e.preventDefault();var t=y.__saturation_field.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),y.__color.v=o,y.__color.s=n,y.setValue(y.__color.toOriginal()),!1}function b(e){e.preventDefault();var t=y.__hue_field.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),y.__color.h=360*n,y.setValue(y.__color.toOriginal()),!1}i(this,t);var v=r(this,e.call(this,n,o));v.__color=new p["default"](v.getValue()),v.__temp=new p["default"](0);var y=v;v.domElement=document.createElement("div"),f["default"].makeSelectable(v.domElement,!1),v.__selector=document.createElement("div"),v.__selector.className="selector",v.__saturation_field=document.createElement("div"),v.__saturation_field.className="saturation-field",v.__field_knob=document.createElement("div"),v.__field_knob.className="field-knob",v.__field_knob_border="2px solid ",v.__hue_knob=document.createElement("div"),v.__hue_knob.className="hue-knob",v.__hue_field=document.createElement("div"),v.__hue_field.className="hue-field",v.__input=document.createElement("input"),v.__input.type="text",v.__input_textShadow="0 1px 1px ",f["default"].bind(v.__input,"keydown",function(e){13===e.keyCode&&d.call(this)}),f["default"].bind(v.__input,"blur",d),f["default"].bind(v.__selector,"mousedown",function(){f["default"].addClass(this,"drag").bind(window,"mouseup",function(){f["default"].removeClass(y.__selector,"drag")})});var w=document.createElement("div");return g["default"].extend(v.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g["default"].extend(v.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:v.__field_knob_border+(v.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g["default"].extend(v.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),g["default"].extend(v.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g["default"].extend(w.style,{width:"100%",height:"100%",background:"none"}),l(w,"top","rgba(0,0,0,0)","#000"),g["default"].extend(v.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),s(v.__hue_field),g["default"].extend(v.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:v.__input_textShadow+"rgba(0,0,0,0.7)"}),f["default"].bind(v.__saturation_field,"mousedown",a),f["default"].bind(v.__field_knob,"mousedown",a),f["default"].bind(v.__hue_field,"mousedown",function(e){b(e),f["default"].bind(window,"mousemove",b),f["default"].bind(window,"mouseup",c)}),v.__saturation_field.appendChild(w),v.__selector.appendChild(v.__field_knob),v.__selector.appendChild(v.__saturation_field),v.__selector.appendChild(v.__hue_field),v.__hue_field.appendChild(v.__hue_knob),v.domElement.appendChild(v.__input),v.domElement.appendChild(v.__selector),v.updateDisplay(),v}return a(t,e),t.prototype.updateDisplay=function(){var e=(0,m["default"])(this.getValue());if(e!==!1){var t=!1;g["default"].each(p["default"].COMPONENTS,function(n){if(!g["default"].isUndefined(e[n])&&!g["default"].isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&g["default"].extend(this.__color.__state,e)}g["default"].extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;g["default"].extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,l(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),g["default"].extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})},t}(d["default"]),y=["-moz-","-o-","-webkit-","-ms-",""];t["default"]=v},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var o=document.createElement("li");return t&&o.appendChild(t),n?e.__ul.insertBefore(o,n):e.__ul.appendChild(o),e.onResize(),o}function r(e,t){var n=e.__preset_select[e.__preset_select.selectedIndex];t?n.innerHTML=n.value+"*":n.innerHTML=n.value}function a(e,t,n){if(n.__li=t,n.__gui=e,U["default"].extend(n,{options:function(t){if(arguments.length>1){var o=n.__li.nextElementSibling;return n.remove(),s(e,n.object,n.property,{before:o,factoryArgs:[U["default"].toArray(arguments)]})}if(U["default"].isArray(t)||U["default"].isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),s(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){
2
+ return n.__gui.remove(n),n}}),n instanceof B["default"])!function(){var e=new N["default"](n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});U["default"].each(["updateDisplay","onChange","onFinishChange","step"],function(t){var o=n[t],i=e[t];n[t]=e[t]=function(){var t=Array.prototype.slice.call(arguments);return i.apply(e,t),o.apply(n,t)}}),z["default"].addClass(t,"has-slider"),n.domElement.insertBefore(e.domElement,n.domElement.firstElementChild)}();else if(n instanceof N["default"]){var o=function(t){if(U["default"].isNumber(n.__min)&&U["default"].isNumber(n.__max)){var o=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var r=s(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return r.name(o),i&&r.listen(),r}return t};n.min=U["default"].compose(o,n.min),n.max=U["default"].compose(o,n.max)}else n instanceof O["default"]?(z["default"].bind(t,"click",function(){z["default"].fakeEvent(n.__checkbox,"click")}),z["default"].bind(n.__checkbox,"click",function(e){e.stopPropagation()})):n instanceof R["default"]?(z["default"].bind(t,"click",function(){z["default"].fakeEvent(n.__button,"click")}),z["default"].bind(t,"mouseover",function(){z["default"].addClass(n.__button,"hover")}),z["default"].bind(t,"mouseout",function(){z["default"].removeClass(n.__button,"hover")})):n instanceof j["default"]&&(z["default"].addClass(t,"color"),n.updateDisplay=U["default"].compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay());n.setValue=U["default"].compose(function(t){return e.getRoot().__preset_select&&n.isModified()&&r(e.getRoot(),!0),t},n.setValue)}function l(e,t){var n=e.getRoot(),o=n.__rememberedObjects.indexOf(t.object);if(o!==-1){var i=n.__rememberedObjectIndecesToControllers[o];if(void 0===i&&(i={},n.__rememberedObjectIndecesToControllers[o]=i),i[t.property]=t,n.load&&n.load.remembered){var r=n.load.remembered,a=void 0;if(r[e.preset])a=r[e.preset];else{if(!r[Q])return;a=r[Q]}if(a[o]&&void 0!==a[o][t.property]){var l=a[o][t.property];t.initialValue=l,t.setValue(l)}}}}function s(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var r=void 0;if(o.color)r=new j["default"](t,n);else{var s=[t,n].concat(o.factoryArgs);r=C["default"].apply(e,s)}o.before instanceof S["default"]&&(o.before=o.before.__li),l(e,r),z["default"].addClass(r.domElement,"c");var u=document.createElement("span");z["default"].addClass(u,"property-name"),u.innerHTML=r.property;var d=document.createElement("div");d.appendChild(u),d.appendChild(r.domElement);var c=i(e,d,o.before);return z["default"].addClass(c,oe.CLASS_CONTROLLER_ROW),r instanceof j["default"]?z["default"].addClass(c,"color"):z["default"].addClass(c,g(r.getValue())),a(e,c,r),e.__controllers.push(r),r}function u(e,t){return document.location.href+"."+t}function d(e,t,n){var o=document.createElement("option");o.innerHTML=t,o.value=t,e.__preset_select.appendChild(o),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function c(e,t){t.style.display=e.useLocalStorage?"block":"none"}function f(e){var t=e.__save_row=document.createElement("li");z["default"].addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),z["default"].addClass(t,"save-row");var n=document.createElement("span");n.innerHTML="&nbsp;",z["default"].addClass(n,"button gears");var o=document.createElement("span");o.innerHTML="Save",z["default"].addClass(o,"button"),z["default"].addClass(o,"save");var i=document.createElement("span");i.innerHTML="New",z["default"].addClass(i,"button"),z["default"].addClass(i,"save-as");var r=document.createElement("span");r.innerHTML="Revert",z["default"].addClass(r,"button"),z["default"].addClass(r,"revert");var a=e.__preset_select=document.createElement("select");e.load&&e.load.remembered?U["default"].each(e.load.remembered,function(t,n){d(e,n,n===e.preset)}):d(e,Q,!1),z["default"].bind(a,"change",function(){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].innerHTML=e.__preset_select[t].value;e.preset=this.value}),t.appendChild(a),t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(r),q&&!function(){var t=document.getElementById("dg-local-explain"),n=document.getElementById("dg-local-storage"),o=document.getElementById("dg-save-locally");o.style.display="block","true"===localStorage.getItem(u(e,"isLocal"))&&n.setAttribute("checked","checked"),c(e,t),z["default"].bind(n,"change",function(){e.useLocalStorage=!e.useLocalStorage,c(e,t)})}();var l=document.getElementById("dg-new-constructor");z["default"].bind(l,"keydown",function(e){!e.metaKey||67!==e.which&&67!==e.keyCode||Z.hide()}),z["default"].bind(n,"click",function(){l.innerHTML=JSON.stringify(e.getSaveObject(),void 0,2),Z.show(),l.focus(),l.select()}),z["default"].bind(o,"click",function(){e.save()}),z["default"].bind(i,"click",function(){var t=prompt("Enter a new preset name.");t&&e.saveAs(t)}),z["default"].bind(r,"click",function(){e.revert()})}function _(e){function t(t){return t.preventDefault(),e.width+=i-t.clientX,e.onResize(),i=t.clientX,!1}function n(){z["default"].removeClass(e.__closeButton,oe.CLASS_DRAG),z["default"].unbind(window,"mousemove",t),z["default"].unbind(window,"mouseup",n)}function o(o){return o.preventDefault(),i=o.clientX,z["default"].addClass(e.__closeButton,oe.CLASS_DRAG),z["default"].bind(window,"mousemove",t),z["default"].bind(window,"mouseup",n),!1}var i=void 0;e.__resize_handle=document.createElement("div"),U["default"].extend(e.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),z["default"].bind(e.__resize_handle,"mousedown",o),z["default"].bind(e.__closeButton,"mousedown",o),e.domElement.insertBefore(e.__resize_handle,e.domElement.firstElementChild)}function p(e,t){e.domElement.style.width=t+"px",e.__save_row&&e.autoPlace&&(e.__save_row.style.width=t+"px"),e.__closeButton&&(e.__closeButton.style.width=t+"px")}function h(e,t){var n={};return U["default"].each(e.__rememberedObjects,function(o,i){var r={},a=e.__rememberedObjectIndecesToControllers[i];U["default"].each(a,function(e,n){r[n]=t?e.initialValue:e.getValue()}),n[i]=r}),n}function m(e){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].value===e.preset&&(e.__preset_select.selectedIndex=t)}function b(e){0!==e.length&&D["default"].call(window,function(){b(e)}),U["default"].each(e,function(e){e.updateDisplay()})}var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},v=n(18),y=o(v),w=n(19),x=o(w),E=n(20),C=o(E),A=n(7),S=o(A),k=n(8),O=o(k),T=n(15),R=o(T),L=n(13),N=o(L),M=n(14),B=o(M),H=n(16),j=o(H),P=n(21),D=o(P),V=n(22),F=o(V),I=n(9),z=o(I),G=n(5),U=o(G),X=n(23),K=o(X);y["default"].inject(K["default"]);var Y="dg",J=72,W=20,Q="Default",q=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}(),Z=void 0,$=!0,ee=void 0,te=!1,ne=[],oe=function ie(e){function t(){var e=n.getRoot();e.width+=1,U["default"].defer(function(){e.width-=1})}var n=this,o=e||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),z["default"].addClass(this.domElement,Y),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],o=U["default"].defaults(o,{autoPlace:!0,width:ie.DEFAULT_WIDTH}),o=U["default"].defaults(o,{resizable:o.autoPlace,hideable:o.autoPlace}),U["default"].isUndefined(o.load)?o.load={preset:Q}:o.preset&&(o.load.preset=o.preset),U["default"].isUndefined(o.parent)&&o.hideable&&ne.push(this),o.resizable=U["default"].isUndefined(o.parent)&&o.resizable,o.autoPlace&&U["default"].isUndefined(o.scrollable)&&(o.scrollable=!0);var r=q&&"true"===localStorage.getItem(u(this,"isLocal")),a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return o.parent}},scrollable:{get:function(){return o.scrollable}},autoPlace:{get:function(){return o.autoPlace}},preset:{get:function(){return n.parent?n.getRoot().preset:o.load.preset},set:function(e){n.parent?n.getRoot().preset=e:o.load.preset=e,m(this),n.revert()}},width:{get:function(){return o.width},set:function(e){o.width=e,p(n,e)}},name:{get:function(){return o.name},set:function(e){o.name=e,titleRowName&&(titleRowName.innerHTML=o.name)}},closed:{get:function(){return o.closed},set:function(e){o.closed=e,o.closed?z["default"].addClass(n.__ul,ie.CLASS_CLOSED):z["default"].removeClass(n.__ul,ie.CLASS_CLOSED),this.onResize(),n.__closeButton&&(n.__closeButton.innerHTML=e?ie.TEXT_OPEN:ie.TEXT_CLOSED)}},load:{get:function(){return o.load}},useLocalStorage:{get:function(){return r},set:function(e){q&&(r=e,e?z["default"].bind(window,"unload",a):z["default"].unbind(window,"unload",a),localStorage.setItem(u(n,"isLocal"),e))}}}),U["default"].isUndefined(o.parent)){if(o.closed=!1,z["default"].addClass(this.domElement,ie.CLASS_MAIN),z["default"].makeSelectable(this.domElement,!1),q&&r){n.useLocalStorage=!0;var l=localStorage.getItem(u(this,"gui"));l&&(o.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=ie.TEXT_CLOSED,z["default"].addClass(this.__closeButton,ie.CLASS_CLOSE_BUTTON),this.domElement.appendChild(this.__closeButton),z["default"].bind(this.__closeButton,"click",function(){n.closed=!n.closed})}else{void 0===o.closed&&(o.closed=!0);var s=document.createTextNode(o.name);z["default"].addClass(s,"controller-name");var d=i(n,s),c=function(e){return e.preventDefault(),n.closed=!n.closed,!1};z["default"].addClass(this.__ul,ie.CLASS_CLOSED),z["default"].addClass(d,"title"),z["default"].bind(d,"click",c),o.closed||(this.closed=!1)}o.autoPlace&&(U["default"].isUndefined(o.parent)&&($&&(ee=document.createElement("div"),z["default"].addClass(ee,Y),z["default"].addClass(ee,ie.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(ee),$=!1),ee.appendChild(this.domElement),z["default"].addClass(this.domElement,ie.CLASS_AUTO_PLACE)),this.parent||p(n,o.width)),this.__resizeHandler=function(){n.onResizeDebounced()},z["default"].bind(window,"resize",this.__resizeHandler),z["default"].bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),z["default"].bind(this.__ul,"transitionend",this.__resizeHandler),z["default"].bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),o.resizable&&_(this),a=function(){q&&"true"===localStorage.getItem(u(n,"isLocal"))&&localStorage.setItem(u(n,"gui"),JSON.stringify(n.getSaveObject()))},this.saveToLocalStorageIfPossible=a,o.parent||t()};oe.toggleHide=function(){te=!te,U["default"].each(ne,function(e){e.domElement.style.display=te?"none":""})},oe.CLASS_AUTO_PLACE="a",oe.CLASS_AUTO_PLACE_CONTAINER="ac",oe.CLASS_MAIN="main",oe.CLASS_CONTROLLER_ROW="cr",oe.CLASS_TOO_TALL="taller-than-window",oe.CLASS_CLOSED="closed",oe.CLASS_CLOSE_BUTTON="close-button",oe.CLASS_DRAG="drag",oe.DEFAULT_WIDTH=245,oe.TEXT_CLOSED="Close Controls",oe.TEXT_OPEN="Open Controls",oe._keydownHandler=function(e){"text"===document.activeElement.type||e.which!==J&&e.keyCode!==J||oe.toggleHide()},z["default"].bind(window,"keydown",oe._keydownHandler,!1),U["default"].extend(oe.prototype,{add:function(e,t){return s(this,e,t,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(e,t){return s(this,e,t,{color:!0})},remove:function(e){this.__ul.removeChild(e.__li),this.__controllers.splice(this.__controllers.indexOf(e),1);var t=this;U["default"].defer(function(){t.onResize()})},destroy:function(){this.autoPlace&&ee.removeChild(this.domElement),z["default"].unbind(window,"keydown",oe._keydownHandler,!1),z["default"].unbind(window,"resize",this.__resizeHandler),this.saveToLocalStorageIfPossible&&z["default"].unbind(window,"unload",this.saveToLocalStorageIfPossible)},addFolder:function(e){if(void 0!==this.__folders[e])throw new Error('You already have a folder in this GUI by the name "'+e+'"');var t={name:e,parent:this};t.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[e]&&(t.closed=this.load.folders[e].closed,t.load=this.load.folders[e]);var n=new oe(t);this.__folders[e]=n;var o=i(this,n.domElement);return z["default"].addClass(o,"folder"),n},open:function(){this.closed=!1},close:function(){this.closed=!0},onResize:function(){var e=this.getRoot();if(e.scrollable){var t=z["default"].getOffset(e.__ul).top,n=0;U["default"].each(e.__ul.childNodes,function(t){e.autoPlace&&t===e.__save_row||(n+=z["default"].getHeight(t))}),window.innerHeight-t-W<n?(z["default"].addClass(e.domElement,oe.CLASS_TOO_TALL),e.__ul.style.height=window.innerHeight-t-W+"px"):(z["default"].removeClass(e.domElement,oe.CLASS_TOO_TALL),e.__ul.style.height="auto")}e.__resize_handle&&U["default"].defer(function(){e.__resize_handle.style.height=e.__ul.offsetHeight+"px"}),e.__closeButton&&(e.__closeButton.style.width=e.width+"px")},onResizeDebounced:U["default"].debounce(function(){this.onResize()},200),remember:function(){if(U["default"].isUndefined(Z)&&(Z=new F["default"],Z.domElement.innerHTML=x["default"]),this.parent)throw new Error("You can only call remember on a top level GUI.");var e=this;U["default"].each(Array.prototype.slice.call(arguments),function(t){0===e.__rememberedObjects.length&&f(e),e.__rememberedObjects.indexOf(t)===-1&&e.__rememberedObjects.push(t)}),this.autoPlace&&p(this,this.width)},getRoot:function(){for(var e=this;e.parent;)e=e.parent;return e},getSaveObject:function(){var e=this.load;return e.closed=this.closed,this.__rememberedObjects.length>0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=h(this)),e.folders={},U["default"].each(this.__folders,function(t,n){e.folders[n]=t.getSaveObject()}),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=h(this),r(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[Q]=h(this,!0)),this.load.remembered[e]=h(this),this.preset=e,d(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){U["default"].each(this.__controllers,function(t){this.getRoot().load.remembered?l(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),U["default"].each(this.__folders,function(e){e.revert(e)}),e||r(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&b(this.__listening)},updateDisplay:function(){U["default"].each(this.__controllers,function(e){e.updateDisplay()}),U["default"].each(this.__folders,function(e){e.updateDisplay()})}}),e.exports=oe},function(e,t){"use strict";e.exports={load:function(e,t){var n=t||document,o=n.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=e,n.getElementsByTagName("head")[0].appendChild(o)},inject:function(e,t){var n=t||document,o=document.createElement("style");o.type="text/css",o.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(o)}catch(r){}}}},function(e,t){e.exports="<div id=dg-save class=\"dg dialogue\"> Here's the new load parameter for your <code>GUI</code>'s constructor: <textarea id=dg-new-constructor></textarea> <div id=dg-save-locally> <input id=dg-local-storage type=checkbox /> Automatically save values to <code>localStorage</code> on exit. <div id=dg-local-explain>The values saved to <code>localStorage</code> will override those passed to <code>dat.GUI</code>'s constructor. This makes it easier to work incrementally, but <code>localStorage</code> is fragile, and your friends may not see the same values you do. </div> </div> </div>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(10),r=o(i),a=n(13),l=o(a),s=n(14),u=o(s),d=n(11),c=o(d),f=n(15),_=o(f),p=n(8),h=o(p),m=n(5),b=o(m),g=function(e,t){var n=e[t];return b["default"].isArray(arguments[2])||b["default"].isObject(arguments[2])?new r["default"](e,t,arguments[2]):b["default"].isNumber(n)?b["default"].isNumber(arguments[2])&&b["default"].isNumber(arguments[3])?b["default"].isNumber(arguments[4])?new u["default"](e,t,arguments[2],arguments[3],arguments[4]):new u["default"](e,t,arguments[2],arguments[3]):b["default"].isNumber(arguments[4])?new l["default"](e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new l["default"](e,t,{min:arguments[2],max:arguments[3]}):b["default"].isString(n)?new c["default"](e,t):b["default"].isFunction(n)?new _["default"](e,t,""):b["default"].isBoolean(n)?new h["default"](e,t):null};t["default"]=g},function(e,t){"use strict";function n(e){setTimeout(e,1e3/60)}t.__esModule=!0,t["default"]=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(9),a=o(r),l=n(5),s=o(l),u=function(){function e(){i(this,e),this.backgroundElement=document.createElement("div"),s["default"].extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),a["default"].makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),s["default"].extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;a["default"].bind(this.backgroundElement,"click",function(){t.hide()})}return e.prototype.show=function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),s["default"].defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})},e.prototype.hide=function t(){var e=this,t=function n(){e.domElement.style.display="none",e.backgroundElement.style.display="none",a["default"].unbind(e.domElement,"webkitTransitionEnd",n),a["default"].unbind(e.domElement,"transitionend",n),a["default"].unbind(e.domElement,"oTransitionEnd",n)};a["default"].bind(this.domElement,"webkitTransitionEnd",t),a["default"].bind(this.domElement,"transitionend",t),a["default"].bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"},e.prototype.layout=function(){this.domElement.style.left=window.innerWidth/2-a["default"].getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-a["default"].getHeight(this.domElement)/2+"px"},e}();t["default"]=u},function(e,t,n){t=e.exports=n(24)(),t.push([e.id,".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1!important}.dg.main .close-button.drag,.dg.main:hover .close-button{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save>ul{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height .1s ease-out;transition:height .1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:9px}.dg .c select{margin-top:5px}.dg .cr.boolean,.dg .cr.boolean *,.dg .cr.function,.dg .cr.function *,.dg .cr.function .property-name{cursor:pointer}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco,monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px Lucida Grande,sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid hsla(0,0%,100%,.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.boolean:hover,.dg .cr.function:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}}])});
libs/earcut.min.js ADDED
@@ -0,0 +1 @@
 
 
1
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.earcut=e()}}(function(){return function e(n,t,r){function x(u,f){if(!t[u]){if(!n[u]){var o="function"==typeof require&&require;if(!f&&o)return o(u,!0);if(i)return i(u,!0);var v=new Error("Cannot find module '"+u+"'");throw v.code="MODULE_NOT_FOUND",v}var l=t[u]={exports:{}};n[u][0].call(l.exports,function(e){var t=n[u][1][e];return x(t?t:e)},l,l.exports,e,n,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)x(r[u]);return x}({1:[function(e,n,t){"use strict";function r(e,n,t){t=t||2;var r=n&&n.length,i=r?n[0]*t:e.length,f=x(e,0,i,t,!0),o=[];if(!f)return o;var v,l,p,a,h,s,c;if(r&&(f=y(e,n,f,t)),e.length>80*t){v=p=e[0],l=a=e[1];for(var d=t;i>d;d+=t)h=e[d],s=e[d+1],v>h&&(v=h),l>s&&(l=s),h>p&&(p=h),s>a&&(a=s);c=Math.max(p-v,a-l)}return u(f,o,t,v,l,c),o}function x(e,n,t,r,x){var i,u;if(x===_(e,n,t,r)>0)for(i=n;t>i;i+=r)u=E(i,e[i],e[i+1],u);else for(i=t-r;i>=n;i-=r)u=E(i,e[i],e[i+1],u);return u&&z(u,u.next)&&(N(u),u=u.next),u}function i(e,n){if(!e)return e;n||(n=e);var t,r=e;do if(t=!1,r.steiner||!z(r,r.next)&&0!==b(r.prev,r,r.next))r=r.next;else{if(N(r),r=n=r.prev,r===r.next)return null;t=!0}while(t||r!==n);return n}function u(e,n,t,r,x,y,p){if(e){!p&&y&&s(e,r,x,y);for(var a,h,c=e;e.prev!==e.next;)if(a=e.prev,h=e.next,y?o(e,r,x,y):f(e))n.push(a.i/t),n.push(e.i/t),n.push(h.i/t),N(e),e=h.next,c=h.next;else if(e=h,e===c){p?1===p?(e=v(e,n,t),u(e,n,t,r,x,y,2)):2===p&&l(e,n,t,r,x,y):u(i(e),n,t,r,x,y,1);break}}}function f(e){var n=e.prev,t=e,r=e.next;if(b(n,t,r)>=0)return!1;for(var x=e.next.next;x!==e.prev;){if(g(n.x,n.y,t.x,t.y,r.x,r.y,x.x,x.y)&&b(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function o(e,n,t,r){var x=e.prev,i=e,u=e.next;if(b(x,i,u)>=0)return!1;for(var f=x.x<i.x?x.x<u.x?x.x:u.x:i.x<u.x?i.x:u.x,o=x.y<i.y?x.y<u.y?x.y:u.y:i.y<u.y?i.y:u.y,v=x.x>i.x?x.x>u.x?x.x:u.x:i.x>u.x?i.x:u.x,l=x.y>i.y?x.y>u.y?x.y:u.y:i.y>u.y?i.y:u.y,y=d(f,o,n,t,r),p=d(v,l,n,t,r),a=e.nextZ;a&&a.z<=p;){if(a!==e.prev&&a!==e.next&&g(x.x,x.y,i.x,i.y,u.x,u.y,a.x,a.y)&&b(a.prev,a,a.next)>=0)return!1;a=a.nextZ}for(a=e.prevZ;a&&a.z>=y;){if(a!==e.prev&&a!==e.next&&g(x.x,x.y,i.x,i.y,u.x,u.y,a.x,a.y)&&b(a.prev,a,a.next)>=0)return!1;a=a.prevZ}return!0}function v(e,n,t){var r=e;do{var x=r.prev,i=r.next.next;!z(x,i)&&M(x,r,r.next,i)&&q(x,i)&&q(i,x)&&(n.push(x.i/t),n.push(r.i/t),n.push(i.i/t),N(r),N(r.next),r=e=i),r=r.next}while(r!==e);return r}function l(e,n,t,r,x,f){var o=e;do{for(var v=o.next.next;v!==o.prev;){if(o.i!==v.i&&w(o,v)){var l=D(o,v);return o=i(o,o.next),l=i(l,l.next),u(o,n,t,r,x,f),void u(l,n,t,r,x,f)}v=v.next}o=o.next}while(o!==e)}function y(e,n,t,r){var u,f,o,v,l,y=[];for(u=0,f=n.length;f>u;u++)o=n[u]*r,v=f-1>u?n[u+1]*r:e.length,l=x(e,o,v,r,!1),l===l.next&&(l.steiner=!0),y.push(Z(l));for(y.sort(p),u=0;u<y.length;u++)a(y[u],t),t=i(t,t.next);return t}function p(e,n){return e.x-n.x}function a(e,n){if(n=h(e,n)){var t=D(n,e);i(t,t.next)}}function h(e,n){var t,r=n,x=e.x,i=e.y,u=-(1/0);do{if(i<=r.y&&i>=r.next.y){var f=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(x>=f&&f>u){if(u=f,f===x){if(i===r.y)return r;if(i===r.next.y)return r.next}t=r.x<r.next.x?r:r.next}}r=r.next}while(r!==n);if(!t)return null;if(x===u)return t.prev;var o,v=t,l=t.x,y=t.y,p=1/0;for(r=t.next;r!==v;)x>=r.x&&r.x>=l&&g(y>i?x:u,i,l,y,y>i?u:x,i,r.x,r.y)&&(o=Math.abs(i-r.y)/(x-r.x),(p>o||o===p&&r.x>t.x)&&q(r,e)&&(t=r,p=o)),r=r.next;return t}function s(e,n,t,r){var x=e;do null===x.z&&(x.z=d(x.x,x.y,n,t,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next;while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,c(x)}function c(e){var n,t,r,x,i,u,f,o,v=1;do{for(t=e,e=null,i=null,u=0;t;){for(u++,r=t,f=0,n=0;v>n&&(f++,r=r.nextZ,r);n++);for(o=v;f>0||o>0&&r;)0===f?(x=r,r=r.nextZ,o--):0!==o&&r?t.z<=r.z?(x=t,t=t.nextZ,f--):(x=r,r=r.nextZ,o--):(x=t,t=t.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;t=r}i.nextZ=null,v*=2}while(u>1);return e}function d(e,n,t,r,x){return e=32767*(e-t)/x,n=32767*(n-r)/x,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),e|n<<1}function Z(e){var n=e,t=e;do n.x<t.x&&(t=n),n=n.next;while(n!==e);return t}function g(e,n,t,r,x,i,u,f){return(x-u)*(n-f)-(e-u)*(i-f)>=0&&(e-u)*(r-f)-(t-u)*(n-f)>=0&&(t-u)*(i-f)-(x-u)*(r-f)>=0}function w(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!m(e,n)&&q(e,n)&&q(n,e)&&O(e,n)}function b(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function z(e,n){return e.x===n.x&&e.y===n.y}function M(e,n,t,r){return z(e,n)&&z(t,r)||z(e,r)&&z(t,n)?!0:b(e,n,t)>0!=b(e,n,r)>0&&b(t,r,e)>0!=b(t,r,n)>0}function m(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&M(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}function q(e,n){return b(e.prev,e,e.next)<0?b(e,n,e.next)>=0&&b(e,e.prev,n)>=0:b(e,n,e.prev)<0||b(e,e.next,n)<0}function O(e,n){var t=e,r=!1,x=(e.x+n.x)/2,i=(e.y+n.y)/2;do t.y>i!=t.next.y>i&&x<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next;while(t!==e);return r}function D(e,n){var t=new U(e.i,e.x,e.y),r=new U(n.i,n.x,n.y),x=e.next,i=n.prev;return e.next=n,n.prev=e,t.next=x,x.prev=t,r.next=t,t.prev=r,i.next=r,r.prev=i,r}function E(e,n,t,r){var x=new U(e,n,t);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function N(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function U(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(e,n,t,r){for(var x=0,i=n,u=t-r;t>i;i+=r)x+=(e[u]-e[i])*(e[i+1]+e[u+1]),u=i;return x}n.exports=r,r.deviation=function(e,n,t,r){var x=n&&n.length,i=x?n[0]*t:e.length,u=Math.abs(_(e,0,i,t));if(x)for(var f=0,o=n.length;o>f;f++){var v=n[f]*t,l=o-1>f?n[f+1]*t:e.length;u-=Math.abs(_(e,v,l,t))}var y=0;for(f=0;f<r.length;f+=3){var p=r[f]*t,a=r[f+1]*t,h=r[f+2]*t;y+=Math.abs((e[p]-e[h])*(e[a+1]-e[p+1])-(e[p]-e[a])*(e[h+1]-e[p+1]))}return 0===u&&0===y?0:Math.abs((y-u)/u)},r.flatten=function(e){for(var n=e[0][0].length,t={vertices:[],holes:[],dimensions:n},r=0,x=0;x<e.length;x++){for(var i=0;i<e[x].length;i++)for(var u=0;n>u;u++)t.vertices.push(e[x][i][u]);x>0&&(r+=e[x-1].length,t.holes.push(r))}return t}},{}]},{},[1])(1)});
package.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "compliance",
3
+ "version": "0.0.0",
4
+ "description": "these numbers are scary",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "Julian BILCKE",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ }
13
+ }
screenshot.jpg ADDED

Git LFS Details

  • SHA256: 48d60da25c05d6e418b24b385d56877e0ad970772d8b8977820bd5a91c47b0f2
  • Pointer size: 132 Bytes
  • Size of remote file: 1.37 MB