@rive-app/canvas-lite 2.14.4 → 2.15.0
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 +10 -3
- package/rive.js +236 -217
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +26 -4
package/rive.js
CHANGED
|
@@ -33,14 +33,14 @@ h.ready = new Promise((b, a) => {
|
|
|
33
33
|
});
|
|
34
34
|
function ca() {
|
|
35
35
|
function b(m) {
|
|
36
|
-
const
|
|
36
|
+
const k = d;
|
|
37
37
|
c = a = 0;
|
|
38
38
|
d = new Map();
|
|
39
|
-
|
|
39
|
+
k.forEach(n => {
|
|
40
40
|
try {
|
|
41
41
|
n(m);
|
|
42
|
-
} catch (
|
|
43
|
-
console.error(
|
|
42
|
+
} catch (l) {
|
|
43
|
+
console.error(l);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
this.xa();
|
|
@@ -49,9 +49,9 @@ function ca() {
|
|
|
49
49
|
let a = 0, c = 0, d = new Map(), e = null, g = null;
|
|
50
50
|
this.requestAnimationFrame = function(m) {
|
|
51
51
|
a || (a = requestAnimationFrame(b.bind(this)));
|
|
52
|
-
const
|
|
53
|
-
d.set(
|
|
54
|
-
return
|
|
52
|
+
const k = ++c;
|
|
53
|
+
d.set(k, m);
|
|
54
|
+
return k;
|
|
55
55
|
};
|
|
56
56
|
this.cancelAnimationFrame = function(m) {
|
|
57
57
|
d.delete(m);
|
|
@@ -59,14 +59,14 @@ function ca() {
|
|
|
59
59
|
};
|
|
60
60
|
this.Ra = function(m) {
|
|
61
61
|
g && (document.body.remove(g), g = null);
|
|
62
|
-
m || (g = document.createElement("div"), g.style.backgroundColor = "black", g.style.position = "fixed", g.style.right = 0, g.style.top = 0, g.style.color = "white", g.style.padding = "4px", g.innerHTML = "RIVE FPS", m = function(
|
|
63
|
-
g.innerHTML = "RIVE FPS " +
|
|
62
|
+
m || (g = document.createElement("div"), g.style.backgroundColor = "black", g.style.position = "fixed", g.style.right = 0, g.style.top = 0, g.style.color = "white", g.style.padding = "4px", g.innerHTML = "RIVE FPS", m = function(k) {
|
|
63
|
+
g.innerHTML = "RIVE FPS " + k.toFixed(1);
|
|
64
64
|
}, document.body.appendChild(g));
|
|
65
65
|
e = new function() {
|
|
66
|
-
let
|
|
66
|
+
let k = 0, n = 0;
|
|
67
67
|
this.Ta = function() {
|
|
68
|
-
var
|
|
69
|
-
n ? (++
|
|
68
|
+
var l = performance.now();
|
|
69
|
+
n ? (++k, l -= n, 1000 < l && (m(1000 * k / l), k = n = 0)) : (n = l, k = 0);
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
72
72
|
};
|
|
@@ -95,52 +95,57 @@ function da(b) {
|
|
|
95
95
|
const ea = h.onRuntimeInitialized;
|
|
96
96
|
h.onRuntimeInitialized = function() {
|
|
97
97
|
ea && ea();
|
|
98
|
-
let b = h.
|
|
99
|
-
h.
|
|
100
|
-
|
|
101
|
-
d
|
|
98
|
+
let b = h.decodeAudio;
|
|
99
|
+
h.decodeAudio = function(d, e) {
|
|
100
|
+
d = b(d);
|
|
101
|
+
e(d);
|
|
102
|
+
};
|
|
103
|
+
let a = h.decodeFont;
|
|
104
|
+
h.decodeFont = function(d, e) {
|
|
105
|
+
d = a(d);
|
|
106
|
+
e(d);
|
|
102
107
|
};
|
|
103
|
-
const
|
|
104
|
-
h.ptrToAsset =
|
|
105
|
-
let
|
|
106
|
-
return
|
|
108
|
+
const c = h.FileAssetLoader;
|
|
109
|
+
h.ptrToAsset = d => {
|
|
110
|
+
let e = h.ptrToFileAsset(d);
|
|
111
|
+
return e.isImage ? h.ptrToImageAsset(d) : e.isFont ? h.ptrToFontAsset(d) : e.isAudio ? h.ptrToAudioAsset(d) : e;
|
|
107
112
|
};
|
|
108
|
-
h.CustomFileAssetLoader =
|
|
113
|
+
h.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:d}) {
|
|
109
114
|
this.__parent.__construct.call(this);
|
|
110
|
-
this.Ha =
|
|
111
|
-
}, loadContents:function(
|
|
112
|
-
|
|
113
|
-
return this.Ha(
|
|
115
|
+
this.Ha = d;
|
|
116
|
+
}, loadContents:function(d, e) {
|
|
117
|
+
d = h.ptrToAsset(d);
|
|
118
|
+
return this.Ha(d, e);
|
|
114
119
|
},});
|
|
115
|
-
h.CDNFileAssetLoader =
|
|
120
|
+
h.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
116
121
|
this.__parent.__construct.call(this);
|
|
117
|
-
}, loadContents:function(
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
if ("" ===
|
|
122
|
+
}, loadContents:function(d) {
|
|
123
|
+
let e = h.ptrToAsset(d);
|
|
124
|
+
d = e.cdnUuid;
|
|
125
|
+
if ("" === d) {
|
|
121
126
|
return !1;
|
|
122
127
|
}
|
|
123
|
-
(function(
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
4 ==
|
|
128
|
+
(function(g, m) {
|
|
129
|
+
var k = new XMLHttpRequest();
|
|
130
|
+
k.responseType = "arraybuffer";
|
|
131
|
+
k.onreadystatechange = function() {
|
|
132
|
+
4 == k.readyState && 200 == k.status && m(k);
|
|
128
133
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
})(
|
|
132
|
-
|
|
134
|
+
k.open("GET", g, !0);
|
|
135
|
+
k.send(null);
|
|
136
|
+
})(e.cdnBaseUrl + "/" + d, g => {
|
|
137
|
+
e.decode(new Uint8Array(g.response));
|
|
133
138
|
});
|
|
134
139
|
return !0;
|
|
135
140
|
},});
|
|
136
|
-
h.FallbackFileAssetLoader =
|
|
141
|
+
h.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
137
142
|
this.__parent.__construct.call(this);
|
|
138
143
|
this.wa = [];
|
|
139
|
-
}, addLoader:function(
|
|
140
|
-
this.wa.push(
|
|
141
|
-
}, loadContents:function(
|
|
142
|
-
for (let
|
|
143
|
-
if (
|
|
144
|
+
}, addLoader:function(d) {
|
|
145
|
+
this.wa.push(d);
|
|
146
|
+
}, loadContents:function(d, e) {
|
|
147
|
+
for (let g of this.wa) {
|
|
148
|
+
if (g.loadContents(d, e)) {
|
|
144
149
|
return !0;
|
|
145
150
|
}
|
|
146
151
|
}
|
|
@@ -219,7 +224,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
219
224
|
}
|
|
220
225
|
return !0;
|
|
221
226
|
}
|
|
222
|
-
let a = null, c = 0, d = 0, e = null, g = null, m = 0,
|
|
227
|
+
let a = null, c = 0, d = 0, e = null, g = null, m = 0, k = 0, n = !1;
|
|
223
228
|
b();
|
|
224
229
|
this.eb = function() {
|
|
225
230
|
b();
|
|
@@ -244,10 +249,10 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
244
249
|
2 == c ? (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR_MIPMAP_LINEAR), a.generateMipmap(a.TEXTURE_2D)) : a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR);
|
|
245
250
|
return r;
|
|
246
251
|
};
|
|
247
|
-
const
|
|
252
|
+
const l = new da(8), t = new da(8), v = new da(10), x = new da(10);
|
|
248
253
|
this.Qa = function(f, r, q, G, D) {
|
|
249
254
|
if (b()) {
|
|
250
|
-
var u =
|
|
255
|
+
var u = l.push(f), I = t.push(r);
|
|
251
256
|
if (a.canvas) {
|
|
252
257
|
if (a.canvas.width != u || a.canvas.height != I) {
|
|
253
258
|
a.canvas.width = u, a.canvas.height = I;
|
|
@@ -270,7 +275,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
270
275
|
}
|
|
271
276
|
console.assert(u == 8 * G);
|
|
272
277
|
u = x.push(D);
|
|
273
|
-
|
|
278
|
+
k != u && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * u, a.DYNAMIC_DRAW), k = u);
|
|
274
279
|
O = 0;
|
|
275
280
|
for (var ia of q) {
|
|
276
281
|
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, O, ia.indices), O += 2 * ia.indices.length;
|
|
@@ -304,37 +309,37 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
304
309
|
h.onRuntimeInitialized = function() {
|
|
305
310
|
function b(p) {
|
|
306
311
|
switch(p) {
|
|
307
|
-
case
|
|
312
|
+
case l.srcOver:
|
|
308
313
|
return "source-over";
|
|
309
|
-
case
|
|
314
|
+
case l.screen:
|
|
310
315
|
return "screen";
|
|
311
|
-
case
|
|
316
|
+
case l.overlay:
|
|
312
317
|
return "overlay";
|
|
313
|
-
case
|
|
318
|
+
case l.darken:
|
|
314
319
|
return "darken";
|
|
315
|
-
case
|
|
320
|
+
case l.lighten:
|
|
316
321
|
return "lighten";
|
|
317
|
-
case
|
|
322
|
+
case l.colorDodge:
|
|
318
323
|
return "color-dodge";
|
|
319
|
-
case
|
|
324
|
+
case l.colorBurn:
|
|
320
325
|
return "color-burn";
|
|
321
|
-
case
|
|
326
|
+
case l.hardLight:
|
|
322
327
|
return "hard-light";
|
|
323
|
-
case
|
|
328
|
+
case l.softLight:
|
|
324
329
|
return "soft-light";
|
|
325
|
-
case
|
|
330
|
+
case l.difference:
|
|
326
331
|
return "difference";
|
|
327
|
-
case
|
|
332
|
+
case l.exclusion:
|
|
328
333
|
return "exclusion";
|
|
329
|
-
case
|
|
334
|
+
case l.multiply:
|
|
330
335
|
return "multiply";
|
|
331
|
-
case
|
|
336
|
+
case l.hue:
|
|
332
337
|
return "hue";
|
|
333
|
-
case
|
|
338
|
+
case l.saturation:
|
|
334
339
|
return "saturation";
|
|
335
|
-
case
|
|
340
|
+
case l.color:
|
|
336
341
|
return "color";
|
|
337
|
-
case
|
|
342
|
+
case l.luminosity:
|
|
338
343
|
return "luminosity";
|
|
339
344
|
}
|
|
340
345
|
}
|
|
@@ -353,7 +358,7 @@ h.onRuntimeInitialized = function() {
|
|
|
353
358
|
}
|
|
354
359
|
la && la();
|
|
355
360
|
var d = h.RenderPaintStyle;
|
|
356
|
-
const e = h.RenderPath, g = h.RenderPaint, m = h.Renderer,
|
|
361
|
+
const e = h.RenderPath, g = h.RenderPaint, m = h.Renderer, k = h.StrokeCap, n = h.StrokeJoin, l = h.BlendMode, t = d.fill, v = d.stroke, x = h.FillRule.evenOdd;
|
|
357
362
|
let f = 1;
|
|
358
363
|
var r = h.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:w} = {}) {
|
|
359
364
|
this.__parent.__construct.call(this);
|
|
@@ -419,13 +424,13 @@ h.onRuntimeInitialized = function() {
|
|
|
419
424
|
}
|
|
420
425
|
}, cap:function(p) {
|
|
421
426
|
switch(p) {
|
|
422
|
-
case
|
|
427
|
+
case k.butt:
|
|
423
428
|
this.aa = "butt";
|
|
424
429
|
break;
|
|
425
|
-
case
|
|
430
|
+
case k.round:
|
|
426
431
|
this.aa = "round";
|
|
427
432
|
break;
|
|
428
|
-
case
|
|
433
|
+
case k.square:
|
|
429
434
|
this.aa = "square";
|
|
430
435
|
}
|
|
431
436
|
}, style:function(p) {
|
|
@@ -884,20 +889,20 @@ function Fb(b) {
|
|
|
884
889
|
}
|
|
885
890
|
var Gb = {}, Hb = {};
|
|
886
891
|
function V(b, a, c) {
|
|
887
|
-
function d(
|
|
888
|
-
|
|
889
|
-
|
|
892
|
+
function d(k) {
|
|
893
|
+
k = c(k);
|
|
894
|
+
k.length !== b.length && Ab("Mismatched type converter count");
|
|
890
895
|
for (var n = 0; n < b.length; ++n) {
|
|
891
|
-
Ib(b[n],
|
|
896
|
+
Ib(b[n], k[n]);
|
|
892
897
|
}
|
|
893
898
|
}
|
|
894
|
-
b.forEach(function(
|
|
895
|
-
Hb[
|
|
899
|
+
b.forEach(function(k) {
|
|
900
|
+
Hb[k] = a;
|
|
896
901
|
});
|
|
897
902
|
var e = Array(a.length), g = [], m = 0;
|
|
898
|
-
a.forEach((
|
|
899
|
-
jb.hasOwnProperty(
|
|
900
|
-
e[n] = jb[
|
|
903
|
+
a.forEach((k, n) => {
|
|
904
|
+
jb.hasOwnProperty(k) ? e[n] = jb[k] : (g.push(k), Gb.hasOwnProperty(k) || (Gb[k] = []), Gb[k].push(() => {
|
|
905
|
+
e[n] = jb[k];
|
|
901
906
|
++m;
|
|
902
907
|
m === g.length && d(e);
|
|
903
908
|
}));
|
|
@@ -956,7 +961,7 @@ function Nb(b, a, c) {
|
|
|
956
961
|
function Ob(b, a, c) {
|
|
957
962
|
h.hasOwnProperty(b) ? ((void 0 === c || void 0 !== h[b].m && void 0 !== h[b].m[c]) && R(`Cannot register public name '${b}' twice`), Nb(h, b, b), h.hasOwnProperty(c) && R(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`), h[b].m[c] = a) : (h[b] = a, void 0 !== c && (h[b].tb = c));
|
|
958
963
|
}
|
|
959
|
-
function Pb(b, a, c, d, e, g, m,
|
|
964
|
+
function Pb(b, a, c, d, e, g, m, k) {
|
|
960
965
|
this.name = b;
|
|
961
966
|
this.constructor = a;
|
|
962
967
|
this.B = c;
|
|
@@ -964,7 +969,7 @@ function Pb(b, a, c, d, e, g, m, l) {
|
|
|
964
969
|
this.l = e;
|
|
965
970
|
this.Ua = g;
|
|
966
971
|
this.S = m;
|
|
967
|
-
this.Pa =
|
|
972
|
+
this.Pa = k;
|
|
968
973
|
this.ya = [];
|
|
969
974
|
}
|
|
970
975
|
function Qb(b, a, c) {
|
|
@@ -1078,16 +1083,16 @@ function ac(b, a) {
|
|
|
1078
1083
|
function bc(b, a, c, d, e) {
|
|
1079
1084
|
var g = a.length;
|
|
1080
1085
|
2 > g && R("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1081
|
-
var m = null !== a[1] && null !== c,
|
|
1086
|
+
var m = null !== a[1] && null !== c, k = !1;
|
|
1082
1087
|
for (c = 1; c < a.length; ++c) {
|
|
1083
1088
|
if (null !== a[c] && void 0 === a[c].v) {
|
|
1084
|
-
|
|
1089
|
+
k = !0;
|
|
1085
1090
|
break;
|
|
1086
1091
|
}
|
|
1087
1092
|
}
|
|
1088
|
-
var n = "void" !== a[0].name,
|
|
1093
|
+
var n = "void" !== a[0].name, l = g - 2, t = Array(l), v = [], x = [];
|
|
1089
1094
|
return function() {
|
|
1090
|
-
arguments.length !==
|
|
1095
|
+
arguments.length !== l && R(`function ${b} called with ${arguments.length} arguments, expected ${l} args!`);
|
|
1091
1096
|
x.length = 0;
|
|
1092
1097
|
v.length = m ? 2 : 1;
|
|
1093
1098
|
v[0] = e;
|
|
@@ -1095,11 +1100,11 @@ function bc(b, a, c, d, e) {
|
|
|
1095
1100
|
var f = a[1].toWireType(x, this);
|
|
1096
1101
|
v[1] = f;
|
|
1097
1102
|
}
|
|
1098
|
-
for (var r = 0; r <
|
|
1103
|
+
for (var r = 0; r < l; ++r) {
|
|
1099
1104
|
t[r] = a[r + 2].toWireType(x, arguments[r]), v.push(t[r]);
|
|
1100
1105
|
}
|
|
1101
1106
|
r = d.apply(null, v);
|
|
1102
|
-
if (
|
|
1107
|
+
if (k) {
|
|
1103
1108
|
Eb(x);
|
|
1104
1109
|
} else {
|
|
1105
1110
|
for (var q = m ? 1 : 2; q < a.length; q++) {
|
|
@@ -1382,7 +1387,7 @@ var Ic = (b, a, c, d) => {
|
|
|
1382
1387
|
0 === (G = q(f.getFullYear() - r.getFullYear())) && 0 === (G = q(f.getMonth() - r.getMonth())) && (G = q(f.getDate() - r.getDate()));
|
|
1383
1388
|
return G;
|
|
1384
1389
|
}
|
|
1385
|
-
function
|
|
1390
|
+
function k(f) {
|
|
1386
1391
|
switch(f.getDay()) {
|
|
1387
1392
|
case 0:
|
|
1388
1393
|
return new Date(f.getFullYear() - 1, 11, 29);
|
|
@@ -1412,19 +1417,19 @@ var Ic = (b, a, c, d) => {
|
|
|
1412
1417
|
}
|
|
1413
1418
|
}
|
|
1414
1419
|
q = new Date(f.getFullYear() + 1, 0, 4);
|
|
1415
|
-
r =
|
|
1416
|
-
q =
|
|
1420
|
+
r = k(new Date(f.getFullYear(), 0, 4));
|
|
1421
|
+
q = k(q);
|
|
1417
1422
|
return 0 >= m(r, f) ? 0 >= m(q, f) ? f.getFullYear() + 1 : f.getFullYear() : f.getFullYear() - 1;
|
|
1418
1423
|
}
|
|
1419
|
-
var
|
|
1420
|
-
d = {qb:M[d >> 2], pb:M[d + 4 >> 2], Z:M[d + 8 >> 2], ha:M[d + 12 >> 2], $:M[d + 16 >> 2], K:M[d + 20 >> 2], C:M[d + 24 >> 2], J:M[d + 28 >> 2], ub:M[d + 32 >> 2], ob:M[d + 36 >> 2], rb:
|
|
1424
|
+
var l = M[d + 40 >> 2];
|
|
1425
|
+
d = {qb:M[d >> 2], pb:M[d + 4 >> 2], Z:M[d + 8 >> 2], ha:M[d + 12 >> 2], $:M[d + 16 >> 2], K:M[d + 20 >> 2], C:M[d + 24 >> 2], J:M[d + 28 >> 2], ub:M[d + 32 >> 2], ob:M[d + 36 >> 2], rb:l ? l ? lc(L, l) : "" : ""};
|
|
1421
1426
|
c = c ? lc(L, c) : "";
|
|
1422
|
-
|
|
1423
|
-
for (var t in
|
|
1424
|
-
c = c.replace(new RegExp(t, "g"),
|
|
1427
|
+
l = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y",};
|
|
1428
|
+
for (var t in l) {
|
|
1429
|
+
c = c.replace(new RegExp(t, "g"), l[t]);
|
|
1425
1430
|
}
|
|
1426
1431
|
var v = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), x = "January February March April May June July August September October November December".split(" ");
|
|
1427
|
-
|
|
1432
|
+
l = {"%a":f => v[f.C].substring(0, 3), "%A":f => v[f.C], "%b":f => x[f.$].substring(0, 3), "%B":f => x[f.$], "%C":f => g((f.K + 1900) / 100 | 0, 2), "%d":f => g(f.ha, 2), "%e":f => e(f.ha, 2, " "), "%g":f => n(f).toString().substring(2), "%G":f => n(f), "%H":f => g(f.Z, 2), "%I":f => {
|
|
1428
1433
|
f = f.Z;
|
|
1429
1434
|
0 == f ? f = 12 : 12 < f && (f -= 12);
|
|
1430
1435
|
return g(f, 2);
|
|
@@ -1450,8 +1455,8 @@ var Ic = (b, a, c, d) => {
|
|
|
1450
1455
|
return (r ? "+" : "-") + String("0000" + (f / 60 * 100 + f % 60)).slice(-4);
|
|
1451
1456
|
}, "%Z":f => f.rb, "%%":() => "%"};
|
|
1452
1457
|
c = c.replace(/%%/g, "\x00\x00");
|
|
1453
|
-
for (t in
|
|
1454
|
-
c.includes(t) && (c = c.replace(new RegExp(t, "g"),
|
|
1458
|
+
for (t in l) {
|
|
1459
|
+
c.includes(t) && (c = c.replace(new RegExp(t, "g"), l[t](d)));
|
|
1455
1460
|
}
|
|
1456
1461
|
c = c.replace(/\0\0/g, "%");
|
|
1457
1462
|
t = Hc(c);
|
|
@@ -1600,11 +1605,11 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1600
1605
|
b = U(b);
|
|
1601
1606
|
a = nb(a, "wrapper");
|
|
1602
1607
|
c = S(c);
|
|
1603
|
-
var d = [].slice, e = a.h, g = e.B, m = e.l.B,
|
|
1608
|
+
var d = [].slice, e = a.h, g = e.B, m = e.l.B, k = e.l.constructor;
|
|
1604
1609
|
b = Ya(b, function() {
|
|
1605
|
-
e.l.ya.forEach(function(
|
|
1606
|
-
if (this[
|
|
1607
|
-
throw new cb(`Pure virtual function ${
|
|
1610
|
+
e.l.ya.forEach(function(l) {
|
|
1611
|
+
if (this[l] === m[l]) {
|
|
1612
|
+
throw new cb(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
1608
1613
|
}
|
|
1609
1614
|
}.bind(this));
|
|
1610
1615
|
Object.defineProperty(this, "__parent", {value:g});
|
|
@@ -1612,23 +1617,23 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1612
1617
|
});
|
|
1613
1618
|
g.__construct = function() {
|
|
1614
1619
|
this === g && R("Pass correct 'this' to __construct");
|
|
1615
|
-
var
|
|
1616
|
-
ob(
|
|
1617
|
-
var t =
|
|
1618
|
-
|
|
1620
|
+
var l = k.implement.apply(void 0, [this].concat(d.call(arguments)));
|
|
1621
|
+
ob(l);
|
|
1622
|
+
var t = l.g;
|
|
1623
|
+
l.notifyOnDestruction();
|
|
1619
1624
|
t.O = !0;
|
|
1620
1625
|
Object.defineProperties(this, {g:{value:t}});
|
|
1621
1626
|
Cb(this);
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
hb.hasOwnProperty(
|
|
1627
|
+
l = t.i;
|
|
1628
|
+
l = ib(e, l);
|
|
1629
|
+
hb.hasOwnProperty(l) ? R(`Tried to register registered instance: ${l}`) : hb[l] = this;
|
|
1625
1630
|
};
|
|
1626
1631
|
g.__destruct = function() {
|
|
1627
1632
|
this === g && R("Pass correct 'this' to __destruct");
|
|
1628
1633
|
ob(this);
|
|
1629
|
-
var
|
|
1630
|
-
|
|
1631
|
-
hb.hasOwnProperty(
|
|
1634
|
+
var l = this.g.i;
|
|
1635
|
+
l = ib(e, l);
|
|
1636
|
+
hb.hasOwnProperty(l) ? delete hb[l] : R(`Tried to unregister unregistered instance: ${l}`);
|
|
1632
1637
|
};
|
|
1633
1638
|
b.prototype = Object.create(g);
|
|
1634
1639
|
for (var n in c) {
|
|
@@ -1640,31 +1645,31 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1640
1645
|
delete Db[b];
|
|
1641
1646
|
var c = a.fa, d = a.H, e = a.sa, g = e.map(m => m.Ya).concat(e.map(m => m.lb));
|
|
1642
1647
|
V([b], g, m => {
|
|
1643
|
-
var
|
|
1644
|
-
e.forEach((n,
|
|
1645
|
-
var t = m[
|
|
1646
|
-
|
|
1648
|
+
var k = {};
|
|
1649
|
+
e.forEach((n, l) => {
|
|
1650
|
+
var t = m[l], v = n.Wa, x = n.Xa, f = m[l + e.length], r = n.kb, q = n.mb;
|
|
1651
|
+
k[n.Sa] = {read:G => t.fromWireType(v(x, G)), write:(G, D) => {
|
|
1647
1652
|
var u = [];
|
|
1648
1653
|
r(q, G, f.toWireType(u, D));
|
|
1649
1654
|
Eb(u);
|
|
1650
1655
|
}};
|
|
1651
1656
|
});
|
|
1652
1657
|
return [{name:a.name, fromWireType:function(n) {
|
|
1653
|
-
var
|
|
1654
|
-
for (t in
|
|
1655
|
-
|
|
1658
|
+
var l = {}, t;
|
|
1659
|
+
for (t in k) {
|
|
1660
|
+
l[t] = k[t].read(n);
|
|
1656
1661
|
}
|
|
1657
1662
|
d(n);
|
|
1658
|
-
return
|
|
1659
|
-
}, toWireType:function(n,
|
|
1660
|
-
for (var t in
|
|
1661
|
-
if (!(t in
|
|
1663
|
+
return l;
|
|
1664
|
+
}, toWireType:function(n, l) {
|
|
1665
|
+
for (var t in k) {
|
|
1666
|
+
if (!(t in l)) {
|
|
1662
1667
|
throw new TypeError(`Missing field: "${t}"`);
|
|
1663
1668
|
}
|
|
1664
1669
|
}
|
|
1665
1670
|
var v = c();
|
|
1666
|
-
for (t in
|
|
1667
|
-
|
|
1671
|
+
for (t in k) {
|
|
1672
|
+
k[t].write(v, l[t]);
|
|
1668
1673
|
}
|
|
1669
1674
|
null !== n && n.push(d, v);
|
|
1670
1675
|
return v;
|
|
@@ -1676,25 +1681,25 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1676
1681
|
a = U(a);
|
|
1677
1682
|
Ib(b, {name:a, fromWireType:function(m) {
|
|
1678
1683
|
return !!m;
|
|
1679
|
-
}, toWireType:function(m,
|
|
1680
|
-
return
|
|
1684
|
+
}, toWireType:function(m, k) {
|
|
1685
|
+
return k ? d : e;
|
|
1681
1686
|
}, argPackAdvance:8, readValueFromPointer:function(m) {
|
|
1682
1687
|
if (1 === c) {
|
|
1683
|
-
var
|
|
1688
|
+
var k = Ba;
|
|
1684
1689
|
} else if (2 === c) {
|
|
1685
|
-
|
|
1690
|
+
k = Ca;
|
|
1686
1691
|
} else if (4 === c) {
|
|
1687
|
-
|
|
1692
|
+
k = M;
|
|
1688
1693
|
} else {
|
|
1689
1694
|
throw new TypeError("Unknown boolean type size: " + a);
|
|
1690
1695
|
}
|
|
1691
|
-
return this.fromWireType(
|
|
1696
|
+
return this.fromWireType(k[m >> g]);
|
|
1692
1697
|
}, v:null,});
|
|
1693
|
-
}, _embind_register_class:function(b, a, c, d, e, g, m,
|
|
1698
|
+
}, _embind_register_class:function(b, a, c, d, e, g, m, k, n, l, t, v, x) {
|
|
1694
1699
|
t = U(t);
|
|
1695
1700
|
g = Z(e, g);
|
|
1696
|
-
|
|
1697
|
-
|
|
1701
|
+
k && (k = Z(m, k));
|
|
1702
|
+
l && (l = Z(n, l));
|
|
1698
1703
|
x = Z(v, x);
|
|
1699
1704
|
var f = Xa(t);
|
|
1700
1705
|
Ob(f, function() {
|
|
@@ -1723,7 +1728,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1723
1728
|
});
|
|
1724
1729
|
var D = Object.create(G, {constructor:{value:r},});
|
|
1725
1730
|
r.prototype = D;
|
|
1726
|
-
var u = new Pb(t, r, D, x, q, g,
|
|
1731
|
+
var u = new Pb(t, r, D, x, q, g, k, l);
|
|
1727
1732
|
u.l && (void 0 === u.l.T && (u.l.T = []), u.l.T.push(u));
|
|
1728
1733
|
q = new Vb(t, u, !0, !1);
|
|
1729
1734
|
G = new Vb(t + "*", u, !1, !1);
|
|
@@ -1733,19 +1738,19 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1733
1738
|
return [q, G, I];
|
|
1734
1739
|
});
|
|
1735
1740
|
}, _embind_register_class_class_function:function(b, a, c, d, e, g, m) {
|
|
1736
|
-
var
|
|
1741
|
+
var k = cc(c, d);
|
|
1737
1742
|
a = U(a);
|
|
1738
1743
|
g = Z(e, g);
|
|
1739
1744
|
V([], [b], function(n) {
|
|
1740
|
-
function
|
|
1741
|
-
ac(`Cannot call ${t} due to unbound types`,
|
|
1745
|
+
function l() {
|
|
1746
|
+
ac(`Cannot call ${t} due to unbound types`, k);
|
|
1742
1747
|
}
|
|
1743
1748
|
n = n[0];
|
|
1744
1749
|
var t = `${n.name}.${a}`;
|
|
1745
1750
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1746
1751
|
var v = n.h.constructor;
|
|
1747
|
-
void 0 === v[a] ? (
|
|
1748
|
-
V([],
|
|
1752
|
+
void 0 === v[a] ? (l.L = c - 1, v[a] = l) : (Nb(v, a, t), v[a].m[c - 1] = l);
|
|
1753
|
+
V([], k, function(x) {
|
|
1749
1754
|
x = bc(t, [x[0], null].concat(x.slice(1)), null, g, m);
|
|
1750
1755
|
void 0 === v[a].m ? (x.L = c - 1, v[a] = x) : v[a].m[c - 1] = x;
|
|
1751
1756
|
if (n.h.T) {
|
|
@@ -1757,18 +1762,18 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1757
1762
|
});
|
|
1758
1763
|
return [];
|
|
1759
1764
|
});
|
|
1760
|
-
}, _embind_register_class_class_property:function(b, a, c, d, e, g, m,
|
|
1765
|
+
}, _embind_register_class_class_property:function(b, a, c, d, e, g, m, k) {
|
|
1761
1766
|
a = U(a);
|
|
1762
1767
|
g = Z(e, g);
|
|
1763
1768
|
V([], [b], function(n) {
|
|
1764
1769
|
n = n[0];
|
|
1765
|
-
var
|
|
1766
|
-
ac(`Cannot access ${
|
|
1770
|
+
var l = `${n.name}.${a}`, t = {get() {
|
|
1771
|
+
ac(`Cannot access ${l} due to unbound types`, [c]);
|
|
1767
1772
|
}, enumerable:!0, configurable:!0};
|
|
1768
|
-
t.set =
|
|
1769
|
-
ac(`Cannot access ${
|
|
1773
|
+
t.set = k ? () => {
|
|
1774
|
+
ac(`Cannot access ${l} due to unbound types`, [c]);
|
|
1770
1775
|
} : () => {
|
|
1771
|
-
R(`${
|
|
1776
|
+
R(`${l} is a read-only property`);
|
|
1772
1777
|
};
|
|
1773
1778
|
Object.defineProperty(n.h.constructor, a, t);
|
|
1774
1779
|
V([], [c], function(v) {
|
|
@@ -1776,9 +1781,9 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1776
1781
|
var x = {get() {
|
|
1777
1782
|
return v.fromWireType(g(d));
|
|
1778
1783
|
}, enumerable:!0};
|
|
1779
|
-
|
|
1784
|
+
k && (k = Z(m, k), x.set = f => {
|
|
1780
1785
|
var r = [];
|
|
1781
|
-
|
|
1786
|
+
k(d, v.toWireType(r, f));
|
|
1782
1787
|
Eb(r);
|
|
1783
1788
|
});
|
|
1784
1789
|
Object.defineProperty(n.h.constructor, a, x);
|
|
@@ -1789,45 +1794,45 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1789
1794
|
}, _embind_register_class_constructor:function(b, a, c, d, e, g) {
|
|
1790
1795
|
var m = cc(a, c);
|
|
1791
1796
|
e = Z(d, e);
|
|
1792
|
-
V([], [b], function(
|
|
1793
|
-
|
|
1794
|
-
var n = `constructor ${
|
|
1795
|
-
void 0 ===
|
|
1796
|
-
if (void 0 !==
|
|
1797
|
-
throw new $a(`Cannot register multiple constructors with identical number of parameters (${a - 1}) for class '${
|
|
1797
|
+
V([], [b], function(k) {
|
|
1798
|
+
k = k[0];
|
|
1799
|
+
var n = `constructor ${k.name}`;
|
|
1800
|
+
void 0 === k.h.I && (k.h.I = []);
|
|
1801
|
+
if (void 0 !== k.h.I[a - 1]) {
|
|
1802
|
+
throw new $a(`Cannot register multiple constructors with identical number of parameters (${a - 1}) for class '${k.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
1798
1803
|
}
|
|
1799
|
-
|
|
1800
|
-
ac(`Cannot construct ${
|
|
1804
|
+
k.h.I[a - 1] = () => {
|
|
1805
|
+
ac(`Cannot construct ${k.name} due to unbound types`, m);
|
|
1801
1806
|
};
|
|
1802
|
-
V([], m, function(
|
|
1803
|
-
|
|
1804
|
-
|
|
1807
|
+
V([], m, function(l) {
|
|
1808
|
+
l.splice(1, 0, null);
|
|
1809
|
+
k.h.I[a - 1] = bc(n, l, null, e, g);
|
|
1805
1810
|
return [];
|
|
1806
1811
|
});
|
|
1807
1812
|
return [];
|
|
1808
1813
|
});
|
|
1809
|
-
}, _embind_register_class_function:function(b, a, c, d, e, g, m,
|
|
1814
|
+
}, _embind_register_class_function:function(b, a, c, d, e, g, m, k) {
|
|
1810
1815
|
var n = cc(c, d);
|
|
1811
1816
|
a = U(a);
|
|
1812
1817
|
g = Z(e, g);
|
|
1813
|
-
V([], [b], function(
|
|
1818
|
+
V([], [b], function(l) {
|
|
1814
1819
|
function t() {
|
|
1815
1820
|
ac(`Cannot call ${v} due to unbound types`, n);
|
|
1816
1821
|
}
|
|
1817
|
-
|
|
1818
|
-
var v = `${
|
|
1822
|
+
l = l[0];
|
|
1823
|
+
var v = `${l.name}.${a}`;
|
|
1819
1824
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1820
|
-
|
|
1821
|
-
var x =
|
|
1822
|
-
void 0 === f || void 0 === f.m && f.className !==
|
|
1825
|
+
k && l.h.ya.push(a);
|
|
1826
|
+
var x = l.h.B, f = x[a];
|
|
1827
|
+
void 0 === f || void 0 === f.m && f.className !== l.name && f.L === c - 2 ? (t.L = c - 2, t.className = l.name, x[a] = t) : (Nb(x, a, v), x[a].m[c - 2] = t);
|
|
1823
1828
|
V([], n, function(r) {
|
|
1824
|
-
r = bc(v, r,
|
|
1829
|
+
r = bc(v, r, l, g, m);
|
|
1825
1830
|
void 0 === x[a].m ? (r.L = c - 2, x[a] = r) : x[a].m[c - 2] = r;
|
|
1826
1831
|
return [];
|
|
1827
1832
|
});
|
|
1828
1833
|
return [];
|
|
1829
1834
|
});
|
|
1830
|
-
}, _embind_register_class_property:function(b, a, c, d, e, g, m,
|
|
1835
|
+
}, _embind_register_class_property:function(b, a, c, d, e, g, m, k, n, l) {
|
|
1831
1836
|
a = U(a);
|
|
1832
1837
|
e = Z(d, e);
|
|
1833
1838
|
V([], [b], function(t) {
|
|
@@ -1847,11 +1852,11 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1847
1852
|
return r.fromWireType(e(g, D));
|
|
1848
1853
|
}, enumerable:!0};
|
|
1849
1854
|
if (n) {
|
|
1850
|
-
n = Z(
|
|
1855
|
+
n = Z(k, n);
|
|
1851
1856
|
var G = f[1];
|
|
1852
1857
|
q.set = function(D) {
|
|
1853
1858
|
var u = dc(this, t, v + " setter"), I = [];
|
|
1854
|
-
n(
|
|
1859
|
+
n(l, u, G.toWireType(I, D));
|
|
1855
1860
|
Eb(I);
|
|
1856
1861
|
};
|
|
1857
1862
|
}
|
|
@@ -1904,22 +1909,22 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1904
1909
|
Ob(b, function() {
|
|
1905
1910
|
ac(`Cannot call ${b} due to unbound types`, m);
|
|
1906
1911
|
}, a - 1);
|
|
1907
|
-
V([], m, function(
|
|
1908
|
-
Wb(b, bc(b, [
|
|
1912
|
+
V([], m, function(k) {
|
|
1913
|
+
Wb(b, bc(b, [k[0], null].concat(k.slice(1)), null, e, g), a - 1);
|
|
1909
1914
|
return [];
|
|
1910
1915
|
});
|
|
1911
1916
|
}, _embind_register_integer:function(b, a, c, d, e) {
|
|
1912
1917
|
a = U(a);
|
|
1913
1918
|
-1 === e && (e = 4294967295);
|
|
1914
1919
|
e = Jb(c);
|
|
1915
|
-
var g =
|
|
1920
|
+
var g = k => k;
|
|
1916
1921
|
if (0 === d) {
|
|
1917
1922
|
var m = 32 - 8 * c;
|
|
1918
|
-
g =
|
|
1923
|
+
g = k => k << m >>> m;
|
|
1919
1924
|
}
|
|
1920
|
-
c = a.includes("unsigned") ? function(
|
|
1925
|
+
c = a.includes("unsigned") ? function(k, n) {
|
|
1921
1926
|
return n >>> 0;
|
|
1922
|
-
} : function(
|
|
1927
|
+
} : function(k, n) {
|
|
1923
1928
|
return n;
|
|
1924
1929
|
};
|
|
1925
1930
|
Ib(b, {name:a, fromWireType:g, toWireType:c, argPackAdvance:8, readValueFromPointer:hc(a, e, 0 !== d), v:null,});
|
|
@@ -1938,42 +1943,42 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1938
1943
|
Ib(b, {name:a, fromWireType:function(d) {
|
|
1939
1944
|
var e = P[d >> 2], g = d + 4;
|
|
1940
1945
|
if (c) {
|
|
1941
|
-
for (var m = g,
|
|
1942
|
-
var n = g +
|
|
1943
|
-
if (
|
|
1946
|
+
for (var m = g, k = 0; k <= e; ++k) {
|
|
1947
|
+
var n = g + k;
|
|
1948
|
+
if (k == e || 0 == L[n]) {
|
|
1944
1949
|
m = m ? lc(L, m, n - m) : "";
|
|
1945
|
-
if (void 0 ===
|
|
1946
|
-
var
|
|
1950
|
+
if (void 0 === l) {
|
|
1951
|
+
var l = m;
|
|
1947
1952
|
} else {
|
|
1948
|
-
|
|
1953
|
+
l += String.fromCharCode(0), l += m;
|
|
1949
1954
|
}
|
|
1950
1955
|
m = n + 1;
|
|
1951
1956
|
}
|
|
1952
1957
|
}
|
|
1953
1958
|
} else {
|
|
1954
|
-
|
|
1955
|
-
for (
|
|
1956
|
-
k
|
|
1959
|
+
l = Array(e);
|
|
1960
|
+
for (k = 0; k < e; ++k) {
|
|
1961
|
+
l[k] = String.fromCharCode(L[g + k]);
|
|
1957
1962
|
}
|
|
1958
|
-
|
|
1963
|
+
l = l.join("");
|
|
1959
1964
|
}
|
|
1960
1965
|
mb(d);
|
|
1961
|
-
return
|
|
1966
|
+
return l;
|
|
1962
1967
|
}, toWireType:function(d, e) {
|
|
1963
1968
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
1964
1969
|
var g = "string" == typeof e;
|
|
1965
1970
|
g || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || R("Cannot pass non-string to std::string");
|
|
1966
1971
|
var m = c && g ? jc(e) : e.length;
|
|
1967
|
-
var
|
|
1968
|
-
P[
|
|
1972
|
+
var k = Lc(4 + m + 1), n = k + 4;
|
|
1973
|
+
P[k >> 2] = m;
|
|
1969
1974
|
if (c && g) {
|
|
1970
1975
|
ic(e, L, n, m + 1);
|
|
1971
1976
|
} else {
|
|
1972
1977
|
if (g) {
|
|
1973
1978
|
for (g = 0; g < m; ++g) {
|
|
1974
|
-
var
|
|
1975
|
-
255 <
|
|
1976
|
-
L[n + g] =
|
|
1979
|
+
var l = e.charCodeAt(g);
|
|
1980
|
+
255 < l && (mb(n), R("String has UTF-16 code units that do not fit in 8 bits"));
|
|
1981
|
+
L[n + g] = l;
|
|
1977
1982
|
}
|
|
1978
1983
|
} else {
|
|
1979
1984
|
for (g = 0; g < m; ++g) {
|
|
@@ -1981,8 +1986,8 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1981
1986
|
}
|
|
1982
1987
|
}
|
|
1983
1988
|
}
|
|
1984
|
-
null !== d && d.push(mb,
|
|
1985
|
-
return
|
|
1989
|
+
null !== d && d.push(mb, k);
|
|
1990
|
+
return k;
|
|
1986
1991
|
}, argPackAdvance:8, readValueFromPointer:Fb, v:function(d) {
|
|
1987
1992
|
mb(d);
|
|
1988
1993
|
},});
|
|
@@ -1993,24 +1998,24 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1993
1998
|
var e = pc;
|
|
1994
1999
|
var g = qc;
|
|
1995
2000
|
var m = () => Da;
|
|
1996
|
-
var
|
|
2001
|
+
var k = 1;
|
|
1997
2002
|
} else {
|
|
1998
|
-
4 === a && (d = rc, e = sc, g = tc, m = () => P,
|
|
2003
|
+
4 === a && (d = rc, e = sc, g = tc, m = () => P, k = 2);
|
|
1999
2004
|
}
|
|
2000
2005
|
Ib(b, {name:c, fromWireType:function(n) {
|
|
2001
|
-
for (var
|
|
2006
|
+
for (var l = P[n >> 2], t = m(), v, x = n + 4, f = 0; f <= l; ++f) {
|
|
2002
2007
|
var r = n + 4 + f * a;
|
|
2003
|
-
if (f ==
|
|
2008
|
+
if (f == l || 0 == t[r >> k]) {
|
|
2004
2009
|
x = d(x, r - x), void 0 === v ? v = x : (v += String.fromCharCode(0), v += x), x = r + a;
|
|
2005
2010
|
}
|
|
2006
2011
|
}
|
|
2007
2012
|
mb(n);
|
|
2008
2013
|
return v;
|
|
2009
|
-
}, toWireType:function(n,
|
|
2010
|
-
"string" != typeof
|
|
2011
|
-
var t = g(
|
|
2012
|
-
P[v >> 2] = t >>
|
|
2013
|
-
e(
|
|
2014
|
+
}, toWireType:function(n, l) {
|
|
2015
|
+
"string" != typeof l && R(`Cannot pass non-string to C++ string type ${c}`);
|
|
2016
|
+
var t = g(l), v = Lc(4 + t + a);
|
|
2017
|
+
P[v >> 2] = t >> k;
|
|
2018
|
+
e(l, v + 4, t + a);
|
|
2014
2019
|
null !== n && n.push(mb, v);
|
|
2015
2020
|
return v;
|
|
2016
2021
|
}, argPackAdvance:8, readValueFromPointer:Fb, v:function(n) {
|
|
@@ -2018,8 +2023,8 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2018
2023
|
},});
|
|
2019
2024
|
}, _embind_register_value_object:function(b, a, c, d, e, g) {
|
|
2020
2025
|
Db[b] = {name:U(a), fa:Z(c, d), H:Z(e, g), sa:[],};
|
|
2021
|
-
}, _embind_register_value_object_field:function(b, a, c, d, e, g, m,
|
|
2022
|
-
Db[b].sa.push({Sa:U(a), Ya:c, Wa:Z(d, e), Xa:g, lb:m, kb:Z(
|
|
2026
|
+
}, _embind_register_value_object_field:function(b, a, c, d, e, g, m, k, n, l) {
|
|
2027
|
+
Db[b].sa.push({Sa:U(a), Ya:c, Wa:Z(d, e), Xa:g, lb:m, kb:Z(k, n), mb:l,});
|
|
2023
2028
|
}, _embind_register_void:function(b, a) {
|
|
2024
2029
|
a = U(a);
|
|
2025
2030
|
Ib(b, {cb:!0, name:a, argPackAdvance:0, fromWireType:function() {
|
|
@@ -2053,11 +2058,11 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2053
2058
|
return e;
|
|
2054
2059
|
}
|
|
2055
2060
|
var g = Array(b - 1);
|
|
2056
|
-
e = xc((m,
|
|
2061
|
+
e = xc((m, k, n, l) => {
|
|
2057
2062
|
for (var t = 0, v = 0; v < b - 1; ++v) {
|
|
2058
|
-
g[v] = c[v + 1].readValueFromPointer(
|
|
2063
|
+
g[v] = c[v + 1].readValueFromPointer(l + t), t += c[v + 1].argPackAdvance;
|
|
2059
2064
|
}
|
|
2060
|
-
m = m[
|
|
2065
|
+
m = m[k].apply(m, g);
|
|
2061
2066
|
for (v = 0; v < b - 1; ++v) {
|
|
2062
2067
|
c[v + 1].Na && c[v + 1].Na(g[v]);
|
|
2063
2068
|
}
|
|
@@ -2146,13 +2151,13 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2146
2151
|
return 70;
|
|
2147
2152
|
}, fd_write:(b, a, c, d) => {
|
|
2148
2153
|
for (var e = 0, g = 0; g < c; g++) {
|
|
2149
|
-
var m = P[a >> 2],
|
|
2154
|
+
var m = P[a >> 2], k = P[a + 4 >> 2];
|
|
2150
2155
|
a += 8;
|
|
2151
|
-
for (var n = 0; n <
|
|
2152
|
-
var
|
|
2153
|
-
0 ===
|
|
2156
|
+
for (var n = 0; n < k; n++) {
|
|
2157
|
+
var l = L[m + n], t = Dc[b];
|
|
2158
|
+
0 === l || 10 === l ? ((1 === b ? ta : ua)(lc(t, 0)), t.length = 0) : t.push(l);
|
|
2154
2159
|
}
|
|
2155
|
-
e +=
|
|
2160
|
+
e += k;
|
|
2156
2161
|
}
|
|
2157
2162
|
P[d >> 2] = e;
|
|
2158
2163
|
return 0;
|
|
@@ -2193,8 +2198,8 @@ h.__embind_initialize_bindings = () => (h.__embind_initialize_bindings = J._embi
|
|
|
2193
2198
|
h.dynCall_jiji = (b, a, c, d, e) => (h.dynCall_jiji = J.dynCall_jiji)(b, a, c, d, e);
|
|
2194
2199
|
h.dynCall_viijii = (b, a, c, d, e, g, m) => (h.dynCall_viijii = J.dynCall_viijii)(b, a, c, d, e, g, m);
|
|
2195
2200
|
h.dynCall_iiiiij = (b, a, c, d, e, g, m) => (h.dynCall_iiiiij = J.dynCall_iiiiij)(b, a, c, d, e, g, m);
|
|
2196
|
-
h.dynCall_iiiiijj = (b, a, c, d, e, g, m,
|
|
2197
|
-
h.dynCall_iiiiiijj = (b, a, c, d, e, g, m,
|
|
2201
|
+
h.dynCall_iiiiijj = (b, a, c, d, e, g, m, k, n) => (h.dynCall_iiiiijj = J.dynCall_iiiiijj)(b, a, c, d, e, g, m, k, n);
|
|
2202
|
+
h.dynCall_iiiiiijj = (b, a, c, d, e, g, m, k, n, l) => (h.dynCall_iiiiiijj = J.dynCall_iiiiiijj)(b, a, c, d, e, g, m, k, n, l);
|
|
2198
2203
|
var Nc;
|
|
2199
2204
|
Oa = function Oc() {
|
|
2200
2205
|
Nc || Pc();
|
|
@@ -2252,7 +2257,7 @@ Pc();
|
|
|
2252
2257
|
/* 2 */
|
|
2253
2258
|
/***/ ((module) => {
|
|
2254
2259
|
|
|
2255
|
-
module.exports = JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.
|
|
2260
|
+
module.exports = JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.15.0","description":"A lite version of Rive\'s canvas 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)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2256
2261
|
|
|
2257
2262
|
/***/ }),
|
|
2258
2263
|
/* 3 */
|
|
@@ -2550,6 +2555,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2550
2555
|
/* harmony export */ StateMachineInput: () => (/* binding */ StateMachineInput),
|
|
2551
2556
|
/* harmony export */ StateMachineInputType: () => (/* binding */ StateMachineInputType),
|
|
2552
2557
|
/* harmony export */ Testing: () => (/* binding */ Testing),
|
|
2558
|
+
/* harmony export */ decodeAudio: () => (/* binding */ decodeAudio),
|
|
2553
2559
|
/* harmony export */ decodeFont: () => (/* binding */ decodeFont),
|
|
2554
2560
|
/* harmony export */ decodeImage: () => (/* binding */ decodeImage)
|
|
2555
2561
|
/* harmony export */ });
|
|
@@ -4724,10 +4730,23 @@ var Testing = {
|
|
|
4724
4730
|
};
|
|
4725
4731
|
// #endregion
|
|
4726
4732
|
// #region asset loaders
|
|
4733
|
+
/**
|
|
4734
|
+
* Decodes bytes into an audio asset.
|
|
4735
|
+
*
|
|
4736
|
+
* Be sure to call `.unref()` on the audio once it is no longer needed. This
|
|
4737
|
+
* allows the engine to clean it up when it is not used by any more animations.
|
|
4738
|
+
*/
|
|
4739
|
+
var decodeAudio = function (bytes) {
|
|
4740
|
+
return new Promise(function (resolve) {
|
|
4741
|
+
return RuntimeLoader.getInstance(function (rive) {
|
|
4742
|
+
rive.decodeAudio(bytes, resolve);
|
|
4743
|
+
});
|
|
4744
|
+
});
|
|
4745
|
+
};
|
|
4727
4746
|
/**
|
|
4728
4747
|
* Decodes bytes into an image.
|
|
4729
4748
|
*
|
|
4730
|
-
* Be sure to call `.
|
|
4749
|
+
* Be sure to call `.unref()` on the image once it is no longer needed. This
|
|
4731
4750
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
4732
4751
|
*/
|
|
4733
4752
|
var decodeImage = function (bytes) {
|
|
@@ -4740,7 +4759,7 @@ var decodeImage = function (bytes) {
|
|
|
4740
4759
|
/**
|
|
4741
4760
|
* Decodes bytes into a font.
|
|
4742
4761
|
*
|
|
4743
|
-
* Be sure to call `.
|
|
4762
|
+
* Be sure to call `.unref()` on the font once it is no longer needed. This
|
|
4744
4763
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
4745
4764
|
*/
|
|
4746
4765
|
var decodeFont = function (bytes) {
|