@rive-app/webgl2 2.26.4 → 2.26.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rive.d.ts +155 -0
- package/rive.js +972 -389
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +129 -0
package/rive.js
CHANGED
|
@@ -26,9 +26,9 @@ var Rive = (() => {
|
|
|
26
26
|
return (
|
|
27
27
|
function(moduleArg = {}) {
|
|
28
28
|
|
|
29
|
-
var k = moduleArg,
|
|
29
|
+
var k = moduleArg, aa, ca;
|
|
30
30
|
k.ready = new Promise((a, b) => {
|
|
31
|
-
|
|
31
|
+
aa = a;
|
|
32
32
|
ca = b;
|
|
33
33
|
});
|
|
34
34
|
function da() {
|
|
@@ -175,8 +175,8 @@ k.onRuntimeInitialized = function() {
|
|
|
175
175
|
this.transform = function(u) {
|
|
176
176
|
this.S.push(d.transform.bind(d, u));
|
|
177
177
|
};
|
|
178
|
-
this.align = function(u, y, z, A,
|
|
179
|
-
this.S.push(d.align.bind(d, u, y, z, A,
|
|
178
|
+
this.align = function(u, y, z, A, H = 1.0) {
|
|
179
|
+
this.S.push(d.align.bind(d, u, y, z, A, H));
|
|
180
180
|
};
|
|
181
181
|
this.flush = function() {
|
|
182
182
|
console.assert(0 == this.la);
|
|
@@ -203,19 +203,19 @@ k.onRuntimeInitialized = function() {
|
|
|
203
203
|
var A = z.delete;
|
|
204
204
|
z.delete = function() {
|
|
205
205
|
A.call(this);
|
|
206
|
-
var
|
|
207
|
-
r === w[
|
|
208
|
-
"object" == typeof JSEvents && JSEvents.Oc(w[
|
|
209
|
-
w[
|
|
210
|
-
this.Ka = this.F = this.La = this.T = w[
|
|
206
|
+
var H = this.Ka;
|
|
207
|
+
r === w[H] && (r = null);
|
|
208
|
+
"object" == typeof JSEvents && JSEvents.Oc(w[H].D.canvas);
|
|
209
|
+
w[H] && w[H].D.canvas && (w[H].D.canvas.zb = void 0);
|
|
210
|
+
this.Ka = this.F = this.La = this.T = w[H] = null;
|
|
211
211
|
};
|
|
212
212
|
return z;
|
|
213
213
|
}
|
|
214
214
|
function c() {
|
|
215
215
|
if (d) {
|
|
216
|
-
var q = d.Cb, u = 0, y = 0, z = 0, A = Array(e.size),
|
|
216
|
+
var q = d.Cb, u = 0, y = 0, z = 0, A = Array(e.size), H = 0;
|
|
217
217
|
for (var I of e) {
|
|
218
|
-
I.fa = Math.min(I.F.width, q), I.ea = Math.min(I.F.height, q), I.Ia = I.ea * I.fa, u = Math.max(u, I.fa), y = Math.max(y, I.ea), z += I.Ia, A[
|
|
218
|
+
I.fa = Math.min(I.F.width, q), I.ea = Math.min(I.F.height, q), I.Ia = I.ea * I.fa, u = Math.max(u, I.fa), y = Math.max(y, I.ea), z += I.Ia, A[H++] = I;
|
|
219
219
|
}
|
|
220
220
|
e.clear();
|
|
221
221
|
if (!(0 >= z)) {
|
|
@@ -225,14 +225,14 @@ k.onRuntimeInitialized = function() {
|
|
|
225
225
|
}
|
|
226
226
|
u = Math.min(u, q);
|
|
227
227
|
u = Math.min(y, q);
|
|
228
|
-
A.sort((
|
|
228
|
+
A.sort((ba, sb) => sb.Ia - ba.Ia);
|
|
229
229
|
z = new k.DynamicRectanizer(q);
|
|
230
230
|
for (I = 0; I < A.length;) {
|
|
231
231
|
z.reset(u, y);
|
|
232
|
-
for (
|
|
233
|
-
var L = A[
|
|
232
|
+
for (H = I; H < A.length; ++H) {
|
|
233
|
+
var L = A[H], E = z.addRect(L.fa, L.ea);
|
|
234
234
|
if (0 > E) {
|
|
235
|
-
console.assert(
|
|
235
|
+
console.assert(H > I);
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
238
|
L.ra = E & 65535;
|
|
@@ -247,26 +247,26 @@ k.onRuntimeInitialized = function() {
|
|
|
247
247
|
d.F.width != L && (d.F.width = L);
|
|
248
248
|
d.F.height != E && (d.F.height = E);
|
|
249
249
|
d.clear();
|
|
250
|
-
for (L = I; L <
|
|
250
|
+
for (L = I; L < H; ++L) {
|
|
251
251
|
E = A[L];
|
|
252
252
|
d.saveClipRect(E.ra, E.sa, E.ra + E.fa, E.sa + E.ea);
|
|
253
|
-
let
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
d.transform(
|
|
253
|
+
let ba = new k.Mat2D();
|
|
254
|
+
ba.xx = E.fa / E.F.width;
|
|
255
|
+
ba.yy = E.ea / E.F.height;
|
|
256
|
+
ba.xy = ba.yx = 0;
|
|
257
|
+
ba.tx = E.ra;
|
|
258
|
+
ba.ty = E.sa;
|
|
259
|
+
d.transform(ba);
|
|
260
260
|
for (const sb of E.S) {
|
|
261
261
|
sb();
|
|
262
262
|
}
|
|
263
263
|
d.restoreClipRect();
|
|
264
264
|
E.S = [];
|
|
265
265
|
}
|
|
266
|
-
for (d.flush(); I <
|
|
266
|
+
for (d.flush(); I < H; ++I) {
|
|
267
267
|
L = A[I], E = L.Ab, E.globalCompositeOperation = "copy", E.drawImage(d.F, L.ra, L.sa, L.fa, L.ea, 0, 0, L.F.width, L.F.height);
|
|
268
268
|
}
|
|
269
|
-
I =
|
|
269
|
+
I = H;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
}
|
|
@@ -363,11 +363,11 @@ var sa;
|
|
|
363
363
|
k.wasmBinary && (sa = k.wasmBinary);
|
|
364
364
|
var noExitRuntime = k.noExitRuntime || !0;
|
|
365
365
|
"object" != typeof WebAssembly && ta("no native wasm support detected");
|
|
366
|
-
var ua, C, va = !1, D, F,
|
|
366
|
+
var ua, C, va = !1, D, F, G, wa, J, K, xa, ya;
|
|
367
367
|
function za() {
|
|
368
368
|
var a = ua.buffer;
|
|
369
369
|
k.HEAP8 = D = new Int8Array(a);
|
|
370
|
-
k.HEAP16 =
|
|
370
|
+
k.HEAP16 = G = new Int16Array(a);
|
|
371
371
|
k.HEAP32 = J = new Int32Array(a);
|
|
372
372
|
k.HEAPU8 = F = new Uint8Array(a);
|
|
373
373
|
k.HEAPU16 = wa = new Uint16Array(a);
|
|
@@ -442,7 +442,7 @@ function Oa(a, b) {
|
|
|
442
442
|
return Na(c, a, b);
|
|
443
443
|
}));
|
|
444
444
|
}
|
|
445
|
-
var Pa, Qa, Ua = {
|
|
445
|
+
var Pa, Qa, Ua = {510110:(a, b, c, d, e) => {
|
|
446
446
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
447
447
|
return 0;
|
|
448
448
|
}
|
|
@@ -505,9 +505,9 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
|
|
|
505
505
|
}
|
|
506
506
|
window.h.Da += 1;
|
|
507
507
|
return 1;
|
|
508
|
-
},
|
|
508
|
+
}, 512288:() => {
|
|
509
509
|
"undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
|
|
510
|
-
},
|
|
510
|
+
}, 512452:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 512556:() => {
|
|
511
511
|
try {
|
|
512
512
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
513
513
|
a.close();
|
|
@@ -515,7 +515,7 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
|
|
|
515
515
|
} catch (c) {
|
|
516
516
|
return 0;
|
|
517
517
|
}
|
|
518
|
-
},
|
|
518
|
+
}, 512727:(a, b, c, d, e, f) => {
|
|
519
519
|
if ("undefined" === typeof window.h) {
|
|
520
520
|
return -1;
|
|
521
521
|
}
|
|
@@ -561,7 +561,7 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
|
|
|
561
561
|
a == window.h.I.Ba && g.Z.connect(g.J.destination);
|
|
562
562
|
g.lb = f;
|
|
563
563
|
return window.h.oc(g);
|
|
564
|
-
},
|
|
564
|
+
}, 515604:a => window.h.va(a).J.sampleRate, 515677:a => {
|
|
565
565
|
a = window.h.va(a);
|
|
566
566
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
567
567
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
@@ -569,13 +569,13 @@ var Pa, Qa, Ua = {507918:(a, b, c, d, e) => {
|
|
|
569
569
|
a.J.close();
|
|
570
570
|
a.J = void 0;
|
|
571
571
|
a.lb = void 0;
|
|
572
|
-
},
|
|
572
|
+
}, 516077:a => {
|
|
573
573
|
window.h.yb(a);
|
|
574
|
-
},
|
|
574
|
+
}, 516127:a => {
|
|
575
575
|
a = window.h.va(a);
|
|
576
576
|
a.J.resume();
|
|
577
577
|
a.state = window.h.ia.tb;
|
|
578
|
-
},
|
|
578
|
+
}, 516266:a => {
|
|
579
579
|
a = window.h.va(a);
|
|
580
580
|
a.J.suspend();
|
|
581
581
|
a.state = window.h.ia.stopped;
|
|
@@ -1311,7 +1311,7 @@ function R(a) {
|
|
|
1311
1311
|
var S = a => {
|
|
1312
1312
|
a || R("Cannot use deleted val. handle = " + a);
|
|
1313
1313
|
return Q.get(a).value;
|
|
1314
|
-
},
|
|
1314
|
+
}, T = a => {
|
|
1315
1315
|
switch(a) {
|
|
1316
1316
|
case void 0:
|
|
1317
1317
|
return 1;
|
|
@@ -1325,7 +1325,7 @@ var S = a => {
|
|
|
1325
1325
|
return Q.ta({qb:1, value:a});
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
|
-
function
|
|
1328
|
+
function cc(a) {
|
|
1329
1329
|
var b = Error, c = $b(a, function(d) {
|
|
1330
1330
|
this.name = a;
|
|
1331
1331
|
this.message = d;
|
|
@@ -1339,122 +1339,122 @@ function dc(a) {
|
|
|
1339
1339
|
};
|
|
1340
1340
|
return c;
|
|
1341
1341
|
}
|
|
1342
|
-
var
|
|
1343
|
-
function
|
|
1342
|
+
var dc = void 0, ec = void 0;
|
|
1343
|
+
function U(a) {
|
|
1344
1344
|
for (var b = ""; F[a];) {
|
|
1345
|
-
b +=
|
|
1345
|
+
b += ec[F[a++]];
|
|
1346
1346
|
}
|
|
1347
1347
|
return b;
|
|
1348
1348
|
}
|
|
1349
|
-
var
|
|
1350
|
-
function
|
|
1351
|
-
for (;
|
|
1352
|
-
var a =
|
|
1349
|
+
var fc = [];
|
|
1350
|
+
function gc() {
|
|
1351
|
+
for (; fc.length;) {
|
|
1352
|
+
var a = fc.pop();
|
|
1353
1353
|
a.g.ha = !1;
|
|
1354
1354
|
a["delete"]();
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
var
|
|
1358
|
-
function
|
|
1357
|
+
var hc = void 0, ic = {};
|
|
1358
|
+
function jc(a, b) {
|
|
1359
1359
|
for (void 0 === b && R("ptr should not be undefined"); a.A;) {
|
|
1360
1360
|
b = a.pa(b), a = a.A;
|
|
1361
1361
|
}
|
|
1362
1362
|
return b;
|
|
1363
1363
|
}
|
|
1364
|
-
var
|
|
1365
|
-
function
|
|
1366
|
-
a =
|
|
1367
|
-
var b =
|
|
1368
|
-
|
|
1364
|
+
var kc = {};
|
|
1365
|
+
function lc(a) {
|
|
1366
|
+
a = mc(a);
|
|
1367
|
+
var b = U(a);
|
|
1368
|
+
nc(a);
|
|
1369
1369
|
return b;
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1372
|
-
var c =
|
|
1373
|
-
void 0 === c && R(b + " has unknown type " +
|
|
1371
|
+
function oc(a, b) {
|
|
1372
|
+
var c = kc[a];
|
|
1373
|
+
void 0 === c && R(b + " has unknown type " + lc(a));
|
|
1374
1374
|
return c;
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function pc() {
|
|
1377
1377
|
}
|
|
1378
|
-
var
|
|
1379
|
-
function
|
|
1378
|
+
var qc = !1;
|
|
1379
|
+
function rc(a) {
|
|
1380
1380
|
--a.count.value;
|
|
1381
1381
|
0 === a.count.value && (a.H ? a.L.W(a.H) : a.u.i.W(a.o));
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function sc(a, b, c) {
|
|
1384
1384
|
if (b === c) {
|
|
1385
1385
|
return a;
|
|
1386
1386
|
}
|
|
1387
1387
|
if (void 0 === c.A) {
|
|
1388
1388
|
return null;
|
|
1389
1389
|
}
|
|
1390
|
-
a =
|
|
1390
|
+
a = sc(a, b, c.A);
|
|
1391
1391
|
return null === a ? null : c.Jb(a);
|
|
1392
1392
|
}
|
|
1393
|
-
var
|
|
1394
|
-
function
|
|
1395
|
-
b =
|
|
1396
|
-
return
|
|
1393
|
+
var tc = {};
|
|
1394
|
+
function uc(a, b) {
|
|
1395
|
+
b = jc(a, b);
|
|
1396
|
+
return ic[b];
|
|
1397
1397
|
}
|
|
1398
|
-
var
|
|
1399
|
-
function
|
|
1400
|
-
throw new
|
|
1398
|
+
var vc = void 0;
|
|
1399
|
+
function wc(a) {
|
|
1400
|
+
throw new vc(a);
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
b.u && b.o ||
|
|
1404
|
-
!!b.L !== !!b.H &&
|
|
1402
|
+
function xc(a, b) {
|
|
1403
|
+
b.u && b.o || wc("makeClassHandle requires ptr and ptrType");
|
|
1404
|
+
!!b.L !== !!b.H && wc("Both smartPtrType and smartPtr must be specified");
|
|
1405
1405
|
b.count = {value:1};
|
|
1406
|
-
return
|
|
1406
|
+
return yc(Object.create(a, {g:{value:b,},}));
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function yc(a) {
|
|
1409
1409
|
if ("undefined" === typeof FinalizationRegistry) {
|
|
1410
|
-
return
|
|
1410
|
+
return yc = b => b, a;
|
|
1411
1411
|
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1412
|
+
qc = new FinalizationRegistry(b => {
|
|
1413
|
+
rc(b.g);
|
|
1414
1414
|
});
|
|
1415
|
-
|
|
1415
|
+
yc = b => {
|
|
1416
1416
|
var c = b.g;
|
|
1417
|
-
c.H &&
|
|
1417
|
+
c.H && qc.register(b, {g:c}, b);
|
|
1418
1418
|
return b;
|
|
1419
1419
|
};
|
|
1420
|
-
|
|
1421
|
-
|
|
1420
|
+
pc = b => {
|
|
1421
|
+
qc.unregister(b);
|
|
1422
1422
|
};
|
|
1423
|
-
return
|
|
1423
|
+
return yc(a);
|
|
1424
1424
|
}
|
|
1425
|
-
var
|
|
1426
|
-
function
|
|
1425
|
+
var zc = {};
|
|
1426
|
+
function Ac(a) {
|
|
1427
1427
|
for (; a.length;) {
|
|
1428
1428
|
var b = a.pop();
|
|
1429
1429
|
a.pop()(b);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function Bc(a) {
|
|
1433
1433
|
return this.fromWireType(J[a >> 2]);
|
|
1434
1434
|
}
|
|
1435
|
-
var
|
|
1436
|
-
function
|
|
1435
|
+
var Cc = {}, Dc = {};
|
|
1436
|
+
function V(a, b, c) {
|
|
1437
1437
|
function d(l) {
|
|
1438
1438
|
l = c(l);
|
|
1439
|
-
l.length !== a.length &&
|
|
1439
|
+
l.length !== a.length && wc("Mismatched type converter count");
|
|
1440
1440
|
for (var p = 0; p < a.length; ++p) {
|
|
1441
|
-
|
|
1441
|
+
W(a[p], l[p]);
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
a.forEach(function(l) {
|
|
1445
|
-
|
|
1445
|
+
Dc[l] = b;
|
|
1446
1446
|
});
|
|
1447
1447
|
var e = Array(b.length), f = [], g = 0;
|
|
1448
1448
|
b.forEach((l, p) => {
|
|
1449
|
-
|
|
1450
|
-
e[p] =
|
|
1449
|
+
kc.hasOwnProperty(l) ? e[p] = kc[l] : (f.push(l), Cc.hasOwnProperty(l) || (Cc[l] = []), Cc[l].push(() => {
|
|
1450
|
+
e[p] = kc[l];
|
|
1451
1451
|
++g;
|
|
1452
1452
|
g === f.length && d(e);
|
|
1453
1453
|
}));
|
|
1454
1454
|
});
|
|
1455
1455
|
0 === f.length && d(e);
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Ec(a) {
|
|
1458
1458
|
switch(a) {
|
|
1459
1459
|
case 1:
|
|
1460
1460
|
return 0;
|
|
@@ -1468,31 +1468,31 @@ function Fc(a) {
|
|
|
1468
1468
|
throw new TypeError(`Unknown type size: ${a}`);
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Fc(a, b, c = {}) {
|
|
1472
1472
|
var d = b.name;
|
|
1473
1473
|
a || R(`type "${d}" must have a positive integer typeid pointer`);
|
|
1474
|
-
if (
|
|
1474
|
+
if (kc.hasOwnProperty(a)) {
|
|
1475
1475
|
if (c.Ub) {
|
|
1476
1476
|
return;
|
|
1477
1477
|
}
|
|
1478
1478
|
R(`Cannot register type '${d}' twice`);
|
|
1479
1479
|
}
|
|
1480
|
-
|
|
1481
|
-
delete
|
|
1482
|
-
|
|
1480
|
+
kc[a] = b;
|
|
1481
|
+
delete Dc[a];
|
|
1482
|
+
Cc.hasOwnProperty(a) && (b = Cc[a], delete Cc[a], b.forEach(e => e()));
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function W(a, b, c = {}) {
|
|
1485
1485
|
if (!("argPackAdvance" in b)) {
|
|
1486
1486
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
1487
1487
|
}
|
|
1488
|
-
|
|
1488
|
+
Fc(a, b, c);
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function Gc(a) {
|
|
1491
1491
|
R(a.g.u.i.name + " instance already deleted");
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function Hc() {
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function Ic(a, b, c) {
|
|
1496
1496
|
if (void 0 === a[b].B) {
|
|
1497
1497
|
var d = a[b];
|
|
1498
1498
|
a[b] = function() {
|
|
@@ -1503,10 +1503,10 @@ function Jc(a, b, c) {
|
|
|
1503
1503
|
a[b].B[d.ga] = d;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
k.hasOwnProperty(a) ? ((void 0 === c || void 0 !== k[a].B && void 0 !== k[a].B[c]) && R(`Cannot register public name '${a}' twice`),
|
|
1506
|
+
function Jc(a, b, c) {
|
|
1507
|
+
k.hasOwnProperty(a) ? ((void 0 === c || void 0 !== k[a].B && void 0 !== k[a].B[c]) && R(`Cannot register public name '${a}' twice`), Ic(k, a, a), k.hasOwnProperty(c) && R(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`), k[a].B[c] = b) : (k[a] = b, void 0 !== c && (k[a].Mc = c));
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function Kc(a, b, c, d, e, f, g, l) {
|
|
1510
1510
|
this.name = a;
|
|
1511
1511
|
this.constructor = b;
|
|
1512
1512
|
this.N = c;
|
|
@@ -1517,21 +1517,21 @@ function Lc(a, b, c, d, e, f, g, l) {
|
|
|
1517
1517
|
this.Jb = l;
|
|
1518
1518
|
this.mb = [];
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function Lc(a, b, c) {
|
|
1521
1521
|
for (; b !== c;) {
|
|
1522
1522
|
b.pa || R(`Expected null or instance of ${c.name}, got an instance of ${b.name}`), a = b.pa(a), b = b.A;
|
|
1523
1523
|
}
|
|
1524
1524
|
return a;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function Mc(a, b) {
|
|
1527
1527
|
if (null === b) {
|
|
1528
1528
|
return this.Pa && R(`null is not a valid ${this.name}`), 0;
|
|
1529
1529
|
}
|
|
1530
|
-
b.g || R(`Cannot pass "${
|
|
1530
|
+
b.g || R(`Cannot pass "${Nc(b)}" as a ${this.name}`);
|
|
1531
1531
|
b.g.o || R(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1532
|
-
return
|
|
1532
|
+
return Lc(b.g.o, b.g.u.i, this.i);
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function Oc(a, b) {
|
|
1535
1535
|
if (null === b) {
|
|
1536
1536
|
this.Pa && R(`null is not a valid ${this.name}`);
|
|
1537
1537
|
if (this.ya) {
|
|
@@ -1541,10 +1541,10 @@ function Pc(a, b) {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
return 0;
|
|
1543
1543
|
}
|
|
1544
|
-
b.g || R(`Cannot pass "${
|
|
1544
|
+
b.g || R(`Cannot pass "${Nc(b)}" as a ${this.name}`);
|
|
1545
1545
|
b.g.o || R(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1546
1546
|
!this.xa && b.g.u.xa && R(`Cannot convert argument of type ${b.g.L ? b.g.L.name : b.g.u.name} to parameter type ${this.name}`);
|
|
1547
|
-
c =
|
|
1547
|
+
c = Lc(b.g.o, b.g.u.i, this.i);
|
|
1548
1548
|
if (this.ya) {
|
|
1549
1549
|
switch(void 0 === b.g.H && R("Passing raw pointer to smart pointer is illegal"), this.jc) {
|
|
1550
1550
|
case 0:
|
|
@@ -1558,7 +1558,7 @@ function Pc(a, b) {
|
|
|
1558
1558
|
c = b.g.H;
|
|
1559
1559
|
} else {
|
|
1560
1560
|
var d = b.clone();
|
|
1561
|
-
c = this.dc(c,
|
|
1561
|
+
c = this.dc(c, T(function() {
|
|
1562
1562
|
d["delete"]();
|
|
1563
1563
|
}));
|
|
1564
1564
|
null !== a && a.push(this.W, c);
|
|
@@ -1570,33 +1570,33 @@ function Pc(a, b) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
return c;
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function Pc(a, b) {
|
|
1574
1574
|
if (null === b) {
|
|
1575
1575
|
return this.Pa && R(`null is not a valid ${this.name}`), 0;
|
|
1576
1576
|
}
|
|
1577
|
-
b.g || R(`Cannot pass "${
|
|
1577
|
+
b.g || R(`Cannot pass "${Nc(b)}" as a ${this.name}`);
|
|
1578
1578
|
b.g.o || R(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1579
1579
|
b.g.u.xa && R(`Cannot convert argument of type ${b.g.u.name} to parameter type ${this.name}`);
|
|
1580
|
-
return
|
|
1580
|
+
return Lc(b.g.o, b.g.u.i, this.i);
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function Qc(a, b, c, d) {
|
|
1583
1583
|
this.name = a;
|
|
1584
1584
|
this.i = b;
|
|
1585
1585
|
this.Pa = c;
|
|
1586
1586
|
this.xa = d;
|
|
1587
1587
|
this.ya = !1;
|
|
1588
1588
|
this.W = this.dc = this.Ra = this.ob = this.jc = this.cc = void 0;
|
|
1589
|
-
void 0 !== b.A ? this.toWireType =
|
|
1589
|
+
void 0 !== b.A ? this.toWireType = Oc : (this.toWireType = d ? Mc : Pc, this.K = null);
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1592
|
-
k.hasOwnProperty(a) ||
|
|
1591
|
+
function Rc(a, b, c) {
|
|
1592
|
+
k.hasOwnProperty(a) || wc("Replacing nonexistant public symbol");
|
|
1593
1593
|
void 0 !== k[a].B && void 0 !== c ? k[a].B[c] = b : (k[a] = b, k[a].ga = c);
|
|
1594
1594
|
}
|
|
1595
|
-
var
|
|
1596
|
-
var b =
|
|
1597
|
-
b || (a >=
|
|
1595
|
+
var Sc = [], Tc = a => {
|
|
1596
|
+
var b = Sc[a];
|
|
1597
|
+
b || (a >= Sc.length && (Sc.length = a + 1), Sc[a] = b = Aa.get(a));
|
|
1598
1598
|
return b;
|
|
1599
|
-
},
|
|
1599
|
+
}, Uc = (a, b) => {
|
|
1600
1600
|
var c = [];
|
|
1601
1601
|
return function() {
|
|
1602
1602
|
c.length = 0;
|
|
@@ -1605,27 +1605,27 @@ var Tc = [], Uc = a => {
|
|
|
1605
1605
|
var d = k["dynCall_" + a];
|
|
1606
1606
|
d = c && c.length ? d.apply(null, [b].concat(c)) : d.call(null, b);
|
|
1607
1607
|
} else {
|
|
1608
|
-
d =
|
|
1608
|
+
d = Tc(b).apply(null, c);
|
|
1609
1609
|
}
|
|
1610
1610
|
return d;
|
|
1611
1611
|
};
|
|
1612
1612
|
};
|
|
1613
|
-
function
|
|
1614
|
-
a =
|
|
1615
|
-
var c = a.includes("j") ?
|
|
1613
|
+
function X(a, b) {
|
|
1614
|
+
a = U(a);
|
|
1615
|
+
var c = a.includes("j") ? Uc(a, b) : Tc(b);
|
|
1616
1616
|
"function" != typeof c && R(`unknown function pointer with signature ${a}: ${b}`);
|
|
1617
1617
|
return c;
|
|
1618
1618
|
}
|
|
1619
|
-
var
|
|
1620
|
-
function
|
|
1619
|
+
var Vc = void 0;
|
|
1620
|
+
function Wc(a, b) {
|
|
1621
1621
|
function c(f) {
|
|
1622
|
-
e[f] ||
|
|
1622
|
+
e[f] || kc[f] || (Dc[f] ? Dc[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1623
1623
|
}
|
|
1624
1624
|
var d = [], e = {};
|
|
1625
1625
|
b.forEach(c);
|
|
1626
|
-
throw new
|
|
1626
|
+
throw new Vc(`${a}: ` + d.map(lc).join([", "]));
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function Xc(a, b, c, d, e) {
|
|
1629
1629
|
var f = b.length;
|
|
1630
1630
|
2 > f && R("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1631
1631
|
var g = null !== b[1] && null !== c, l = !1;
|
|
@@ -1650,7 +1650,7 @@ function Yc(a, b, c, d, e) {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
q = d.apply(null, v);
|
|
1652
1652
|
if (l) {
|
|
1653
|
-
|
|
1653
|
+
Ac(x);
|
|
1654
1654
|
} else {
|
|
1655
1655
|
for (var u = g ? 1 : 2; u < b.length; u++) {
|
|
1656
1656
|
var y = 1 === u ? n : t[u - 2];
|
|
@@ -1661,22 +1661,22 @@ function Yc(a, b, c, d, e) {
|
|
|
1661
1661
|
return n;
|
|
1662
1662
|
};
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function Yc(a, b) {
|
|
1665
1665
|
for (var c = [], d = 0; d < a; d++) {
|
|
1666
1666
|
c.push(K[b + 4 * d >> 2]);
|
|
1667
1667
|
}
|
|
1668
1668
|
return c;
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function Zc(a, b, c) {
|
|
1671
1671
|
a instanceof Object || R(`${c} with invalid "this": ${a}`);
|
|
1672
1672
|
a instanceof b.i.constructor || R(`${c} incompatible with "this" of type ${a.constructor.name}`);
|
|
1673
1673
|
a.g.o || R(`cannot call emscripten binding method ${c} on deleted object`);
|
|
1674
|
-
return
|
|
1674
|
+
return Lc(a.g.o, a.g.u.i, b.i);
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function $c(a) {
|
|
1677
1677
|
a >= Q.h && 0 === --Q.get(a).qb && Q.Tb(a);
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1679
|
+
function ad(a, b, c) {
|
|
1680
1680
|
switch(b) {
|
|
1681
1681
|
case 0:
|
|
1682
1682
|
return function(d) {
|
|
@@ -1684,7 +1684,7 @@ function bd(a, b, c) {
|
|
|
1684
1684
|
};
|
|
1685
1685
|
case 1:
|
|
1686
1686
|
return function(d) {
|
|
1687
|
-
return this.fromWireType((c ?
|
|
1687
|
+
return this.fromWireType((c ? G : wa)[d >> 1]);
|
|
1688
1688
|
};
|
|
1689
1689
|
case 2:
|
|
1690
1690
|
return function(d) {
|
|
@@ -1694,14 +1694,14 @@ function bd(a, b, c) {
|
|
|
1694
1694
|
throw new TypeError("Unknown integer type: " + a);
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
|
-
function
|
|
1697
|
+
function Nc(a) {
|
|
1698
1698
|
if (null === a) {
|
|
1699
1699
|
return "null";
|
|
1700
1700
|
}
|
|
1701
1701
|
var b = typeof a;
|
|
1702
1702
|
return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1704
|
+
function bd(a, b) {
|
|
1705
1705
|
switch(b) {
|
|
1706
1706
|
case 2:
|
|
1707
1707
|
return function(c) {
|
|
@@ -1715,7 +1715,7 @@ function cd(a, b) {
|
|
|
1715
1715
|
throw new TypeError("Unknown float type: " + a);
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function cd(a, b, c) {
|
|
1719
1719
|
switch(b) {
|
|
1720
1720
|
case 0:
|
|
1721
1721
|
return c ? function(d) {
|
|
@@ -1725,7 +1725,7 @@ function dd(a, b, c) {
|
|
|
1725
1725
|
};
|
|
1726
1726
|
case 1:
|
|
1727
1727
|
return c ? function(d) {
|
|
1728
|
-
return
|
|
1728
|
+
return G[d >> 1];
|
|
1729
1729
|
} : function(d) {
|
|
1730
1730
|
return wa[d >> 1];
|
|
1731
1731
|
};
|
|
@@ -1739,25 +1739,25 @@ function dd(a, b, c) {
|
|
|
1739
1739
|
throw new TypeError("Unknown integer type: " + a);
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
-
var
|
|
1742
|
+
var dd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, ed = (a, b) => {
|
|
1743
1743
|
var c = a >> 1;
|
|
1744
1744
|
for (var d = c + b / 2; !(c >= d) && wa[c];) {
|
|
1745
1745
|
++c;
|
|
1746
1746
|
}
|
|
1747
1747
|
c <<= 1;
|
|
1748
|
-
if (32 < c - a &&
|
|
1749
|
-
return
|
|
1748
|
+
if (32 < c - a && dd) {
|
|
1749
|
+
return dd.decode(F.subarray(a, c));
|
|
1750
1750
|
}
|
|
1751
1751
|
c = "";
|
|
1752
1752
|
for (d = 0; !(d >= b / 2); ++d) {
|
|
1753
|
-
var e =
|
|
1753
|
+
var e = G[a + 2 * d >> 1];
|
|
1754
1754
|
if (0 == e) {
|
|
1755
1755
|
break;
|
|
1756
1756
|
}
|
|
1757
1757
|
c += String.fromCharCode(e);
|
|
1758
1758
|
}
|
|
1759
1759
|
return c;
|
|
1760
|
-
},
|
|
1760
|
+
}, fd = (a, b, c) => {
|
|
1761
1761
|
void 0 === c && (c = 2147483647);
|
|
1762
1762
|
if (2 > c) {
|
|
1763
1763
|
return 0;
|
|
@@ -1766,11 +1766,11 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
1766
1766
|
var d = b;
|
|
1767
1767
|
c = c < 2 * a.length ? c / 2 : a.length;
|
|
1768
1768
|
for (var e = 0; e < c; ++e) {
|
|
1769
|
-
|
|
1769
|
+
G[b >> 1] = a.charCodeAt(e), b += 2;
|
|
1770
1770
|
}
|
|
1771
|
-
|
|
1771
|
+
G[b >> 1] = 0;
|
|
1772
1772
|
return b - d;
|
|
1773
|
-
},
|
|
1773
|
+
}, gd = a => 2 * a.length, hd = (a, b) => {
|
|
1774
1774
|
for (var c = 0, d = ""; !(c >= b / 4);) {
|
|
1775
1775
|
var e = J[a + 4 * c >> 2];
|
|
1776
1776
|
if (0 == e) {
|
|
@@ -1780,7 +1780,7 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
1780
1780
|
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1781
1781
|
}
|
|
1782
1782
|
return d;
|
|
1783
|
-
},
|
|
1783
|
+
}, jd = (a, b, c) => {
|
|
1784
1784
|
void 0 === c && (c = 2147483647);
|
|
1785
1785
|
if (4 > c) {
|
|
1786
1786
|
return 0;
|
|
@@ -1801,43 +1801,43 @@ var ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
1801
1801
|
}
|
|
1802
1802
|
J[b >> 2] = 0;
|
|
1803
1803
|
return b - d;
|
|
1804
|
-
},
|
|
1804
|
+
}, kd = a => {
|
|
1805
1805
|
for (var b = 0, c = 0; c < a.length; ++c) {
|
|
1806
1806
|
var d = a.charCodeAt(c);
|
|
1807
1807
|
55296 <= d && 57343 >= d && ++c;
|
|
1808
1808
|
b += 4;
|
|
1809
1809
|
}
|
|
1810
1810
|
return b;
|
|
1811
|
-
},
|
|
1812
|
-
function
|
|
1813
|
-
var b =
|
|
1814
|
-
return void 0 === b ?
|
|
1811
|
+
}, ld = {};
|
|
1812
|
+
function md(a) {
|
|
1813
|
+
var b = ld[a];
|
|
1814
|
+
return void 0 === b ? U(a) : b;
|
|
1815
1815
|
}
|
|
1816
|
-
var
|
|
1817
|
-
function
|
|
1818
|
-
var b =
|
|
1819
|
-
|
|
1816
|
+
var nd = [];
|
|
1817
|
+
function od(a) {
|
|
1818
|
+
var b = nd.length;
|
|
1819
|
+
nd.push(a);
|
|
1820
1820
|
return b;
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function pd(a, b) {
|
|
1823
1823
|
for (var c = Array(a), d = 0; d < a; ++d) {
|
|
1824
|
-
c[d] =
|
|
1824
|
+
c[d] = oc(K[b + 4 * d >> 2], "parameter " + d);
|
|
1825
1825
|
}
|
|
1826
1826
|
return c;
|
|
1827
1827
|
}
|
|
1828
|
-
var
|
|
1829
|
-
function
|
|
1828
|
+
var qd = [], rd = [];
|
|
1829
|
+
function sd(a) {
|
|
1830
1830
|
a.Ac = a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function td(a) {
|
|
1833
1833
|
a.Ic = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");
|
|
1834
1834
|
}
|
|
1835
|
-
var
|
|
1835
|
+
var ud = 1, vd = [], wd = [], xd = [], yd = [], zd = [], Ad = [], Bd = [], w = [], Cd = {};
|
|
1836
1836
|
function Y(a) {
|
|
1837
1837
|
Dd || (Dd = a);
|
|
1838
1838
|
}
|
|
1839
1839
|
function Ed(a) {
|
|
1840
|
-
for (var b =
|
|
1840
|
+
for (var b = ud++, c = a.length; c < b; c++) {
|
|
1841
1841
|
a[c] = null;
|
|
1842
1842
|
}
|
|
1843
1843
|
return b;
|
|
@@ -1859,8 +1859,8 @@ function Fd(a) {
|
|
|
1859
1859
|
if (!a.Vb) {
|
|
1860
1860
|
a.Vb = !0;
|
|
1861
1861
|
var b = a.D;
|
|
1862
|
+
sd(b);
|
|
1862
1863
|
td(b);
|
|
1863
|
-
ud(b);
|
|
1864
1864
|
2 <= a.version && (b.$a = b.getExtension("EXT_disjoint_timer_query_webgl2"));
|
|
1865
1865
|
if (2 > a.version || !b.$a) {
|
|
1866
1866
|
b.$a = b.getExtension("EXT_disjoint_timer_query");
|
|
@@ -2183,34 +2183,34 @@ k.count_emval_handles = function() {
|
|
|
2183
2183
|
}
|
|
2184
2184
|
return a;
|
|
2185
2185
|
};
|
|
2186
|
-
|
|
2186
|
+
dc = k.PureVirtualError = cc("PureVirtualError");
|
|
2187
2187
|
for (var Ud = Array(256), Vd = 0; 256 > Vd; ++Vd) {
|
|
2188
2188
|
Ud[Vd] = String.fromCharCode(Vd);
|
|
2189
2189
|
}
|
|
2190
|
-
|
|
2190
|
+
ec = Ud;
|
|
2191
2191
|
k.getInheritedInstanceCount = function() {
|
|
2192
|
-
return Object.keys(
|
|
2192
|
+
return Object.keys(ic).length;
|
|
2193
2193
|
};
|
|
2194
2194
|
k.getLiveInheritedInstances = function() {
|
|
2195
2195
|
var a = [], b;
|
|
2196
|
-
for (b in
|
|
2197
|
-
|
|
2196
|
+
for (b in ic) {
|
|
2197
|
+
ic.hasOwnProperty(b) && a.push(ic[b]);
|
|
2198
2198
|
}
|
|
2199
2199
|
return a;
|
|
2200
2200
|
};
|
|
2201
|
-
k.flushPendingDeletes =
|
|
2201
|
+
k.flushPendingDeletes = gc;
|
|
2202
2202
|
k.setDelayFunction = function(a) {
|
|
2203
|
-
|
|
2204
|
-
|
|
2203
|
+
hc = a;
|
|
2204
|
+
fc.length && hc && hc(gc);
|
|
2205
2205
|
};
|
|
2206
|
-
|
|
2206
|
+
vc = k.InternalError = class extends Error {
|
|
2207
2207
|
constructor(a) {
|
|
2208
2208
|
super(a);
|
|
2209
2209
|
this.name = "InternalError";
|
|
2210
2210
|
}
|
|
2211
2211
|
};
|
|
2212
|
-
|
|
2213
|
-
if (!(this instanceof
|
|
2212
|
+
Hc.prototype.isAliasOf = function(a) {
|
|
2213
|
+
if (!(this instanceof Hc && a instanceof Hc)) {
|
|
2214
2214
|
return !1;
|
|
2215
2215
|
}
|
|
2216
2216
|
var b = this.g.u.i, c = this.g.o, d = a.g.u.i;
|
|
@@ -2222,58 +2222,58 @@ Ic.prototype.isAliasOf = function(a) {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
return b === d && c === a;
|
|
2224
2224
|
};
|
|
2225
|
-
|
|
2226
|
-
this.g.o ||
|
|
2225
|
+
Hc.prototype.clone = function() {
|
|
2226
|
+
this.g.o || Gc(this);
|
|
2227
2227
|
if (this.g.ka) {
|
|
2228
2228
|
return this.g.count.value += 1, this;
|
|
2229
2229
|
}
|
|
2230
|
-
var a =
|
|
2230
|
+
var a = yc, b = Object, c = b.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
2231
2231
|
a = a(c.call(b, d, {g:{value:{count:e.count, ha:e.ha, ka:e.ka, o:e.o, u:e.u, H:e.H, L:e.L,},}}));
|
|
2232
2232
|
a.g.count.value += 1;
|
|
2233
2233
|
a.g.ha = !1;
|
|
2234
2234
|
return a;
|
|
2235
2235
|
};
|
|
2236
|
-
|
|
2237
|
-
this.g.o ||
|
|
2236
|
+
Hc.prototype["delete"] = function() {
|
|
2237
|
+
this.g.o || Gc(this);
|
|
2238
2238
|
this.g.ha && !this.g.ka && R("Object already scheduled for deletion");
|
|
2239
|
-
|
|
2240
|
-
|
|
2239
|
+
pc(this);
|
|
2240
|
+
rc(this.g);
|
|
2241
2241
|
this.g.ka || (this.g.H = void 0, this.g.o = void 0);
|
|
2242
2242
|
};
|
|
2243
|
-
|
|
2243
|
+
Hc.prototype.isDeleted = function() {
|
|
2244
2244
|
return !this.g.o;
|
|
2245
2245
|
};
|
|
2246
|
-
|
|
2247
|
-
this.g.o ||
|
|
2246
|
+
Hc.prototype.deleteLater = function() {
|
|
2247
|
+
this.g.o || Gc(this);
|
|
2248
2248
|
this.g.ha && !this.g.ka && R("Object already scheduled for deletion");
|
|
2249
|
-
|
|
2250
|
-
1 ===
|
|
2249
|
+
fc.push(this);
|
|
2250
|
+
1 === fc.length && hc && hc(gc);
|
|
2251
2251
|
this.g.ha = !0;
|
|
2252
2252
|
return this;
|
|
2253
2253
|
};
|
|
2254
|
-
|
|
2254
|
+
Qc.prototype.Pb = function(a) {
|
|
2255
2255
|
this.ob && (a = this.ob(a));
|
|
2256
2256
|
return a;
|
|
2257
2257
|
};
|
|
2258
|
-
|
|
2258
|
+
Qc.prototype.Za = function(a) {
|
|
2259
2259
|
this.W && this.W(a);
|
|
2260
2260
|
};
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2261
|
+
Qc.prototype.argPackAdvance = 8;
|
|
2262
|
+
Qc.prototype.readValueFromPointer = Bc;
|
|
2263
|
+
Qc.prototype.deleteObject = function(a) {
|
|
2264
2264
|
if (null !== a) {
|
|
2265
2265
|
a["delete"]();
|
|
2266
2266
|
}
|
|
2267
2267
|
};
|
|
2268
|
-
|
|
2268
|
+
Qc.prototype.fromWireType = function(a) {
|
|
2269
2269
|
function b() {
|
|
2270
|
-
return this.ya ?
|
|
2270
|
+
return this.ya ? xc(this.i.N, {u:this.cc, o:c, L:this, H:a,}) : xc(this.i.N, {u:this, o:a,});
|
|
2271
2271
|
}
|
|
2272
2272
|
var c = this.Pb(a);
|
|
2273
2273
|
if (!c) {
|
|
2274
2274
|
return this.Za(a), null;
|
|
2275
2275
|
}
|
|
2276
|
-
var d =
|
|
2276
|
+
var d = uc(this.i, c);
|
|
2277
2277
|
if (void 0 !== d) {
|
|
2278
2278
|
if (0 === d.g.count.value) {
|
|
2279
2279
|
return d.g.o = c, d.g.H = a, d.clone();
|
|
@@ -2283,15 +2283,15 @@ Rc.prototype.fromWireType = function(a) {
|
|
|
2283
2283
|
return d;
|
|
2284
2284
|
}
|
|
2285
2285
|
d = this.i.Ob(c);
|
|
2286
|
-
d =
|
|
2286
|
+
d = tc[d];
|
|
2287
2287
|
if (!d) {
|
|
2288
2288
|
return b.call(this);
|
|
2289
2289
|
}
|
|
2290
2290
|
d = this.xa ? d.Gb : d.pointerType;
|
|
2291
|
-
var e =
|
|
2292
|
-
return null === e ? b.call(this) : this.ya ?
|
|
2291
|
+
var e = sc(c, this.i, d.i);
|
|
2292
|
+
return null === e ? b.call(this) : this.ya ? xc(d.i.N, {u:d, o:e, L:this, H:a,}) : xc(d.i.N, {u:d, o:e,});
|
|
2293
2293
|
};
|
|
2294
|
-
|
|
2294
|
+
Vc = k.UnboundTypeError = cc("UnboundTypeError");
|
|
2295
2295
|
for (var Z, Wd = 0; 32 > Wd; ++Wd) {
|
|
2296
2296
|
Kd.push(Array(Wd));
|
|
2297
2297
|
}
|
|
@@ -2311,7 +2311,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2311
2311
|
case 4:
|
|
2312
2312
|
return e = Yb(), d.flags |= e, 0;
|
|
2313
2313
|
case 5:
|
|
2314
|
-
return e = Yb(),
|
|
2314
|
+
return e = Yb(), G[e + 0 >> 1] = 2, 0;
|
|
2315
2315
|
case 6:
|
|
2316
2316
|
case 7:
|
|
2317
2317
|
return 0;
|
|
@@ -2386,7 +2386,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2386
2386
|
if (!d.s) {
|
|
2387
2387
|
return -59;
|
|
2388
2388
|
}
|
|
2389
|
-
d.s.V.Zb && (f = [24, 80], e = Yb(),
|
|
2389
|
+
d.s.V.Zb && (f = [24, 80], e = Yb(), G[e >> 1] = f[0], G[e + 2 >> 1] = f[1]);
|
|
2390
2390
|
return 0;
|
|
2391
2391
|
case 21524:
|
|
2392
2392
|
return d.s ? 0 : -59;
|
|
@@ -2424,14 +2424,14 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2424
2424
|
return -l.aa;
|
|
2425
2425
|
}
|
|
2426
2426
|
}, _embind_create_inheriting_constructor:function(a, b, c) {
|
|
2427
|
-
a =
|
|
2428
|
-
b =
|
|
2427
|
+
a = U(a);
|
|
2428
|
+
b = oc(b, "wrapper");
|
|
2429
2429
|
c = S(c);
|
|
2430
2430
|
var d = [].slice, e = b.i, f = e.N, g = e.A.N, l = e.A.constructor;
|
|
2431
2431
|
a = $b(a, function() {
|
|
2432
2432
|
e.A.mb.forEach(function(m) {
|
|
2433
2433
|
if (this[m] === g[m]) {
|
|
2434
|
-
throw new
|
|
2434
|
+
throw new dc(`Pure virtual function ${m} must be implemented in JavaScript`);
|
|
2435
2435
|
}
|
|
2436
2436
|
}.bind(this));
|
|
2437
2437
|
Object.defineProperty(this, "__parent", {value:f});
|
|
@@ -2440,40 +2440,40 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2440
2440
|
f.__construct = function() {
|
|
2441
2441
|
this === f && R("Pass correct 'this' to __construct");
|
|
2442
2442
|
var m = l.implement.apply(void 0, [this].concat(d.call(arguments)));
|
|
2443
|
-
|
|
2443
|
+
pc(m);
|
|
2444
2444
|
var t = m.g;
|
|
2445
2445
|
m.notifyOnDestruction();
|
|
2446
2446
|
t.ka = !0;
|
|
2447
2447
|
Object.defineProperties(this, {g:{value:t}});
|
|
2448
|
-
|
|
2448
|
+
yc(this);
|
|
2449
2449
|
m = t.o;
|
|
2450
|
-
m =
|
|
2451
|
-
|
|
2450
|
+
m = jc(e, m);
|
|
2451
|
+
ic.hasOwnProperty(m) ? R(`Tried to register registered instance: ${m}`) : ic[m] = this;
|
|
2452
2452
|
};
|
|
2453
2453
|
f.__destruct = function() {
|
|
2454
2454
|
this === f && R("Pass correct 'this' to __destruct");
|
|
2455
|
-
|
|
2455
|
+
pc(this);
|
|
2456
2456
|
var m = this.g.o;
|
|
2457
|
-
m =
|
|
2458
|
-
|
|
2457
|
+
m = jc(e, m);
|
|
2458
|
+
ic.hasOwnProperty(m) ? delete ic[m] : R(`Tried to unregister unregistered instance: ${m}`);
|
|
2459
2459
|
};
|
|
2460
2460
|
a.prototype = Object.create(f);
|
|
2461
2461
|
for (var p in c) {
|
|
2462
2462
|
a.prototype[p] = c[p];
|
|
2463
2463
|
}
|
|
2464
|
-
return
|
|
2464
|
+
return T(a);
|
|
2465
2465
|
}, _embind_finalize_value_object:function(a) {
|
|
2466
|
-
var b =
|
|
2467
|
-
delete
|
|
2466
|
+
var b = zc[a];
|
|
2467
|
+
delete zc[a];
|
|
2468
2468
|
var c = b.Ra, d = b.W, e = b.ab, f = e.map(g => g.Sb).concat(e.map(g => g.hc));
|
|
2469
|
-
|
|
2469
|
+
V([a], f, g => {
|
|
2470
2470
|
var l = {};
|
|
2471
2471
|
e.forEach((p, m) => {
|
|
2472
2472
|
var t = g[m], v = p.Qb, x = p.Rb, n = g[m + e.length], q = p.fc, u = p.ic;
|
|
2473
2473
|
l[p.Mb] = {read:y => t.fromWireType(v(x, y)), write:(y, z) => {
|
|
2474
2474
|
var A = [];
|
|
2475
2475
|
q(u, y, n.toWireType(A, z));
|
|
2476
|
-
|
|
2476
|
+
Ac(A);
|
|
2477
2477
|
}};
|
|
2478
2478
|
});
|
|
2479
2479
|
return [{name:b.name, fromWireType:function(p) {
|
|
@@ -2495,13 +2495,13 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2495
2495
|
}
|
|
2496
2496
|
null !== p && p.push(d, v);
|
|
2497
2497
|
return v;
|
|
2498
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2498
|
+
}, argPackAdvance:8, readValueFromPointer:Bc, K:d,}];
|
|
2499
2499
|
});
|
|
2500
2500
|
}, _embind_register_bigint:function() {
|
|
2501
2501
|
}, _embind_register_bool:function(a, b, c, d, e) {
|
|
2502
|
-
var f =
|
|
2503
|
-
b =
|
|
2504
|
-
|
|
2502
|
+
var f = Ec(c);
|
|
2503
|
+
b = U(b);
|
|
2504
|
+
W(a, {name:b, fromWireType:function(g) {
|
|
2505
2505
|
return !!g;
|
|
2506
2506
|
}, toWireType:function(g, l) {
|
|
2507
2507
|
return l ? d : e;
|
|
@@ -2509,7 +2509,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2509
2509
|
if (1 === c) {
|
|
2510
2510
|
var l = D;
|
|
2511
2511
|
} else if (2 === c) {
|
|
2512
|
-
l =
|
|
2512
|
+
l = G;
|
|
2513
2513
|
} else if (4 === c) {
|
|
2514
2514
|
l = J;
|
|
2515
2515
|
} else {
|
|
@@ -2518,22 +2518,22 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2518
2518
|
return this.fromWireType(l[g >> f]);
|
|
2519
2519
|
}, K:null,});
|
|
2520
2520
|
}, _embind_register_class:function(a, b, c, d, e, f, g, l, p, m, t, v, x) {
|
|
2521
|
-
t =
|
|
2522
|
-
f =
|
|
2523
|
-
l && (l =
|
|
2524
|
-
m && (m =
|
|
2525
|
-
x =
|
|
2521
|
+
t = U(t);
|
|
2522
|
+
f = X(e, f);
|
|
2523
|
+
l && (l = X(g, l));
|
|
2524
|
+
m && (m = X(p, m));
|
|
2525
|
+
x = X(v, x);
|
|
2526
2526
|
var n = Zb(t);
|
|
2527
|
-
|
|
2528
|
-
|
|
2527
|
+
Jc(n, function() {
|
|
2528
|
+
Wc(`Cannot construct ${t} due to unbound types`, [d]);
|
|
2529
2529
|
});
|
|
2530
|
-
|
|
2530
|
+
V([a, b, c], d ? [d] : [], function(q) {
|
|
2531
2531
|
q = q[0];
|
|
2532
2532
|
if (d) {
|
|
2533
2533
|
var u = q.i;
|
|
2534
2534
|
var y = u.N;
|
|
2535
2535
|
} else {
|
|
2536
|
-
y =
|
|
2536
|
+
y = Hc.prototype;
|
|
2537
2537
|
}
|
|
2538
2538
|
q = $b(n, function() {
|
|
2539
2539
|
if (Object.getPrototypeOf(this) !== z) {
|
|
@@ -2550,30 +2550,30 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2550
2550
|
});
|
|
2551
2551
|
var z = Object.create(y, {constructor:{value:q},});
|
|
2552
2552
|
q.prototype = z;
|
|
2553
|
-
var A = new
|
|
2553
|
+
var A = new Kc(t, q, z, x, u, f, l, m);
|
|
2554
2554
|
A.A && (void 0 === A.A.qa && (A.A.qa = []), A.A.qa.push(A));
|
|
2555
|
-
u = new
|
|
2556
|
-
y = new
|
|
2557
|
-
var
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
return [u, y,
|
|
2555
|
+
u = new Qc(t, A, !0, !1);
|
|
2556
|
+
y = new Qc(t + "*", A, !1, !1);
|
|
2557
|
+
var H = new Qc(t + " const*", A, !1, !0);
|
|
2558
|
+
tc[a] = {pointerType:y, Gb:H};
|
|
2559
|
+
Rc(n, q);
|
|
2560
|
+
return [u, y, H];
|
|
2561
2561
|
});
|
|
2562
2562
|
}, _embind_register_class_class_function:function(a, b, c, d, e, f, g) {
|
|
2563
|
-
var l =
|
|
2564
|
-
b =
|
|
2565
|
-
f =
|
|
2566
|
-
|
|
2563
|
+
var l = Yc(c, d);
|
|
2564
|
+
b = U(b);
|
|
2565
|
+
f = X(e, f);
|
|
2566
|
+
V([], [a], function(p) {
|
|
2567
2567
|
function m() {
|
|
2568
|
-
|
|
2568
|
+
Wc(`Cannot call ${t} due to unbound types`, l);
|
|
2569
2569
|
}
|
|
2570
2570
|
p = p[0];
|
|
2571
2571
|
var t = `${p.name}.${b}`;
|
|
2572
2572
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2573
2573
|
var v = p.i.constructor;
|
|
2574
|
-
void 0 === v[b] ? (m.ga = c - 1, v[b] = m) : (
|
|
2575
|
-
|
|
2576
|
-
x =
|
|
2574
|
+
void 0 === v[b] ? (m.ga = c - 1, v[b] = m) : (Ic(v, b, t), v[b].B[c - 1] = m);
|
|
2575
|
+
V([], l, function(x) {
|
|
2576
|
+
x = Xc(t, [x[0], null].concat(x.slice(1)), null, f, g);
|
|
2577
2577
|
void 0 === v[b].B ? (x.ga = c - 1, v[b] = x) : v[b].B[c - 1] = x;
|
|
2578
2578
|
if (p.i.qa) {
|
|
2579
2579
|
for (const n of p.i.qa) {
|
|
@@ -2585,28 +2585,28 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2585
2585
|
return [];
|
|
2586
2586
|
});
|
|
2587
2587
|
}, _embind_register_class_class_property:function(a, b, c, d, e, f, g, l) {
|
|
2588
|
-
b =
|
|
2589
|
-
f =
|
|
2590
|
-
|
|
2588
|
+
b = U(b);
|
|
2589
|
+
f = X(e, f);
|
|
2590
|
+
V([], [a], function(p) {
|
|
2591
2591
|
p = p[0];
|
|
2592
2592
|
var m = `${p.name}.${b}`, t = {get() {
|
|
2593
|
-
|
|
2593
|
+
Wc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2594
2594
|
}, enumerable:!0, configurable:!0};
|
|
2595
2595
|
t.set = l ? () => {
|
|
2596
|
-
|
|
2596
|
+
Wc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2597
2597
|
} : () => {
|
|
2598
2598
|
R(`${m} is a read-only property`);
|
|
2599
2599
|
};
|
|
2600
2600
|
Object.defineProperty(p.i.constructor, b, t);
|
|
2601
|
-
|
|
2601
|
+
V([], [c], function(v) {
|
|
2602
2602
|
v = v[0];
|
|
2603
2603
|
var x = {get() {
|
|
2604
2604
|
return v.fromWireType(f(d));
|
|
2605
2605
|
}, enumerable:!0};
|
|
2606
|
-
l && (l =
|
|
2606
|
+
l && (l = X(g, l), x.set = n => {
|
|
2607
2607
|
var q = [];
|
|
2608
2608
|
l(d, v.toWireType(q, n));
|
|
2609
|
-
|
|
2609
|
+
Ac(q);
|
|
2610
2610
|
});
|
|
2611
2611
|
Object.defineProperty(p.i.constructor, b, x);
|
|
2612
2612
|
return [];
|
|
@@ -2614,9 +2614,9 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2614
2614
|
return [];
|
|
2615
2615
|
});
|
|
2616
2616
|
}, _embind_register_class_constructor:function(a, b, c, d, e, f) {
|
|
2617
|
-
var g =
|
|
2618
|
-
e =
|
|
2619
|
-
|
|
2617
|
+
var g = Yc(b, c);
|
|
2618
|
+
e = X(d, e);
|
|
2619
|
+
V([], [a], function(l) {
|
|
2620
2620
|
l = l[0];
|
|
2621
2621
|
var p = `constructor ${l.name}`;
|
|
2622
2622
|
void 0 === l.i.$ && (l.i.$ = []);
|
|
@@ -2624,62 +2624,62 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2624
2624
|
throw new bc(`Cannot register multiple constructors with identical number of parameters (${b - 1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
2625
2625
|
}
|
|
2626
2626
|
l.i.$[b - 1] = () => {
|
|
2627
|
-
|
|
2627
|
+
Wc(`Cannot construct ${l.name} due to unbound types`, g);
|
|
2628
2628
|
};
|
|
2629
|
-
|
|
2629
|
+
V([], g, function(m) {
|
|
2630
2630
|
m.splice(1, 0, null);
|
|
2631
|
-
l.i.$[b - 1] =
|
|
2631
|
+
l.i.$[b - 1] = Xc(p, m, null, e, f);
|
|
2632
2632
|
return [];
|
|
2633
2633
|
});
|
|
2634
2634
|
return [];
|
|
2635
2635
|
});
|
|
2636
2636
|
}, _embind_register_class_function:function(a, b, c, d, e, f, g, l) {
|
|
2637
|
-
var p =
|
|
2638
|
-
b =
|
|
2639
|
-
f =
|
|
2640
|
-
|
|
2637
|
+
var p = Yc(c, d);
|
|
2638
|
+
b = U(b);
|
|
2639
|
+
f = X(e, f);
|
|
2640
|
+
V([], [a], function(m) {
|
|
2641
2641
|
function t() {
|
|
2642
|
-
|
|
2642
|
+
Wc(`Cannot call ${v} due to unbound types`, p);
|
|
2643
2643
|
}
|
|
2644
2644
|
m = m[0];
|
|
2645
2645
|
var v = `${m.name}.${b}`;
|
|
2646
2646
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2647
2647
|
l && m.i.mb.push(b);
|
|
2648
2648
|
var x = m.i.N, n = x[b];
|
|
2649
|
-
void 0 === n || void 0 === n.B && n.className !== m.name && n.ga === c - 2 ? (t.ga = c - 2, t.className = m.name, x[b] = t) : (
|
|
2650
|
-
|
|
2651
|
-
q =
|
|
2649
|
+
void 0 === n || void 0 === n.B && n.className !== m.name && n.ga === c - 2 ? (t.ga = c - 2, t.className = m.name, x[b] = t) : (Ic(x, b, v), x[b].B[c - 2] = t);
|
|
2650
|
+
V([], p, function(q) {
|
|
2651
|
+
q = Xc(v, q, m, f, g);
|
|
2652
2652
|
void 0 === x[b].B ? (q.ga = c - 2, x[b] = q) : x[b].B[c - 2] = q;
|
|
2653
2653
|
return [];
|
|
2654
2654
|
});
|
|
2655
2655
|
return [];
|
|
2656
2656
|
});
|
|
2657
2657
|
}, _embind_register_class_property:function(a, b, c, d, e, f, g, l, p, m) {
|
|
2658
|
-
b =
|
|
2659
|
-
e =
|
|
2660
|
-
|
|
2658
|
+
b = U(b);
|
|
2659
|
+
e = X(d, e);
|
|
2660
|
+
V([], [a], function(t) {
|
|
2661
2661
|
t = t[0];
|
|
2662
2662
|
var v = `${t.name}.${b}`, x = {get() {
|
|
2663
|
-
|
|
2663
|
+
Wc(`Cannot access ${v} due to unbound types`, [c, g]);
|
|
2664
2664
|
}, enumerable:!0, configurable:!0};
|
|
2665
2665
|
x.set = p ? () => {
|
|
2666
|
-
|
|
2666
|
+
Wc(`Cannot access ${v} due to unbound types`, [c, g]);
|
|
2667
2667
|
} : () => {
|
|
2668
2668
|
R(v + " is a read-only property");
|
|
2669
2669
|
};
|
|
2670
2670
|
Object.defineProperty(t.i.N, b, x);
|
|
2671
|
-
|
|
2671
|
+
V([], p ? [c, g] : [c], function(n) {
|
|
2672
2672
|
var q = n[0], u = {get() {
|
|
2673
|
-
var z =
|
|
2673
|
+
var z = Zc(this, t, v + " getter");
|
|
2674
2674
|
return q.fromWireType(e(f, z));
|
|
2675
2675
|
}, enumerable:!0};
|
|
2676
2676
|
if (p) {
|
|
2677
|
-
p =
|
|
2677
|
+
p = X(l, p);
|
|
2678
2678
|
var y = n[1];
|
|
2679
2679
|
u.set = function(z) {
|
|
2680
|
-
var A =
|
|
2681
|
-
p(m, A, y.toWireType(
|
|
2682
|
-
|
|
2680
|
+
var A = Zc(this, t, v + " setter"), H = [];
|
|
2681
|
+
p(m, A, y.toWireType(H, z));
|
|
2682
|
+
Ac(H);
|
|
2683
2683
|
};
|
|
2684
2684
|
}
|
|
2685
2685
|
Object.defineProperty(t.i.N, b, u);
|
|
@@ -2688,57 +2688,57 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2688
2688
|
return [];
|
|
2689
2689
|
});
|
|
2690
2690
|
}, _embind_register_emval:function(a, b) {
|
|
2691
|
-
b =
|
|
2692
|
-
|
|
2691
|
+
b = U(b);
|
|
2692
|
+
W(a, {name:b, fromWireType:function(c) {
|
|
2693
2693
|
var d = S(c);
|
|
2694
|
-
|
|
2694
|
+
$c(c);
|
|
2695
2695
|
return d;
|
|
2696
2696
|
}, toWireType:function(c, d) {
|
|
2697
|
-
return
|
|
2698
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2697
|
+
return T(d);
|
|
2698
|
+
}, argPackAdvance:8, readValueFromPointer:Bc, K:null,});
|
|
2699
2699
|
}, _embind_register_enum:function(a, b, c, d) {
|
|
2700
2700
|
function e() {
|
|
2701
2701
|
}
|
|
2702
|
-
c =
|
|
2703
|
-
b =
|
|
2702
|
+
c = Ec(c);
|
|
2703
|
+
b = U(b);
|
|
2704
2704
|
e.values = {};
|
|
2705
|
-
|
|
2705
|
+
W(a, {name:b, constructor:e, fromWireType:function(f) {
|
|
2706
2706
|
return this.constructor.values[f];
|
|
2707
2707
|
}, toWireType:function(f, g) {
|
|
2708
2708
|
return g.value;
|
|
2709
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2710
|
-
|
|
2709
|
+
}, argPackAdvance:8, readValueFromPointer:ad(b, c, d), K:null,});
|
|
2710
|
+
Jc(b, e);
|
|
2711
2711
|
}, _embind_register_enum_value:function(a, b, c) {
|
|
2712
|
-
var d =
|
|
2713
|
-
b =
|
|
2712
|
+
var d = oc(a, "enum");
|
|
2713
|
+
b = U(b);
|
|
2714
2714
|
a = d.constructor;
|
|
2715
2715
|
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:$b(`${d.name}_${b}`, function() {
|
|
2716
2716
|
})},});
|
|
2717
2717
|
a.values[c] = d;
|
|
2718
2718
|
a[b] = d;
|
|
2719
2719
|
}, _embind_register_float:function(a, b, c) {
|
|
2720
|
-
c =
|
|
2721
|
-
b =
|
|
2722
|
-
|
|
2720
|
+
c = Ec(c);
|
|
2721
|
+
b = U(b);
|
|
2722
|
+
W(a, {name:b, fromWireType:function(d) {
|
|
2723
2723
|
return d;
|
|
2724
2724
|
}, toWireType:function(d, e) {
|
|
2725
2725
|
return e;
|
|
2726
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2726
|
+
}, argPackAdvance:8, readValueFromPointer:bd(b, c), K:null,});
|
|
2727
2727
|
}, _embind_register_function:function(a, b, c, d, e, f) {
|
|
2728
|
-
var g =
|
|
2729
|
-
a =
|
|
2730
|
-
e =
|
|
2731
|
-
|
|
2732
|
-
|
|
2728
|
+
var g = Yc(b, c);
|
|
2729
|
+
a = U(a);
|
|
2730
|
+
e = X(d, e);
|
|
2731
|
+
Jc(a, function() {
|
|
2732
|
+
Wc(`Cannot call ${a} due to unbound types`, g);
|
|
2733
2733
|
}, b - 1);
|
|
2734
|
-
|
|
2735
|
-
|
|
2734
|
+
V([], g, function(l) {
|
|
2735
|
+
Rc(a, Xc(a, [l[0], null].concat(l.slice(1)), null, e, f), b - 1);
|
|
2736
2736
|
return [];
|
|
2737
2737
|
});
|
|
2738
2738
|
}, _embind_register_integer:function(a, b, c, d, e) {
|
|
2739
|
-
b =
|
|
2739
|
+
b = U(b);
|
|
2740
2740
|
-1 === e && (e = 4294967295);
|
|
2741
|
-
e =
|
|
2741
|
+
e = Ec(c);
|
|
2742
2742
|
var f = l => l;
|
|
2743
2743
|
if (0 === d) {
|
|
2744
2744
|
var g = 32 - 8 * c;
|
|
@@ -2749,7 +2749,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2749
2749
|
} : function(l, p) {
|
|
2750
2750
|
return p;
|
|
2751
2751
|
};
|
|
2752
|
-
|
|
2752
|
+
W(a, {name:b, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:cd(b, e, 0 !== d), K:null,});
|
|
2753
2753
|
}, _embind_register_memory_view:function(a, b, c) {
|
|
2754
2754
|
function d(f) {
|
|
2755
2755
|
f >>= 2;
|
|
@@ -2757,12 +2757,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2757
2757
|
return new e(g.buffer, g[f + 1], g[f]);
|
|
2758
2758
|
}
|
|
2759
2759
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b];
|
|
2760
|
-
c =
|
|
2761
|
-
|
|
2760
|
+
c = U(c);
|
|
2761
|
+
W(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Ub:!0,});
|
|
2762
2762
|
}, _embind_register_std_string:function(a, b) {
|
|
2763
|
-
b =
|
|
2763
|
+
b = U(b);
|
|
2764
2764
|
var c = "std::string" === b;
|
|
2765
|
-
|
|
2765
|
+
W(a, {name:b, fromWireType:function(d) {
|
|
2766
2766
|
var e = K[d >> 2], f = d + 4;
|
|
2767
2767
|
if (c) {
|
|
2768
2768
|
for (var g = f, l = 0; l <= e; ++l) {
|
|
@@ -2784,7 +2784,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
m = m.join("");
|
|
2786
2786
|
}
|
|
2787
|
-
|
|
2787
|
+
nc(d);
|
|
2788
2788
|
return m;
|
|
2789
2789
|
}, toWireType:function(d, e) {
|
|
2790
2790
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
@@ -2799,7 +2799,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2799
2799
|
if (f) {
|
|
2800
2800
|
for (f = 0; f < g; ++f) {
|
|
2801
2801
|
var m = e.charCodeAt(f);
|
|
2802
|
-
255 < m && (
|
|
2802
|
+
255 < m && (nc(p), R("String has UTF-16 code units that do not fit in 8 bits"));
|
|
2803
2803
|
F[p + f] = m;
|
|
2804
2804
|
}
|
|
2805
2805
|
} else {
|
|
@@ -2808,79 +2808,79 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
2810
|
}
|
|
2811
|
-
null !== d && d.push(
|
|
2811
|
+
null !== d && d.push(nc, l);
|
|
2812
2812
|
return l;
|
|
2813
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2814
|
-
|
|
2813
|
+
}, argPackAdvance:8, readValueFromPointer:Bc, K:function(d) {
|
|
2814
|
+
nc(d);
|
|
2815
2815
|
},});
|
|
2816
2816
|
}, _embind_register_std_wstring:function(a, b, c) {
|
|
2817
|
-
c =
|
|
2817
|
+
c = U(c);
|
|
2818
2818
|
if (2 === b) {
|
|
2819
|
-
var d =
|
|
2820
|
-
var e =
|
|
2821
|
-
var f =
|
|
2819
|
+
var d = ed;
|
|
2820
|
+
var e = fd;
|
|
2821
|
+
var f = gd;
|
|
2822
2822
|
var g = () => wa;
|
|
2823
2823
|
var l = 1;
|
|
2824
2824
|
} else {
|
|
2825
|
-
4 === b && (d =
|
|
2825
|
+
4 === b && (d = hd, e = jd, f = kd, g = () => K, l = 2);
|
|
2826
2826
|
}
|
|
2827
|
-
|
|
2827
|
+
W(a, {name:c, fromWireType:function(p) {
|
|
2828
2828
|
for (var m = K[p >> 2], t = g(), v, x = p + 4, n = 0; n <= m; ++n) {
|
|
2829
2829
|
var q = p + 4 + n * b;
|
|
2830
2830
|
if (n == m || 0 == t[q >> l]) {
|
|
2831
2831
|
x = d(x, q - x), void 0 === v ? v = x : (v += String.fromCharCode(0), v += x), x = q + b;
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
|
-
|
|
2834
|
+
nc(p);
|
|
2835
2835
|
return v;
|
|
2836
2836
|
}, toWireType:function(p, m) {
|
|
2837
2837
|
"string" != typeof m && R(`Cannot pass non-string to C++ string type ${c}`);
|
|
2838
2838
|
var t = f(m), v = Nd(4 + t + b);
|
|
2839
2839
|
K[v >> 2] = t >> l;
|
|
2840
2840
|
e(m, v + 4, t + b);
|
|
2841
|
-
null !== p && p.push(
|
|
2841
|
+
null !== p && p.push(nc, v);
|
|
2842
2842
|
return v;
|
|
2843
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2844
|
-
|
|
2843
|
+
}, argPackAdvance:8, readValueFromPointer:Bc, K:function(p) {
|
|
2844
|
+
nc(p);
|
|
2845
2845
|
},});
|
|
2846
2846
|
}, _embind_register_value_object:function(a, b, c, d, e, f) {
|
|
2847
|
-
|
|
2847
|
+
zc[a] = {name:U(b), Ra:X(c, d), W:X(e, f), ab:[],};
|
|
2848
2848
|
}, _embind_register_value_object_field:function(a, b, c, d, e, f, g, l, p, m) {
|
|
2849
|
-
|
|
2849
|
+
zc[a].ab.push({Mb:U(b), Sb:c, Qb:X(d, e), Rb:f, hc:g, fc:X(l, p), ic:m,});
|
|
2850
2850
|
}, _embind_register_void:function(a, b) {
|
|
2851
|
-
b =
|
|
2852
|
-
|
|
2851
|
+
b = U(b);
|
|
2852
|
+
W(a, {$b:!0, name:b, argPackAdvance:0, fromWireType:function() {
|
|
2853
2853
|
}, toWireType:function() {
|
|
2854
2854
|
},});
|
|
2855
2855
|
}, _emscripten_get_now_is_monotonic:() => !0, _emval_as:function(a, b, c) {
|
|
2856
2856
|
a = S(a);
|
|
2857
|
-
b =
|
|
2858
|
-
var d = [], e =
|
|
2857
|
+
b = oc(b, "emval::as");
|
|
2858
|
+
var d = [], e = T(d);
|
|
2859
2859
|
K[c >> 2] = e;
|
|
2860
2860
|
return b.toWireType(d, a);
|
|
2861
2861
|
}, _emval_call_method:function(a, b, c, d, e) {
|
|
2862
|
-
a =
|
|
2862
|
+
a = nd[a];
|
|
2863
2863
|
b = S(b);
|
|
2864
|
-
c =
|
|
2864
|
+
c = md(c);
|
|
2865
2865
|
var f = [];
|
|
2866
|
-
K[d >> 2] =
|
|
2866
|
+
K[d >> 2] = T(f);
|
|
2867
2867
|
return a(b, c, f, e);
|
|
2868
2868
|
}, _emval_call_void_method:function(a, b, c, d) {
|
|
2869
|
-
a =
|
|
2869
|
+
a = nd[a];
|
|
2870
2870
|
b = S(b);
|
|
2871
|
-
c =
|
|
2871
|
+
c = md(c);
|
|
2872
2872
|
a(b, c, null, d);
|
|
2873
|
-
}, _emval_decref
|
|
2874
|
-
var c =
|
|
2873
|
+
}, _emval_decref:$c, _emval_get_method_caller:function(a, b) {
|
|
2874
|
+
var c = pd(a, b), d = c[0];
|
|
2875
2875
|
b = d.name + "_$" + c.slice(1).map(function(g) {
|
|
2876
2876
|
return g.name;
|
|
2877
2877
|
}).join("_") + "$";
|
|
2878
|
-
var e =
|
|
2878
|
+
var e = qd[b];
|
|
2879
2879
|
if (void 0 !== e) {
|
|
2880
2880
|
return e;
|
|
2881
2881
|
}
|
|
2882
2882
|
var f = Array(a - 1);
|
|
2883
|
-
e =
|
|
2883
|
+
e = od((g, l, p, m) => {
|
|
2884
2884
|
for (var t = 0, v = 0; v < a - 1; ++v) {
|
|
2885
2885
|
f[v] = c[v + 1].readValueFromPointer(m + t), t += c[v + 1].argPackAdvance;
|
|
2886
2886
|
}
|
|
@@ -2892,30 +2892,32 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2892
2892
|
return d.toWireType(p, g);
|
|
2893
2893
|
}
|
|
2894
2894
|
});
|
|
2895
|
-
return
|
|
2895
|
+
return qd[b] = e;
|
|
2896
2896
|
}, _emval_get_property:function(a, b) {
|
|
2897
2897
|
a = S(a);
|
|
2898
2898
|
b = S(b);
|
|
2899
|
-
return
|
|
2899
|
+
return T(a[b]);
|
|
2900
2900
|
}, _emval_incref:function(a) {
|
|
2901
2901
|
4 < a && (Q.get(a).qb += 1);
|
|
2902
|
+
}, _emval_new_array:function() {
|
|
2903
|
+
return T([]);
|
|
2902
2904
|
}, _emval_new_cstring:function(a) {
|
|
2903
|
-
return
|
|
2905
|
+
return T(md(a));
|
|
2904
2906
|
}, _emval_new_object:function() {
|
|
2905
|
-
return
|
|
2907
|
+
return T({});
|
|
2906
2908
|
}, _emval_run_destructors:function(a) {
|
|
2907
2909
|
var b = S(a);
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
+
Ac(b);
|
|
2911
|
+
$c(a);
|
|
2910
2912
|
}, _emval_set_property:function(a, b, c) {
|
|
2911
2913
|
a = S(a);
|
|
2912
2914
|
b = S(b);
|
|
2913
2915
|
c = S(c);
|
|
2914
2916
|
a[b] = c;
|
|
2915
2917
|
}, _emval_take_value:function(a, b) {
|
|
2916
|
-
a =
|
|
2918
|
+
a = oc(a, "_emval_take_value");
|
|
2917
2919
|
a = a.readValueFromPointer(b);
|
|
2918
|
-
return
|
|
2920
|
+
return T(a);
|
|
2919
2921
|
}, abort:() => {
|
|
2920
2922
|
ta("");
|
|
2921
2923
|
}, beginPixelLocalStorageWEBGL:function(a, b, c) {
|
|
@@ -2936,12 +2938,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2936
2938
|
var b = k.images;
|
|
2937
2939
|
b && b.get(a) && b.delete(a);
|
|
2938
2940
|
}, emscripten_asm_const_int:(a, b, c) => {
|
|
2939
|
-
|
|
2941
|
+
rd.length = 0;
|
|
2940
2942
|
var d;
|
|
2941
2943
|
for (c >>= 2; d = F[b++];) {
|
|
2942
|
-
c += 105 != d & c,
|
|
2944
|
+
c += 105 != d & c, rd.push(105 == d ? J[c] : ya[c++ >> 1]), ++c;
|
|
2943
2945
|
}
|
|
2944
|
-
return Ua[a].apply(null,
|
|
2946
|
+
return Ua[a].apply(null, rd);
|
|
2945
2947
|
}, emscripten_date_now:function() {
|
|
2946
2948
|
return Date.now();
|
|
2947
2949
|
}, emscripten_get_now:() => performance.now(), emscripten_memcpy_big:(a, b, c) => F.copyWithin(a, b, b + c), emscripten_resize_heap:a => {
|
|
@@ -2975,8 +2977,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2975
2977
|
a = w[a];
|
|
2976
2978
|
b = b ? M(F, b) : "";
|
|
2977
2979
|
b.startsWith("GL_") && (b = b.substr(3));
|
|
2978
|
-
"WEBGL_draw_instanced_base_vertex_base_instance" == b &&
|
|
2979
|
-
"WEBGL_multi_draw_instanced_base_vertex_base_instance" == b &&
|
|
2980
|
+
"WEBGL_draw_instanced_base_vertex_base_instance" == b && sd(Z);
|
|
2981
|
+
"WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && td(Z);
|
|
2980
2982
|
"WEBGL_multi_draw" == b && Gd(Z);
|
|
2981
2983
|
return !!a.D.getExtension(b);
|
|
2982
2984
|
}, emscripten_webgl_get_current_context:function() {
|
|
@@ -3166,12 +3168,12 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3166
3168
|
}, glActiveTexture:function(a) {
|
|
3167
3169
|
Z.activeTexture(a);
|
|
3168
3170
|
}, glAttachShader:function(a, b) {
|
|
3169
|
-
Z.attachShader(
|
|
3171
|
+
Z.attachShader(wd[a], Ad[b]);
|
|
3170
3172
|
}, glBindBuffer:function(a, b) {
|
|
3171
3173
|
35051 == a ? Z.Ya = b : 35052 == a && (Z.Ma = b);
|
|
3172
|
-
Z.bindBuffer(a,
|
|
3174
|
+
Z.bindBuffer(a, vd[b]);
|
|
3173
3175
|
}, glBindBufferRange:function(a, b, c, d, e) {
|
|
3174
|
-
Z.bindBufferRange(a, b,
|
|
3176
|
+
Z.bindBufferRange(a, b, vd[c], d, e);
|
|
3175
3177
|
}, glBindFramebuffer:function(a, b) {
|
|
3176
3178
|
Z.bindFramebuffer(a, xd[b]);
|
|
3177
3179
|
}, glBindRenderbuffer:function(a, b) {
|
|
@@ -3203,11 +3205,11 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3203
3205
|
}, glCompileShader:function(a) {
|
|
3204
3206
|
Z.compileShader(Ad[a]);
|
|
3205
3207
|
}, glCreateProgram:function() {
|
|
3206
|
-
var a = Ed(
|
|
3208
|
+
var a = Ed(wd), b = Z.createProgram();
|
|
3207
3209
|
b.name = a;
|
|
3208
3210
|
b.Hc = b.Fc = b.Gc = 0;
|
|
3209
3211
|
b.Ua = 1;
|
|
3210
|
-
|
|
3212
|
+
wd[a] = b;
|
|
3211
3213
|
return a;
|
|
3212
3214
|
}, glCreateShader:function(a) {
|
|
3213
3215
|
var b = Ed(Ad);
|
|
@@ -3217,8 +3219,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3217
3219
|
Z.cullFace(a);
|
|
3218
3220
|
}, glDeleteBuffers:function(a, b) {
|
|
3219
3221
|
for (var c = 0; c < a; c++) {
|
|
3220
|
-
var d = J[b + 4 * c >> 2], e =
|
|
3221
|
-
e && (Z.deleteBuffer(e), e.name = 0,
|
|
3222
|
+
var d = J[b + 4 * c >> 2], e = vd[d];
|
|
3223
|
+
e && (Z.deleteBuffer(e), e.name = 0, vd[d] = null, d == Z.Ya && (Z.Ya = 0), d == Z.Ma && (Z.Ma = 0));
|
|
3222
3224
|
}
|
|
3223
3225
|
}, glDeleteFramebuffers:function(a, b) {
|
|
3224
3226
|
for (var c = 0; c < a; ++c) {
|
|
@@ -3227,8 +3229,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3227
3229
|
}
|
|
3228
3230
|
}, glDeleteProgram:function(a) {
|
|
3229
3231
|
if (a) {
|
|
3230
|
-
var b =
|
|
3231
|
-
b ? (Z.deleteProgram(b), b.name = 0,
|
|
3232
|
+
var b = wd[a];
|
|
3233
|
+
b ? (Z.deleteProgram(b), b.name = 0, wd[a] = null) : Y(1281);
|
|
3232
3234
|
}
|
|
3233
3235
|
}, glDeleteRenderbuffers:function(a, b) {
|
|
3234
3236
|
for (var c = 0; c < a; c++) {
|
|
@@ -3285,7 +3287,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3285
3287
|
}, glFrontFace:function(a) {
|
|
3286
3288
|
Z.frontFace(a);
|
|
3287
3289
|
}, glGenBuffers:function(a, b) {
|
|
3288
|
-
Ld(a, b, "createBuffer",
|
|
3290
|
+
Ld(a, b, "createBuffer", vd);
|
|
3289
3291
|
}, glGenFramebuffers:function(a, b) {
|
|
3290
3292
|
Ld(a, b, "createFramebuffer", xd);
|
|
3291
3293
|
}, glGenRenderbuffers:function(a, b) {
|
|
@@ -3332,10 +3334,10 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3332
3334
|
}
|
|
3333
3335
|
return b;
|
|
3334
3336
|
}, glGetUniformBlockIndex:function(a, b) {
|
|
3335
|
-
return Z.getUniformBlockIndex(
|
|
3337
|
+
return Z.getUniformBlockIndex(wd[a], b ? M(F, b) : "");
|
|
3336
3338
|
}, glGetUniformLocation:function(a, b) {
|
|
3337
3339
|
b = b ? M(F, b) : "";
|
|
3338
|
-
if (a =
|
|
3340
|
+
if (a = wd[a]) {
|
|
3339
3341
|
var c = a, d = c.oa, e = c.vb, f;
|
|
3340
3342
|
if (!d) {
|
|
3341
3343
|
for (c.oa = d = {}, c.ub = {}, f = 0; f < Z.getProgramParameter(c, 35718); ++f) {
|
|
@@ -3370,7 +3372,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3370
3372
|
}
|
|
3371
3373
|
Z.invalidateFramebuffer(a, d);
|
|
3372
3374
|
}, glLinkProgram:function(a) {
|
|
3373
|
-
a =
|
|
3375
|
+
a = wd[a];
|
|
3374
3376
|
Z.linkProgram(a);
|
|
3375
3377
|
a.oa = 0;
|
|
3376
3378
|
a.vb = {};
|
|
@@ -3406,7 +3408,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3406
3408
|
Z.texSubImage2D(a, b, c, d, e, f, g, l, p);
|
|
3407
3409
|
} else if (p) {
|
|
3408
3410
|
var m = l - 5120;
|
|
3409
|
-
m = 0 == m ? D : 1 == m ? F : 2 == m ?
|
|
3411
|
+
m = 0 == m ? D : 1 == m ? F : 2 == m ? G : 4 == m ? J : 6 == m ? xa : 5 == m || 28922 == m || 28520 == m || 30779 == m || 30782 == m ? K : wa;
|
|
3410
3412
|
Z.texSubImage2D(a, b, c, d, e, f, g, l, m, p >> 31 - Math.clz32(m.BYTES_PER_ELEMENT));
|
|
3411
3413
|
} else {
|
|
3412
3414
|
Z.texSubImage2D(a, b, c, d, e, f, g, l, null);
|
|
@@ -3423,10 +3425,10 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3423
3425
|
}
|
|
3424
3426
|
d.call(c, a, b);
|
|
3425
3427
|
}, glUniformBlockBinding:function(a, b, c) {
|
|
3426
|
-
a =
|
|
3428
|
+
a = wd[a];
|
|
3427
3429
|
Z.uniformBlockBinding(a, b, c);
|
|
3428
3430
|
}, glUseProgram:function(a) {
|
|
3429
|
-
a =
|
|
3431
|
+
a = wd[a];
|
|
3430
3432
|
Z.useProgram(a);
|
|
3431
3433
|
Z.Hb = a;
|
|
3432
3434
|
}, glVertexAttribDivisor:function(a, b) {
|
|
@@ -3474,24 +3476,25 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3474
3476
|
}).catch(ca);
|
|
3475
3477
|
return {};
|
|
3476
3478
|
})();
|
|
3477
|
-
var
|
|
3479
|
+
var nc = a => (nc = C.free)(a), Nd = a => (Nd = C.malloc)(a);
|
|
3478
3480
|
k._setWebImage = (a, b, c) => (k._setWebImage = C.setWebImage)(a, b, c);
|
|
3479
3481
|
var Ra = k._ma_device__on_notification_unlocked = a => (Ra = k._ma_device__on_notification_unlocked = C.ma_device__on_notification_unlocked)(a);
|
|
3480
3482
|
k._ma_malloc_emscripten = (a, b) => (k._ma_malloc_emscripten = C.ma_malloc_emscripten)(a, b);
|
|
3481
3483
|
k._ma_free_emscripten = (a, b) => (k._ma_free_emscripten = C.ma_free_emscripten)(a, b);
|
|
3482
|
-
var Sa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Sa = k._ma_device_process_pcm_frames_capture__webaudio = C.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ta = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ta = k._ma_device_process_pcm_frames_playback__webaudio = C.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Xd = () => (Xd = C.__errno_location)(),
|
|
3484
|
+
var Sa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Sa = k._ma_device_process_pcm_frames_capture__webaudio = C.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ta = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ta = k._ma_device_process_pcm_frames_playback__webaudio = C.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Xd = () => (Xd = C.__errno_location)(), mc = a => (mc = C.__getTypeName)(a);
|
|
3483
3485
|
k.__embind_initialize_bindings = () => (k.__embind_initialize_bindings = C._embind_initialize_bindings)();
|
|
3484
3486
|
k.dynCall_iiji = (a, b, c, d, e) => (k.dynCall_iiji = C.dynCall_iiji)(a, b, c, d, e);
|
|
3485
3487
|
k.dynCall_iiiji = (a, b, c, d, e, f) => (k.dynCall_iiiji = C.dynCall_iiiji)(a, b, c, d, e, f);
|
|
3486
3488
|
k.dynCall_iij = (a, b, c, d) => (k.dynCall_iij = C.dynCall_iij)(a, b, c, d);
|
|
3487
3489
|
k.dynCall_jii = (a, b, c) => (k.dynCall_jii = C.dynCall_jii)(a, b, c);
|
|
3490
|
+
k.dynCall_vijj = (a, b, c, d, e, f) => (k.dynCall_vijj = C.dynCall_vijj)(a, b, c, d, e, f);
|
|
3488
3491
|
k.dynCall_jiji = (a, b, c, d, e) => (k.dynCall_jiji = C.dynCall_jiji)(a, b, c, d, e);
|
|
3489
3492
|
k.dynCall_viijii = (a, b, c, d, e, f, g) => (k.dynCall_viijii = C.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3490
3493
|
k.dynCall_iiiiij = (a, b, c, d, e, f, g) => (k.dynCall_iiiiij = C.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3491
3494
|
k.dynCall_iiiiijj = (a, b, c, d, e, f, g, l, p) => (k.dynCall_iiiiijj = C.dynCall_iiiiijj)(a, b, c, d, e, f, g, l, p);
|
|
3492
3495
|
k.dynCall_iiiiiijj = (a, b, c, d, e, f, g, l, p, m) => (k.dynCall_iiiiiijj = C.dynCall_iiiiiijj)(a, b, c, d, e, f, g, l, p, m);
|
|
3493
|
-
k.___start_em_js =
|
|
3494
|
-
k.___stop_em_js =
|
|
3496
|
+
k.___start_em_js = 507676;
|
|
3497
|
+
k.___stop_em_js = 510110;
|
|
3495
3498
|
var Zd;
|
|
3496
3499
|
Ha = function $d() {
|
|
3497
3500
|
Zd || ae();
|
|
@@ -3503,7 +3506,7 @@ function ae() {
|
|
|
3503
3506
|
k.noFSInit || Tb || (Tb = !0, Sb(), k.stdin = k.stdin, k.stdout = k.stdout, k.stderr = k.stderr, k.stdin ? Vb("stdin", k.stdin) : Ob("/dev/tty", "/dev/stdin"), k.stdout ? Vb("stdout", null, k.stdout) : Ob("/dev/tty", "/dev/stdout"), k.stderr ? Vb("stderr", null, k.stderr) : Ob("/dev/tty1", "/dev/stderr"), Qb("/dev/stdin", 0), Qb("/dev/stdout", 1), Qb("/dev/stderr", 1));
|
|
3504
3507
|
zb = !1;
|
|
3505
3508
|
Va(Ca);
|
|
3506
|
-
|
|
3509
|
+
aa(k);
|
|
3507
3510
|
if (k.onRuntimeInitialized) {
|
|
3508
3511
|
k.onRuntimeInitialized();
|
|
3509
3512
|
}
|
|
@@ -3551,7 +3554,7 @@ ae();
|
|
|
3551
3554
|
/* 2 */
|
|
3552
3555
|
/***/ ((module) => {
|
|
3553
3556
|
|
|
3554
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.26.
|
|
3557
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.26.6","description":"Rive\'s webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3555
3558
|
|
|
3556
3559
|
/***/ }),
|
|
3557
3560
|
/* 3 */
|
|
@@ -4010,6 +4013,7 @@ var __webpack_exports__ = {};
|
|
|
4010
4013
|
__webpack_require__.r(__webpack_exports__);
|
|
4011
4014
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4012
4015
|
/* harmony export */ Alignment: () => (/* binding */ Alignment),
|
|
4016
|
+
/* harmony export */ DataEnum: () => (/* binding */ DataEnum),
|
|
4013
4017
|
/* harmony export */ EventType: () => (/* binding */ EventType),
|
|
4014
4018
|
/* harmony export */ Fit: () => (/* binding */ Fit),
|
|
4015
4019
|
/* harmony export */ Layout: () => (/* binding */ Layout),
|
|
@@ -4021,6 +4025,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4021
4025
|
/* harmony export */ StateMachineInput: () => (/* binding */ StateMachineInput),
|
|
4022
4026
|
/* harmony export */ StateMachineInputType: () => (/* binding */ StateMachineInputType),
|
|
4023
4027
|
/* harmony export */ Testing: () => (/* binding */ Testing),
|
|
4028
|
+
/* harmony export */ ViewModel: () => (/* binding */ ViewModel),
|
|
4029
|
+
/* harmony export */ ViewModelInstance: () => (/* binding */ ViewModelInstance),
|
|
4030
|
+
/* harmony export */ ViewModelInstanceBoolean: () => (/* binding */ ViewModelInstanceBoolean),
|
|
4031
|
+
/* harmony export */ ViewModelInstanceColor: () => (/* binding */ ViewModelInstanceColor),
|
|
4032
|
+
/* harmony export */ ViewModelInstanceEnum: () => (/* binding */ ViewModelInstanceEnum),
|
|
4033
|
+
/* harmony export */ ViewModelInstanceNumber: () => (/* binding */ ViewModelInstanceNumber),
|
|
4034
|
+
/* harmony export */ ViewModelInstanceString: () => (/* binding */ ViewModelInstanceString),
|
|
4035
|
+
/* harmony export */ ViewModelInstanceTrigger: () => (/* binding */ ViewModelInstanceTrigger),
|
|
4036
|
+
/* harmony export */ ViewModelInstanceValue: () => (/* binding */ ViewModelInstanceValue),
|
|
4024
4037
|
/* harmony export */ decodeAudio: () => (/* binding */ decodeAudio),
|
|
4025
4038
|
/* harmony export */ decodeFont: () => (/* binding */ decodeFont),
|
|
4026
4039
|
/* harmony export */ decodeImage: () => (/* binding */ decodeImage)
|
|
@@ -4044,6 +4057,17 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
4044
4057
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
4045
4058
|
};
|
|
4046
4059
|
})();
|
|
4060
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
4061
|
+
__assign = Object.assign || function(t) {
|
|
4062
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4063
|
+
s = arguments[i];
|
|
4064
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
4065
|
+
t[p] = s[p];
|
|
4066
|
+
}
|
|
4067
|
+
return t;
|
|
4068
|
+
};
|
|
4069
|
+
return __assign.apply(this, arguments);
|
|
4070
|
+
};
|
|
4047
4071
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4048
4072
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4049
4073
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -4480,6 +4504,11 @@ var StateMachine = /** @class */ (function () {
|
|
|
4480
4504
|
this.inputs.length = 0;
|
|
4481
4505
|
this.instance.delete();
|
|
4482
4506
|
};
|
|
4507
|
+
StateMachine.prototype.bindViewModelInstance = function (viewModelInstance) {
|
|
4508
|
+
if (viewModelInstance.runtimeInstance != null) {
|
|
4509
|
+
this.instance.bindViewModelInstance(viewModelInstance.runtimeInstance);
|
|
4510
|
+
}
|
|
4511
|
+
};
|
|
4483
4512
|
return StateMachine;
|
|
4484
4513
|
}());
|
|
4485
4514
|
// #endregion
|
|
@@ -4626,6 +4655,9 @@ var Animator = /** @class */ (function () {
|
|
|
4626
4655
|
if (sm) {
|
|
4627
4656
|
var newStateMachine = new StateMachine(sm, this.runtime, playing, this.artboard);
|
|
4628
4657
|
this.stateMachines.push(newStateMachine);
|
|
4658
|
+
if (!playing) {
|
|
4659
|
+
newStateMachine.advanceAndApply(0);
|
|
4660
|
+
}
|
|
4629
4661
|
}
|
|
4630
4662
|
else {
|
|
4631
4663
|
// In order to maintain compatibility with current behavior, if a state machine is not found
|
|
@@ -5371,6 +5403,8 @@ var Rive = /** @class */ (function () {
|
|
|
5371
5403
|
this._audioEventListener = null;
|
|
5372
5404
|
// draw method bound to the class
|
|
5373
5405
|
this._boundDraw = null;
|
|
5406
|
+
this._viewModelInstance = null;
|
|
5407
|
+
this._dataEnums = null;
|
|
5374
5408
|
// Durations to generate a frame for the last second. Used for performance profiling.
|
|
5375
5409
|
this.durations = [];
|
|
5376
5410
|
this.frameTimes = [];
|
|
@@ -5456,6 +5490,7 @@ var Rive = /** @class */ (function () {
|
|
|
5456
5490
|
buffer: this.buffer,
|
|
5457
5491
|
riveFile: this.riveFile,
|
|
5458
5492
|
autoplay: params.autoplay,
|
|
5493
|
+
autoBind: params.autoBind,
|
|
5459
5494
|
animations: params.animations,
|
|
5460
5495
|
stateMachines: params.stateMachines,
|
|
5461
5496
|
artboard: params.artboard,
|
|
@@ -5474,7 +5509,7 @@ var Rive = /** @class */ (function () {
|
|
|
5474
5509
|
// Initializes the Rive object either from constructor or load()
|
|
5475
5510
|
Rive.prototype.init = function (_a) {
|
|
5476
5511
|
var _this = this;
|
|
5477
|
-
var src = _a.src, buffer = _a.buffer, riveFile = _a.riveFile, animations = _a.animations, stateMachines = _a.stateMachines, artboard = _a.artboard, _b = _a.autoplay, autoplay = _b === void 0 ? false : _b, _c = _a.useOffscreenRenderer, useOffscreenRenderer = _c === void 0 ? false : _c;
|
|
5512
|
+
var src = _a.src, buffer = _a.buffer, riveFile = _a.riveFile, animations = _a.animations, stateMachines = _a.stateMachines, artboard = _a.artboard, _b = _a.autoplay, autoplay = _b === void 0 ? false : _b, _c = _a.useOffscreenRenderer, useOffscreenRenderer = _c === void 0 ? false : _c, _d = _a.autoBind, autoBind = _d === void 0 ? false : _d;
|
|
5478
5513
|
if (this.destroyed) {
|
|
5479
5514
|
return;
|
|
5480
5515
|
}
|
|
@@ -5509,7 +5544,7 @@ var Rive = /** @class */ (function () {
|
|
|
5509
5544
|
_this.resizeDrawingSurfaceToCanvas();
|
|
5510
5545
|
}
|
|
5511
5546
|
// Load Rive data from a source uri or a data buffer
|
|
5512
|
-
_this.initData(artboard, startingAnimationNames, startingStateMachineNames, autoplay)
|
|
5547
|
+
_this.initData(artboard, startingAnimationNames, startingStateMachineNames, autoplay, autoBind)
|
|
5513
5548
|
.then(function () { return _this.setupRiveListeners(); })
|
|
5514
5549
|
.catch(function (e) {
|
|
5515
5550
|
console.error(e);
|
|
@@ -5590,7 +5625,7 @@ var Rive = /** @class */ (function () {
|
|
|
5590
5625
|
this._artboardHeight || this.artboard.height;
|
|
5591
5626
|
};
|
|
5592
5627
|
// Initializes runtime with Rive data and preps for playing
|
|
5593
|
-
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay) {
|
|
5628
|
+
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
5594
5629
|
return __awaiter(this, void 0, void 0, function () {
|
|
5595
5630
|
var error_1, msg;
|
|
5596
5631
|
var _a;
|
|
@@ -5616,7 +5651,7 @@ var Rive = /** @class */ (function () {
|
|
|
5616
5651
|
}
|
|
5617
5652
|
this.file = this.riveFile.getInstance();
|
|
5618
5653
|
// Initialize and draw frame
|
|
5619
|
-
this.initArtboard(artboardName, animationNames, stateMachineNames, autoplay);
|
|
5654
|
+
this.initArtboard(artboardName, animationNames, stateMachineNames, autoplay, autoBind);
|
|
5620
5655
|
// Initialize the artboard size
|
|
5621
5656
|
this.initArtboardSize();
|
|
5622
5657
|
// Check for audio
|
|
@@ -5645,7 +5680,7 @@ var Rive = /** @class */ (function () {
|
|
|
5645
5680
|
});
|
|
5646
5681
|
};
|
|
5647
5682
|
// Initialize for playback
|
|
5648
|
-
Rive.prototype.initArtboard = function (artboardName, animationNames, stateMachineNames, autoplay) {
|
|
5683
|
+
Rive.prototype.initArtboard = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
5649
5684
|
if (!this.file) {
|
|
5650
5685
|
return;
|
|
5651
5686
|
}
|
|
@@ -5690,13 +5725,24 @@ var Rive = /** @class */ (function () {
|
|
|
5690
5725
|
data: instanceNames,
|
|
5691
5726
|
},
|
|
5692
5727
|
});
|
|
5728
|
+
if (autoBind) {
|
|
5729
|
+
var viewModel = this.file.defaultArtboardViewModel(rootArtboard);
|
|
5730
|
+
if (viewModel !== null) {
|
|
5731
|
+
var runtimeInstance = viewModel.defaultInstance();
|
|
5732
|
+
if (runtimeInstance !== null) {
|
|
5733
|
+
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
5734
|
+
this.bindViewModelInstance(viewModelInstance);
|
|
5735
|
+
}
|
|
5736
|
+
}
|
|
5737
|
+
}
|
|
5693
5738
|
};
|
|
5694
5739
|
// Draws the current artboard frame
|
|
5695
5740
|
Rive.prototype.drawFrame = function () {
|
|
5696
|
-
var _a;
|
|
5741
|
+
var _a, _b;
|
|
5697
5742
|
if ((_a = document === null || document === void 0 ? void 0 : document.timeline) === null || _a === void 0 ? void 0 : _a.currentTime) {
|
|
5698
5743
|
if (this.loaded && this.artboard && !this.frameRequestId) {
|
|
5699
5744
|
this._boundDraw(document.timeline.currentTime);
|
|
5745
|
+
(_b = this.runtime) === null || _b === void 0 ? void 0 : _b.resolveAnimationFrame();
|
|
5700
5746
|
}
|
|
5701
5747
|
}
|
|
5702
5748
|
else {
|
|
@@ -5708,6 +5754,7 @@ var Rive = /** @class */ (function () {
|
|
|
5708
5754
|
* @param time the time at which to render a frame
|
|
5709
5755
|
*/
|
|
5710
5756
|
Rive.prototype.draw = function (time, onSecond) {
|
|
5757
|
+
var _a;
|
|
5711
5758
|
// Clear the frameRequestId, as we're now rendering a fresh frame
|
|
5712
5759
|
this.frameRequestId = null;
|
|
5713
5760
|
var before = performance.now();
|
|
@@ -5743,8 +5790,8 @@ var Rive = /** @class */ (function () {
|
|
|
5743
5790
|
// - Advance non-paused state machines by the elapsed number of seconds
|
|
5744
5791
|
// - Advance to the first frame even when autoplay is false
|
|
5745
5792
|
var activeStateMachines = this.animator.stateMachines.filter(function (a) { return a.playing; });
|
|
5746
|
-
for (var
|
|
5747
|
-
var stateMachine = activeStateMachines_1[
|
|
5793
|
+
for (var _b = 0, activeStateMachines_1 = activeStateMachines; _b < activeStateMachines_1.length; _b++) {
|
|
5794
|
+
var stateMachine = activeStateMachines_1[_b];
|
|
5748
5795
|
// Check for events before the current frame's state machine advance
|
|
5749
5796
|
var numEventsReported = stateMachine.reportedEventCount();
|
|
5750
5797
|
if (numEventsReported) {
|
|
@@ -5759,7 +5806,7 @@ var Rive = /** @class */ (function () {
|
|
|
5759
5806
|
// Handle the event side effect if explicitly enabled
|
|
5760
5807
|
if (this.automaticallyHandleEvents) {
|
|
5761
5808
|
var newAnchorTag = document.createElement("a");
|
|
5762
|
-
var
|
|
5809
|
+
var _c = event_1, url = _c.url, target = _c.target;
|
|
5763
5810
|
var sanitizedUrl = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.sanitizeUrl)(url);
|
|
5764
5811
|
url && newAnchorTag.setAttribute("href", sanitizedUrl);
|
|
5765
5812
|
target && newAnchorTag.setAttribute("target", target);
|
|
@@ -5812,6 +5859,7 @@ var Rive = /** @class */ (function () {
|
|
|
5812
5859
|
this.frameTimes.shift();
|
|
5813
5860
|
this.durations.shift();
|
|
5814
5861
|
}
|
|
5862
|
+
(_a = this._viewModelInstance) === null || _a === void 0 ? void 0 : _a.handleCallbacks();
|
|
5815
5863
|
// Calling requestAnimationFrame will rerun draw() at the correct rate:
|
|
5816
5864
|
// https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations
|
|
5817
5865
|
if (this.animator.isPlaying) {
|
|
@@ -5869,7 +5917,7 @@ var Rive = /** @class */ (function () {
|
|
|
5869
5917
|
* Rive class
|
|
5870
5918
|
*/
|
|
5871
5919
|
Rive.prototype.cleanup = function () {
|
|
5872
|
-
var _a;
|
|
5920
|
+
var _a, _b;
|
|
5873
5921
|
this.destroyed = true;
|
|
5874
5922
|
// Stop the renderer if it hasn't already been stopped.
|
|
5875
5923
|
this.stopRendering();
|
|
@@ -5890,6 +5938,9 @@ var Rive = /** @class */ (function () {
|
|
|
5890
5938
|
audioManager.remove(this._audioEventListener);
|
|
5891
5939
|
this._audioEventListener = null;
|
|
5892
5940
|
}
|
|
5941
|
+
(_b = this._viewModelInstance) === null || _b === void 0 ? void 0 : _b.cleanup();
|
|
5942
|
+
this._viewModelInstance = null;
|
|
5943
|
+
this._dataEnums = null;
|
|
5893
5944
|
};
|
|
5894
5945
|
/**
|
|
5895
5946
|
* Cleans up the Renderer object. Only call this API if you no longer
|
|
@@ -6041,16 +6092,17 @@ var Rive = /** @class */ (function () {
|
|
|
6041
6092
|
*
|
|
6042
6093
|
*/
|
|
6043
6094
|
Rive.prototype.reset = function (params) {
|
|
6044
|
-
var _a;
|
|
6095
|
+
var _a, _b;
|
|
6045
6096
|
// Get the current artboard, animations, state machines, and playback states
|
|
6046
6097
|
var artBoardName = params === null || params === void 0 ? void 0 : params.artboard;
|
|
6047
6098
|
var animationNames = mapToStringArray(params === null || params === void 0 ? void 0 : params.animations);
|
|
6048
6099
|
var stateMachineNames = mapToStringArray(params === null || params === void 0 ? void 0 : params.stateMachines);
|
|
6049
6100
|
var autoplay = (_a = params === null || params === void 0 ? void 0 : params.autoplay) !== null && _a !== void 0 ? _a : false;
|
|
6101
|
+
var autoBind = (_b = params === null || params === void 0 ? void 0 : params.autoBind) !== null && _b !== void 0 ? _b : false;
|
|
6050
6102
|
// Stop everything and clean up
|
|
6051
6103
|
this.cleanupInstances();
|
|
6052
6104
|
// Reinitialize an artboard instance with the state
|
|
6053
|
-
this.initArtboard(artBoardName, animationNames, stateMachineNames, autoplay);
|
|
6105
|
+
this.initArtboard(artBoardName, animationNames, stateMachineNames, autoplay, autoBind);
|
|
6054
6106
|
this.taskQueue.process();
|
|
6055
6107
|
};
|
|
6056
6108
|
// Loads a new Rive file, keeping listeners in place
|
|
@@ -6673,6 +6725,62 @@ var Rive = /** @class */ (function () {
|
|
|
6673
6725
|
enumerable: false,
|
|
6674
6726
|
configurable: true
|
|
6675
6727
|
});
|
|
6728
|
+
/**
|
|
6729
|
+
* Initialize the data context with the view model instance.
|
|
6730
|
+
*/
|
|
6731
|
+
Rive.prototype.bindViewModelInstance = function (viewModelInstance) {
|
|
6732
|
+
var _a;
|
|
6733
|
+
if (this.artboard && !this.destroyed) {
|
|
6734
|
+
if (viewModelInstance && viewModelInstance.runtimeInstance) {
|
|
6735
|
+
viewModelInstance.internalIncrementReferenceCount();
|
|
6736
|
+
(_a = this._viewModelInstance) === null || _a === void 0 ? void 0 : _a.cleanup();
|
|
6737
|
+
this._viewModelInstance = viewModelInstance;
|
|
6738
|
+
this.artboard.bindViewModelInstance(viewModelInstance.runtimeInstance);
|
|
6739
|
+
this.animator.stateMachines.forEach(function (stateMachine) {
|
|
6740
|
+
return stateMachine.bindViewModelInstance(viewModelInstance);
|
|
6741
|
+
});
|
|
6742
|
+
}
|
|
6743
|
+
}
|
|
6744
|
+
};
|
|
6745
|
+
Object.defineProperty(Rive.prototype, "viewModelInstance", {
|
|
6746
|
+
get: function () {
|
|
6747
|
+
return this._viewModelInstance;
|
|
6748
|
+
},
|
|
6749
|
+
enumerable: false,
|
|
6750
|
+
configurable: true
|
|
6751
|
+
});
|
|
6752
|
+
Rive.prototype.viewModelByIndex = function (index) {
|
|
6753
|
+
var viewModel = this.file.viewModelByIndex(index);
|
|
6754
|
+
if (viewModel !== null) {
|
|
6755
|
+
return new ViewModel(viewModel);
|
|
6756
|
+
}
|
|
6757
|
+
return null;
|
|
6758
|
+
};
|
|
6759
|
+
Rive.prototype.viewModelByName = function (name) {
|
|
6760
|
+
var viewModel = this.file.viewModelByName(name);
|
|
6761
|
+
if (viewModel !== null) {
|
|
6762
|
+
return new ViewModel(viewModel);
|
|
6763
|
+
}
|
|
6764
|
+
return null;
|
|
6765
|
+
};
|
|
6766
|
+
Rive.prototype.enums = function () {
|
|
6767
|
+
if (this._dataEnums === null) {
|
|
6768
|
+
var dataEnums = this.file.enums();
|
|
6769
|
+
this._dataEnums = dataEnums.map(function (dataEnum) {
|
|
6770
|
+
return new DataEnum(dataEnum);
|
|
6771
|
+
});
|
|
6772
|
+
}
|
|
6773
|
+
return this._dataEnums;
|
|
6774
|
+
};
|
|
6775
|
+
Rive.prototype.defaultViewModel = function () {
|
|
6776
|
+
if (this.artboard) {
|
|
6777
|
+
var viewModel = this.file.defaultArtboardViewModel(this.artboard);
|
|
6778
|
+
if (viewModel) {
|
|
6779
|
+
return new ViewModel(viewModel);
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6782
|
+
return null;
|
|
6783
|
+
};
|
|
6676
6784
|
// Error message for missing source or buffer
|
|
6677
6785
|
Rive.missingErrorMessage = "Rive source file or data buffer required";
|
|
6678
6786
|
// Error message for removed rive file
|
|
@@ -6680,6 +6788,481 @@ var Rive = /** @class */ (function () {
|
|
|
6680
6788
|
return Rive;
|
|
6681
6789
|
}());
|
|
6682
6790
|
|
|
6791
|
+
var ViewModel = /** @class */ (function () {
|
|
6792
|
+
function ViewModel(viewModel) {
|
|
6793
|
+
this._viewModel = viewModel;
|
|
6794
|
+
}
|
|
6795
|
+
Object.defineProperty(ViewModel.prototype, "instanceCount", {
|
|
6796
|
+
get: function () {
|
|
6797
|
+
return this._viewModel.instanceCount;
|
|
6798
|
+
},
|
|
6799
|
+
enumerable: false,
|
|
6800
|
+
configurable: true
|
|
6801
|
+
});
|
|
6802
|
+
Object.defineProperty(ViewModel.prototype, "name", {
|
|
6803
|
+
get: function () {
|
|
6804
|
+
return this._viewModel.name;
|
|
6805
|
+
},
|
|
6806
|
+
enumerable: false,
|
|
6807
|
+
configurable: true
|
|
6808
|
+
});
|
|
6809
|
+
ViewModel.prototype.instanceByIndex = function (index) {
|
|
6810
|
+
var instance = this._viewModel.instanceByIndex(index);
|
|
6811
|
+
if (instance !== null) {
|
|
6812
|
+
return new ViewModelInstance(instance, null);
|
|
6813
|
+
}
|
|
6814
|
+
return null;
|
|
6815
|
+
};
|
|
6816
|
+
ViewModel.prototype.instanceByName = function (name) {
|
|
6817
|
+
var instance = this._viewModel.instanceByName(name);
|
|
6818
|
+
if (instance !== null) {
|
|
6819
|
+
return new ViewModelInstance(instance, null);
|
|
6820
|
+
}
|
|
6821
|
+
return null;
|
|
6822
|
+
};
|
|
6823
|
+
ViewModel.prototype.defaultInstance = function () {
|
|
6824
|
+
var runtimeInstance = this._viewModel.defaultInstance();
|
|
6825
|
+
if (runtimeInstance !== null) {
|
|
6826
|
+
return new ViewModelInstance(runtimeInstance, null);
|
|
6827
|
+
}
|
|
6828
|
+
return null;
|
|
6829
|
+
};
|
|
6830
|
+
ViewModel.prototype.instance = function () {
|
|
6831
|
+
var runtimeInstance = this._viewModel.instance();
|
|
6832
|
+
if (runtimeInstance !== null) {
|
|
6833
|
+
return new ViewModelInstance(runtimeInstance, null);
|
|
6834
|
+
}
|
|
6835
|
+
return null;
|
|
6836
|
+
};
|
|
6837
|
+
Object.defineProperty(ViewModel.prototype, "properties", {
|
|
6838
|
+
get: function () {
|
|
6839
|
+
return this._viewModel.getProperties();
|
|
6840
|
+
},
|
|
6841
|
+
enumerable: false,
|
|
6842
|
+
configurable: true
|
|
6843
|
+
});
|
|
6844
|
+
Object.defineProperty(ViewModel.prototype, "instanceNames", {
|
|
6845
|
+
get: function () {
|
|
6846
|
+
return this._viewModel.getInstanceNames();
|
|
6847
|
+
},
|
|
6848
|
+
enumerable: false,
|
|
6849
|
+
configurable: true
|
|
6850
|
+
});
|
|
6851
|
+
return ViewModel;
|
|
6852
|
+
}());
|
|
6853
|
+
|
|
6854
|
+
var DataEnum = /** @class */ (function () {
|
|
6855
|
+
function DataEnum(dataEnum) {
|
|
6856
|
+
this._dataEnum = dataEnum;
|
|
6857
|
+
}
|
|
6858
|
+
Object.defineProperty(DataEnum.prototype, "name", {
|
|
6859
|
+
get: function () {
|
|
6860
|
+
return this._dataEnum.name;
|
|
6861
|
+
},
|
|
6862
|
+
enumerable: false,
|
|
6863
|
+
configurable: true
|
|
6864
|
+
});
|
|
6865
|
+
Object.defineProperty(DataEnum.prototype, "values", {
|
|
6866
|
+
get: function () {
|
|
6867
|
+
return this._dataEnum.values;
|
|
6868
|
+
},
|
|
6869
|
+
enumerable: false,
|
|
6870
|
+
configurable: true
|
|
6871
|
+
});
|
|
6872
|
+
return DataEnum;
|
|
6873
|
+
}());
|
|
6874
|
+
|
|
6875
|
+
var ViewModelInstance = /** @class */ (function () {
|
|
6876
|
+
function ViewModelInstance(runtimeInstance, root) {
|
|
6877
|
+
this._propertiesWithCallbacks = [];
|
|
6878
|
+
this._referenceCount = 0;
|
|
6879
|
+
this._runtimeInstance = runtimeInstance;
|
|
6880
|
+
this._root = root || this;
|
|
6881
|
+
}
|
|
6882
|
+
Object.defineProperty(ViewModelInstance.prototype, "runtimeInstance", {
|
|
6883
|
+
get: function () {
|
|
6884
|
+
return this._runtimeInstance;
|
|
6885
|
+
},
|
|
6886
|
+
enumerable: false,
|
|
6887
|
+
configurable: true
|
|
6888
|
+
});
|
|
6889
|
+
ViewModelInstance.prototype.handleCallbacks = function () {
|
|
6890
|
+
if (this._propertiesWithCallbacks.length !== 0) {
|
|
6891
|
+
this._propertiesWithCallbacks.forEach(function (property) {
|
|
6892
|
+
property.handleCallbacks();
|
|
6893
|
+
});
|
|
6894
|
+
}
|
|
6895
|
+
};
|
|
6896
|
+
ViewModelInstance.prototype.clearCallbacks = function () {
|
|
6897
|
+
this._propertiesWithCallbacks.forEach(function (property) {
|
|
6898
|
+
property.clearCallbacks();
|
|
6899
|
+
});
|
|
6900
|
+
};
|
|
6901
|
+
/**
|
|
6902
|
+
* method to access a property instance of type number belonging
|
|
6903
|
+
* to the view model instance or to a nested view model instance
|
|
6904
|
+
* @param path - path to the number property
|
|
6905
|
+
*/
|
|
6906
|
+
ViewModelInstance.prototype.number = function (path) {
|
|
6907
|
+
var _a;
|
|
6908
|
+
var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.number(path);
|
|
6909
|
+
if (instance) {
|
|
6910
|
+
return new ViewModelInstanceNumber(instance, this._root);
|
|
6911
|
+
}
|
|
6912
|
+
return null;
|
|
6913
|
+
};
|
|
6914
|
+
/**
|
|
6915
|
+
* method to access a property instance of type string belonging
|
|
6916
|
+
* to the view model instance or to a nested view model instance
|
|
6917
|
+
* @param path - path to the number property
|
|
6918
|
+
*/
|
|
6919
|
+
ViewModelInstance.prototype.string = function (path) {
|
|
6920
|
+
var _a;
|
|
6921
|
+
var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.string(path);
|
|
6922
|
+
if (instance) {
|
|
6923
|
+
return new ViewModelInstanceString(instance, this._root);
|
|
6924
|
+
}
|
|
6925
|
+
return null;
|
|
6926
|
+
};
|
|
6927
|
+
/**
|
|
6928
|
+
* method to access a property instance of type boolean belonging
|
|
6929
|
+
* to the view model instance or to a nested view model instance
|
|
6930
|
+
* @param path - path to the number property
|
|
6931
|
+
*/
|
|
6932
|
+
ViewModelInstance.prototype.boolean = function (path) {
|
|
6933
|
+
var _a;
|
|
6934
|
+
var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.boolean(path);
|
|
6935
|
+
if (instance) {
|
|
6936
|
+
return new ViewModelInstanceBoolean(instance, this._root);
|
|
6937
|
+
}
|
|
6938
|
+
return null;
|
|
6939
|
+
};
|
|
6940
|
+
/**
|
|
6941
|
+
* method to access a property instance of type color belonging
|
|
6942
|
+
* to the view model instance or to a nested view model instance
|
|
6943
|
+
* @param path - path to the number property
|
|
6944
|
+
*/
|
|
6945
|
+
ViewModelInstance.prototype.color = function (path) {
|
|
6946
|
+
var _a;
|
|
6947
|
+
var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.color(path);
|
|
6948
|
+
if (instance) {
|
|
6949
|
+
return new ViewModelInstanceColor(instance, this._root);
|
|
6950
|
+
}
|
|
6951
|
+
return null;
|
|
6952
|
+
};
|
|
6953
|
+
/**
|
|
6954
|
+
* method to access a property instance of type trigger belonging
|
|
6955
|
+
* to the view model instance or to a nested view model instance
|
|
6956
|
+
* @param path - path to the number property
|
|
6957
|
+
*/
|
|
6958
|
+
ViewModelInstance.prototype.trigger = function (path) {
|
|
6959
|
+
var _a;
|
|
6960
|
+
var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.trigger(path);
|
|
6961
|
+
if (instance) {
|
|
6962
|
+
return new ViewModelInstanceTrigger(instance, this._root);
|
|
6963
|
+
}
|
|
6964
|
+
return null;
|
|
6965
|
+
};
|
|
6966
|
+
/**
|
|
6967
|
+
* method to access a property instance of type enum belonging
|
|
6968
|
+
* to the view model instance or to a nested view model instance
|
|
6969
|
+
* @param path - path to the number property
|
|
6970
|
+
*/
|
|
6971
|
+
ViewModelInstance.prototype.enum = function (path) {
|
|
6972
|
+
var _a;
|
|
6973
|
+
var instance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.enum(path);
|
|
6974
|
+
if (instance) {
|
|
6975
|
+
return new ViewModelInstanceEnum(instance, this._root);
|
|
6976
|
+
}
|
|
6977
|
+
return null;
|
|
6978
|
+
};
|
|
6979
|
+
/**
|
|
6980
|
+
* method to access a view model property instance belonging
|
|
6981
|
+
* to the view model instance or to a nested view model instance
|
|
6982
|
+
* @param path - path to the number property
|
|
6983
|
+
*/
|
|
6984
|
+
ViewModelInstance.prototype.viewModel = function (path) {
|
|
6985
|
+
var _a;
|
|
6986
|
+
var viewModelInstance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.viewModel(path);
|
|
6987
|
+
if (viewModelInstance) {
|
|
6988
|
+
return new ViewModelInstance(viewModelInstance, this._root);
|
|
6989
|
+
}
|
|
6990
|
+
return null;
|
|
6991
|
+
};
|
|
6992
|
+
/**
|
|
6993
|
+
* method to replace a view model property with another view model value
|
|
6994
|
+
* @param path - path to the view model property
|
|
6995
|
+
* @param value - view model that will replace the original
|
|
6996
|
+
*/
|
|
6997
|
+
ViewModelInstance.prototype.replaceViewModel = function (path, value) {
|
|
6998
|
+
var _a;
|
|
6999
|
+
if (value.runtimeInstance !== null) {
|
|
7000
|
+
return (((_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.replaceViewModel(path, value.runtimeInstance)) ||
|
|
7001
|
+
false);
|
|
7002
|
+
}
|
|
7003
|
+
return false;
|
|
7004
|
+
};
|
|
7005
|
+
/*
|
|
7006
|
+
* method for internal use, it shouldn't be called externally
|
|
7007
|
+
*/
|
|
7008
|
+
ViewModelInstance.prototype.addToCallbacks = function (property) {
|
|
7009
|
+
if (!this._propertiesWithCallbacks.includes(property)) {
|
|
7010
|
+
this._propertiesWithCallbacks.push(property);
|
|
7011
|
+
}
|
|
7012
|
+
};
|
|
7013
|
+
/*
|
|
7014
|
+
* method for internal use, it shouldn't be called externally
|
|
7015
|
+
*/
|
|
7016
|
+
ViewModelInstance.prototype.removeFromCallbacks = function (property) {
|
|
7017
|
+
if (this._propertiesWithCallbacks.includes(property)) {
|
|
7018
|
+
this._propertiesWithCallbacks = this._propertiesWithCallbacks.filter(function (prop) { return prop !== property; });
|
|
7019
|
+
}
|
|
7020
|
+
};
|
|
7021
|
+
/*
|
|
7022
|
+
* method to add one to the reference counter of the instance.
|
|
7023
|
+
* Use if the file owning the reference is destroyed but the instance needs to stay around
|
|
7024
|
+
*/
|
|
7025
|
+
ViewModelInstance.prototype.incrementReferenceCount = function () {
|
|
7026
|
+
var _a;
|
|
7027
|
+
this._referenceCount++;
|
|
7028
|
+
(_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.incrementReferenceCount();
|
|
7029
|
+
};
|
|
7030
|
+
/*
|
|
7031
|
+
* method to subtract one to the reference counter of the instance.
|
|
7032
|
+
* Use if incrementReferenceCount has been called
|
|
7033
|
+
*/
|
|
7034
|
+
ViewModelInstance.prototype.decrementReferenceCount = function () {
|
|
7035
|
+
var _a;
|
|
7036
|
+
this._referenceCount--;
|
|
7037
|
+
(_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.decrementReferenceCount();
|
|
7038
|
+
};
|
|
7039
|
+
Object.defineProperty(ViewModelInstance.prototype, "properties", {
|
|
7040
|
+
get: function () {
|
|
7041
|
+
var _a;
|
|
7042
|
+
return (((_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.getProperties().map(function (prop) { return (__assign({}, prop)); })) || []);
|
|
7043
|
+
},
|
|
7044
|
+
enumerable: false,
|
|
7045
|
+
configurable: true
|
|
7046
|
+
});
|
|
7047
|
+
ViewModelInstance.prototype.internalIncrementReferenceCount = function () {
|
|
7048
|
+
this._referenceCount++;
|
|
7049
|
+
};
|
|
7050
|
+
ViewModelInstance.prototype.cleanup = function () {
|
|
7051
|
+
this._referenceCount--;
|
|
7052
|
+
if (this._referenceCount <= 0) {
|
|
7053
|
+
this._runtimeInstance = null;
|
|
7054
|
+
this.clearCallbacks();
|
|
7055
|
+
this._propertiesWithCallbacks = [];
|
|
7056
|
+
}
|
|
7057
|
+
};
|
|
7058
|
+
return ViewModelInstance;
|
|
7059
|
+
}());
|
|
7060
|
+
|
|
7061
|
+
var ViewModelInstanceValue = /** @class */ (function () {
|
|
7062
|
+
function ViewModelInstanceValue(instance, root) {
|
|
7063
|
+
this.callbacks = [];
|
|
7064
|
+
this._viewModelInstanceValue = instance;
|
|
7065
|
+
this._rootViewModel = root;
|
|
7066
|
+
}
|
|
7067
|
+
ViewModelInstanceValue.prototype.on = function (callback) {
|
|
7068
|
+
// Since we don't clean the changed flag for properties that don't have listeners,
|
|
7069
|
+
// we clean it the first time we add a listener to it
|
|
7070
|
+
if (this.callbacks.length === 0) {
|
|
7071
|
+
this._viewModelInstanceValue.clearChanges();
|
|
7072
|
+
}
|
|
7073
|
+
if (!this.callbacks.includes(callback)) {
|
|
7074
|
+
this.callbacks.push(callback);
|
|
7075
|
+
this._rootViewModel.addToCallbacks(this);
|
|
7076
|
+
}
|
|
7077
|
+
};
|
|
7078
|
+
ViewModelInstanceValue.prototype.off = function (callback) {
|
|
7079
|
+
if (!callback) {
|
|
7080
|
+
this.callbacks.length = 0;
|
|
7081
|
+
}
|
|
7082
|
+
else {
|
|
7083
|
+
this.callbacks = this.callbacks.filter(function (cb) { return cb !== callback; });
|
|
7084
|
+
}
|
|
7085
|
+
if (this.callbacks.length === 0) {
|
|
7086
|
+
this._rootViewModel.removeFromCallbacks(this);
|
|
7087
|
+
}
|
|
7088
|
+
};
|
|
7089
|
+
ViewModelInstanceValue.prototype.internalHandleCallback = function (callback) { };
|
|
7090
|
+
ViewModelInstanceValue.prototype.handleCallbacks = function () {
|
|
7091
|
+
var _this = this;
|
|
7092
|
+
if (this._viewModelInstanceValue.hasChanged) {
|
|
7093
|
+
this._viewModelInstanceValue.clearChanges();
|
|
7094
|
+
this.callbacks.forEach(function (callback) {
|
|
7095
|
+
_this.internalHandleCallback(callback);
|
|
7096
|
+
});
|
|
7097
|
+
}
|
|
7098
|
+
};
|
|
7099
|
+
ViewModelInstanceValue.prototype.clearCallbacks = function () {
|
|
7100
|
+
this.callbacks.length = 0;
|
|
7101
|
+
};
|
|
7102
|
+
Object.defineProperty(ViewModelInstanceValue.prototype, "name", {
|
|
7103
|
+
get: function () {
|
|
7104
|
+
return this._viewModelInstanceValue.name;
|
|
7105
|
+
},
|
|
7106
|
+
enumerable: false,
|
|
7107
|
+
configurable: true
|
|
7108
|
+
});
|
|
7109
|
+
return ViewModelInstanceValue;
|
|
7110
|
+
}());
|
|
7111
|
+
|
|
7112
|
+
var ViewModelInstanceString = /** @class */ (function (_super) {
|
|
7113
|
+
__extends(ViewModelInstanceString, _super);
|
|
7114
|
+
function ViewModelInstanceString(instance, root) {
|
|
7115
|
+
return _super.call(this, instance, root) || this;
|
|
7116
|
+
}
|
|
7117
|
+
Object.defineProperty(ViewModelInstanceString.prototype, "value", {
|
|
7118
|
+
get: function () {
|
|
7119
|
+
return this._viewModelInstanceValue.value;
|
|
7120
|
+
},
|
|
7121
|
+
set: function (val) {
|
|
7122
|
+
this._viewModelInstanceValue.value = val;
|
|
7123
|
+
},
|
|
7124
|
+
enumerable: false,
|
|
7125
|
+
configurable: true
|
|
7126
|
+
});
|
|
7127
|
+
ViewModelInstanceString.prototype.internalHandleCallback = function (callback) {
|
|
7128
|
+
callback(this.value);
|
|
7129
|
+
};
|
|
7130
|
+
return ViewModelInstanceString;
|
|
7131
|
+
}(ViewModelInstanceValue));
|
|
7132
|
+
|
|
7133
|
+
var ViewModelInstanceNumber = /** @class */ (function (_super) {
|
|
7134
|
+
__extends(ViewModelInstanceNumber, _super);
|
|
7135
|
+
function ViewModelInstanceNumber(instance, root) {
|
|
7136
|
+
return _super.call(this, instance, root) || this;
|
|
7137
|
+
}
|
|
7138
|
+
Object.defineProperty(ViewModelInstanceNumber.prototype, "value", {
|
|
7139
|
+
get: function () {
|
|
7140
|
+
return this._viewModelInstanceValue.value;
|
|
7141
|
+
},
|
|
7142
|
+
set: function (val) {
|
|
7143
|
+
this._viewModelInstanceValue.value = val;
|
|
7144
|
+
},
|
|
7145
|
+
enumerable: false,
|
|
7146
|
+
configurable: true
|
|
7147
|
+
});
|
|
7148
|
+
ViewModelInstanceNumber.prototype.internalHandleCallback = function (callback) {
|
|
7149
|
+
callback(this.value);
|
|
7150
|
+
};
|
|
7151
|
+
return ViewModelInstanceNumber;
|
|
7152
|
+
}(ViewModelInstanceValue));
|
|
7153
|
+
|
|
7154
|
+
var ViewModelInstanceBoolean = /** @class */ (function (_super) {
|
|
7155
|
+
__extends(ViewModelInstanceBoolean, _super);
|
|
7156
|
+
function ViewModelInstanceBoolean(instance, root) {
|
|
7157
|
+
return _super.call(this, instance, root) || this;
|
|
7158
|
+
}
|
|
7159
|
+
Object.defineProperty(ViewModelInstanceBoolean.prototype, "value", {
|
|
7160
|
+
get: function () {
|
|
7161
|
+
return this._viewModelInstanceValue.value;
|
|
7162
|
+
},
|
|
7163
|
+
set: function (val) {
|
|
7164
|
+
this._viewModelInstanceValue.value = val;
|
|
7165
|
+
},
|
|
7166
|
+
enumerable: false,
|
|
7167
|
+
configurable: true
|
|
7168
|
+
});
|
|
7169
|
+
ViewModelInstanceBoolean.prototype.internalHandleCallback = function (callback) {
|
|
7170
|
+
callback(this.value);
|
|
7171
|
+
};
|
|
7172
|
+
return ViewModelInstanceBoolean;
|
|
7173
|
+
}(ViewModelInstanceValue));
|
|
7174
|
+
|
|
7175
|
+
var ViewModelInstanceTrigger = /** @class */ (function (_super) {
|
|
7176
|
+
__extends(ViewModelInstanceTrigger, _super);
|
|
7177
|
+
function ViewModelInstanceTrigger(instance, root) {
|
|
7178
|
+
return _super.call(this, instance, root) || this;
|
|
7179
|
+
}
|
|
7180
|
+
ViewModelInstanceTrigger.prototype.trigger = function () {
|
|
7181
|
+
return this._viewModelInstanceValue.trigger();
|
|
7182
|
+
};
|
|
7183
|
+
ViewModelInstanceTrigger.prototype.internalHandleCallback = function (callback) {
|
|
7184
|
+
callback();
|
|
7185
|
+
};
|
|
7186
|
+
return ViewModelInstanceTrigger;
|
|
7187
|
+
}(ViewModelInstanceValue));
|
|
7188
|
+
|
|
7189
|
+
var ViewModelInstanceEnum = /** @class */ (function (_super) {
|
|
7190
|
+
__extends(ViewModelInstanceEnum, _super);
|
|
7191
|
+
function ViewModelInstanceEnum(instance, root) {
|
|
7192
|
+
return _super.call(this, instance, root) || this;
|
|
7193
|
+
}
|
|
7194
|
+
Object.defineProperty(ViewModelInstanceEnum.prototype, "value", {
|
|
7195
|
+
get: function () {
|
|
7196
|
+
return this._viewModelInstanceValue.value;
|
|
7197
|
+
},
|
|
7198
|
+
set: function (val) {
|
|
7199
|
+
this._viewModelInstanceValue.value = val;
|
|
7200
|
+
},
|
|
7201
|
+
enumerable: false,
|
|
7202
|
+
configurable: true
|
|
7203
|
+
});
|
|
7204
|
+
Object.defineProperty(ViewModelInstanceEnum.prototype, "valueIndex", {
|
|
7205
|
+
get: function () {
|
|
7206
|
+
return this._viewModelInstanceValue
|
|
7207
|
+
.valueIndex;
|
|
7208
|
+
},
|
|
7209
|
+
set: function (val) {
|
|
7210
|
+
this._viewModelInstanceValue.valueIndex = val;
|
|
7211
|
+
},
|
|
7212
|
+
enumerable: false,
|
|
7213
|
+
configurable: true
|
|
7214
|
+
});
|
|
7215
|
+
Object.defineProperty(ViewModelInstanceEnum.prototype, "values", {
|
|
7216
|
+
get: function () {
|
|
7217
|
+
return this._viewModelInstanceValue.values;
|
|
7218
|
+
},
|
|
7219
|
+
enumerable: false,
|
|
7220
|
+
configurable: true
|
|
7221
|
+
});
|
|
7222
|
+
ViewModelInstanceEnum.prototype.internalHandleCallback = function (callback) {
|
|
7223
|
+
callback(this.value);
|
|
7224
|
+
};
|
|
7225
|
+
return ViewModelInstanceEnum;
|
|
7226
|
+
}(ViewModelInstanceValue));
|
|
7227
|
+
|
|
7228
|
+
var ViewModelInstanceColor = /** @class */ (function (_super) {
|
|
7229
|
+
__extends(ViewModelInstanceColor, _super);
|
|
7230
|
+
function ViewModelInstanceColor(instance, root) {
|
|
7231
|
+
return _super.call(this, instance, root) || this;
|
|
7232
|
+
}
|
|
7233
|
+
Object.defineProperty(ViewModelInstanceColor.prototype, "value", {
|
|
7234
|
+
get: function () {
|
|
7235
|
+
return this._viewModelInstanceValue.value;
|
|
7236
|
+
},
|
|
7237
|
+
set: function (val) {
|
|
7238
|
+
this._viewModelInstanceValue.value = val;
|
|
7239
|
+
},
|
|
7240
|
+
enumerable: false,
|
|
7241
|
+
configurable: true
|
|
7242
|
+
});
|
|
7243
|
+
ViewModelInstanceColor.prototype.rgb = function (r, g, b) {
|
|
7244
|
+
this._viewModelInstanceValue.rgb(r, g, b);
|
|
7245
|
+
};
|
|
7246
|
+
ViewModelInstanceColor.prototype.rgba = function (r, g, b, a) {
|
|
7247
|
+
this._viewModelInstanceValue.argb(a, r, g, b);
|
|
7248
|
+
};
|
|
7249
|
+
ViewModelInstanceColor.prototype.argb = function (a, r, g, b) {
|
|
7250
|
+
this._viewModelInstanceValue.argb(a, r, g, b);
|
|
7251
|
+
};
|
|
7252
|
+
// Value 0 to 255
|
|
7253
|
+
ViewModelInstanceColor.prototype.alpha = function (a) {
|
|
7254
|
+
this._viewModelInstanceValue.alpha(a);
|
|
7255
|
+
};
|
|
7256
|
+
// Value 0 to 1
|
|
7257
|
+
ViewModelInstanceColor.prototype.opacity = function (o) {
|
|
7258
|
+
this._viewModelInstanceValue.alpha(Math.round(Math.max(0, Math.min(1, o)) * 255));
|
|
7259
|
+
};
|
|
7260
|
+
ViewModelInstanceColor.prototype.internalHandleCallback = function (callback) {
|
|
7261
|
+
callback(this.value);
|
|
7262
|
+
};
|
|
7263
|
+
return ViewModelInstanceColor;
|
|
7264
|
+
}(ViewModelInstanceValue));
|
|
7265
|
+
|
|
6683
7266
|
// Loads Rive data from a URI via fetch.
|
|
6684
7267
|
var loadRiveFile = function (src) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6685
7268
|
var req, res, buffer;
|