@rive-app/canvas-advanced 2.27.2 → 2.27.4
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 +88 -86
- package/package.json +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +4 -0
- package/rive_fallback.wasm +0 -0
package/canvas_advanced.mjs
CHANGED
|
@@ -22,7 +22,7 @@ function fa() {
|
|
|
22
22
|
console.error(l);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
this.
|
|
25
|
+
this.pb();
|
|
26
26
|
e && e.Tb();
|
|
27
27
|
}
|
|
28
28
|
let b = 0, c = 0, d = new Map(), e = null, f = null;
|
|
@@ -53,7 +53,7 @@ function fa() {
|
|
|
53
53
|
f && (document.body.remove(f), f = null);
|
|
54
54
|
e = null;
|
|
55
55
|
};
|
|
56
|
-
this.
|
|
56
|
+
this.pb = function() {
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function ha(a) {
|
|
@@ -119,11 +119,11 @@ m.onRuntimeInitialized = function() {
|
|
|
119
119
|
},});
|
|
120
120
|
m.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
121
121
|
this.__parent.__construct.call(this);
|
|
122
|
-
this.
|
|
122
|
+
this.lb = [];
|
|
123
123
|
}, addLoader:function(e) {
|
|
124
|
-
this.
|
|
124
|
+
this.lb.push(e);
|
|
125
125
|
}, loadContents:function(e, f) {
|
|
126
|
-
for (let g of this.
|
|
126
|
+
for (let g of this.lb) {
|
|
127
127
|
if (g.loadContents(e, f)) {
|
|
128
128
|
return !0;
|
|
129
129
|
}
|
|
@@ -245,12 +245,12 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
245
245
|
b.clearColor(0, 0, 0, 0);
|
|
246
246
|
b.clear(b.COLOR_BUFFER_BIT);
|
|
247
247
|
b.enable(b.SCISSOR_TEST);
|
|
248
|
-
r.sort((H, ca) => ca.
|
|
248
|
+
r.sort((H, ca) => ca.xb - H.xb);
|
|
249
249
|
w = v.push(B);
|
|
250
250
|
g != w && (b.bufferData(b.ARRAY_BUFFER, 8 * w, b.DYNAMIC_DRAW), g = w);
|
|
251
251
|
w = 0;
|
|
252
252
|
for (var T of r) {
|
|
253
|
-
b.bufferSubData(b.ARRAY_BUFFER, w, T.
|
|
253
|
+
b.bufferSubData(b.ARRAY_BUFFER, w, T.Ua), w += 4 * T.Ua.length;
|
|
254
254
|
}
|
|
255
255
|
console.assert(w == 4 * B);
|
|
256
256
|
for (var da of r) {
|
|
@@ -269,15 +269,15 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
269
269
|
w = T = 0;
|
|
270
270
|
for (const H of r) {
|
|
271
271
|
H.image.Ka != ra && (b.bindTexture(b.TEXTURE_2D, H.image.Ja || null), ra = H.image.Ka);
|
|
272
|
-
H.mc ? (b.scissor(H.
|
|
272
|
+
H.mc ? (b.scissor(H.Za, M - H.$a - H.kb, H.Ac, H.kb), da = !0) : da && (b.scissor(0, M - t, k, t), da = !1);
|
|
273
273
|
r = 2 / k;
|
|
274
274
|
const ca = -2 / t;
|
|
275
275
|
b.uniform4f(e, H.ha[0] * r * H.Ba, H.ha[1] * ca * H.Ca, H.ha[2] * r * H.Ba, H.ha[3] * ca * H.Ca);
|
|
276
|
-
b.uniform2f(f, H.ha[4] * r * H.Ba + r * (H.
|
|
276
|
+
b.uniform2f(f, H.ha[4] * r * H.Ba + r * (H.Za - H.ic * H.Ba) - 1, H.ha[5] * ca * H.Ca + ca * (H.$a - H.jc * H.Ca) + 1);
|
|
277
277
|
b.vertexAttribPointer(0, 2, b.FLOAT, !1, 0, w);
|
|
278
278
|
b.vertexAttribPointer(1, 2, b.FLOAT, !1, 0, w + 4 * B);
|
|
279
279
|
b.drawElements(b.TRIANGLES, H.indices.length, b.UNSIGNED_SHORT, T);
|
|
280
|
-
w += 4 * H.
|
|
280
|
+
w += 4 * H.Ua.length;
|
|
281
281
|
T += 2 * H.indices.length;
|
|
282
282
|
}
|
|
283
283
|
console.assert(w == 4 * B);
|
|
@@ -350,20 +350,20 @@ m.onRuntimeInitialized = function() {
|
|
|
350
350
|
this.la = q;
|
|
351
351
|
this.xa = y;
|
|
352
352
|
}, __destruct:function() {
|
|
353
|
-
this.Ja && (ka.Mb(this.Ja), URL.revokeObjectURL(this.
|
|
353
|
+
this.Ja && (ka.Mb(this.Ja), URL.revokeObjectURL(this.Xa));
|
|
354
354
|
this.__parent.__destruct.call(this);
|
|
355
355
|
}, decode:function(q) {
|
|
356
356
|
var y = this;
|
|
357
357
|
y.xa && y.xa(y);
|
|
358
358
|
var F = new Image();
|
|
359
|
-
y.
|
|
359
|
+
y.Xa = URL.createObjectURL(new Blob([q], {type:"image/png",}));
|
|
360
360
|
F.onload = function() {
|
|
361
361
|
y.Fb = F;
|
|
362
362
|
y.Ja = ka.Lb(F);
|
|
363
363
|
y.size(F.width, F.height);
|
|
364
364
|
y.la && y.la(y);
|
|
365
365
|
};
|
|
366
|
-
F.src = y.
|
|
366
|
+
F.src = y.Xa;
|
|
367
367
|
},}), r = e.extend("CanvasRenderPath", {__construct:function() {
|
|
368
368
|
this.__parent.__construct.call(this);
|
|
369
369
|
this.T = new Path2D();
|
|
@@ -381,7 +381,7 @@ m.onRuntimeInitialized = function() {
|
|
|
381
381
|
Q.f = J;
|
|
382
382
|
X.call(K, q, Q);
|
|
383
383
|
}, fillRule:function(q) {
|
|
384
|
-
this.
|
|
384
|
+
this.Wa = q;
|
|
385
385
|
}, moveTo:function(q, y) {
|
|
386
386
|
this.T.moveTo(q, y);
|
|
387
387
|
}, lineTo:function(q, y) {
|
|
@@ -391,7 +391,7 @@ m.onRuntimeInitialized = function() {
|
|
|
391
391
|
}, close:function() {
|
|
392
392
|
this.T.closePath();
|
|
393
393
|
},}), B = f.extend("CanvasRenderPaint", {color:function(q) {
|
|
394
|
-
this.
|
|
394
|
+
this.Ya = b(q);
|
|
395
395
|
}, thickness:function(q) {
|
|
396
396
|
this.Ib = q;
|
|
397
397
|
}, join:function(q) {
|
|
@@ -423,27 +423,27 @@ m.onRuntimeInitialized = function() {
|
|
|
423
423
|
}, clearGradient:function() {
|
|
424
424
|
this.ja = null;
|
|
425
425
|
}, linearGradient:function(q, y, F, G) {
|
|
426
|
-
this.ja = {
|
|
426
|
+
this.ja = {zb:q, Ab:y, cb:F, eb:G, Ra:[],};
|
|
427
427
|
}, radialGradient:function(q, y, F, G) {
|
|
428
|
-
this.ja = {
|
|
428
|
+
this.ja = {zb:q, Ab:y, cb:F, eb:G, Ra:[], ec:!0,};
|
|
429
429
|
}, addStop:function(q, y) {
|
|
430
430
|
this.ja.Ra.push({color:q, stop:y,});
|
|
431
431
|
}, completeGradient:function() {
|
|
432
432
|
}, draw:function(q, y, F) {
|
|
433
433
|
let G = this.Hb;
|
|
434
|
-
var A = this.
|
|
434
|
+
var A = this.Ya, I = this.ja;
|
|
435
435
|
q.globalCompositeOperation = this.Eb;
|
|
436
436
|
if (null != I) {
|
|
437
|
-
A = I.
|
|
438
|
-
var J = I.
|
|
439
|
-
const X = I.
|
|
440
|
-
var K = I.
|
|
437
|
+
A = I.zb;
|
|
438
|
+
var J = I.Ab;
|
|
439
|
+
const X = I.cb;
|
|
440
|
+
var K = I.eb;
|
|
441
441
|
const Q = I.Ra;
|
|
442
442
|
I.ec ? (I = X - A, K -= J, A = q.createRadialGradient(A, J, 0, A, J, Math.sqrt(I * I + K * K))) : A = q.createLinearGradient(A, J, X, K);
|
|
443
443
|
for (let ea = 0, R = Q.length; ea < R; ea++) {
|
|
444
444
|
J = Q[ea], A.addColorStop(J.stop, b(J.color));
|
|
445
445
|
}
|
|
446
|
-
this.
|
|
446
|
+
this.Ya = A;
|
|
447
447
|
this.ja = null;
|
|
448
448
|
}
|
|
449
449
|
switch(G) {
|
|
@@ -464,7 +464,7 @@ m.onRuntimeInitialized = function() {
|
|
|
464
464
|
this.__parent.__construct.call(this);
|
|
465
465
|
this.S = [1, 0, 0, 1, 0, 0];
|
|
466
466
|
this.C = q.getContext("2d");
|
|
467
|
-
this.
|
|
467
|
+
this.Va = q;
|
|
468
468
|
this.H = [];
|
|
469
469
|
}, save:function() {
|
|
470
470
|
this.S.push(...this.S.slice(this.S.length - 6));
|
|
@@ -485,7 +485,7 @@ m.onRuntimeInitialized = function() {
|
|
|
485
485
|
q = Math.cos(q);
|
|
486
486
|
this.transform(q, y, -y, q, 0, 0);
|
|
487
487
|
}, _drawPath:function(q, y) {
|
|
488
|
-
this.H.push(y.draw.bind(y, this.C, q.T, q.
|
|
488
|
+
this.H.push(y.draw.bind(y, this.C, q.T, q.Wa === x ? "evenodd" : "nonzero"));
|
|
489
489
|
}, _drawRiveImage:function(q, y, F) {
|
|
490
490
|
var G = q.Fb;
|
|
491
491
|
if (G) {
|
|
@@ -523,7 +523,7 @@ m.onRuntimeInitialized = function() {
|
|
|
523
523
|
R = w.addRect(sa, ta);
|
|
524
524
|
0 > R && (c(), D.add(this), R = w.addRect(sa, ta), console.assert(0 <= R));
|
|
525
525
|
var $b = R & 65535, ac = R >> 16;
|
|
526
|
-
M.push({ha:this.S.slice(this.S.length - 6), image:q,
|
|
526
|
+
M.push({ha:this.S.slice(this.S.length - 6), image:q, Za:$b, $a:ac, ic:J, jc:K, Ac:sa, kb:ta, Ba:Q, Ca:ea, Ua:new Float32Array(G), Db:new Float32Array(A), indices:new Uint16Array(I), mc:X, xb:q.Ka << 1 | (X ? 1 : 0),});
|
|
527
527
|
T += G.length;
|
|
528
528
|
da += I.length;
|
|
529
529
|
var za = this.C, qd = a(y);
|
|
@@ -538,10 +538,10 @@ m.onRuntimeInitialized = function() {
|
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
540
|
}, _clipPath:function(q) {
|
|
541
|
-
this.H.push(this.C.clip.bind(this.C, q.T, q.
|
|
541
|
+
this.H.push(this.C.clip.bind(this.C, q.T, q.Wa === x ? "evenodd" : "nonzero"));
|
|
542
542
|
}, clear:function() {
|
|
543
543
|
D.add(this);
|
|
544
|
-
this.H.push(this.C.clearRect.bind(this.C, 0, 0, this.
|
|
544
|
+
this.H.push(this.C.clearRect.bind(this.C, 0, 0, this.Va.width, this.Va.height));
|
|
545
545
|
}, flush:function() {
|
|
546
546
|
}, translate:function(q, y) {
|
|
547
547
|
this.transform(1, 0, 0, 1, q, y);
|
|
@@ -613,7 +613,7 @@ m.onRuntimeInitialized = function() {
|
|
|
613
613
|
m.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
614
614
|
m.enableFPSCounter = d.Rb.bind(d);
|
|
615
615
|
m.disableFPSCounter = d.Ob;
|
|
616
|
-
d.
|
|
616
|
+
d.pb = c;
|
|
617
617
|
m.resolveAnimationFrame = c;
|
|
618
618
|
m.cleanup = function() {
|
|
619
619
|
w && w.delete();
|
|
@@ -725,7 +725,7 @@ function Ya(a, b) {
|
|
|
725
725
|
return Xa(c, a, b);
|
|
726
726
|
}));
|
|
727
727
|
}
|
|
728
|
-
var Za, $a, db = {
|
|
728
|
+
var Za, $a, db = {453404:(a, b, c, d, e) => {
|
|
729
729
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
730
730
|
return 0;
|
|
731
731
|
}
|
|
@@ -737,7 +737,7 @@ var Za, $a, db = {452588:(a, b, c, d, e) => {
|
|
|
737
737
|
window.h.I.La = c;
|
|
738
738
|
window.h.ga = {};
|
|
739
739
|
window.h.ga.stopped = d;
|
|
740
|
-
window.h.ga.
|
|
740
|
+
window.h.ga.yb = e;
|
|
741
741
|
let f = window.h;
|
|
742
742
|
f.D = [];
|
|
743
743
|
f.yc = function(g) {
|
|
@@ -768,29 +768,31 @@ var Za, $a, db = {452588:(a, b, c, d, e) => {
|
|
|
768
768
|
f.ra = function(g) {
|
|
769
769
|
return f.D[g];
|
|
770
770
|
};
|
|
771
|
-
f.
|
|
771
|
+
f.Ta = ["touchend", "click"];
|
|
772
772
|
f.unlock = function() {
|
|
773
773
|
for (var g = 0; g < f.D.length; ++g) {
|
|
774
774
|
var n = f.D[g];
|
|
775
|
-
null != n && null != n.J && n.state === f.ga.
|
|
776
|
-
ab(n.
|
|
775
|
+
null != n && null != n.J && n.state === f.ga.yb && n.J.resume().then(() => {
|
|
776
|
+
ab(n.qb);
|
|
777
777
|
}, p => {
|
|
778
778
|
console.error("Failed to resume audiocontext", p);
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
|
-
f.
|
|
781
|
+
f.Ta.map(function(p) {
|
|
782
782
|
document.removeEventListener(p, f.unlock, !0);
|
|
783
783
|
});
|
|
784
784
|
};
|
|
785
|
-
f.
|
|
785
|
+
f.Ta.map(function(g) {
|
|
786
786
|
document.addEventListener(g, f.unlock, !0);
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
window.h.Aa += 1;
|
|
790
790
|
return 1;
|
|
791
|
-
},
|
|
792
|
-
"undefined" !== typeof window.h && (
|
|
793
|
-
|
|
791
|
+
}, 455582:() => {
|
|
792
|
+
"undefined" !== typeof window.h && (window.h.Ta.map(function(a) {
|
|
793
|
+
document.removeEventListener(a, window.h.unlock, !0);
|
|
794
|
+
}), --window.h.Aa, 0 === window.h.Aa && delete window.h);
|
|
795
|
+
}, 455886:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 455990:() => {
|
|
794
796
|
try {
|
|
795
797
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
796
798
|
a.close();
|
|
@@ -798,7 +800,7 @@ var Za, $a, db = {452588:(a, b, c, d, e) => {
|
|
|
798
800
|
} catch (c) {
|
|
799
801
|
return 0;
|
|
800
802
|
}
|
|
801
|
-
},
|
|
803
|
+
}, 456161:(a, b, c, d, e, f) => {
|
|
802
804
|
if ("undefined" === typeof window.h) {
|
|
803
805
|
return -1;
|
|
804
806
|
}
|
|
@@ -842,23 +844,23 @@ var Za, $a, db = {452588:(a, b, c, d, e) => {
|
|
|
842
844
|
console.log("Failed to get user media: " + p);
|
|
843
845
|
});
|
|
844
846
|
a == window.h.I.ya && g.Z.connect(g.J.destination);
|
|
845
|
-
g.
|
|
847
|
+
g.qb = f;
|
|
846
848
|
return window.h.yc(g);
|
|
847
|
-
},
|
|
849
|
+
}, 459038:a => window.h.ra(a).J.sampleRate, 459111:a => {
|
|
848
850
|
a = window.h.ra(a);
|
|
849
851
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
850
852
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
851
853
|
void 0 !== a.Da && (a.Da.disconnect(), a.Da = void 0);
|
|
852
854
|
a.J.close();
|
|
853
855
|
a.J = void 0;
|
|
854
|
-
a.
|
|
855
|
-
},
|
|
856
|
+
a.qb = void 0;
|
|
857
|
+
}, 459511:a => {
|
|
856
858
|
window.h.Cb(a);
|
|
857
|
-
},
|
|
859
|
+
}, 459561:a => {
|
|
858
860
|
a = window.h.ra(a);
|
|
859
861
|
a.J.resume();
|
|
860
|
-
a.state = window.h.ga.
|
|
861
|
-
},
|
|
862
|
+
a.state = window.h.ga.yb;
|
|
863
|
+
}, 459700:a => {
|
|
862
864
|
a = window.h.ra(a);
|
|
863
865
|
a.J.suspend();
|
|
864
866
|
a.state = window.h.ga.stopped;
|
|
@@ -1017,12 +1019,12 @@ var vb = {open:function(a) {
|
|
|
1017
1019
|
}, qa:function(a) {
|
|
1018
1020
|
a.s.V.qa(a.s);
|
|
1019
1021
|
}, read:function(a, b, c, d) {
|
|
1020
|
-
if (!a.s || !a.s.V.
|
|
1022
|
+
if (!a.s || !a.s.V.jb) {
|
|
1021
1023
|
throw new O(60);
|
|
1022
1024
|
}
|
|
1023
1025
|
for (var e = 0, f = 0; f < d; f++) {
|
|
1024
1026
|
try {
|
|
1025
|
-
var g = a.s.V.
|
|
1027
|
+
var g = a.s.V.jb(a.s);
|
|
1026
1028
|
} catch (n) {
|
|
1027
1029
|
throw new O(29);
|
|
1028
1030
|
}
|
|
@@ -1050,7 +1052,7 @@ var vb = {open:function(a) {
|
|
|
1050
1052
|
}
|
|
1051
1053
|
d && (a.node.timestamp = Date.now());
|
|
1052
1054
|
return e;
|
|
1053
|
-
},}, wb = {
|
|
1055
|
+
},}, wb = {jb:function() {
|
|
1054
1056
|
a: {
|
|
1055
1057
|
if (!ob.length) {
|
|
1056
1058
|
var a = null;
|
|
@@ -1089,9 +1091,9 @@ var P = {O:null, U() {
|
|
|
1089
1091
|
if (24576 === (c & 61440) || 4096 === (c & 61440)) {
|
|
1090
1092
|
throw new O(63);
|
|
1091
1093
|
}
|
|
1092
|
-
P.O || (P.O = {dir:{node:{Y:P.l.Y, P:P.l.P, ka:P.l.ka, va:P.l.va,
|
|
1094
|
+
P.O || (P.O = {dir:{node:{Y:P.l.Y, P:P.l.P, ka:P.l.ka, va:P.l.va, vb:P.l.vb, Bb:P.l.Bb, wb:P.l.wb, tb:P.l.tb, Ea:P.l.Ea}, stream:{ba:P.m.ba}}, file:{node:{Y:P.l.Y, P:P.l.P}, stream:{ba:P.m.ba, read:P.m.read, write:P.m.write, pa:P.m.pa, mb:P.m.mb, ob:P.m.ob}}, link:{node:{Y:P.l.Y, P:P.l.P, ma:P.l.ma}, stream:{}}, ab:{node:{Y:P.l.Y, P:P.l.P}, stream:zb}});
|
|
1093
1095
|
c = Ab(a, b, c, d);
|
|
1094
|
-
16384 === (c.mode & 61440) ? (c.l = P.O.dir.node, c.m = P.O.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.l = P.O.file.node, c.m = P.O.file.stream, c.v = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.l = P.O.link.node, c.m = P.O.link.stream) : 8192 === (c.mode & 61440) && (c.l = P.O
|
|
1096
|
+
16384 === (c.mode & 61440) ? (c.l = P.O.dir.node, c.m = P.O.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.l = P.O.file.node, c.m = P.O.file.stream, c.v = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.l = P.O.link.node, c.m = P.O.link.stream) : 8192 === (c.mode & 61440) && (c.l = P.O.ab.node, c.m = P.O.ab.stream);
|
|
1095
1097
|
c.timestamp = Date.now();
|
|
1096
1098
|
a && (a.j[b] = c, a.timestamp = c.timestamp);
|
|
1097
1099
|
return c;
|
|
@@ -1130,7 +1132,7 @@ var P = {O:null, U() {
|
|
|
1130
1132
|
throw Bb[44];
|
|
1131
1133
|
}, va(a, b, c, d) {
|
|
1132
1134
|
return P.createNode(a, b, c, d);
|
|
1133
|
-
},
|
|
1135
|
+
}, vb(a, b, c) {
|
|
1134
1136
|
if (16384 === (a.mode & 61440)) {
|
|
1135
1137
|
try {
|
|
1136
1138
|
var d = Cb(b, c);
|
|
@@ -1148,17 +1150,17 @@ var P = {O:null, U() {
|
|
|
1148
1150
|
b.j[c] = a;
|
|
1149
1151
|
b.timestamp = a.parent.timestamp;
|
|
1150
1152
|
a.parent = b;
|
|
1151
|
-
},
|
|
1153
|
+
}, Bb(a, b) {
|
|
1152
1154
|
delete a.j[b];
|
|
1153
1155
|
a.timestamp = Date.now();
|
|
1154
|
-
},
|
|
1156
|
+
}, wb(a, b) {
|
|
1155
1157
|
var c = Cb(a, b), d;
|
|
1156
1158
|
for (d in c.j) {
|
|
1157
1159
|
throw new O(55);
|
|
1158
1160
|
}
|
|
1159
1161
|
delete a.j[b];
|
|
1160
1162
|
a.timestamp = Date.now();
|
|
1161
|
-
},
|
|
1163
|
+
}, tb(a) {
|
|
1162
1164
|
var b = [".", ".."], c;
|
|
1163
1165
|
for (c in a.j) {
|
|
1164
1166
|
a.j.hasOwnProperty(c) && b.push(c);
|
|
@@ -1224,7 +1226,7 @@ var P = {O:null, U() {
|
|
|
1224
1226
|
}, pa(a, b, c) {
|
|
1225
1227
|
yb(a.node, b + c);
|
|
1226
1228
|
a.node.v = Math.max(a.node.v, b + c);
|
|
1227
|
-
},
|
|
1229
|
+
}, mb(a, b, c, d, e) {
|
|
1228
1230
|
if (32768 !== (a.node.mode & 61440)) {
|
|
1229
1231
|
throw new O(43);
|
|
1230
1232
|
}
|
|
@@ -1244,7 +1246,7 @@ var P = {O:null, U() {
|
|
|
1244
1246
|
c = !1, b = a.byteOffset;
|
|
1245
1247
|
}
|
|
1246
1248
|
return {o:b, M:c};
|
|
1247
|
-
},
|
|
1249
|
+
}, ob(a, b, c, d) {
|
|
1248
1250
|
P.m.write(a, b, 0, d, c, !1);
|
|
1249
1251
|
return 0;
|
|
1250
1252
|
},},};
|
|
@@ -1259,7 +1261,7 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1259
1261
|
if (!a) {
|
|
1260
1262
|
return {path:"", node:null};
|
|
1261
1263
|
}
|
|
1262
|
-
b = Object.assign({
|
|
1264
|
+
b = Object.assign({hb:!0, Qa:0}, b);
|
|
1263
1265
|
if (8 < b.Qa) {
|
|
1264
1266
|
throw new O(32);
|
|
1265
1267
|
}
|
|
@@ -1271,8 +1273,8 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1271
1273
|
}
|
|
1272
1274
|
c = Cb(c, a[e]);
|
|
1273
1275
|
d = gb(d + "/" + a[e]);
|
|
1274
|
-
c.wa && (!f || f && b.
|
|
1275
|
-
if (!f || b.
|
|
1276
|
+
c.wa && (!f || f && b.hb) && (c = c.wa.root);
|
|
1277
|
+
if (!f || b.gb) {
|
|
1276
1278
|
for (f = 0; 40960 === (c.mode & 61440);) {
|
|
1277
1279
|
if (c = Kb(d), d = lb(hb(d), c), c = Lb(d, {Qa:b.Qa + 1}).node, 40 < f++) {
|
|
1278
1280
|
throw new O(32);
|
|
@@ -1284,7 +1286,7 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1284
1286
|
}, Mb = a => {
|
|
1285
1287
|
for (var b;;) {
|
|
1286
1288
|
if (a === a.parent) {
|
|
1287
|
-
return a = a.U.
|
|
1289
|
+
return a = a.U.nb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
|
|
1288
1290
|
}
|
|
1289
1291
|
b = b ? `${a.name}/${b}` : a.name;
|
|
1290
1292
|
a = a.parent;
|
|
@@ -1379,7 +1381,7 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1379
1381
|
throw new O(10);
|
|
1380
1382
|
}
|
|
1381
1383
|
if (!c && !d) {
|
|
1382
|
-
var e = Lb(b, {
|
|
1384
|
+
var e = Lb(b, {hb:!1});
|
|
1383
1385
|
b = e.path;
|
|
1384
1386
|
e = e.node;
|
|
1385
1387
|
if (e.wa) {
|
|
@@ -1389,7 +1391,7 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1389
1391
|
throw new O(54);
|
|
1390
1392
|
}
|
|
1391
1393
|
}
|
|
1392
|
-
b = {type:a, Qc:{},
|
|
1394
|
+
b = {type:a, Qc:{}, nb:b, kc:[]};
|
|
1393
1395
|
a = a.U(b);
|
|
1394
1396
|
a.U = b;
|
|
1395
1397
|
b.root = a;
|
|
@@ -1454,7 +1456,7 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1454
1456
|
} else {
|
|
1455
1457
|
a = gb(a);
|
|
1456
1458
|
try {
|
|
1457
|
-
e = Lb(a, {
|
|
1459
|
+
e = Lb(a, {gb:!(b & 131072)}).node;
|
|
1458
1460
|
} catch (f) {
|
|
1459
1461
|
}
|
|
1460
1462
|
}
|
|
@@ -1480,7 +1482,7 @@ var Eb = null, Fb = {}, Gb = [], Hb = 1, Ib = null, Jb = !0, O = null, Bb = {},
|
|
|
1480
1482
|
}
|
|
1481
1483
|
if (b & 512 && !d) {
|
|
1482
1484
|
c = e;
|
|
1483
|
-
c = "string" == typeof c ? Lb(c, {
|
|
1485
|
+
c = "string" == typeof c ? Lb(c, {gb:!0}).node : c;
|
|
1484
1486
|
if (!c.l.P) {
|
|
1485
1487
|
throw new O(63);
|
|
1486
1488
|
}
|
|
@@ -1585,7 +1587,7 @@ function oc(a, b) {
|
|
|
1585
1587
|
}
|
|
1586
1588
|
function pc() {
|
|
1587
1589
|
this.M = [void 0];
|
|
1588
|
-
this.
|
|
1590
|
+
this.ib = [];
|
|
1589
1591
|
}
|
|
1590
1592
|
var U = new pc(), qc = void 0;
|
|
1591
1593
|
function V(a) {
|
|
@@ -1605,7 +1607,7 @@ var rc = a => {
|
|
|
1605
1607
|
case !1:
|
|
1606
1608
|
return 4;
|
|
1607
1609
|
default:
|
|
1608
|
-
return U.pa({
|
|
1610
|
+
return U.pa({ub:1, value:a});
|
|
1609
1611
|
}
|
|
1610
1612
|
};
|
|
1611
1613
|
function tc(a) {
|
|
@@ -1798,7 +1800,7 @@ function bd(a, b, c, d, e, f, g, n) {
|
|
|
1798
1800
|
this.Ub = f;
|
|
1799
1801
|
this.na = g;
|
|
1800
1802
|
this.Pb = n;
|
|
1801
|
-
this.
|
|
1803
|
+
this.rb = [];
|
|
1802
1804
|
}
|
|
1803
1805
|
function cd(a, b, c) {
|
|
1804
1806
|
for (; b !== c;) {
|
|
@@ -1868,7 +1870,7 @@ function hd(a, b, c, d) {
|
|
|
1868
1870
|
this.Na = c;
|
|
1869
1871
|
this.ta = d;
|
|
1870
1872
|
this.ua = !1;
|
|
1871
|
-
this.W = this.oc = this.Pa = this.
|
|
1873
|
+
this.W = this.oc = this.Pa = this.sb = this.tc = this.nc = void 0;
|
|
1872
1874
|
void 0 !== b.A ? this.toWireType = fd : (this.toWireType = d ? dd : gd, this.K = null);
|
|
1873
1875
|
}
|
|
1874
1876
|
function jd(a, b, c) {
|
|
@@ -1957,7 +1959,7 @@ function td(a, b, c) {
|
|
|
1957
1959
|
return cd(a.g.o, a.g.u.i, b.i);
|
|
1958
1960
|
}
|
|
1959
1961
|
function ud(a) {
|
|
1960
|
-
a >= U.h && 0 === --U.get(a).
|
|
1962
|
+
a >= U.h && 0 === --U.get(a).ub && U.Zb(a);
|
|
1961
1963
|
}
|
|
1962
1964
|
function vd(a, b, c) {
|
|
1963
1965
|
switch(b) {
|
|
@@ -2270,7 +2272,7 @@ S("/home/web_user", 16895, 0);
|
|
|
2270
2272
|
var b = Ab(a, "fd", 16895, 73);
|
|
2271
2273
|
b.l = {ka:(c, d) => {
|
|
2272
2274
|
var e = Tb(+d);
|
|
2273
|
-
c = {parent:null, U:{
|
|
2275
|
+
c = {parent:null, U:{nb:"fake"}, l:{ma:() => e.path},};
|
|
2274
2276
|
return c.parent = c;
|
|
2275
2277
|
}};
|
|
2276
2278
|
return b;
|
|
@@ -2281,12 +2283,12 @@ Object.assign(pc.prototype, {get(a) {
|
|
|
2281
2283
|
}, has(a) {
|
|
2282
2284
|
return void 0 !== this.M[a];
|
|
2283
2285
|
}, pa(a) {
|
|
2284
|
-
var b = this.
|
|
2286
|
+
var b = this.ib.pop() || this.M.length;
|
|
2285
2287
|
this.M[b] = a;
|
|
2286
2288
|
return b;
|
|
2287
2289
|
}, Zb(a) {
|
|
2288
2290
|
this.M[a] = void 0;
|
|
2289
|
-
this.
|
|
2291
|
+
this.ib.push(a);
|
|
2290
2292
|
}});
|
|
2291
2293
|
qc = m.BindingError = class extends Error {
|
|
2292
2294
|
constructor(a) {
|
|
@@ -2371,10 +2373,10 @@ Zc.prototype.deleteLater = function() {
|
|
|
2371
2373
|
return this;
|
|
2372
2374
|
};
|
|
2373
2375
|
hd.prototype.Vb = function(a) {
|
|
2374
|
-
this.
|
|
2376
|
+
this.sb && (a = this.sb(a));
|
|
2375
2377
|
return a;
|
|
2376
2378
|
};
|
|
2377
|
-
hd.prototype.
|
|
2379
|
+
hd.prototype.bb = function(a) {
|
|
2378
2380
|
this.W && this.W(a);
|
|
2379
2381
|
};
|
|
2380
2382
|
hd.prototype.argPackAdvance = 8;
|
|
@@ -2390,7 +2392,7 @@ hd.prototype.fromWireType = function(a) {
|
|
|
2390
2392
|
}
|
|
2391
2393
|
var c = this.Vb(a);
|
|
2392
2394
|
if (!c) {
|
|
2393
|
-
return this.
|
|
2395
|
+
return this.bb(a), null;
|
|
2394
2396
|
}
|
|
2395
2397
|
var d = Lc(this.i, c);
|
|
2396
2398
|
if (void 0 !== d) {
|
|
@@ -2398,7 +2400,7 @@ hd.prototype.fromWireType = function(a) {
|
|
|
2398
2400
|
return d.g.o = c, d.g.G = a, d.clone();
|
|
2399
2401
|
}
|
|
2400
2402
|
d = d.clone();
|
|
2401
|
-
this.
|
|
2403
|
+
this.bb(a);
|
|
2402
2404
|
return d;
|
|
2403
2405
|
}
|
|
2404
2406
|
d = this.i.Ub(c);
|
|
@@ -2545,7 +2547,7 @@ var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2545
2547
|
c = rc(c);
|
|
2546
2548
|
var d = [].slice, e = b.i, f = e.N, g = e.A.N, n = e.A.constructor;
|
|
2547
2549
|
a = oc(a, function() {
|
|
2548
|
-
e.A.
|
|
2550
|
+
e.A.rb.forEach(function(l) {
|
|
2549
2551
|
if (this[l] === g[l]) {
|
|
2550
2552
|
throw new uc(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
2551
2553
|
}
|
|
@@ -2581,7 +2583,7 @@ var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2581
2583
|
}, _embind_finalize_value_object:function(a) {
|
|
2582
2584
|
var b = Qc[a];
|
|
2583
2585
|
delete Qc[a];
|
|
2584
|
-
var c = b.Pa, d = b.W, e = b.
|
|
2586
|
+
var c = b.Pa, d = b.W, e = b.fb, f = e.map(g => g.Yb).concat(e.map(g => g.rc));
|
|
2585
2587
|
Y([a], f, g => {
|
|
2586
2588
|
var n = {};
|
|
2587
2589
|
e.forEach((p, l) => {
|
|
@@ -2760,7 +2762,7 @@ var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2760
2762
|
l = l[0];
|
|
2761
2763
|
var v = `${l.name}.${b}`;
|
|
2762
2764
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2763
|
-
n && l.i.
|
|
2765
|
+
n && l.i.rb.push(b);
|
|
2764
2766
|
var x = l.i.N, k = x[b];
|
|
2765
2767
|
void 0 === k || void 0 === k.B && k.className !== l.name && k.ea === c - 2 ? (u.ea = c - 2, u.className = l.name, x[b] = u) : ($c(x, b, v), x[b].B[c - 2] = u);
|
|
2766
2768
|
Y([], p, function(t) {
|
|
@@ -2960,9 +2962,9 @@ var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2960
2962
|
Ec(p);
|
|
2961
2963
|
},});
|
|
2962
2964
|
}, _embind_register_value_object:function(a, b, c, d, e, f) {
|
|
2963
|
-
Qc[a] = {name:W(b), Pa:Z(c, d), W:Z(e, f),
|
|
2965
|
+
Qc[a] = {name:W(b), Pa:Z(c, d), W:Z(e, f), fb:[],};
|
|
2964
2966
|
}, _embind_register_value_object_field:function(a, b, c, d, e, f, g, n, p, l) {
|
|
2965
|
-
Qc[a].
|
|
2967
|
+
Qc[a].fb.push({Sb:W(b), Yb:c, Wb:Z(d, e), Xb:f, rc:g, qc:Z(n, p), sc:l,});
|
|
2966
2968
|
}, _embind_register_void:function(a, b) {
|
|
2967
2969
|
b = W(b);
|
|
2968
2970
|
Vc(a, {fc:!0, name:b, argPackAdvance:0, fromWireType:function() {
|
|
@@ -3017,7 +3019,7 @@ var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3017
3019
|
b = rc(b);
|
|
3018
3020
|
return sc(a[b]);
|
|
3019
3021
|
}, _emval_incref:function(a) {
|
|
3020
|
-
4 < a && (U.get(a).
|
|
3022
|
+
4 < a && (U.get(a).ub += 1);
|
|
3021
3023
|
}, _emval_new_array:function() {
|
|
3022
3024
|
return sc([]);
|
|
3023
3025
|
}, _emval_new_cstring:function(a) {
|
|
@@ -3273,10 +3275,10 @@ var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3273
3275
|
}).catch(ba);
|
|
3274
3276
|
return {};
|
|
3275
3277
|
})();
|
|
3276
|
-
var Ec = a => (Ec = z.free)(a), Wd = a => (Wd = z.malloc)(a), ab = m._ma_device__on_notification_unlocked = a => (ab = m._ma_device__on_notification_unlocked = z.ma_device__on_notification_unlocked)(a);
|
|
3278
|
+
var Ec = a => (Ec = z.free)(a), Wd = a => (Wd = z.malloc)(a), Vd = () => (Vd = z.__errno_location)(), ab = m._ma_device__on_notification_unlocked = a => (ab = m._ma_device__on_notification_unlocked = z.ma_device__on_notification_unlocked)(a);
|
|
3277
3279
|
m._ma_malloc_emscripten = (a, b) => (m._ma_malloc_emscripten = z.ma_malloc_emscripten)(a, b);
|
|
3278
3280
|
m._ma_free_emscripten = (a, b) => (m._ma_free_emscripten = z.ma_free_emscripten)(a, b);
|
|
3279
|
-
var bb = m._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (bb = m._ma_device_process_pcm_frames_capture__webaudio = z.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), cb = m._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (cb = m._ma_device_process_pcm_frames_playback__webaudio = z.ma_device_process_pcm_frames_playback__webaudio)(a, b, c),
|
|
3281
|
+
var bb = m._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (bb = m._ma_device_process_pcm_frames_capture__webaudio = z.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), cb = m._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (cb = m._ma_device_process_pcm_frames_playback__webaudio = z.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Dc = a => (Dc = z.__getTypeName)(a);
|
|
3280
3282
|
m.__embind_initialize_bindings = () => (m.__embind_initialize_bindings = z._embind_initialize_bindings)();
|
|
3281
3283
|
m.dynCall_iiji = (a, b, c, d, e) => (m.dynCall_iiji = z.dynCall_iiji)(a, b, c, d, e);
|
|
3282
3284
|
m.dynCall_jiji = (a, b, c, d, e) => (m.dynCall_jiji = z.dynCall_jiji)(a, b, c, d, e);
|
package/package.json
CHANGED
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -917,6 +917,9 @@ export declare class ViewModelInstanceList extends ViewModelInstanceValue {
|
|
|
917
917
|
removeInstanceAt(index: number): void;
|
|
918
918
|
instanceAt(index: number): ViewModelInstance;
|
|
919
919
|
}
|
|
920
|
+
export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue {
|
|
921
|
+
set value(image: Image);
|
|
922
|
+
}
|
|
920
923
|
|
|
921
924
|
export declare class ViewModelInstance {
|
|
922
925
|
get propertyCount(): number;
|
|
@@ -928,6 +931,7 @@ export declare class ViewModelInstance {
|
|
|
928
931
|
trigger(path: string): ViewModelInstanceTrigger;
|
|
929
932
|
list(path: string): ViewModelInstanceList;
|
|
930
933
|
viewModel(path: string): ViewModelInstance;
|
|
934
|
+
image(path: string): ViewModelInstanceAssetImage;
|
|
931
935
|
replaceViewModel(path: string, value: ViewModelInstance): boolean;
|
|
932
936
|
incrementReferenceCount(): void;
|
|
933
937
|
decrementReferenceCount(): void;
|
package/rive_fallback.wasm
CHANGED
|
Binary file
|