@rive-app/canvas-advanced 2.27.3 → 2.27.5

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.
@@ -22,7 +22,7 @@ function fa() {
22
22
  console.error(l);
23
23
  }
24
24
  });
25
- this.ob();
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.ob = function() {
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.kb = [];
122
+ this.lb = [];
123
123
  }, addLoader:function(e) {
124
- this.kb.push(e);
124
+ this.lb.push(e);
125
125
  }, loadContents:function(e, f) {
126
- for (let g of this.kb) {
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.wb - H.wb);
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.Ta), w += 4 * T.Ta.length;
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.Ya, M - H.Za - H.jb, H.Ac, H.jb), da = !0) : da && (b.scissor(0, M - t, k, t), da = !1);
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.Ya - H.ic * H.Ba) - 1, H.ha[5] * ca * H.Ca + ca * (H.Za - H.jc * H.Ca) + 1);
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.Ta.length;
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.Wa));
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.Wa = URL.createObjectURL(new Blob([q], {type:"image/png",}));
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.Wa;
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.Va = q;
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.Xa = b(q);
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 = {yb:q, zb:y, bb:F, cb:G, Ra:[],};
426
+ this.ja = {zb:q, Ab:y, cb:F, eb:G, Ra:[],};
427
427
  }, radialGradient:function(q, y, F, G) {
428
- this.ja = {yb:q, zb:y, bb:F, cb:G, Ra:[], ec:!0,};
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.Xa, I = this.ja;
434
+ var A = this.Ya, I = this.ja;
435
435
  q.globalCompositeOperation = this.Eb;
436
436
  if (null != I) {
437
- A = I.yb;
438
- var J = I.zb;
439
- const X = I.bb;
440
- var K = I.cb;
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.Xa = A;
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.Ua = q;
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.Va === x ? "evenodd" : "nonzero"));
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, Ya:$b, Za:ac, ic:J, jc:K, Ac:sa, jb:ta, Ba:Q, Ca:ea, Ta:new Float32Array(G), Db:new Float32Array(A), indices:new Uint16Array(I), mc:X, wb:q.Ka << 1 | (X ? 1 : 0),});
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.Va === x ? "evenodd" : "nonzero"));
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.Ua.width, this.Ua.height));
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.ob = c;
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 = {452908:(a, b, c, d, e) => {
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 = {452908:(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.xb = e;
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 = {452908:(a, b, c, d, e) => {
768
768
  f.ra = function(g) {
769
769
  return f.D[g];
770
770
  };
771
- f.Bb = ["touchend", "click"];
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.xb && n.J.resume().then(() => {
776
- ab(n.pb);
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.Bb.map(function(p) {
781
+ f.Ta.map(function(p) {
782
782
  document.removeEventListener(p, f.unlock, !0);
783
783
  });
784
784
  };
785
- f.Bb.map(function(g) {
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
- }, 455086:() => {
792
- "undefined" !== typeof window.h && (--window.h.Aa, 0 === window.h.Aa && delete window.h);
793
- }, 455250:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 455354:() => {
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 = {452908:(a, b, c, d, e) => {
798
800
  } catch (c) {
799
801
  return 0;
800
802
  }
801
- }, 455525:(a, b, c, d, e, f) => {
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 = {452908:(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.pb = f;
847
+ g.qb = f;
846
848
  return window.h.yc(g);
847
- }, 458402:a => window.h.ra(a).J.sampleRate, 458475:a => {
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.pb = void 0;
855
- }, 458875:a => {
856
+ a.qb = void 0;
857
+ }, 459511:a => {
856
858
  window.h.Cb(a);
857
- }, 458925:a => {
859
+ }, 459561:a => {
858
860
  a = window.h.ra(a);
859
861
  a.J.resume();
860
- a.state = window.h.ga.xb;
861
- }, 459064:a => {
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.ib) {
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.ib(a.s);
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 = {ib:function() {
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, ub:P.l.ub, Ab:P.l.Ab, vb:P.l.vb, sb:P.l.sb, 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, lb:P.m.lb, nb:P.m.nb}}, link:{node:{Y:P.l.Y, P:P.l.P, ma:P.l.ma}, stream:{}}, $a:{node:{Y:P.l.Y, P:P.l.P}, stream:zb}});
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.$a.node, c.m = P.O.$a.stream);
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
- }, ub(a, b, c) {
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
- }, Ab(a, b) {
1153
+ }, Bb(a, b) {
1152
1154
  delete a.j[b];
1153
1155
  a.timestamp = Date.now();
1154
- }, vb(a, b) {
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
- }, sb(a) {
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
- }, lb(a, b, c, d, e) {
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
- }, nb(a, b, c, d) {
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({gb:!0, Qa:0}, b);
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.gb) && (c = c.wa.root);
1275
- if (!f || b.fb) {
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.mb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
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, {gb:!1});
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:{}, mb:b, kc:[]};
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, {fb:!(b & 131072)}).node;
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, {fb:!0}).node : 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.hb = [];
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({tb:1, value:a});
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.qb = [];
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.rb = this.tc = this.nc = void 0;
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).tb && U.Zb(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:{mb:"fake"}, l:{ma:() => e.path},};
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.hb.pop() || this.M.length;
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.hb.push(a);
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.rb && (a = this.rb(a));
2376
+ this.sb && (a = this.sb(a));
2375
2377
  return a;
2376
2378
  };
2377
- hd.prototype.ab = function(a) {
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.ab(a), null;
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.ab(a);
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.qb.forEach(function(l) {
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.eb, f = e.map(g => g.Yb).concat(e.map(g => g.rc));
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.qb.push(b);
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), eb:[],};
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].eb.push({Sb:W(b), Yb:c, Wb:Z(d, e), Xb:f, rc:g, qc:Z(n, p), sc:l,});
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).tb += 1);
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), Vd = () => (Vd = z.__errno_location)(), Dc = a => (Dc = z.__getTypeName)(a);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-advanced",
3
- "version": "2.27.3",
3
+ "version": "2.27.5",
4
4
  "description": "Rive's lightweight low-level canvas based web api.",
5
5
  "main": "canvas_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file
@@ -280,8 +280,12 @@ export interface CanvasRenderFactory {
280
280
  makeRenderPath(): CanvasRenderPath;
281
281
  }
282
282
 
283
+ export class AudioInternal {
284
+ unref(): void;
285
+ }
283
286
  export class Audio {
284
287
  unref(): void;
288
+ get nativeAudio(): AudioInternal;
285
289
  }
286
290
  export interface AudioCallback {
287
291
  (audio: Audio): void;
@@ -289,8 +293,12 @@ export interface AudioCallback {
289
293
  export interface DecodeAudio {
290
294
  (bytes: Uint8Array, callback: AudioCallback): void;
291
295
  }
296
+ export class ImageInternal {
297
+ unref(): void;
298
+ }
292
299
  export class Image {
293
300
  unref(): void;
301
+ get nativeImage(): ImageInternal;
294
302
  }
295
303
  export interface ImageCallback {
296
304
  (image: Image): void;
@@ -298,8 +306,12 @@ export interface ImageCallback {
298
306
  export interface DecodeImage {
299
307
  (bytes: Uint8Array, callback: ImageCallback): void;
300
308
  }
309
+ export class FontInternal {
310
+ unref(): void;
311
+ }
301
312
  export class Font {
302
313
  unref(): void;
314
+ get nativeFont(): FontInternal;
303
315
  }
304
316
  export interface FontCallback {
305
317
  (font: Font): void;
@@ -917,6 +929,9 @@ export declare class ViewModelInstanceList extends ViewModelInstanceValue {
917
929
  removeInstanceAt(index: number): void;
918
930
  instanceAt(index: number): ViewModelInstance;
919
931
  }
932
+ export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue {
933
+ value(image: ImageInternal):void;
934
+ }
920
935
 
921
936
  export declare class ViewModelInstance {
922
937
  get propertyCount(): number;
@@ -928,6 +943,7 @@ export declare class ViewModelInstance {
928
943
  trigger(path: string): ViewModelInstanceTrigger;
929
944
  list(path: string): ViewModelInstanceList;
930
945
  viewModel(path: string): ViewModelInstance;
946
+ image(path: string): ViewModelInstanceAssetImage;
931
947
  replaceViewModel(path: string, value: ViewModelInstance): boolean;
932
948
  incrementReferenceCount(): void;
933
949
  decrementReferenceCount(): void;
@@ -1118,6 +1134,27 @@ export declare class FileAsset {
1118
1134
  cdnUuid: string;
1119
1135
 
1120
1136
  decode(bytes: Uint8Array): void;
1137
+ get nativeAsset(): FileAssetInternal;
1138
+ }
1139
+
1140
+ /**
1141
+ * Rive class representing a FileAsset with relevant metadata fields to describe
1142
+ * an asset associated wtih the Rive File
1143
+ */
1144
+ export declare class FileAssetInternal {
1145
+ name: string;
1146
+ fileExtension: string;
1147
+ uniqueFilename: string;
1148
+ isAudio: boolean;
1149
+ isImage: boolean;
1150
+ isFont: boolean;
1151
+ cdnUuid: string;
1152
+
1153
+ decode(bytes: Uint8Array): void;
1154
+ }
1155
+
1156
+ export declare class AudioAssetInternal extends FileAssetInternal {
1157
+ setAudioSource(audio: AudioInternal): void;
1121
1158
  }
1122
1159
 
1123
1160
  /**
@@ -1128,6 +1165,10 @@ export declare class AudioAsset extends FileAsset {
1128
1165
  setAudioSource(audio: Audio): void;
1129
1166
  }
1130
1167
 
1168
+
1169
+ export declare class ImageAssetInternal extends FileAssetInternal {
1170
+ setRenderImage(image: ImageInternal): void;
1171
+ }
1131
1172
  /**
1132
1173
  * Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
1133
1174
  * decoded Image (via the `decodeImage()` API) to set a new Image on the Rive FileAsset
@@ -1136,6 +1177,9 @@ export declare class ImageAsset extends FileAsset {
1136
1177
  setRenderImage(image: Image): void;
1137
1178
  }
1138
1179
 
1180
+ export declare class FontAssetInternal extends FileAssetInternal {
1181
+ setFont(font: FontInternal): void;
1182
+ }
1139
1183
  /**
1140
1184
  * Rive class extending the FileAsset that exposes a `setFont()` API with a
1141
1185
  * decoded Font (via the `decodeFont()` API) to set a new Font on the Rive FileAsset
Binary file