@rive-app/canvas-advanced-lite 2.14.3 → 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/canvas_advanced.mjs +219 -214
- package/package.json +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +26 -4
package/canvas_advanced.mjs
CHANGED
|
@@ -12,14 +12,14 @@ h.ready = new Promise((b, a) => {
|
|
|
12
12
|
});
|
|
13
13
|
function ca() {
|
|
14
14
|
function b(m) {
|
|
15
|
-
const
|
|
15
|
+
const k = d;
|
|
16
16
|
c = a = 0;
|
|
17
17
|
d = new Map();
|
|
18
|
-
|
|
18
|
+
k.forEach(n => {
|
|
19
19
|
try {
|
|
20
20
|
n(m);
|
|
21
|
-
} catch (
|
|
22
|
-
console.error(
|
|
21
|
+
} catch (l) {
|
|
22
|
+
console.error(l);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
this.xa();
|
|
@@ -28,9 +28,9 @@ function ca() {
|
|
|
28
28
|
let a = 0, c = 0, d = new Map(), e = null, g = null;
|
|
29
29
|
this.requestAnimationFrame = function(m) {
|
|
30
30
|
a || (a = requestAnimationFrame(b.bind(this)));
|
|
31
|
-
const
|
|
32
|
-
d.set(
|
|
33
|
-
return
|
|
31
|
+
const k = ++c;
|
|
32
|
+
d.set(k, m);
|
|
33
|
+
return k;
|
|
34
34
|
};
|
|
35
35
|
this.cancelAnimationFrame = function(m) {
|
|
36
36
|
d.delete(m);
|
|
@@ -38,14 +38,14 @@ function ca() {
|
|
|
38
38
|
};
|
|
39
39
|
this.Ra = function(m) {
|
|
40
40
|
g && (document.body.remove(g), g = null);
|
|
41
|
-
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(
|
|
42
|
-
g.innerHTML = "RIVE FPS " +
|
|
41
|
+
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) {
|
|
42
|
+
g.innerHTML = "RIVE FPS " + k.toFixed(1);
|
|
43
43
|
}, document.body.appendChild(g));
|
|
44
44
|
e = new function() {
|
|
45
|
-
let
|
|
45
|
+
let k = 0, n = 0;
|
|
46
46
|
this.Ta = function() {
|
|
47
|
-
var
|
|
48
|
-
n ? (++
|
|
47
|
+
var l = performance.now();
|
|
48
|
+
n ? (++k, l -= n, 1000 < l && (m(1000 * k / l), k = n = 0)) : (n = l, k = 0);
|
|
49
49
|
};
|
|
50
50
|
}();
|
|
51
51
|
};
|
|
@@ -74,52 +74,57 @@ function da(b) {
|
|
|
74
74
|
const ea = h.onRuntimeInitialized;
|
|
75
75
|
h.onRuntimeInitialized = function() {
|
|
76
76
|
ea && ea();
|
|
77
|
-
let b = h.
|
|
78
|
-
h.
|
|
79
|
-
|
|
80
|
-
d
|
|
77
|
+
let b = h.decodeAudio;
|
|
78
|
+
h.decodeAudio = function(d, e) {
|
|
79
|
+
d = b(d);
|
|
80
|
+
e(d);
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
h.
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
let a = h.decodeFont;
|
|
83
|
+
h.decodeFont = function(d, e) {
|
|
84
|
+
d = a(d);
|
|
85
|
+
e(d);
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
const c = h.FileAssetLoader;
|
|
88
|
+
h.ptrToAsset = d => {
|
|
89
|
+
let e = h.ptrToFileAsset(d);
|
|
90
|
+
return e.isImage ? h.ptrToImageAsset(d) : e.isFont ? h.ptrToFontAsset(d) : e.isAudio ? h.ptrToAudioAsset(d) : e;
|
|
91
|
+
};
|
|
92
|
+
h.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:d}) {
|
|
88
93
|
this.__parent.__construct.call(this);
|
|
89
|
-
this.Ha =
|
|
90
|
-
}, loadContents:function(
|
|
91
|
-
|
|
92
|
-
return this.Ha(
|
|
94
|
+
this.Ha = d;
|
|
95
|
+
}, loadContents:function(d, e) {
|
|
96
|
+
d = h.ptrToAsset(d);
|
|
97
|
+
return this.Ha(d, e);
|
|
93
98
|
},});
|
|
94
|
-
h.CDNFileAssetLoader =
|
|
99
|
+
h.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
95
100
|
this.__parent.__construct.call(this);
|
|
96
|
-
}, loadContents:function(
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
if ("" ===
|
|
101
|
+
}, loadContents:function(d) {
|
|
102
|
+
let e = h.ptrToAsset(d);
|
|
103
|
+
d = e.cdnUuid;
|
|
104
|
+
if ("" === d) {
|
|
100
105
|
return !1;
|
|
101
106
|
}
|
|
102
|
-
(function(
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
4 ==
|
|
107
|
+
(function(g, m) {
|
|
108
|
+
var k = new XMLHttpRequest();
|
|
109
|
+
k.responseType = "arraybuffer";
|
|
110
|
+
k.onreadystatechange = function() {
|
|
111
|
+
4 == k.readyState && 200 == k.status && m(k);
|
|
107
112
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
})(
|
|
111
|
-
|
|
113
|
+
k.open("GET", g, !0);
|
|
114
|
+
k.send(null);
|
|
115
|
+
})(e.cdnBaseUrl + "/" + d, g => {
|
|
116
|
+
e.decode(new Uint8Array(g.response));
|
|
112
117
|
});
|
|
113
118
|
return !0;
|
|
114
119
|
},});
|
|
115
|
-
h.FallbackFileAssetLoader =
|
|
120
|
+
h.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
116
121
|
this.__parent.__construct.call(this);
|
|
117
122
|
this.wa = [];
|
|
118
|
-
}, addLoader:function(
|
|
119
|
-
this.wa.push(
|
|
120
|
-
}, loadContents:function(
|
|
121
|
-
for (let
|
|
122
|
-
if (
|
|
123
|
+
}, addLoader:function(d) {
|
|
124
|
+
this.wa.push(d);
|
|
125
|
+
}, loadContents:function(d, e) {
|
|
126
|
+
for (let g of this.wa) {
|
|
127
|
+
if (g.loadContents(d, e)) {
|
|
123
128
|
return !0;
|
|
124
129
|
}
|
|
125
130
|
}
|
|
@@ -198,7 +203,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
198
203
|
}
|
|
199
204
|
return !0;
|
|
200
205
|
}
|
|
201
|
-
let a = null, c = 0, d = 0, e = null, g = null, m = 0,
|
|
206
|
+
let a = null, c = 0, d = 0, e = null, g = null, m = 0, k = 0, n = !1;
|
|
202
207
|
b();
|
|
203
208
|
this.eb = function() {
|
|
204
209
|
b();
|
|
@@ -223,10 +228,10 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
223
228
|
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);
|
|
224
229
|
return r;
|
|
225
230
|
};
|
|
226
|
-
const
|
|
231
|
+
const l = new da(8), t = new da(8), v = new da(10), x = new da(10);
|
|
227
232
|
this.Qa = function(f, r, q, G, D) {
|
|
228
233
|
if (b()) {
|
|
229
|
-
var u =
|
|
234
|
+
var u = l.push(f), I = t.push(r);
|
|
230
235
|
if (a.canvas) {
|
|
231
236
|
if (a.canvas.width != u || a.canvas.height != I) {
|
|
232
237
|
a.canvas.width = u, a.canvas.height = I;
|
|
@@ -249,7 +254,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
249
254
|
}
|
|
250
255
|
console.assert(u == 8 * G);
|
|
251
256
|
u = x.push(D);
|
|
252
|
-
|
|
257
|
+
k != u && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * u, a.DYNAMIC_DRAW), k = u);
|
|
253
258
|
O = 0;
|
|
254
259
|
for (var ia of q) {
|
|
255
260
|
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, O, ia.indices), O += 2 * ia.indices.length;
|
|
@@ -283,37 +288,37 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
283
288
|
h.onRuntimeInitialized = function() {
|
|
284
289
|
function b(p) {
|
|
285
290
|
switch(p) {
|
|
286
|
-
case
|
|
291
|
+
case l.srcOver:
|
|
287
292
|
return "source-over";
|
|
288
|
-
case
|
|
293
|
+
case l.screen:
|
|
289
294
|
return "screen";
|
|
290
|
-
case
|
|
295
|
+
case l.overlay:
|
|
291
296
|
return "overlay";
|
|
292
|
-
case
|
|
297
|
+
case l.darken:
|
|
293
298
|
return "darken";
|
|
294
|
-
case
|
|
299
|
+
case l.lighten:
|
|
295
300
|
return "lighten";
|
|
296
|
-
case
|
|
301
|
+
case l.colorDodge:
|
|
297
302
|
return "color-dodge";
|
|
298
|
-
case
|
|
303
|
+
case l.colorBurn:
|
|
299
304
|
return "color-burn";
|
|
300
|
-
case
|
|
305
|
+
case l.hardLight:
|
|
301
306
|
return "hard-light";
|
|
302
|
-
case
|
|
307
|
+
case l.softLight:
|
|
303
308
|
return "soft-light";
|
|
304
|
-
case
|
|
309
|
+
case l.difference:
|
|
305
310
|
return "difference";
|
|
306
|
-
case
|
|
311
|
+
case l.exclusion:
|
|
307
312
|
return "exclusion";
|
|
308
|
-
case
|
|
313
|
+
case l.multiply:
|
|
309
314
|
return "multiply";
|
|
310
|
-
case
|
|
315
|
+
case l.hue:
|
|
311
316
|
return "hue";
|
|
312
|
-
case
|
|
317
|
+
case l.saturation:
|
|
313
318
|
return "saturation";
|
|
314
|
-
case
|
|
319
|
+
case l.color:
|
|
315
320
|
return "color";
|
|
316
|
-
case
|
|
321
|
+
case l.luminosity:
|
|
317
322
|
return "luminosity";
|
|
318
323
|
}
|
|
319
324
|
}
|
|
@@ -332,7 +337,7 @@ h.onRuntimeInitialized = function() {
|
|
|
332
337
|
}
|
|
333
338
|
la && la();
|
|
334
339
|
var d = h.RenderPaintStyle;
|
|
335
|
-
const e = h.RenderPath, g = h.RenderPaint, m = h.Renderer,
|
|
340
|
+
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;
|
|
336
341
|
let f = 1;
|
|
337
342
|
var r = h.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:w} = {}) {
|
|
338
343
|
this.__parent.__construct.call(this);
|
|
@@ -398,13 +403,13 @@ h.onRuntimeInitialized = function() {
|
|
|
398
403
|
}
|
|
399
404
|
}, cap:function(p) {
|
|
400
405
|
switch(p) {
|
|
401
|
-
case
|
|
406
|
+
case k.butt:
|
|
402
407
|
this.aa = "butt";
|
|
403
408
|
break;
|
|
404
|
-
case
|
|
409
|
+
case k.round:
|
|
405
410
|
this.aa = "round";
|
|
406
411
|
break;
|
|
407
|
-
case
|
|
412
|
+
case k.square:
|
|
408
413
|
this.aa = "square";
|
|
409
414
|
}
|
|
410
415
|
}, style:function(p) {
|
|
@@ -863,20 +868,20 @@ function Fb(b) {
|
|
|
863
868
|
}
|
|
864
869
|
var Gb = {}, Hb = {};
|
|
865
870
|
function V(b, a, c) {
|
|
866
|
-
function d(
|
|
867
|
-
|
|
868
|
-
|
|
871
|
+
function d(k) {
|
|
872
|
+
k = c(k);
|
|
873
|
+
k.length !== b.length && Ab("Mismatched type converter count");
|
|
869
874
|
for (var n = 0; n < b.length; ++n) {
|
|
870
|
-
Ib(b[n],
|
|
875
|
+
Ib(b[n], k[n]);
|
|
871
876
|
}
|
|
872
877
|
}
|
|
873
|
-
b.forEach(function(
|
|
874
|
-
Hb[
|
|
878
|
+
b.forEach(function(k) {
|
|
879
|
+
Hb[k] = a;
|
|
875
880
|
});
|
|
876
881
|
var e = Array(a.length), g = [], m = 0;
|
|
877
|
-
a.forEach((
|
|
878
|
-
jb.hasOwnProperty(
|
|
879
|
-
e[n] = jb[
|
|
882
|
+
a.forEach((k, n) => {
|
|
883
|
+
jb.hasOwnProperty(k) ? e[n] = jb[k] : (g.push(k), Gb.hasOwnProperty(k) || (Gb[k] = []), Gb[k].push(() => {
|
|
884
|
+
e[n] = jb[k];
|
|
880
885
|
++m;
|
|
881
886
|
m === g.length && d(e);
|
|
882
887
|
}));
|
|
@@ -935,7 +940,7 @@ function Nb(b, a, c) {
|
|
|
935
940
|
function Ob(b, a, c) {
|
|
936
941
|
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));
|
|
937
942
|
}
|
|
938
|
-
function Pb(b, a, c, d, e, g, m,
|
|
943
|
+
function Pb(b, a, c, d, e, g, m, k) {
|
|
939
944
|
this.name = b;
|
|
940
945
|
this.constructor = a;
|
|
941
946
|
this.B = c;
|
|
@@ -943,7 +948,7 @@ function Pb(b, a, c, d, e, g, m, l) {
|
|
|
943
948
|
this.l = e;
|
|
944
949
|
this.Ua = g;
|
|
945
950
|
this.S = m;
|
|
946
|
-
this.Pa =
|
|
951
|
+
this.Pa = k;
|
|
947
952
|
this.ya = [];
|
|
948
953
|
}
|
|
949
954
|
function Qb(b, a, c) {
|
|
@@ -1057,16 +1062,16 @@ function ac(b, a) {
|
|
|
1057
1062
|
function bc(b, a, c, d, e) {
|
|
1058
1063
|
var g = a.length;
|
|
1059
1064
|
2 > g && R("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1060
|
-
var m = null !== a[1] && null !== c,
|
|
1065
|
+
var m = null !== a[1] && null !== c, k = !1;
|
|
1061
1066
|
for (c = 1; c < a.length; ++c) {
|
|
1062
1067
|
if (null !== a[c] && void 0 === a[c].v) {
|
|
1063
|
-
|
|
1068
|
+
k = !0;
|
|
1064
1069
|
break;
|
|
1065
1070
|
}
|
|
1066
1071
|
}
|
|
1067
|
-
var n = "void" !== a[0].name,
|
|
1072
|
+
var n = "void" !== a[0].name, l = g - 2, t = Array(l), v = [], x = [];
|
|
1068
1073
|
return function() {
|
|
1069
|
-
arguments.length !==
|
|
1074
|
+
arguments.length !== l && R(`function ${b} called with ${arguments.length} arguments, expected ${l} args!`);
|
|
1070
1075
|
x.length = 0;
|
|
1071
1076
|
v.length = m ? 2 : 1;
|
|
1072
1077
|
v[0] = e;
|
|
@@ -1074,11 +1079,11 @@ function bc(b, a, c, d, e) {
|
|
|
1074
1079
|
var f = a[1].toWireType(x, this);
|
|
1075
1080
|
v[1] = f;
|
|
1076
1081
|
}
|
|
1077
|
-
for (var r = 0; r <
|
|
1082
|
+
for (var r = 0; r < l; ++r) {
|
|
1078
1083
|
t[r] = a[r + 2].toWireType(x, arguments[r]), v.push(t[r]);
|
|
1079
1084
|
}
|
|
1080
1085
|
r = d.apply(null, v);
|
|
1081
|
-
if (
|
|
1086
|
+
if (k) {
|
|
1082
1087
|
Eb(x);
|
|
1083
1088
|
} else {
|
|
1084
1089
|
for (var q = m ? 1 : 2; q < a.length; q++) {
|
|
@@ -1361,7 +1366,7 @@ var Ic = (b, a, c, d) => {
|
|
|
1361
1366
|
0 === (G = q(f.getFullYear() - r.getFullYear())) && 0 === (G = q(f.getMonth() - r.getMonth())) && (G = q(f.getDate() - r.getDate()));
|
|
1362
1367
|
return G;
|
|
1363
1368
|
}
|
|
1364
|
-
function
|
|
1369
|
+
function k(f) {
|
|
1365
1370
|
switch(f.getDay()) {
|
|
1366
1371
|
case 0:
|
|
1367
1372
|
return new Date(f.getFullYear() - 1, 11, 29);
|
|
@@ -1391,19 +1396,19 @@ var Ic = (b, a, c, d) => {
|
|
|
1391
1396
|
}
|
|
1392
1397
|
}
|
|
1393
1398
|
q = new Date(f.getFullYear() + 1, 0, 4);
|
|
1394
|
-
r =
|
|
1395
|
-
q =
|
|
1399
|
+
r = k(new Date(f.getFullYear(), 0, 4));
|
|
1400
|
+
q = k(q);
|
|
1396
1401
|
return 0 >= m(r, f) ? 0 >= m(q, f) ? f.getFullYear() + 1 : f.getFullYear() : f.getFullYear() - 1;
|
|
1397
1402
|
}
|
|
1398
|
-
var
|
|
1399
|
-
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:
|
|
1403
|
+
var l = M[d + 40 >> 2];
|
|
1404
|
+
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) : "" : ""};
|
|
1400
1405
|
c = c ? lc(L, c) : "";
|
|
1401
|
-
|
|
1402
|
-
for (var t in
|
|
1403
|
-
c = c.replace(new RegExp(t, "g"),
|
|
1406
|
+
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",};
|
|
1407
|
+
for (var t in l) {
|
|
1408
|
+
c = c.replace(new RegExp(t, "g"), l[t]);
|
|
1404
1409
|
}
|
|
1405
1410
|
var v = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), x = "January February March April May June July August September October November December".split(" ");
|
|
1406
|
-
|
|
1411
|
+
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 => {
|
|
1407
1412
|
f = f.Z;
|
|
1408
1413
|
0 == f ? f = 12 : 12 < f && (f -= 12);
|
|
1409
1414
|
return g(f, 2);
|
|
@@ -1429,8 +1434,8 @@ var Ic = (b, a, c, d) => {
|
|
|
1429
1434
|
return (r ? "+" : "-") + String("0000" + (f / 60 * 100 + f % 60)).slice(-4);
|
|
1430
1435
|
}, "%Z":f => f.rb, "%%":() => "%"};
|
|
1431
1436
|
c = c.replace(/%%/g, "\x00\x00");
|
|
1432
|
-
for (t in
|
|
1433
|
-
c.includes(t) && (c = c.replace(new RegExp(t, "g"),
|
|
1437
|
+
for (t in l) {
|
|
1438
|
+
c.includes(t) && (c = c.replace(new RegExp(t, "g"), l[t](d)));
|
|
1434
1439
|
}
|
|
1435
1440
|
c = c.replace(/\0\0/g, "%");
|
|
1436
1441
|
t = Hc(c);
|
|
@@ -1579,11 +1584,11 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1579
1584
|
b = U(b);
|
|
1580
1585
|
a = nb(a, "wrapper");
|
|
1581
1586
|
c = S(c);
|
|
1582
|
-
var d = [].slice, e = a.h, g = e.B, m = e.l.B,
|
|
1587
|
+
var d = [].slice, e = a.h, g = e.B, m = e.l.B, k = e.l.constructor;
|
|
1583
1588
|
b = Ya(b, function() {
|
|
1584
|
-
e.l.ya.forEach(function(
|
|
1585
|
-
if (this[
|
|
1586
|
-
throw new cb(`Pure virtual function ${
|
|
1589
|
+
e.l.ya.forEach(function(l) {
|
|
1590
|
+
if (this[l] === m[l]) {
|
|
1591
|
+
throw new cb(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
1587
1592
|
}
|
|
1588
1593
|
}.bind(this));
|
|
1589
1594
|
Object.defineProperty(this, "__parent", {value:g});
|
|
@@ -1591,23 +1596,23 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1591
1596
|
});
|
|
1592
1597
|
g.__construct = function() {
|
|
1593
1598
|
this === g && R("Pass correct 'this' to __construct");
|
|
1594
|
-
var
|
|
1595
|
-
ob(
|
|
1596
|
-
var t =
|
|
1597
|
-
|
|
1599
|
+
var l = k.implement.apply(void 0, [this].concat(d.call(arguments)));
|
|
1600
|
+
ob(l);
|
|
1601
|
+
var t = l.g;
|
|
1602
|
+
l.notifyOnDestruction();
|
|
1598
1603
|
t.O = !0;
|
|
1599
1604
|
Object.defineProperties(this, {g:{value:t}});
|
|
1600
1605
|
Cb(this);
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
hb.hasOwnProperty(
|
|
1606
|
+
l = t.i;
|
|
1607
|
+
l = ib(e, l);
|
|
1608
|
+
hb.hasOwnProperty(l) ? R(`Tried to register registered instance: ${l}`) : hb[l] = this;
|
|
1604
1609
|
};
|
|
1605
1610
|
g.__destruct = function() {
|
|
1606
1611
|
this === g && R("Pass correct 'this' to __destruct");
|
|
1607
1612
|
ob(this);
|
|
1608
|
-
var
|
|
1609
|
-
|
|
1610
|
-
hb.hasOwnProperty(
|
|
1613
|
+
var l = this.g.i;
|
|
1614
|
+
l = ib(e, l);
|
|
1615
|
+
hb.hasOwnProperty(l) ? delete hb[l] : R(`Tried to unregister unregistered instance: ${l}`);
|
|
1611
1616
|
};
|
|
1612
1617
|
b.prototype = Object.create(g);
|
|
1613
1618
|
for (var n in c) {
|
|
@@ -1619,31 +1624,31 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1619
1624
|
delete Db[b];
|
|
1620
1625
|
var c = a.fa, d = a.H, e = a.sa, g = e.map(m => m.Ya).concat(e.map(m => m.lb));
|
|
1621
1626
|
V([b], g, m => {
|
|
1622
|
-
var
|
|
1623
|
-
e.forEach((n,
|
|
1624
|
-
var t = m[
|
|
1625
|
-
|
|
1627
|
+
var k = {};
|
|
1628
|
+
e.forEach((n, l) => {
|
|
1629
|
+
var t = m[l], v = n.Wa, x = n.Xa, f = m[l + e.length], r = n.kb, q = n.mb;
|
|
1630
|
+
k[n.Sa] = {read:G => t.fromWireType(v(x, G)), write:(G, D) => {
|
|
1626
1631
|
var u = [];
|
|
1627
1632
|
r(q, G, f.toWireType(u, D));
|
|
1628
1633
|
Eb(u);
|
|
1629
1634
|
}};
|
|
1630
1635
|
});
|
|
1631
1636
|
return [{name:a.name, fromWireType:function(n) {
|
|
1632
|
-
var
|
|
1633
|
-
for (t in
|
|
1634
|
-
|
|
1637
|
+
var l = {}, t;
|
|
1638
|
+
for (t in k) {
|
|
1639
|
+
l[t] = k[t].read(n);
|
|
1635
1640
|
}
|
|
1636
1641
|
d(n);
|
|
1637
|
-
return
|
|
1638
|
-
}, toWireType:function(n,
|
|
1639
|
-
for (var t in
|
|
1640
|
-
if (!(t in
|
|
1642
|
+
return l;
|
|
1643
|
+
}, toWireType:function(n, l) {
|
|
1644
|
+
for (var t in k) {
|
|
1645
|
+
if (!(t in l)) {
|
|
1641
1646
|
throw new TypeError(`Missing field: "${t}"`);
|
|
1642
1647
|
}
|
|
1643
1648
|
}
|
|
1644
1649
|
var v = c();
|
|
1645
|
-
for (t in
|
|
1646
|
-
|
|
1650
|
+
for (t in k) {
|
|
1651
|
+
k[t].write(v, l[t]);
|
|
1647
1652
|
}
|
|
1648
1653
|
null !== n && n.push(d, v);
|
|
1649
1654
|
return v;
|
|
@@ -1655,25 +1660,25 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1655
1660
|
a = U(a);
|
|
1656
1661
|
Ib(b, {name:a, fromWireType:function(m) {
|
|
1657
1662
|
return !!m;
|
|
1658
|
-
}, toWireType:function(m,
|
|
1659
|
-
return
|
|
1663
|
+
}, toWireType:function(m, k) {
|
|
1664
|
+
return k ? d : e;
|
|
1660
1665
|
}, argPackAdvance:8, readValueFromPointer:function(m) {
|
|
1661
1666
|
if (1 === c) {
|
|
1662
|
-
var
|
|
1667
|
+
var k = Ba;
|
|
1663
1668
|
} else if (2 === c) {
|
|
1664
|
-
|
|
1669
|
+
k = Ca;
|
|
1665
1670
|
} else if (4 === c) {
|
|
1666
|
-
|
|
1671
|
+
k = M;
|
|
1667
1672
|
} else {
|
|
1668
1673
|
throw new TypeError("Unknown boolean type size: " + a);
|
|
1669
1674
|
}
|
|
1670
|
-
return this.fromWireType(
|
|
1675
|
+
return this.fromWireType(k[m >> g]);
|
|
1671
1676
|
}, v:null,});
|
|
1672
|
-
}, _embind_register_class:function(b, a, c, d, e, g, m,
|
|
1677
|
+
}, _embind_register_class:function(b, a, c, d, e, g, m, k, n, l, t, v, x) {
|
|
1673
1678
|
t = U(t);
|
|
1674
1679
|
g = Z(e, g);
|
|
1675
|
-
|
|
1676
|
-
|
|
1680
|
+
k && (k = Z(m, k));
|
|
1681
|
+
l && (l = Z(n, l));
|
|
1677
1682
|
x = Z(v, x);
|
|
1678
1683
|
var f = Xa(t);
|
|
1679
1684
|
Ob(f, function() {
|
|
@@ -1702,7 +1707,7 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1702
1707
|
});
|
|
1703
1708
|
var D = Object.create(G, {constructor:{value:r},});
|
|
1704
1709
|
r.prototype = D;
|
|
1705
|
-
var u = new Pb(t, r, D, x, q, g,
|
|
1710
|
+
var u = new Pb(t, r, D, x, q, g, k, l);
|
|
1706
1711
|
u.l && (void 0 === u.l.T && (u.l.T = []), u.l.T.push(u));
|
|
1707
1712
|
q = new Vb(t, u, !0, !1);
|
|
1708
1713
|
G = new Vb(t + "*", u, !1, !1);
|
|
@@ -1712,19 +1717,19 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1712
1717
|
return [q, G, I];
|
|
1713
1718
|
});
|
|
1714
1719
|
}, _embind_register_class_class_function:function(b, a, c, d, e, g, m) {
|
|
1715
|
-
var
|
|
1720
|
+
var k = cc(c, d);
|
|
1716
1721
|
a = U(a);
|
|
1717
1722
|
g = Z(e, g);
|
|
1718
1723
|
V([], [b], function(n) {
|
|
1719
|
-
function
|
|
1720
|
-
ac(`Cannot call ${t} due to unbound types`,
|
|
1724
|
+
function l() {
|
|
1725
|
+
ac(`Cannot call ${t} due to unbound types`, k);
|
|
1721
1726
|
}
|
|
1722
1727
|
n = n[0];
|
|
1723
1728
|
var t = `${n.name}.${a}`;
|
|
1724
1729
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1725
1730
|
var v = n.h.constructor;
|
|
1726
|
-
void 0 === v[a] ? (
|
|
1727
|
-
V([],
|
|
1731
|
+
void 0 === v[a] ? (l.L = c - 1, v[a] = l) : (Nb(v, a, t), v[a].m[c - 1] = l);
|
|
1732
|
+
V([], k, function(x) {
|
|
1728
1733
|
x = bc(t, [x[0], null].concat(x.slice(1)), null, g, m);
|
|
1729
1734
|
void 0 === v[a].m ? (x.L = c - 1, v[a] = x) : v[a].m[c - 1] = x;
|
|
1730
1735
|
if (n.h.T) {
|
|
@@ -1736,18 +1741,18 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1736
1741
|
});
|
|
1737
1742
|
return [];
|
|
1738
1743
|
});
|
|
1739
|
-
}, _embind_register_class_class_property:function(b, a, c, d, e, g, m,
|
|
1744
|
+
}, _embind_register_class_class_property:function(b, a, c, d, e, g, m, k) {
|
|
1740
1745
|
a = U(a);
|
|
1741
1746
|
g = Z(e, g);
|
|
1742
1747
|
V([], [b], function(n) {
|
|
1743
1748
|
n = n[0];
|
|
1744
|
-
var
|
|
1745
|
-
ac(`Cannot access ${
|
|
1749
|
+
var l = `${n.name}.${a}`, t = {get() {
|
|
1750
|
+
ac(`Cannot access ${l} due to unbound types`, [c]);
|
|
1746
1751
|
}, enumerable:!0, configurable:!0};
|
|
1747
|
-
t.set =
|
|
1748
|
-
ac(`Cannot access ${
|
|
1752
|
+
t.set = k ? () => {
|
|
1753
|
+
ac(`Cannot access ${l} due to unbound types`, [c]);
|
|
1749
1754
|
} : () => {
|
|
1750
|
-
R(`${
|
|
1755
|
+
R(`${l} is a read-only property`);
|
|
1751
1756
|
};
|
|
1752
1757
|
Object.defineProperty(n.h.constructor, a, t);
|
|
1753
1758
|
V([], [c], function(v) {
|
|
@@ -1755,9 +1760,9 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1755
1760
|
var x = {get() {
|
|
1756
1761
|
return v.fromWireType(g(d));
|
|
1757
1762
|
}, enumerable:!0};
|
|
1758
|
-
|
|
1763
|
+
k && (k = Z(m, k), x.set = f => {
|
|
1759
1764
|
var r = [];
|
|
1760
|
-
|
|
1765
|
+
k(d, v.toWireType(r, f));
|
|
1761
1766
|
Eb(r);
|
|
1762
1767
|
});
|
|
1763
1768
|
Object.defineProperty(n.h.constructor, a, x);
|
|
@@ -1768,45 +1773,45 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1768
1773
|
}, _embind_register_class_constructor:function(b, a, c, d, e, g) {
|
|
1769
1774
|
var m = cc(a, c);
|
|
1770
1775
|
e = Z(d, e);
|
|
1771
|
-
V([], [b], function(
|
|
1772
|
-
|
|
1773
|
-
var n = `constructor ${
|
|
1774
|
-
void 0 ===
|
|
1775
|
-
if (void 0 !==
|
|
1776
|
-
throw new $a(`Cannot register multiple constructors with identical number of parameters (${a - 1}) for class '${
|
|
1776
|
+
V([], [b], function(k) {
|
|
1777
|
+
k = k[0];
|
|
1778
|
+
var n = `constructor ${k.name}`;
|
|
1779
|
+
void 0 === k.h.I && (k.h.I = []);
|
|
1780
|
+
if (void 0 !== k.h.I[a - 1]) {
|
|
1781
|
+
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!`);
|
|
1777
1782
|
}
|
|
1778
|
-
|
|
1779
|
-
ac(`Cannot construct ${
|
|
1783
|
+
k.h.I[a - 1] = () => {
|
|
1784
|
+
ac(`Cannot construct ${k.name} due to unbound types`, m);
|
|
1780
1785
|
};
|
|
1781
|
-
V([], m, function(
|
|
1782
|
-
|
|
1783
|
-
|
|
1786
|
+
V([], m, function(l) {
|
|
1787
|
+
l.splice(1, 0, null);
|
|
1788
|
+
k.h.I[a - 1] = bc(n, l, null, e, g);
|
|
1784
1789
|
return [];
|
|
1785
1790
|
});
|
|
1786
1791
|
return [];
|
|
1787
1792
|
});
|
|
1788
|
-
}, _embind_register_class_function:function(b, a, c, d, e, g, m,
|
|
1793
|
+
}, _embind_register_class_function:function(b, a, c, d, e, g, m, k) {
|
|
1789
1794
|
var n = cc(c, d);
|
|
1790
1795
|
a = U(a);
|
|
1791
1796
|
g = Z(e, g);
|
|
1792
|
-
V([], [b], function(
|
|
1797
|
+
V([], [b], function(l) {
|
|
1793
1798
|
function t() {
|
|
1794
1799
|
ac(`Cannot call ${v} due to unbound types`, n);
|
|
1795
1800
|
}
|
|
1796
|
-
|
|
1797
|
-
var v = `${
|
|
1801
|
+
l = l[0];
|
|
1802
|
+
var v = `${l.name}.${a}`;
|
|
1798
1803
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1799
|
-
|
|
1800
|
-
var x =
|
|
1801
|
-
void 0 === f || void 0 === f.m && f.className !==
|
|
1804
|
+
k && l.h.ya.push(a);
|
|
1805
|
+
var x = l.h.B, f = x[a];
|
|
1806
|
+
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);
|
|
1802
1807
|
V([], n, function(r) {
|
|
1803
|
-
r = bc(v, r,
|
|
1808
|
+
r = bc(v, r, l, g, m);
|
|
1804
1809
|
void 0 === x[a].m ? (r.L = c - 2, x[a] = r) : x[a].m[c - 2] = r;
|
|
1805
1810
|
return [];
|
|
1806
1811
|
});
|
|
1807
1812
|
return [];
|
|
1808
1813
|
});
|
|
1809
|
-
}, _embind_register_class_property:function(b, a, c, d, e, g, m,
|
|
1814
|
+
}, _embind_register_class_property:function(b, a, c, d, e, g, m, k, n, l) {
|
|
1810
1815
|
a = U(a);
|
|
1811
1816
|
e = Z(d, e);
|
|
1812
1817
|
V([], [b], function(t) {
|
|
@@ -1826,11 +1831,11 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1826
1831
|
return r.fromWireType(e(g, D));
|
|
1827
1832
|
}, enumerable:!0};
|
|
1828
1833
|
if (n) {
|
|
1829
|
-
n = Z(
|
|
1834
|
+
n = Z(k, n);
|
|
1830
1835
|
var G = f[1];
|
|
1831
1836
|
q.set = function(D) {
|
|
1832
1837
|
var u = dc(this, t, v + " setter"), I = [];
|
|
1833
|
-
n(
|
|
1838
|
+
n(l, u, G.toWireType(I, D));
|
|
1834
1839
|
Eb(I);
|
|
1835
1840
|
};
|
|
1836
1841
|
}
|
|
@@ -1883,22 +1888,22 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1883
1888
|
Ob(b, function() {
|
|
1884
1889
|
ac(`Cannot call ${b} due to unbound types`, m);
|
|
1885
1890
|
}, a - 1);
|
|
1886
|
-
V([], m, function(
|
|
1887
|
-
Wb(b, bc(b, [
|
|
1891
|
+
V([], m, function(k) {
|
|
1892
|
+
Wb(b, bc(b, [k[0], null].concat(k.slice(1)), null, e, g), a - 1);
|
|
1888
1893
|
return [];
|
|
1889
1894
|
});
|
|
1890
1895
|
}, _embind_register_integer:function(b, a, c, d, e) {
|
|
1891
1896
|
a = U(a);
|
|
1892
1897
|
-1 === e && (e = 4294967295);
|
|
1893
1898
|
e = Jb(c);
|
|
1894
|
-
var g =
|
|
1899
|
+
var g = k => k;
|
|
1895
1900
|
if (0 === d) {
|
|
1896
1901
|
var m = 32 - 8 * c;
|
|
1897
|
-
g =
|
|
1902
|
+
g = k => k << m >>> m;
|
|
1898
1903
|
}
|
|
1899
|
-
c = a.includes("unsigned") ? function(
|
|
1904
|
+
c = a.includes("unsigned") ? function(k, n) {
|
|
1900
1905
|
return n >>> 0;
|
|
1901
|
-
} : function(
|
|
1906
|
+
} : function(k, n) {
|
|
1902
1907
|
return n;
|
|
1903
1908
|
};
|
|
1904
1909
|
Ib(b, {name:a, fromWireType:g, toWireType:c, argPackAdvance:8, readValueFromPointer:hc(a, e, 0 !== d), v:null,});
|
|
@@ -1917,42 +1922,42 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1917
1922
|
Ib(b, {name:a, fromWireType:function(d) {
|
|
1918
1923
|
var e = P[d >> 2], g = d + 4;
|
|
1919
1924
|
if (c) {
|
|
1920
|
-
for (var m = g,
|
|
1921
|
-
var n = g +
|
|
1922
|
-
if (
|
|
1925
|
+
for (var m = g, k = 0; k <= e; ++k) {
|
|
1926
|
+
var n = g + k;
|
|
1927
|
+
if (k == e || 0 == L[n]) {
|
|
1923
1928
|
m = m ? lc(L, m, n - m) : "";
|
|
1924
|
-
if (void 0 ===
|
|
1925
|
-
var
|
|
1929
|
+
if (void 0 === l) {
|
|
1930
|
+
var l = m;
|
|
1926
1931
|
} else {
|
|
1927
|
-
|
|
1932
|
+
l += String.fromCharCode(0), l += m;
|
|
1928
1933
|
}
|
|
1929
1934
|
m = n + 1;
|
|
1930
1935
|
}
|
|
1931
1936
|
}
|
|
1932
1937
|
} else {
|
|
1933
|
-
|
|
1934
|
-
for (
|
|
1935
|
-
k
|
|
1938
|
+
l = Array(e);
|
|
1939
|
+
for (k = 0; k < e; ++k) {
|
|
1940
|
+
l[k] = String.fromCharCode(L[g + k]);
|
|
1936
1941
|
}
|
|
1937
|
-
|
|
1942
|
+
l = l.join("");
|
|
1938
1943
|
}
|
|
1939
1944
|
mb(d);
|
|
1940
|
-
return
|
|
1945
|
+
return l;
|
|
1941
1946
|
}, toWireType:function(d, e) {
|
|
1942
1947
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
1943
1948
|
var g = "string" == typeof e;
|
|
1944
1949
|
g || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || R("Cannot pass non-string to std::string");
|
|
1945
1950
|
var m = c && g ? jc(e) : e.length;
|
|
1946
|
-
var
|
|
1947
|
-
P[
|
|
1951
|
+
var k = Lc(4 + m + 1), n = k + 4;
|
|
1952
|
+
P[k >> 2] = m;
|
|
1948
1953
|
if (c && g) {
|
|
1949
1954
|
ic(e, L, n, m + 1);
|
|
1950
1955
|
} else {
|
|
1951
1956
|
if (g) {
|
|
1952
1957
|
for (g = 0; g < m; ++g) {
|
|
1953
|
-
var
|
|
1954
|
-
255 <
|
|
1955
|
-
L[n + g] =
|
|
1958
|
+
var l = e.charCodeAt(g);
|
|
1959
|
+
255 < l && (mb(n), R("String has UTF-16 code units that do not fit in 8 bits"));
|
|
1960
|
+
L[n + g] = l;
|
|
1956
1961
|
}
|
|
1957
1962
|
} else {
|
|
1958
1963
|
for (g = 0; g < m; ++g) {
|
|
@@ -1960,8 +1965,8 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1960
1965
|
}
|
|
1961
1966
|
}
|
|
1962
1967
|
}
|
|
1963
|
-
null !== d && d.push(mb,
|
|
1964
|
-
return
|
|
1968
|
+
null !== d && d.push(mb, k);
|
|
1969
|
+
return k;
|
|
1965
1970
|
}, argPackAdvance:8, readValueFromPointer:Fb, v:function(d) {
|
|
1966
1971
|
mb(d);
|
|
1967
1972
|
},});
|
|
@@ -1972,24 +1977,24 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1972
1977
|
var e = pc;
|
|
1973
1978
|
var g = qc;
|
|
1974
1979
|
var m = () => Da;
|
|
1975
|
-
var
|
|
1980
|
+
var k = 1;
|
|
1976
1981
|
} else {
|
|
1977
|
-
4 === a && (d = rc, e = sc, g = tc, m = () => P,
|
|
1982
|
+
4 === a && (d = rc, e = sc, g = tc, m = () => P, k = 2);
|
|
1978
1983
|
}
|
|
1979
1984
|
Ib(b, {name:c, fromWireType:function(n) {
|
|
1980
|
-
for (var
|
|
1985
|
+
for (var l = P[n >> 2], t = m(), v, x = n + 4, f = 0; f <= l; ++f) {
|
|
1981
1986
|
var r = n + 4 + f * a;
|
|
1982
|
-
if (f ==
|
|
1987
|
+
if (f == l || 0 == t[r >> k]) {
|
|
1983
1988
|
x = d(x, r - x), void 0 === v ? v = x : (v += String.fromCharCode(0), v += x), x = r + a;
|
|
1984
1989
|
}
|
|
1985
1990
|
}
|
|
1986
1991
|
mb(n);
|
|
1987
1992
|
return v;
|
|
1988
|
-
}, toWireType:function(n,
|
|
1989
|
-
"string" != typeof
|
|
1990
|
-
var t = g(
|
|
1991
|
-
P[v >> 2] = t >>
|
|
1992
|
-
e(
|
|
1993
|
+
}, toWireType:function(n, l) {
|
|
1994
|
+
"string" != typeof l && R(`Cannot pass non-string to C++ string type ${c}`);
|
|
1995
|
+
var t = g(l), v = Lc(4 + t + a);
|
|
1996
|
+
P[v >> 2] = t >> k;
|
|
1997
|
+
e(l, v + 4, t + a);
|
|
1993
1998
|
null !== n && n.push(mb, v);
|
|
1994
1999
|
return v;
|
|
1995
2000
|
}, argPackAdvance:8, readValueFromPointer:Fb, v:function(n) {
|
|
@@ -1997,8 +2002,8 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1997
2002
|
},});
|
|
1998
2003
|
}, _embind_register_value_object:function(b, a, c, d, e, g) {
|
|
1999
2004
|
Db[b] = {name:U(a), fa:Z(c, d), H:Z(e, g), sa:[],};
|
|
2000
|
-
}, _embind_register_value_object_field:function(b, a, c, d, e, g, m,
|
|
2001
|
-
Db[b].sa.push({Sa:U(a), Ya:c, Wa:Z(d, e), Xa:g, lb:m, kb:Z(
|
|
2005
|
+
}, _embind_register_value_object_field:function(b, a, c, d, e, g, m, k, n, l) {
|
|
2006
|
+
Db[b].sa.push({Sa:U(a), Ya:c, Wa:Z(d, e), Xa:g, lb:m, kb:Z(k, n), mb:l,});
|
|
2002
2007
|
}, _embind_register_void:function(b, a) {
|
|
2003
2008
|
a = U(a);
|
|
2004
2009
|
Ib(b, {cb:!0, name:a, argPackAdvance:0, fromWireType:function() {
|
|
@@ -2032,11 +2037,11 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2032
2037
|
return e;
|
|
2033
2038
|
}
|
|
2034
2039
|
var g = Array(b - 1);
|
|
2035
|
-
e = xc((m,
|
|
2040
|
+
e = xc((m, k, n, l) => {
|
|
2036
2041
|
for (var t = 0, v = 0; v < b - 1; ++v) {
|
|
2037
|
-
g[v] = c[v + 1].readValueFromPointer(
|
|
2042
|
+
g[v] = c[v + 1].readValueFromPointer(l + t), t += c[v + 1].argPackAdvance;
|
|
2038
2043
|
}
|
|
2039
|
-
m = m[
|
|
2044
|
+
m = m[k].apply(m, g);
|
|
2040
2045
|
for (v = 0; v < b - 1; ++v) {
|
|
2041
2046
|
c[v + 1].Na && c[v + 1].Na(g[v]);
|
|
2042
2047
|
}
|
|
@@ -2125,13 +2130,13 @@ var Mc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2125
2130
|
return 70;
|
|
2126
2131
|
}, fd_write:(b, a, c, d) => {
|
|
2127
2132
|
for (var e = 0, g = 0; g < c; g++) {
|
|
2128
|
-
var m = P[a >> 2],
|
|
2133
|
+
var m = P[a >> 2], k = P[a + 4 >> 2];
|
|
2129
2134
|
a += 8;
|
|
2130
|
-
for (var n = 0; n <
|
|
2131
|
-
var
|
|
2132
|
-
0 ===
|
|
2135
|
+
for (var n = 0; n < k; n++) {
|
|
2136
|
+
var l = L[m + n], t = Dc[b];
|
|
2137
|
+
0 === l || 10 === l ? ((1 === b ? ta : ua)(lc(t, 0)), t.length = 0) : t.push(l);
|
|
2133
2138
|
}
|
|
2134
|
-
e +=
|
|
2139
|
+
e += k;
|
|
2135
2140
|
}
|
|
2136
2141
|
P[d >> 2] = e;
|
|
2137
2142
|
return 0;
|
|
@@ -2172,8 +2177,8 @@ h.__embind_initialize_bindings = () => (h.__embind_initialize_bindings = J._embi
|
|
|
2172
2177
|
h.dynCall_jiji = (b, a, c, d, e) => (h.dynCall_jiji = J.dynCall_jiji)(b, a, c, d, e);
|
|
2173
2178
|
h.dynCall_viijii = (b, a, c, d, e, g, m) => (h.dynCall_viijii = J.dynCall_viijii)(b, a, c, d, e, g, m);
|
|
2174
2179
|
h.dynCall_iiiiij = (b, a, c, d, e, g, m) => (h.dynCall_iiiiij = J.dynCall_iiiiij)(b, a, c, d, e, g, m);
|
|
2175
|
-
h.dynCall_iiiiijj = (b, a, c, d, e, g, m,
|
|
2176
|
-
h.dynCall_iiiiiijj = (b, a, c, d, e, g, m,
|
|
2180
|
+
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);
|
|
2181
|
+
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);
|
|
2177
2182
|
var Nc;
|
|
2178
2183
|
Oa = function Oc() {
|
|
2179
2184
|
Nc || Pc();
|
package/package.json
CHANGED
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -29,7 +29,8 @@ export interface RiveCanvas {
|
|
|
29
29
|
RenderPaintStyle: typeof RenderPaintStyle;
|
|
30
30
|
StrokeCap: typeof StrokeCap;
|
|
31
31
|
StrokeJoin: typeof StrokeJoin;
|
|
32
|
-
|
|
32
|
+
decodeAudio: DecodeAudio;
|
|
33
|
+
decodeImage: DecodeImage;
|
|
33
34
|
decodeFont: DecodeFont;
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -92,7 +93,7 @@ export interface RiveCanvas {
|
|
|
92
93
|
cancelAnimationFrame(requestID: number): void;
|
|
93
94
|
/**
|
|
94
95
|
* A Rive-specific function to "flush" queued up draw calls from using the renderer.
|
|
95
|
-
*
|
|
96
|
+
*
|
|
96
97
|
* This should only be invoked once at the end of a loop in a regular JS
|
|
97
98
|
* requestAnimationFrame loop, and should not be used with the Rive-wrapped
|
|
98
99
|
* requestAnimationFrame (aka, the requestAnimationFrame() API on this object) as that
|
|
@@ -269,6 +270,15 @@ export interface CanvasRenderFactory {
|
|
|
269
270
|
makeRenderPath(): CanvasRenderPath;
|
|
270
271
|
}
|
|
271
272
|
|
|
273
|
+
export class Audio {
|
|
274
|
+
unref(): void;
|
|
275
|
+
}
|
|
276
|
+
export interface AudioCallback {
|
|
277
|
+
(audio: Audio): void;
|
|
278
|
+
}
|
|
279
|
+
export interface DecodeAudio {
|
|
280
|
+
(bytes: Uint8Array, callback: AudioCallback): void;
|
|
281
|
+
}
|
|
272
282
|
export class Image {
|
|
273
283
|
unref(): void;
|
|
274
284
|
}
|
|
@@ -896,13 +906,25 @@ export declare class Vec2D {
|
|
|
896
906
|
export declare class FileAsset {
|
|
897
907
|
name: string;
|
|
898
908
|
fileExtension: string;
|
|
909
|
+
uniqueFilename: string;
|
|
910
|
+
isAudio: boolean;
|
|
899
911
|
isImage: boolean;
|
|
900
912
|
isFont: boolean;
|
|
901
913
|
cdnUuid: string;
|
|
914
|
+
|
|
915
|
+
decode(bytes: Uint8Array): void;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Rive class extending the FileAsset that exposes a `setAudioSource()` API with a
|
|
920
|
+
* decoded Audio (via the `decodeAudio()` API) to set a new Audio on the Rive FileAsset
|
|
921
|
+
*/
|
|
922
|
+
export declare class AudioAsset extends FileAsset {
|
|
923
|
+
setAudioSource(audio: Audio): void;
|
|
902
924
|
}
|
|
903
925
|
|
|
904
926
|
/**
|
|
905
|
-
* Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
|
|
927
|
+
* Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
|
|
906
928
|
* decoded Image (via the `decodeImage()` API) to set a new Image on the Rive FileAsset
|
|
907
929
|
*/
|
|
908
930
|
export declare class ImageAsset extends FileAsset {
|
|
@@ -910,7 +932,7 @@ export declare class ImageAsset extends FileAsset {
|
|
|
910
932
|
}
|
|
911
933
|
|
|
912
934
|
/**
|
|
913
|
-
* Rive class extending the FileAsset that exposes a `setFont()` API with a
|
|
935
|
+
* Rive class extending the FileAsset that exposes a `setFont()` API with a
|
|
914
936
|
* decoded Font (via the `decodeFont()` API) to set a new Font on the Rive FileAsset
|
|
915
937
|
*/
|
|
916
938
|
export declare class FontAsset extends FileAsset {
|