@rive-app/webgl2 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/package.json +1 -1
- package/rive.d.ts +16 -5
- package/rive.js +456 -114
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +4 -0
package/rive.js
CHANGED
|
@@ -43,7 +43,7 @@ function da() {
|
|
|
43
43
|
console.error(m);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
this.
|
|
46
|
+
this.lb();
|
|
47
47
|
e && e.Nb();
|
|
48
48
|
}
|
|
49
49
|
let b = 0, c = 0, d = new Map(), e = null, f = null;
|
|
@@ -70,7 +70,7 @@ function da() {
|
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
72
72
|
};
|
|
73
|
-
this.
|
|
73
|
+
this.lb = function() {
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
function ea() {
|
|
@@ -136,11 +136,11 @@ k.onRuntimeInitialized = function() {
|
|
|
136
136
|
},});
|
|
137
137
|
k.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
138
138
|
this.__parent.__construct.call(this);
|
|
139
|
-
this.
|
|
139
|
+
this.hb = [];
|
|
140
140
|
}, addLoader:function(e) {
|
|
141
|
-
this.
|
|
141
|
+
this.hb.push(e);
|
|
142
142
|
}, loadContents:function(e, f) {
|
|
143
|
-
for (let g of this.
|
|
143
|
+
for (let g of this.hb) {
|
|
144
144
|
if (g.loadContents(e, f)) {
|
|
145
145
|
return !0;
|
|
146
146
|
}
|
|
@@ -181,7 +181,7 @@ k.onRuntimeInitialized = function() {
|
|
|
181
181
|
this.flush = function() {
|
|
182
182
|
console.assert(0 == this.la);
|
|
183
183
|
e.add(this);
|
|
184
|
-
d.
|
|
184
|
+
d.Wa || c();
|
|
185
185
|
};
|
|
186
186
|
this["delete"] = function() {
|
|
187
187
|
};
|
|
@@ -198,7 +198,7 @@ k.onRuntimeInitialized = function() {
|
|
|
198
198
|
z.Ka = y;
|
|
199
199
|
z.F = q;
|
|
200
200
|
z.La = q.width;
|
|
201
|
-
z.
|
|
201
|
+
z.Xa = q.height;
|
|
202
202
|
z.T = u;
|
|
203
203
|
var A = z.delete;
|
|
204
204
|
z.delete = function() {
|
|
@@ -281,9 +281,9 @@ k.onRuntimeInitialized = function() {
|
|
|
281
281
|
A.width = 1;
|
|
282
282
|
A.height = 1;
|
|
283
283
|
d = b(A, z);
|
|
284
|
-
d.
|
|
284
|
+
d.Wa = !!d.T.getExtension("WEBGL_shader_pixel_local_storage");
|
|
285
285
|
d.Cb = Math.min(d.T.getParameter(d.T.MAX_RENDERBUFFER_SIZE), d.T.getParameter(d.T.MAX_TEXTURE_SIZE));
|
|
286
|
-
d.Ja = !d.
|
|
286
|
+
d.Ja = !d.Wa;
|
|
287
287
|
if (z = d.T.getExtension("WEBGL_debug_renderer_info")) {
|
|
288
288
|
A = d.T.getParameter(z.UNMASKED_RENDERER_WEBGL), d.T.getParameter(z.UNMASKED_VENDOR_WEBGL).includes("Google") && A.includes("ANGLE Metal Renderer") && (d.Ja = !1);
|
|
289
289
|
}
|
|
@@ -309,7 +309,7 @@ k.onRuntimeInitialized = function() {
|
|
|
309
309
|
k.requestAnimationFrame = t.requestAnimationFrame.bind(t);
|
|
310
310
|
k.cancelAnimationFrame = t.cancelAnimationFrame.bind(t);
|
|
311
311
|
k.enableFPSCounter = t.Lb.bind(t);
|
|
312
|
-
t.
|
|
312
|
+
t.lb = c;
|
|
313
313
|
k.resolveAnimationFrame = c;
|
|
314
314
|
let v = k.load;
|
|
315
315
|
k.load = function(q, u, y = !0) {
|
|
@@ -322,8 +322,8 @@ k.onRuntimeInitialized = function() {
|
|
|
322
322
|
k.WebGL2Renderer.prototype.clear = function() {
|
|
323
323
|
ja(this.Ka);
|
|
324
324
|
const q = this.F;
|
|
325
|
-
if (this.La != q.width || this.
|
|
326
|
-
this.resize(q.width, q.height), this.La = q.width, this.
|
|
325
|
+
if (this.La != q.width || this.Xa != q.height) {
|
|
326
|
+
this.resize(q.width, q.height), this.La = q.width, this.Xa = q.height;
|
|
327
327
|
}
|
|
328
328
|
x.call(this);
|
|
329
329
|
};
|
|
@@ -442,7 +442,7 @@ function Oa(a, b) {
|
|
|
442
442
|
return Na(c, a, b);
|
|
443
443
|
}));
|
|
444
444
|
}
|
|
445
|
-
var Pa, Qa, Ua = {
|
|
445
|
+
var Pa, Qa, Ua = {517895:(a, b, c, d, e) => {
|
|
446
446
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
447
447
|
return 0;
|
|
448
448
|
}
|
|
@@ -454,7 +454,7 @@ var Pa, Qa, Ua = {516495:(a, b, c, d, e) => {
|
|
|
454
454
|
window.h.I.Na = c;
|
|
455
455
|
window.h.ja = {};
|
|
456
456
|
window.h.ja.stopped = d;
|
|
457
|
-
window.h.ja.
|
|
457
|
+
window.h.ja.ub = e;
|
|
458
458
|
let f = window.h;
|
|
459
459
|
f.D = [];
|
|
460
460
|
f.oc = function(g) {
|
|
@@ -485,29 +485,31 @@ var Pa, Qa, Ua = {516495:(a, b, c, d, e) => {
|
|
|
485
485
|
f.va = function(g) {
|
|
486
486
|
return f.D[g];
|
|
487
487
|
};
|
|
488
|
-
f.
|
|
488
|
+
f.Va = ["touchend", "click"];
|
|
489
489
|
f.unlock = function() {
|
|
490
490
|
for (var g = 0; g < f.D.length; ++g) {
|
|
491
491
|
var l = f.D[g];
|
|
492
|
-
null != l && null != l.J && l.state === f.ja.
|
|
493
|
-
Ra(l.
|
|
492
|
+
null != l && null != l.J && l.state === f.ja.ub && l.J.resume().then(() => {
|
|
493
|
+
Ra(l.mb);
|
|
494
494
|
}, p => {
|
|
495
495
|
console.error("Failed to resume audiocontext", p);
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
|
-
f.
|
|
498
|
+
f.Va.map(function(p) {
|
|
499
499
|
document.removeEventListener(p, f.unlock, !0);
|
|
500
500
|
});
|
|
501
501
|
};
|
|
502
|
-
f.
|
|
502
|
+
f.Va.map(function(g) {
|
|
503
503
|
document.addEventListener(g, f.unlock, !0);
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
window.h.Da += 1;
|
|
507
507
|
return 1;
|
|
508
|
-
},
|
|
509
|
-
"undefined" !== typeof window.h && (
|
|
510
|
-
|
|
508
|
+
}, 520073:() => {
|
|
509
|
+
"undefined" !== typeof window.h && (window.h.Va.map(function(a) {
|
|
510
|
+
document.removeEventListener(a, window.h.unlock, !0);
|
|
511
|
+
}), --window.h.Da, 0 === window.h.Da && delete window.h);
|
|
512
|
+
}, 520377:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 520481:() => {
|
|
511
513
|
try {
|
|
512
514
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
513
515
|
a.close();
|
|
@@ -515,7 +517,7 @@ var Pa, Qa, Ua = {516495:(a, b, c, d, e) => {
|
|
|
515
517
|
} catch (c) {
|
|
516
518
|
return 0;
|
|
517
519
|
}
|
|
518
|
-
},
|
|
520
|
+
}, 520652:(a, b, c, d, e, f) => {
|
|
519
521
|
if ("undefined" === typeof window.h) {
|
|
520
522
|
return -1;
|
|
521
523
|
}
|
|
@@ -559,23 +561,23 @@ var Pa, Qa, Ua = {516495:(a, b, c, d, e) => {
|
|
|
559
561
|
console.log("Failed to get user media: " + p);
|
|
560
562
|
});
|
|
561
563
|
a == window.h.I.Ba && g.Z.connect(g.J.destination);
|
|
562
|
-
g.
|
|
564
|
+
g.mb = f;
|
|
563
565
|
return window.h.oc(g);
|
|
564
|
-
},
|
|
566
|
+
}, 523529:a => window.h.va(a).J.sampleRate, 523602:a => {
|
|
565
567
|
a = window.h.va(a);
|
|
566
568
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
567
569
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
568
570
|
void 0 !== a.Ea && (a.Ea.disconnect(), a.Ea = void 0);
|
|
569
571
|
a.J.close();
|
|
570
572
|
a.J = void 0;
|
|
571
|
-
a.
|
|
572
|
-
},
|
|
573
|
+
a.mb = void 0;
|
|
574
|
+
}, 524002:a => {
|
|
573
575
|
window.h.yb(a);
|
|
574
|
-
},
|
|
576
|
+
}, 524052:a => {
|
|
575
577
|
a = window.h.va(a);
|
|
576
578
|
a.J.resume();
|
|
577
|
-
a.state = window.h.ja.
|
|
578
|
-
},
|
|
579
|
+
a.state = window.h.ja.ub;
|
|
580
|
+
}, 524191:a => {
|
|
579
581
|
a = window.h.va(a);
|
|
580
582
|
a.J.suspend();
|
|
581
583
|
a.state = window.h.ja.stopped;
|
|
@@ -734,12 +736,12 @@ var kb = {open:function(a) {
|
|
|
734
736
|
}, ua:function(a) {
|
|
735
737
|
a.s.V.ua(a.s);
|
|
736
738
|
}, read:function(a, b, c, d) {
|
|
737
|
-
if (!a.s || !a.s.V.
|
|
739
|
+
if (!a.s || !a.s.V.gb) {
|
|
738
740
|
throw new N(60);
|
|
739
741
|
}
|
|
740
742
|
for (var e = 0, f = 0; f < d; f++) {
|
|
741
743
|
try {
|
|
742
|
-
var g = a.s.V.
|
|
744
|
+
var g = a.s.V.gb(a.s);
|
|
743
745
|
} catch (l) {
|
|
744
746
|
throw new N(29);
|
|
745
747
|
}
|
|
@@ -767,7 +769,7 @@ var kb = {open:function(a) {
|
|
|
767
769
|
}
|
|
768
770
|
d && (a.node.timestamp = Date.now());
|
|
769
771
|
return e;
|
|
770
|
-
},}, lb = {
|
|
772
|
+
},}, lb = {gb:function() {
|
|
771
773
|
a: {
|
|
772
774
|
if (!db.length) {
|
|
773
775
|
var a = null;
|
|
@@ -806,9 +808,9 @@ var O = {O:null, U() {
|
|
|
806
808
|
if (24576 === (c & 61440) || 4096 === (c & 61440)) {
|
|
807
809
|
throw new N(63);
|
|
808
810
|
}
|
|
809
|
-
O.O || (O.O = {dir:{node:{Y:O.l.Y, P:O.l.P, ma:O.l.ma, za:O.l.za,
|
|
811
|
+
O.O || (O.O = {dir:{node:{Y:O.l.Y, P:O.l.P, ma:O.l.ma, za:O.l.za, sb:O.l.sb, xb:O.l.xb, tb:O.l.tb, qb:O.l.qb, Fa:O.l.Fa}, stream:{ba:O.m.ba}}, file:{node:{Y:O.l.Y, P:O.l.P}, stream:{ba:O.m.ba, read:O.m.read, write:O.m.write, ta:O.m.ta, ib:O.m.ib, kb:O.m.kb}}, link:{node:{Y:O.l.Y, P:O.l.P, na:O.l.na}, stream:{}}, Ya:{node:{Y:O.l.Y, P:O.l.P}, stream:ob}});
|
|
810
812
|
c = pb(a, b, c, d);
|
|
811
|
-
16384 === (c.mode & 61440) ? (c.l = O.O.dir.node, c.m = O.O.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.l = O.O.file.node, c.m = O.O.file.stream, c.v = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.l = O.O.link.node, c.m = O.O.link.stream) : 8192 === (c.mode & 61440) && (c.l = O.O.
|
|
813
|
+
16384 === (c.mode & 61440) ? (c.l = O.O.dir.node, c.m = O.O.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.l = O.O.file.node, c.m = O.O.file.stream, c.v = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.l = O.O.link.node, c.m = O.O.link.stream) : 8192 === (c.mode & 61440) && (c.l = O.O.Ya.node, c.m = O.O.Ya.stream);
|
|
812
814
|
c.timestamp = Date.now();
|
|
813
815
|
a && (a.j[b] = c, a.timestamp = c.timestamp);
|
|
814
816
|
return c;
|
|
@@ -847,7 +849,7 @@ var O = {O:null, U() {
|
|
|
847
849
|
throw qb[44];
|
|
848
850
|
}, za(a, b, c, d) {
|
|
849
851
|
return O.createNode(a, b, c, d);
|
|
850
|
-
},
|
|
852
|
+
}, sb(a, b, c) {
|
|
851
853
|
if (16384 === (a.mode & 61440)) {
|
|
852
854
|
try {
|
|
853
855
|
var d = rb(b, c);
|
|
@@ -865,17 +867,17 @@ var O = {O:null, U() {
|
|
|
865
867
|
b.j[c] = a;
|
|
866
868
|
b.timestamp = a.parent.timestamp;
|
|
867
869
|
a.parent = b;
|
|
868
|
-
},
|
|
870
|
+
}, xb(a, b) {
|
|
869
871
|
delete a.j[b];
|
|
870
872
|
a.timestamp = Date.now();
|
|
871
|
-
},
|
|
873
|
+
}, tb(a, b) {
|
|
872
874
|
var c = rb(a, b), d;
|
|
873
875
|
for (d in c.j) {
|
|
874
876
|
throw new N(55);
|
|
875
877
|
}
|
|
876
878
|
delete a.j[b];
|
|
877
879
|
a.timestamp = Date.now();
|
|
878
|
-
},
|
|
880
|
+
}, qb(a) {
|
|
879
881
|
var b = [".", ".."], c;
|
|
880
882
|
for (c in a.j) {
|
|
881
883
|
a.j.hasOwnProperty(c) && b.push(c);
|
|
@@ -941,7 +943,7 @@ var O = {O:null, U() {
|
|
|
941
943
|
}, ta(a, b, c) {
|
|
942
944
|
nb(a.node, b + c);
|
|
943
945
|
a.node.v = Math.max(a.node.v, b + c);
|
|
944
|
-
},
|
|
946
|
+
}, ib(a, b, c, d, e) {
|
|
945
947
|
if (32768 !== (a.node.mode & 61440)) {
|
|
946
948
|
throw new N(43);
|
|
947
949
|
}
|
|
@@ -961,7 +963,7 @@ var O = {O:null, U() {
|
|
|
961
963
|
c = !1, b = a.byteOffset;
|
|
962
964
|
}
|
|
963
965
|
return {o:b, M:c};
|
|
964
|
-
},
|
|
966
|
+
}, kb(a, b, c, d) {
|
|
965
967
|
O.m.write(a, b, 0, d, c, !1);
|
|
966
968
|
return 0;
|
|
967
969
|
},},};
|
|
@@ -976,7 +978,7 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
976
978
|
if (!a) {
|
|
977
979
|
return {path:"", node:null};
|
|
978
980
|
}
|
|
979
|
-
b = Object.assign({
|
|
981
|
+
b = Object.assign({eb:!0, Sa:0}, b);
|
|
980
982
|
if (8 < b.Sa) {
|
|
981
983
|
throw new N(32);
|
|
982
984
|
}
|
|
@@ -988,8 +990,8 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
988
990
|
}
|
|
989
991
|
c = rb(c, a[e]);
|
|
990
992
|
d = Xa(d + "/" + a[e]);
|
|
991
|
-
c.Aa && (!f || f && b.
|
|
992
|
-
if (!f || b.
|
|
993
|
+
c.Aa && (!f || f && b.eb) && (c = c.Aa.root);
|
|
994
|
+
if (!f || b.cb) {
|
|
993
995
|
for (f = 0; 40960 === (c.mode & 61440);) {
|
|
994
996
|
if (c = Ab(d), d = bb(Ya(d), c), c = Bb(d, {Sa:b.Sa + 1}).node, 40 < f++) {
|
|
995
997
|
throw new N(32);
|
|
@@ -1001,7 +1003,7 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
1001
1003
|
}, Cb = a => {
|
|
1002
1004
|
for (var b;;) {
|
|
1003
1005
|
if (a === a.parent) {
|
|
1004
|
-
return a = a.U.
|
|
1006
|
+
return a = a.U.jb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
|
|
1005
1007
|
}
|
|
1006
1008
|
b = b ? `${a.name}/${b}` : a.name;
|
|
1007
1009
|
a = a.parent;
|
|
@@ -1096,7 +1098,7 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
1096
1098
|
throw new N(10);
|
|
1097
1099
|
}
|
|
1098
1100
|
if (!c && !d) {
|
|
1099
|
-
var e = Bb(b, {
|
|
1101
|
+
var e = Bb(b, {eb:!1});
|
|
1100
1102
|
b = e.path;
|
|
1101
1103
|
e = e.node;
|
|
1102
1104
|
if (e.Aa) {
|
|
@@ -1106,7 +1108,7 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
1106
1108
|
throw new N(54);
|
|
1107
1109
|
}
|
|
1108
1110
|
}
|
|
1109
|
-
b = {type:a, Nc:{},
|
|
1111
|
+
b = {type:a, Nc:{}, jb:b, ac:[]};
|
|
1110
1112
|
a = a.U(b);
|
|
1111
1113
|
a.U = b;
|
|
1112
1114
|
b.root = a;
|
|
@@ -1171,7 +1173,7 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
1171
1173
|
} else {
|
|
1172
1174
|
a = Xa(a);
|
|
1173
1175
|
try {
|
|
1174
|
-
e = Bb(a, {
|
|
1176
|
+
e = Bb(a, {cb:!(b & 131072)}).node;
|
|
1175
1177
|
} catch (f) {
|
|
1176
1178
|
}
|
|
1177
1179
|
}
|
|
@@ -1197,7 +1199,7 @@ var ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, N = null, qb = {},
|
|
|
1197
1199
|
}
|
|
1198
1200
|
if (b & 512 && !d) {
|
|
1199
1201
|
c = e;
|
|
1200
|
-
c = "string" == typeof c ? Bb(c, {
|
|
1202
|
+
c = "string" == typeof c ? Bb(c, {cb:!0}).node : c;
|
|
1201
1203
|
if (!c.l.P) {
|
|
1202
1204
|
throw new N(63);
|
|
1203
1205
|
}
|
|
@@ -1302,7 +1304,7 @@ function $b(a, b) {
|
|
|
1302
1304
|
}
|
|
1303
1305
|
function ac() {
|
|
1304
1306
|
this.M = [void 0];
|
|
1305
|
-
this.
|
|
1307
|
+
this.fb = [];
|
|
1306
1308
|
}
|
|
1307
1309
|
var Q = new ac(), bc = void 0;
|
|
1308
1310
|
function R(a) {
|
|
@@ -1322,7 +1324,7 @@ var S = a => {
|
|
|
1322
1324
|
case !1:
|
|
1323
1325
|
return 4;
|
|
1324
1326
|
default:
|
|
1325
|
-
return Q.ta({
|
|
1327
|
+
return Q.ta({rb:1, value:a});
|
|
1326
1328
|
}
|
|
1327
1329
|
};
|
|
1328
1330
|
function cc(a) {
|
|
@@ -1515,7 +1517,7 @@ function Kc(a, b, c, d, e, f, g, l) {
|
|
|
1515
1517
|
this.Ob = f;
|
|
1516
1518
|
this.pa = g;
|
|
1517
1519
|
this.Jb = l;
|
|
1518
|
-
this.
|
|
1520
|
+
this.nb = [];
|
|
1519
1521
|
}
|
|
1520
1522
|
function Lc(a, b, c) {
|
|
1521
1523
|
for (; b !== c;) {
|
|
@@ -1585,7 +1587,7 @@ function Qc(a, b, c, d) {
|
|
|
1585
1587
|
this.Pa = c;
|
|
1586
1588
|
this.xa = d;
|
|
1587
1589
|
this.ya = !1;
|
|
1588
|
-
this.W = this.dc = this.Ra = this.
|
|
1590
|
+
this.W = this.dc = this.Ra = this.pb = this.jc = this.cc = void 0;
|
|
1589
1591
|
void 0 !== b.A ? this.toWireType = Oc : (this.toWireType = d ? Mc : Pc, this.K = null);
|
|
1590
1592
|
}
|
|
1591
1593
|
function Rc(a, b, c) {
|
|
@@ -1674,7 +1676,7 @@ function Zc(a, b, c) {
|
|
|
1674
1676
|
return Lc(a.g.o, a.g.u.i, b.i);
|
|
1675
1677
|
}
|
|
1676
1678
|
function $c(a) {
|
|
1677
|
-
a >= Q.h && 0 === --Q.get(a).
|
|
1679
|
+
a >= Q.h && 0 === --Q.get(a).rb && Q.Tb(a);
|
|
1678
1680
|
}
|
|
1679
1681
|
function ad(a, b, c) {
|
|
1680
1682
|
switch(b) {
|
|
@@ -1861,9 +1863,9 @@ function Fd(a) {
|
|
|
1861
1863
|
var b = a.C;
|
|
1862
1864
|
sd(b);
|
|
1863
1865
|
td(b);
|
|
1864
|
-
2 <= a.version && (b
|
|
1865
|
-
if (2 > a.version || !b
|
|
1866
|
-
b
|
|
1866
|
+
2 <= a.version && (b.ab = b.getExtension("EXT_disjoint_timer_query_webgl2"));
|
|
1867
|
+
if (2 > a.version || !b.ab) {
|
|
1868
|
+
b.ab = b.getExtension("EXT_disjoint_timer_query");
|
|
1867
1869
|
}
|
|
1868
1870
|
Gd(b);
|
|
1869
1871
|
(b.getSupportedExtensions() || []).forEach(function(c) {
|
|
@@ -2151,7 +2153,7 @@ P("/home/web_user", 16895, 0);
|
|
|
2151
2153
|
var b = pb(a, "fd", 16895, 73);
|
|
2152
2154
|
b.l = {ma:(c, d) => {
|
|
2153
2155
|
var e = Jb(+d);
|
|
2154
|
-
c = {parent:null, U:{
|
|
2156
|
+
c = {parent:null, U:{jb:"fake"}, l:{na:() => e.path},};
|
|
2155
2157
|
return c.parent = c;
|
|
2156
2158
|
}};
|
|
2157
2159
|
return b;
|
|
@@ -2162,12 +2164,12 @@ Object.assign(ac.prototype, {get(a) {
|
|
|
2162
2164
|
}, has(a) {
|
|
2163
2165
|
return void 0 !== this.M[a];
|
|
2164
2166
|
}, ta(a) {
|
|
2165
|
-
var b = this.
|
|
2167
|
+
var b = this.fb.pop() || this.M.length;
|
|
2166
2168
|
this.M[b] = a;
|
|
2167
2169
|
return b;
|
|
2168
2170
|
}, Tb(a) {
|
|
2169
2171
|
this.M[a] = void 0;
|
|
2170
|
-
this.
|
|
2172
|
+
this.fb.push(a);
|
|
2171
2173
|
}});
|
|
2172
2174
|
bc = k.BindingError = class extends Error {
|
|
2173
2175
|
constructor(a) {
|
|
@@ -2252,10 +2254,10 @@ Hc.prototype.deleteLater = function() {
|
|
|
2252
2254
|
return this;
|
|
2253
2255
|
};
|
|
2254
2256
|
Qc.prototype.Pb = function(a) {
|
|
2255
|
-
this.
|
|
2257
|
+
this.pb && (a = this.pb(a));
|
|
2256
2258
|
return a;
|
|
2257
2259
|
};
|
|
2258
|
-
Qc.prototype
|
|
2260
|
+
Qc.prototype.$a = function(a) {
|
|
2259
2261
|
this.W && this.W(a);
|
|
2260
2262
|
};
|
|
2261
2263
|
Qc.prototype.argPackAdvance = 8;
|
|
@@ -2271,7 +2273,7 @@ Qc.prototype.fromWireType = function(a) {
|
|
|
2271
2273
|
}
|
|
2272
2274
|
var c = this.Pb(a);
|
|
2273
2275
|
if (!c) {
|
|
2274
|
-
return this
|
|
2276
|
+
return this.$a(a), null;
|
|
2275
2277
|
}
|
|
2276
2278
|
var d = uc(this.i, c);
|
|
2277
2279
|
if (void 0 !== d) {
|
|
@@ -2279,7 +2281,7 @@ Qc.prototype.fromWireType = function(a) {
|
|
|
2279
2281
|
return d.g.o = c, d.g.H = a, d.clone();
|
|
2280
2282
|
}
|
|
2281
2283
|
d = d.clone();
|
|
2282
|
-
this
|
|
2284
|
+
this.$a(a);
|
|
2283
2285
|
return d;
|
|
2284
2286
|
}
|
|
2285
2287
|
d = this.i.Ob(c);
|
|
@@ -2429,7 +2431,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2429
2431
|
c = S(c);
|
|
2430
2432
|
var d = [].slice, e = b.i, f = e.N, g = e.A.N, l = e.A.constructor;
|
|
2431
2433
|
a = $b(a, function() {
|
|
2432
|
-
e.A.
|
|
2434
|
+
e.A.nb.forEach(function(m) {
|
|
2433
2435
|
if (this[m] === g[m]) {
|
|
2434
2436
|
throw new dc(`Pure virtual function ${m} must be implemented in JavaScript`);
|
|
2435
2437
|
}
|
|
@@ -2465,7 +2467,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2465
2467
|
}, _embind_finalize_value_object:function(a) {
|
|
2466
2468
|
var b = zc[a];
|
|
2467
2469
|
delete zc[a];
|
|
2468
|
-
var c = b.Ra, d = b.W, e = b.
|
|
2470
|
+
var c = b.Ra, d = b.W, e = b.bb, f = e.map(g => g.Sb).concat(e.map(g => g.hc));
|
|
2469
2471
|
V([a], f, g => {
|
|
2470
2472
|
var l = {};
|
|
2471
2473
|
e.forEach((p, m) => {
|
|
@@ -2644,7 +2646,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2644
2646
|
m = m[0];
|
|
2645
2647
|
var v = `${m.name}.${b}`;
|
|
2646
2648
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2647
|
-
l && m.i.
|
|
2649
|
+
l && m.i.nb.push(b);
|
|
2648
2650
|
var x = m.i.N, n = x[b];
|
|
2649
2651
|
void 0 === n || void 0 === n.B && n.className !== m.name && n.ha === c - 2 ? (t.ha = c - 2, t.className = m.name, x[b] = t) : (Ic(x, b, v), x[b].B[c - 2] = t);
|
|
2650
2652
|
V([], p, function(q) {
|
|
@@ -2844,9 +2846,9 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2844
2846
|
nc(p);
|
|
2845
2847
|
},});
|
|
2846
2848
|
}, _embind_register_value_object:function(a, b, c, d, e, f) {
|
|
2847
|
-
zc[a] = {name:U(b), Ra:X(c, d), W:X(e, f),
|
|
2849
|
+
zc[a] = {name:U(b), Ra:X(c, d), W:X(e, f), bb:[],};
|
|
2848
2850
|
}, _embind_register_value_object_field:function(a, b, c, d, e, f, g, l, p, m) {
|
|
2849
|
-
zc[a].
|
|
2851
|
+
zc[a].bb.push({Mb:U(b), Sb:c, Qb:X(d, e), Rb:f, hc:g, fc:X(l, p), ic:m,});
|
|
2850
2852
|
}, _embind_register_void:function(a, b) {
|
|
2851
2853
|
b = U(b);
|
|
2852
2854
|
W(a, {$b:!0, name:b, argPackAdvance:0, fromWireType:function() {
|
|
@@ -2898,7 +2900,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2898
2900
|
b = S(b);
|
|
2899
2901
|
return T(a[b]);
|
|
2900
2902
|
}, _emval_incref:function(a) {
|
|
2901
|
-
4 < a && (Q.get(a).
|
|
2903
|
+
4 < a && (Q.get(a).rb += 1);
|
|
2902
2904
|
}, _emval_new_array:function() {
|
|
2903
2905
|
return T([]);
|
|
2904
2906
|
}, _emval_new_cstring:function(a) {
|
|
@@ -2987,8 +2989,8 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2987
2989
|
return ja(a) ? 0 : -5;
|
|
2988
2990
|
}, enable_WEBGL_provoking_vertex:function(a) {
|
|
2989
2991
|
a = w[a].C;
|
|
2990
|
-
a.
|
|
2991
|
-
return !!a.
|
|
2992
|
+
a.ob = a.getExtension("WEBGL_provoking_vertex");
|
|
2993
|
+
return !!a.ob;
|
|
2992
2994
|
}, enable_WEBGL_shader_pixel_local_storage_coherent:function(a) {
|
|
2993
2995
|
a = w[a].C;
|
|
2994
2996
|
a.ca = a.getExtension("WEBGL_shader_pixel_local_storage");
|
|
@@ -3172,7 +3174,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3172
3174
|
}, glAttachShader:function(a, b) {
|
|
3173
3175
|
Z.attachShader(wd[a], Ad[b]);
|
|
3174
3176
|
}, glBindBuffer:function(a, b) {
|
|
3175
|
-
35051 == a ? Z.
|
|
3177
|
+
35051 == a ? Z.Za = b : 35052 == a && (Z.Ma = b);
|
|
3176
3178
|
Z.bindBuffer(a, vd[b]);
|
|
3177
3179
|
}, glBindBufferRange:function(a, b, c, d, e) {
|
|
3178
3180
|
Z.bindBufferRange(a, b, vd[c], d, e);
|
|
@@ -3222,7 +3224,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3222
3224
|
}, glDeleteBuffers:function(a, b) {
|
|
3223
3225
|
for (var c = 0; c < a; c++) {
|
|
3224
3226
|
var d = J[b + 4 * c >> 2], e = vd[d];
|
|
3225
|
-
e && (Z.deleteBuffer(e), e.name = 0, vd[d] = null, d == Z.
|
|
3227
|
+
e && (Z.deleteBuffer(e), e.name = 0, vd[d] = null, d == Z.Za && (Z.Za = 0), d == Z.Ma && (Z.Ma = 0));
|
|
3226
3228
|
}
|
|
3227
3229
|
}, glDeleteFramebuffers:function(a, b) {
|
|
3228
3230
|
for (var c = 0; c < a; ++c) {
|
|
@@ -3344,9 +3346,9 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3344
3346
|
}, glGetUniformLocation:function(a, b) {
|
|
3345
3347
|
b = b ? M(F, b) : "";
|
|
3346
3348
|
if (a = wd[a]) {
|
|
3347
|
-
var c = a, d = c.oa, e = c.
|
|
3349
|
+
var c = a, d = c.oa, e = c.wb, f;
|
|
3348
3350
|
if (!d) {
|
|
3349
|
-
for (c.oa = d = {}, c.
|
|
3351
|
+
for (c.oa = d = {}, c.vb = {}, f = 0; f < Z.getProgramParameter(c, 35718); ++f) {
|
|
3350
3352
|
var g = Z.getActiveUniform(c, f);
|
|
3351
3353
|
var l = g.name;
|
|
3352
3354
|
g = g.size;
|
|
@@ -3356,7 +3358,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3356
3358
|
c.Ua += g;
|
|
3357
3359
|
e[p] = [g, m];
|
|
3358
3360
|
for (l = 0; l < g; ++l) {
|
|
3359
|
-
d[m] = l, c.
|
|
3361
|
+
d[m] = l, c.vb[m++] = p;
|
|
3360
3362
|
}
|
|
3361
3363
|
}
|
|
3362
3364
|
}
|
|
@@ -3365,7 +3367,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3365
3367
|
e = b;
|
|
3366
3368
|
f = Pd(b);
|
|
3367
3369
|
0 < f && (d = parseInt(b.slice(f + 1)) >>> 0, e = b.slice(0, f));
|
|
3368
|
-
if ((e = a.
|
|
3370
|
+
if ((e = a.wb[e]) && d < e[0] && (d += e[1], c[d] = c[d] || Z.getUniformLocation(a, b))) {
|
|
3369
3371
|
return d;
|
|
3370
3372
|
}
|
|
3371
3373
|
} else {
|
|
@@ -3381,7 +3383,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3381
3383
|
a = wd[a];
|
|
3382
3384
|
Z.linkProgram(a);
|
|
3383
3385
|
a.oa = 0;
|
|
3384
|
-
a.
|
|
3386
|
+
a.wb = {};
|
|
3385
3387
|
}, glPixelStorei:function(a, b) {
|
|
3386
3388
|
Z.pixelStorei(a, b);
|
|
3387
3389
|
}, glRenderbufferStorageMultisample:function(a, b, c, d, e) {
|
|
@@ -3424,7 +3426,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3424
3426
|
var e = Z.Hb;
|
|
3425
3427
|
if (e) {
|
|
3426
3428
|
var f = e.oa[a];
|
|
3427
|
-
"number" == typeof f && (e.oa[a] = f = Z.getUniformLocation(e, e.
|
|
3429
|
+
"number" == typeof f && (e.oa[a] = f = Z.getUniformLocation(e, e.vb[a] + (0 < f ? "[" + f + "]" : "")));
|
|
3428
3430
|
a = f;
|
|
3429
3431
|
} else {
|
|
3430
3432
|
Y(1282), a = void 0;
|
|
@@ -3446,7 +3448,7 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3446
3448
|
}, glViewport:function(a, b, c, d) {
|
|
3447
3449
|
Z.viewport(a, b, c, d);
|
|
3448
3450
|
}, provokingVertexWEBGL:function(a, b) {
|
|
3449
|
-
(a = w[a].C.
|
|
3451
|
+
(a = w[a].C.ob) && a.provokingVertexWEBGL(b);
|
|
3450
3452
|
}, strftime_l:(a, b, c, d) => Td(a, b, c, d), upload_image:function(a, b) {
|
|
3451
3453
|
var c = k.images;
|
|
3452
3454
|
c && (b = c.get(b)) && (a = w[a].C, a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0), a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b), a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1));
|
|
@@ -3484,14 +3486,14 @@ var Yd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3484
3486
|
})();
|
|
3485
3487
|
var nc = a => (nc = C.free)(a), Nd = a => (Nd = C.malloc)(a);
|
|
3486
3488
|
k._setWebImage = (a, b, c) => (k._setWebImage = C.setWebImage)(a, b, c);
|
|
3487
|
-
var Ra = k._ma_device__on_notification_unlocked = a => (Ra = k._ma_device__on_notification_unlocked = C.ma_device__on_notification_unlocked)(a);
|
|
3489
|
+
var Xd = () => (Xd = C.__errno_location)(), Ra = k._ma_device__on_notification_unlocked = a => (Ra = k._ma_device__on_notification_unlocked = C.ma_device__on_notification_unlocked)(a);
|
|
3488
3490
|
k._ma_malloc_emscripten = (a, b) => (k._ma_malloc_emscripten = C.ma_malloc_emscripten)(a, b);
|
|
3489
3491
|
k._ma_free_emscripten = (a, b) => (k._ma_free_emscripten = C.ma_free_emscripten)(a, b);
|
|
3490
|
-
var Sa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Sa = k._ma_device_process_pcm_frames_capture__webaudio = C.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ta = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ta = k._ma_device_process_pcm_frames_playback__webaudio = C.ma_device_process_pcm_frames_playback__webaudio)(a, b, c),
|
|
3492
|
+
var Sa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Sa = k._ma_device_process_pcm_frames_capture__webaudio = C.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ta = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ta = k._ma_device_process_pcm_frames_playback__webaudio = C.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), mc = a => (mc = C.__getTypeName)(a);
|
|
3491
3493
|
k.__embind_initialize_bindings = () => (k.__embind_initialize_bindings = C._embind_initialize_bindings)();
|
|
3492
|
-
k.dynCall_iiji = (a, b, c, d, e) => (k.dynCall_iiji = C.dynCall_iiji)(a, b, c, d, e);
|
|
3493
3494
|
k.dynCall_iiiji = (a, b, c, d, e, f) => (k.dynCall_iiiji = C.dynCall_iiiji)(a, b, c, d, e, f);
|
|
3494
3495
|
k.dynCall_iij = (a, b, c, d) => (k.dynCall_iij = C.dynCall_iij)(a, b, c, d);
|
|
3496
|
+
k.dynCall_iiji = (a, b, c, d, e) => (k.dynCall_iiji = C.dynCall_iiji)(a, b, c, d, e);
|
|
3495
3497
|
k.dynCall_jii = (a, b, c) => (k.dynCall_jii = C.dynCall_jii)(a, b, c);
|
|
3496
3498
|
k.dynCall_vijj = (a, b, c, d, e, f) => (k.dynCall_vijj = C.dynCall_vijj)(a, b, c, d, e, f);
|
|
3497
3499
|
k.dynCall_jiji = (a, b, c, d, e) => (k.dynCall_jiji = C.dynCall_jiji)(a, b, c, d, e);
|
|
@@ -3499,8 +3501,8 @@ k.dynCall_viijii = (a, b, c, d, e, f, g) => (k.dynCall_viijii = C.dynCall_viijii
|
|
|
3499
3501
|
k.dynCall_iiiiij = (a, b, c, d, e, f, g) => (k.dynCall_iiiiij = C.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3500
3502
|
k.dynCall_iiiiijj = (a, b, c, d, e, f, g, l, p) => (k.dynCall_iiiiijj = C.dynCall_iiiiijj)(a, b, c, d, e, f, g, l, p);
|
|
3501
3503
|
k.dynCall_iiiiiijj = (a, b, c, d, e, f, g, l, p, m) => (k.dynCall_iiiiiijj = C.dynCall_iiiiiijj)(a, b, c, d, e, f, g, l, p, m);
|
|
3502
|
-
k.___start_em_js =
|
|
3503
|
-
k.___stop_em_js =
|
|
3504
|
+
k.___start_em_js = 515140;
|
|
3505
|
+
k.___stop_em_js = 517895;
|
|
3504
3506
|
var Zd;
|
|
3505
3507
|
Ha = function $d() {
|
|
3506
3508
|
Zd || ae();
|
|
@@ -3560,7 +3562,7 @@ ae();
|
|
|
3560
3562
|
/* 2 */
|
|
3561
3563
|
/***/ ((module) => {
|
|
3562
3564
|
|
|
3563
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.27.
|
|
3565
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.27.4","description":"Rive\'s webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3564
3566
|
|
|
3565
3567
|
/***/ }),
|
|
3566
3568
|
/* 3 */
|
|
@@ -3702,12 +3704,24 @@ var Animation = /** @class */ (function () {
|
|
|
3702
3704
|
|
|
3703
3705
|
__webpack_require__.r(__webpack_exports__);
|
|
3704
3706
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3707
|
+
/* harmony export */ AudioAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.AudioAssetWrapper),
|
|
3708
|
+
/* harmony export */ AudioWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.AudioWrapper),
|
|
3705
3709
|
/* harmony export */ BLANK_URL: () => (/* reexport safe */ _sanitizeUrl__WEBPACK_IMPORTED_MODULE_1__.BLANK_URL),
|
|
3710
|
+
/* harmony export */ CustomFileAssetLoaderWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.CustomFileAssetLoaderWrapper),
|
|
3711
|
+
/* harmony export */ FileAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.FileAssetWrapper),
|
|
3712
|
+
/* harmony export */ Finalizable: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.Finalizable),
|
|
3713
|
+
/* harmony export */ FontAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.FontAssetWrapper),
|
|
3714
|
+
/* harmony export */ FontWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.FontWrapper),
|
|
3715
|
+
/* harmony export */ ImageAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.ImageAssetWrapper),
|
|
3716
|
+
/* harmony export */ ImageWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.ImageWrapper),
|
|
3717
|
+
/* harmony export */ finalizationRegistry: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__.finalizationRegistry),
|
|
3706
3718
|
/* harmony export */ registerTouchInteractions: () => (/* reexport safe */ _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__.registerTouchInteractions),
|
|
3707
3719
|
/* harmony export */ sanitizeUrl: () => (/* reexport safe */ _sanitizeUrl__WEBPACK_IMPORTED_MODULE_1__.sanitizeUrl)
|
|
3708
3720
|
/* harmony export */ });
|
|
3709
3721
|
/* harmony import */ var _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
|
|
3710
3722
|
/* harmony import */ var _sanitizeUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
3723
|
+
/* harmony import */ var _finalizationRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
|
|
3724
|
+
|
|
3711
3725
|
|
|
3712
3726
|
|
|
3713
3727
|
|
|
@@ -3956,6 +3970,258 @@ function sanitizeUrl(url) {
|
|
|
3956
3970
|
}
|
|
3957
3971
|
|
|
3958
3972
|
|
|
3973
|
+
/***/ }),
|
|
3974
|
+
/* 8 */
|
|
3975
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3976
|
+
|
|
3977
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3978
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3979
|
+
/* harmony export */ AudioAssetWrapper: () => (/* binding */ AudioAssetWrapper),
|
|
3980
|
+
/* harmony export */ AudioWrapper: () => (/* binding */ AudioWrapper),
|
|
3981
|
+
/* harmony export */ CustomFileAssetLoaderWrapper: () => (/* binding */ CustomFileAssetLoaderWrapper),
|
|
3982
|
+
/* harmony export */ FileAssetWrapper: () => (/* binding */ FileAssetWrapper),
|
|
3983
|
+
/* harmony export */ Finalizable: () => (/* binding */ Finalizable),
|
|
3984
|
+
/* harmony export */ FontAssetWrapper: () => (/* binding */ FontAssetWrapper),
|
|
3985
|
+
/* harmony export */ FontWrapper: () => (/* binding */ FontWrapper),
|
|
3986
|
+
/* harmony export */ ImageAssetWrapper: () => (/* binding */ ImageAssetWrapper),
|
|
3987
|
+
/* harmony export */ ImageWrapper: () => (/* binding */ ImageWrapper),
|
|
3988
|
+
/* harmony export */ finalizationRegistry: () => (/* binding */ finalizationRegistry)
|
|
3989
|
+
/* harmony export */ });
|
|
3990
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
3991
|
+
var extendStatics = function (d, b) {
|
|
3992
|
+
extendStatics = Object.setPrototypeOf ||
|
|
3993
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
3994
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
3995
|
+
return extendStatics(d, b);
|
|
3996
|
+
};
|
|
3997
|
+
return function (d, b) {
|
|
3998
|
+
if (typeof b !== "function" && b !== null)
|
|
3999
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
4000
|
+
extendStatics(d, b);
|
|
4001
|
+
function __() { this.constructor = d; }
|
|
4002
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
4003
|
+
};
|
|
4004
|
+
})();
|
|
4005
|
+
var Finalizable = /** @class */ (function () {
|
|
4006
|
+
function Finalizable() {
|
|
4007
|
+
this.selfUnref = false;
|
|
4008
|
+
}
|
|
4009
|
+
return Finalizable;
|
|
4010
|
+
}());
|
|
4011
|
+
var ImageWrapper = /** @class */ (function (_super) {
|
|
4012
|
+
__extends(ImageWrapper, _super);
|
|
4013
|
+
function ImageWrapper(image) {
|
|
4014
|
+
var _this = _super.call(this) || this;
|
|
4015
|
+
_this._nativeImage = image;
|
|
4016
|
+
return _this;
|
|
4017
|
+
}
|
|
4018
|
+
Object.defineProperty(ImageWrapper.prototype, "nativeImage", {
|
|
4019
|
+
get: function () {
|
|
4020
|
+
return this._nativeImage;
|
|
4021
|
+
},
|
|
4022
|
+
enumerable: false,
|
|
4023
|
+
configurable: true
|
|
4024
|
+
});
|
|
4025
|
+
ImageWrapper.prototype.unref = function () {
|
|
4026
|
+
if (this.selfUnref) {
|
|
4027
|
+
this._nativeImage.unref();
|
|
4028
|
+
}
|
|
4029
|
+
};
|
|
4030
|
+
return ImageWrapper;
|
|
4031
|
+
}(Finalizable));
|
|
4032
|
+
var AudioWrapper = /** @class */ (function (_super) {
|
|
4033
|
+
__extends(AudioWrapper, _super);
|
|
4034
|
+
function AudioWrapper(audio) {
|
|
4035
|
+
var _this = _super.call(this) || this;
|
|
4036
|
+
_this._nativeAudio = audio;
|
|
4037
|
+
return _this;
|
|
4038
|
+
}
|
|
4039
|
+
Object.defineProperty(AudioWrapper.prototype, "nativeAudio", {
|
|
4040
|
+
get: function () {
|
|
4041
|
+
return this._nativeAudio;
|
|
4042
|
+
},
|
|
4043
|
+
enumerable: false,
|
|
4044
|
+
configurable: true
|
|
4045
|
+
});
|
|
4046
|
+
AudioWrapper.prototype.unref = function () {
|
|
4047
|
+
if (this.selfUnref) {
|
|
4048
|
+
this._nativeAudio.unref();
|
|
4049
|
+
}
|
|
4050
|
+
};
|
|
4051
|
+
return AudioWrapper;
|
|
4052
|
+
}(Finalizable));
|
|
4053
|
+
var FontWrapper = /** @class */ (function (_super) {
|
|
4054
|
+
__extends(FontWrapper, _super);
|
|
4055
|
+
function FontWrapper(font) {
|
|
4056
|
+
var _this = _super.call(this) || this;
|
|
4057
|
+
_this._nativeFont = font;
|
|
4058
|
+
return _this;
|
|
4059
|
+
}
|
|
4060
|
+
Object.defineProperty(FontWrapper.prototype, "nativeFont", {
|
|
4061
|
+
get: function () {
|
|
4062
|
+
return this._nativeFont;
|
|
4063
|
+
},
|
|
4064
|
+
enumerable: false,
|
|
4065
|
+
configurable: true
|
|
4066
|
+
});
|
|
4067
|
+
FontWrapper.prototype.unref = function () {
|
|
4068
|
+
if (this.selfUnref) {
|
|
4069
|
+
this._nativeFont.unref();
|
|
4070
|
+
}
|
|
4071
|
+
};
|
|
4072
|
+
return FontWrapper;
|
|
4073
|
+
}(Finalizable));
|
|
4074
|
+
var CustomFileAssetLoaderWrapper = /** @class */ (function () {
|
|
4075
|
+
function CustomFileAssetLoaderWrapper(runtime, loaderCallback) {
|
|
4076
|
+
this._assetLoaderCallback = loaderCallback;
|
|
4077
|
+
this.assetLoader = new runtime.CustomFileAssetLoader({
|
|
4078
|
+
loadContents: this.loadContents.bind(this),
|
|
4079
|
+
});
|
|
4080
|
+
}
|
|
4081
|
+
CustomFileAssetLoaderWrapper.prototype.loadContents = function (asset, bytes) {
|
|
4082
|
+
var assetWrapper;
|
|
4083
|
+
if (asset.isImage) {
|
|
4084
|
+
assetWrapper = new ImageAssetWrapper(asset);
|
|
4085
|
+
}
|
|
4086
|
+
else if (asset.isAudio) {
|
|
4087
|
+
assetWrapper = new AudioAssetWrapper(asset);
|
|
4088
|
+
}
|
|
4089
|
+
else if (asset.isFont) {
|
|
4090
|
+
assetWrapper = new FontAssetWrapper(asset);
|
|
4091
|
+
}
|
|
4092
|
+
return this._assetLoaderCallback(assetWrapper, bytes);
|
|
4093
|
+
};
|
|
4094
|
+
return CustomFileAssetLoaderWrapper;
|
|
4095
|
+
}());
|
|
4096
|
+
/**
|
|
4097
|
+
* Rive class representing a FileAsset with relevant metadata fields to describe
|
|
4098
|
+
* an asset associated wtih the Rive File
|
|
4099
|
+
*/
|
|
4100
|
+
var FileAssetWrapper = /** @class */ (function () {
|
|
4101
|
+
function FileAssetWrapper(nativeAsset) {
|
|
4102
|
+
this._nativeFileAsset = nativeAsset;
|
|
4103
|
+
}
|
|
4104
|
+
FileAssetWrapper.prototype.decode = function (bytes) {
|
|
4105
|
+
this._nativeFileAsset.decode(bytes);
|
|
4106
|
+
};
|
|
4107
|
+
Object.defineProperty(FileAssetWrapper.prototype, "name", {
|
|
4108
|
+
get: function () {
|
|
4109
|
+
return this._nativeFileAsset.name;
|
|
4110
|
+
},
|
|
4111
|
+
enumerable: false,
|
|
4112
|
+
configurable: true
|
|
4113
|
+
});
|
|
4114
|
+
Object.defineProperty(FileAssetWrapper.prototype, "fileExtension", {
|
|
4115
|
+
get: function () {
|
|
4116
|
+
return this._nativeFileAsset.fileExtension;
|
|
4117
|
+
},
|
|
4118
|
+
enumerable: false,
|
|
4119
|
+
configurable: true
|
|
4120
|
+
});
|
|
4121
|
+
Object.defineProperty(FileAssetWrapper.prototype, "uniqueFilename", {
|
|
4122
|
+
get: function () {
|
|
4123
|
+
return this._nativeFileAsset.uniqueFilename;
|
|
4124
|
+
},
|
|
4125
|
+
enumerable: false,
|
|
4126
|
+
configurable: true
|
|
4127
|
+
});
|
|
4128
|
+
Object.defineProperty(FileAssetWrapper.prototype, "isAudio", {
|
|
4129
|
+
get: function () {
|
|
4130
|
+
return this._nativeFileAsset.isAudio;
|
|
4131
|
+
},
|
|
4132
|
+
enumerable: false,
|
|
4133
|
+
configurable: true
|
|
4134
|
+
});
|
|
4135
|
+
Object.defineProperty(FileAssetWrapper.prototype, "isImage", {
|
|
4136
|
+
get: function () {
|
|
4137
|
+
return this._nativeFileAsset.isImage;
|
|
4138
|
+
},
|
|
4139
|
+
enumerable: false,
|
|
4140
|
+
configurable: true
|
|
4141
|
+
});
|
|
4142
|
+
Object.defineProperty(FileAssetWrapper.prototype, "isFont", {
|
|
4143
|
+
get: function () {
|
|
4144
|
+
return this._nativeFileAsset.isFont;
|
|
4145
|
+
},
|
|
4146
|
+
enumerable: false,
|
|
4147
|
+
configurable: true
|
|
4148
|
+
});
|
|
4149
|
+
Object.defineProperty(FileAssetWrapper.prototype, "cdnUuid", {
|
|
4150
|
+
get: function () {
|
|
4151
|
+
return this._nativeFileAsset.cdnUuid;
|
|
4152
|
+
},
|
|
4153
|
+
enumerable: false,
|
|
4154
|
+
configurable: true
|
|
4155
|
+
});
|
|
4156
|
+
Object.defineProperty(FileAssetWrapper.prototype, "nativeFileAsset", {
|
|
4157
|
+
get: function () {
|
|
4158
|
+
return this._nativeFileAsset;
|
|
4159
|
+
},
|
|
4160
|
+
enumerable: false,
|
|
4161
|
+
configurable: true
|
|
4162
|
+
});
|
|
4163
|
+
return FileAssetWrapper;
|
|
4164
|
+
}());
|
|
4165
|
+
/**
|
|
4166
|
+
* Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
|
|
4167
|
+
* decoded Image (via the `decodeImage()` API) to set a new Image on the Rive FileAsset
|
|
4168
|
+
*/
|
|
4169
|
+
var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
4170
|
+
__extends(ImageAssetWrapper, _super);
|
|
4171
|
+
function ImageAssetWrapper(nativeAsset) {
|
|
4172
|
+
return _super.call(this, nativeAsset) || this;
|
|
4173
|
+
}
|
|
4174
|
+
ImageAssetWrapper.prototype.setRenderImage = function (image) {
|
|
4175
|
+
this._nativeFileAsset.setRenderImage(image.nativeImage);
|
|
4176
|
+
};
|
|
4177
|
+
return ImageAssetWrapper;
|
|
4178
|
+
}(FileAssetWrapper));
|
|
4179
|
+
/**
|
|
4180
|
+
* Rive class extending the FileAsset that exposes a `setAudioSource()` API with a
|
|
4181
|
+
* decoded Audio (via the `decodeAudio()` API) to set a new Audio on the Rive FileAsset
|
|
4182
|
+
*/
|
|
4183
|
+
var AudioAssetWrapper = /** @class */ (function (_super) {
|
|
4184
|
+
__extends(AudioAssetWrapper, _super);
|
|
4185
|
+
function AudioAssetWrapper(nativeAsset) {
|
|
4186
|
+
return _super.call(this, nativeAsset) || this;
|
|
4187
|
+
}
|
|
4188
|
+
AudioAssetWrapper.prototype.setAudioSource = function (audio) {
|
|
4189
|
+
this._nativeFileAsset.setAudioSource(audio.nativeAudio);
|
|
4190
|
+
};
|
|
4191
|
+
return AudioAssetWrapper;
|
|
4192
|
+
}(FileAssetWrapper));
|
|
4193
|
+
/**
|
|
4194
|
+
* Rive class extending the FileAsset that exposes a `setFont()` API with a
|
|
4195
|
+
* decoded Font (via the `decodeFont()` API) to set a new Font on the Rive FileAsset
|
|
4196
|
+
*/
|
|
4197
|
+
var FontAssetWrapper = /** @class */ (function (_super) {
|
|
4198
|
+
__extends(FontAssetWrapper, _super);
|
|
4199
|
+
function FontAssetWrapper() {
|
|
4200
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4201
|
+
}
|
|
4202
|
+
FontAssetWrapper.prototype.setFont = function (font) {
|
|
4203
|
+
this._nativeFileAsset.setFont(font.nativeFont);
|
|
4204
|
+
};
|
|
4205
|
+
return FontAssetWrapper;
|
|
4206
|
+
}(FileAssetWrapper));
|
|
4207
|
+
var FakeFinalizationRegistry = /** @class */ (function (_super) {
|
|
4208
|
+
__extends(FakeFinalizationRegistry, _super);
|
|
4209
|
+
function FakeFinalizationRegistry(fn) {
|
|
4210
|
+
return _super.call(this, fn) || this;
|
|
4211
|
+
}
|
|
4212
|
+
FakeFinalizationRegistry.prototype.register = function (object) {
|
|
4213
|
+
object.selfUnref = true;
|
|
4214
|
+
};
|
|
4215
|
+
FakeFinalizationRegistry.prototype.unregister = function (_) { };
|
|
4216
|
+
return FakeFinalizationRegistry;
|
|
4217
|
+
}(FinalizationRegistry));
|
|
4218
|
+
var MyFinalizationRegistry = FinalizationRegistry || FakeFinalizationRegistry;
|
|
4219
|
+
var finalizationRegistry = new MyFinalizationRegistry(function (ob) {
|
|
4220
|
+
ob.unref();
|
|
4221
|
+
});
|
|
4222
|
+
|
|
4223
|
+
|
|
4224
|
+
|
|
3959
4225
|
/***/ })
|
|
3960
4226
|
/******/ ]);
|
|
3961
4227
|
/************************************************************************/
|
|
@@ -4033,6 +4299,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4033
4299
|
/* harmony export */ Testing: () => (/* binding */ Testing),
|
|
4034
4300
|
/* harmony export */ ViewModel: () => (/* binding */ ViewModel),
|
|
4035
4301
|
/* harmony export */ ViewModelInstance: () => (/* binding */ ViewModelInstance),
|
|
4302
|
+
/* harmony export */ ViewModelInstanceAssetImage: () => (/* binding */ ViewModelInstanceAssetImage),
|
|
4036
4303
|
/* harmony export */ ViewModelInstanceBoolean: () => (/* binding */ ViewModelInstanceBoolean),
|
|
4037
4304
|
/* harmony export */ ViewModelInstanceColor: () => (/* binding */ ViewModelInstanceColor),
|
|
4038
4305
|
/* harmony export */ ViewModelInstanceEnum: () => (/* binding */ ViewModelInstanceEnum),
|
|
@@ -5255,7 +5522,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5255
5522
|
}
|
|
5256
5523
|
RiveFile.prototype.initData = function () {
|
|
5257
5524
|
return __awaiter(this, void 0, void 0, function () {
|
|
5258
|
-
var _a, loader, _b;
|
|
5525
|
+
var _a, loader, loaderWrapper, _b;
|
|
5259
5526
|
var _c;
|
|
5260
5527
|
return __generator(this, function (_d) {
|
|
5261
5528
|
switch (_d.label) {
|
|
@@ -5271,9 +5538,8 @@ var RiveFile = /** @class */ (function () {
|
|
|
5271
5538
|
return [2 /*return*/];
|
|
5272
5539
|
}
|
|
5273
5540
|
if (this.assetLoader) {
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
});
|
|
5541
|
+
loaderWrapper = new _utils__WEBPACK_IMPORTED_MODULE_3__.CustomFileAssetLoaderWrapper(this.runtime, this.assetLoader);
|
|
5542
|
+
loader = loaderWrapper.assetLoader;
|
|
5277
5543
|
}
|
|
5278
5544
|
// Load the Rive file
|
|
5279
5545
|
_b = this;
|
|
@@ -5572,7 +5838,11 @@ var Rive = /** @class */ (function () {
|
|
|
5572
5838
|
}
|
|
5573
5839
|
// Load Rive data from a source uri or a data buffer
|
|
5574
5840
|
_this.initData(artboard, startingAnimationNames, startingStateMachineNames, autoplay, autoBind)
|
|
5575
|
-
.then(function () {
|
|
5841
|
+
.then(function (hasInitialized) {
|
|
5842
|
+
if (hasInitialized) {
|
|
5843
|
+
return _this.setupRiveListeners();
|
|
5844
|
+
}
|
|
5845
|
+
})
|
|
5576
5846
|
.catch(function (e) {
|
|
5577
5847
|
console.error(e);
|
|
5578
5848
|
});
|
|
@@ -5651,7 +5921,8 @@ var Rive = /** @class */ (function () {
|
|
|
5651
5921
|
this._artboardHeight = this.artboard.height =
|
|
5652
5922
|
this._artboardHeight || this.artboard.height;
|
|
5653
5923
|
};
|
|
5654
|
-
// Initializes runtime with Rive data and preps for playing
|
|
5924
|
+
// Initializes runtime with Rive data and preps for playing.
|
|
5925
|
+
// Returns true for successful initialization.
|
|
5655
5926
|
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
5656
5927
|
return __awaiter(this, void 0, void 0, function () {
|
|
5657
5928
|
var error_1, msg;
|
|
@@ -5674,7 +5945,7 @@ var Rive = /** @class */ (function () {
|
|
|
5674
5945
|
case 2:
|
|
5675
5946
|
// Check for riveFile in case it has been cleaned up while initializing;
|
|
5676
5947
|
if (!this.riveFile) {
|
|
5677
|
-
|
|
5948
|
+
return [2 /*return*/, false];
|
|
5678
5949
|
}
|
|
5679
5950
|
this.file = this.riveFile.getInstance();
|
|
5680
5951
|
// Initialize and draw frame
|
|
@@ -5694,7 +5965,7 @@ var Rive = /** @class */ (function () {
|
|
|
5694
5965
|
this.readyForPlaying = true;
|
|
5695
5966
|
this.taskQueue.process();
|
|
5696
5967
|
this.drawFrame();
|
|
5697
|
-
return [2 /*return*/,
|
|
5968
|
+
return [2 /*return*/, true];
|
|
5698
5969
|
case 3:
|
|
5699
5970
|
error_1 = _b.sent();
|
|
5700
5971
|
msg = resolveErrorMessage(error_1);
|
|
@@ -6912,6 +7183,7 @@ var PropertyType;
|
|
|
6912
7183
|
PropertyType["Trigger"] = "trigger";
|
|
6913
7184
|
PropertyType["Enum"] = "enum";
|
|
6914
7185
|
PropertyType["List"] = "list";
|
|
7186
|
+
PropertyType["Image"] = "image";
|
|
6915
7187
|
})(PropertyType || (PropertyType = {}));
|
|
6916
7188
|
var ViewModelInstance = /** @class */ (function () {
|
|
6917
7189
|
function ViewModelInstance(runtimeInstance, parent) {
|
|
@@ -7035,7 +7307,7 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7035
7307
|
return null;
|
|
7036
7308
|
};
|
|
7037
7309
|
ViewModelInstance.prototype.propertyFromPathSegments = function (pathSegments, index, type) {
|
|
7038
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
7310
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
7039
7311
|
if (index < pathSegments.length - 1) {
|
|
7040
7312
|
var viewModelInstance = this.internalViewModelInstance(pathSegments[index]);
|
|
7041
7313
|
if (viewModelInstance !== null) {
|
|
@@ -7089,6 +7361,12 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7089
7361
|
return new ViewModelInstanceList(instance, this);
|
|
7090
7362
|
}
|
|
7091
7363
|
break;
|
|
7364
|
+
case PropertyType.Image:
|
|
7365
|
+
instance = (_r = (_q = this._runtimeInstance) === null || _q === void 0 ? void 0 : _q.image(pathSegments[index])) !== null && _r !== void 0 ? _r : null;
|
|
7366
|
+
if (instance !== null) {
|
|
7367
|
+
return new ViewModelInstanceAssetImage(instance, this);
|
|
7368
|
+
}
|
|
7369
|
+
break;
|
|
7092
7370
|
}
|
|
7093
7371
|
return null;
|
|
7094
7372
|
};
|
|
@@ -7169,6 +7447,15 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7169
7447
|
var viewmodelInstanceValue = this.propertyFromPath(path, PropertyType.List);
|
|
7170
7448
|
return viewmodelInstanceValue;
|
|
7171
7449
|
};
|
|
7450
|
+
/**
|
|
7451
|
+
* method to access a view model property instance belonging
|
|
7452
|
+
* to the view model instance or to a nested view model instance
|
|
7453
|
+
* @param path - path to the image property
|
|
7454
|
+
*/
|
|
7455
|
+
ViewModelInstance.prototype.image = function (path) {
|
|
7456
|
+
var viewmodelInstanceValue = this.propertyFromPath(path, PropertyType.Image);
|
|
7457
|
+
return viewmodelInstanceValue;
|
|
7458
|
+
};
|
|
7172
7459
|
/**
|
|
7173
7460
|
* method to access a view model property instance belonging
|
|
7174
7461
|
* to the view model instance or to a nested view model instance
|
|
@@ -7520,6 +7807,25 @@ var ViewModelInstanceColor = /** @class */ (function (_super) {
|
|
|
7520
7807
|
return ViewModelInstanceColor;
|
|
7521
7808
|
}(ViewModelInstanceValue));
|
|
7522
7809
|
|
|
7810
|
+
var ViewModelInstanceAssetImage = /** @class */ (function (_super) {
|
|
7811
|
+
__extends(ViewModelInstanceAssetImage, _super);
|
|
7812
|
+
function ViewModelInstanceAssetImage(instance, root) {
|
|
7813
|
+
return _super.call(this, instance, root) || this;
|
|
7814
|
+
}
|
|
7815
|
+
Object.defineProperty(ViewModelInstanceAssetImage.prototype, "value", {
|
|
7816
|
+
set: function (image) {
|
|
7817
|
+
this._viewModelInstanceValue.value =
|
|
7818
|
+
image.nativeImage;
|
|
7819
|
+
},
|
|
7820
|
+
enumerable: false,
|
|
7821
|
+
configurable: true
|
|
7822
|
+
});
|
|
7823
|
+
ViewModelInstanceAssetImage.prototype.internalHandleCallback = function (callback) {
|
|
7824
|
+
callback();
|
|
7825
|
+
};
|
|
7826
|
+
return ViewModelInstanceAssetImage;
|
|
7827
|
+
}(ViewModelInstanceValue));
|
|
7828
|
+
|
|
7523
7829
|
// Loads Rive data from a URI via fetch.
|
|
7524
7830
|
var loadRiveFile = function (src) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7525
7831
|
var req, res, buffer;
|
|
@@ -7567,39 +7873,75 @@ var Testing = {
|
|
|
7567
7873
|
* Be sure to call `.unref()` on the audio once it is no longer needed. This
|
|
7568
7874
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
7569
7875
|
*/
|
|
7570
|
-
var decodeAudio = function (bytes) {
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7876
|
+
var decodeAudio = function (bytes) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7877
|
+
var decodedPromise, audio, audioWrapper;
|
|
7878
|
+
return __generator(this, function (_a) {
|
|
7879
|
+
switch (_a.label) {
|
|
7880
|
+
case 0:
|
|
7881
|
+
decodedPromise = new Promise(function (resolve) {
|
|
7882
|
+
return RuntimeLoader.getInstance(function (rive) {
|
|
7883
|
+
rive.decodeAudio(bytes, resolve);
|
|
7884
|
+
});
|
|
7885
|
+
});
|
|
7886
|
+
return [4 /*yield*/, decodedPromise];
|
|
7887
|
+
case 1:
|
|
7888
|
+
audio = _a.sent();
|
|
7889
|
+
audioWrapper = new _utils__WEBPACK_IMPORTED_MODULE_3__.AudioWrapper(audio);
|
|
7890
|
+
_utils__WEBPACK_IMPORTED_MODULE_3__.finalizationRegistry.register(audioWrapper, audio);
|
|
7891
|
+
return [2 /*return*/, audioWrapper];
|
|
7892
|
+
}
|
|
7575
7893
|
});
|
|
7576
|
-
};
|
|
7894
|
+
}); };
|
|
7577
7895
|
/**
|
|
7578
7896
|
* Decodes bytes into an image.
|
|
7579
7897
|
*
|
|
7580
7898
|
* Be sure to call `.unref()` on the image once it is no longer needed. This
|
|
7581
7899
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
7582
7900
|
*/
|
|
7583
|
-
var decodeImage = function (bytes) {
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7901
|
+
var decodeImage = function (bytes) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7902
|
+
var decodedPromise, image, imageWrapper;
|
|
7903
|
+
return __generator(this, function (_a) {
|
|
7904
|
+
switch (_a.label) {
|
|
7905
|
+
case 0:
|
|
7906
|
+
decodedPromise = new Promise(function (resolve) {
|
|
7907
|
+
return RuntimeLoader.getInstance(function (rive) {
|
|
7908
|
+
rive.decodeImage(bytes, resolve);
|
|
7909
|
+
});
|
|
7910
|
+
});
|
|
7911
|
+
return [4 /*yield*/, decodedPromise];
|
|
7912
|
+
case 1:
|
|
7913
|
+
image = _a.sent();
|
|
7914
|
+
imageWrapper = new _utils__WEBPACK_IMPORTED_MODULE_3__.ImageWrapper(image);
|
|
7915
|
+
_utils__WEBPACK_IMPORTED_MODULE_3__.finalizationRegistry.register(imageWrapper, image);
|
|
7916
|
+
return [2 /*return*/, imageWrapper];
|
|
7917
|
+
}
|
|
7588
7918
|
});
|
|
7589
|
-
};
|
|
7919
|
+
}); };
|
|
7590
7920
|
/**
|
|
7591
7921
|
* Decodes bytes into a font.
|
|
7592
7922
|
*
|
|
7593
7923
|
* Be sure to call `.unref()` on the font once it is no longer needed. This
|
|
7594
7924
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
7595
7925
|
*/
|
|
7596
|
-
var decodeFont = function (bytes) {
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7926
|
+
var decodeFont = function (bytes) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7927
|
+
var decodedPromise, font, fontWrapper;
|
|
7928
|
+
return __generator(this, function (_a) {
|
|
7929
|
+
switch (_a.label) {
|
|
7930
|
+
case 0:
|
|
7931
|
+
decodedPromise = new Promise(function (resolve) {
|
|
7932
|
+
return RuntimeLoader.getInstance(function (rive) {
|
|
7933
|
+
rive.decodeFont(bytes, resolve);
|
|
7934
|
+
});
|
|
7935
|
+
});
|
|
7936
|
+
return [4 /*yield*/, decodedPromise];
|
|
7937
|
+
case 1:
|
|
7938
|
+
font = _a.sent();
|
|
7939
|
+
fontWrapper = new _utils__WEBPACK_IMPORTED_MODULE_3__.FontWrapper(font);
|
|
7940
|
+
_utils__WEBPACK_IMPORTED_MODULE_3__.finalizationRegistry.register(fontWrapper, font);
|
|
7941
|
+
return [2 /*return*/, fontWrapper];
|
|
7942
|
+
}
|
|
7601
7943
|
});
|
|
7602
|
-
};
|
|
7944
|
+
}); };
|
|
7603
7945
|
// #endregion
|
|
7604
7946
|
|
|
7605
7947
|
})();
|