@rive-app/canvas 2.23.8 → 2.23.10

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas",
3
- "version": "2.23.8",
3
+ "version": "2.23.10",
4
4
  "description": "Rive's canvas based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.js CHANGED
@@ -159,7 +159,7 @@ m.onRuntimeInitialized = function() {
159
159
  const ja = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), ka = new function() {
160
160
  function a() {
161
161
  if (!b) {
162
- var k = document.createElement("canvas"), t = {alpha:1, depth:0, stencil:0, antialias:0, premultipliedAlpha:1, preserveDrawingBuffer:0, preferLowPowerToHighPerformance:0, failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:1, explicitSwapControl:1, renderViaOffscreenBackBuffer:1,};
162
+ var k = document.createElement("canvas"), t = {alpha:1, depth:0, stencil:0, antialias:0, premultipliedAlpha:1, preserveDrawingBuffer:0, powerPreference:"high-performance", failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:1, explicitSwapControl:1, renderViaOffscreenBackBuffer:1,};
163
163
  let r;
164
164
  if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
165
165
  if (r = k.getContext("webgl", t), c = 1, !r) {
@@ -746,7 +746,7 @@ function Ya(a, b) {
746
746
  return Xa(c, a, b);
747
747
  }));
748
748
  }
749
- var Za, $a, db = {443372:(a, b, c, d, e) => {
749
+ var Za, $a, db = {443532:(a, b, c, d, e) => {
750
750
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
751
751
  return 0;
752
752
  }
@@ -809,9 +809,9 @@ var Za, $a, db = {443372:(a, b, c, d, e) => {
809
809
  }
810
810
  window.h.Aa += 1;
811
811
  return 1;
812
- }, 445550:() => {
812
+ }, 445710:() => {
813
813
  "undefined" !== typeof window.h && (--window.h.Aa, 0 === window.h.Aa && delete window.h);
814
- }, 445714:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 445818:() => {
814
+ }, 445874:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 445978:() => {
815
815
  try {
816
816
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
817
817
  a.close();
@@ -819,7 +819,7 @@ var Za, $a, db = {443372:(a, b, c, d, e) => {
819
819
  } catch (c) {
820
820
  return 0;
821
821
  }
822
- }, 445989:(a, b, c, d, e, f) => {
822
+ }, 446149:(a, b, c, d, e, f) => {
823
823
  if ("undefined" === typeof window.h) {
824
824
  return -1;
825
825
  }
@@ -865,7 +865,7 @@ var Za, $a, db = {443372:(a, b, c, d, e) => {
865
865
  a == window.h.I.ya && g.Z.connect(g.J.destination);
866
866
  g.pb = f;
867
867
  return window.h.yc(g);
868
- }, 448866:a => window.h.ra(a).J.sampleRate, 448939:a => {
868
+ }, 449026:a => window.h.ra(a).J.sampleRate, 449099:a => {
869
869
  a = window.h.ra(a);
870
870
  void 0 !== a.Z && (a.Z.onaudioprocess = function() {
871
871
  }, a.Z.disconnect(), a.Z = void 0);
@@ -873,13 +873,13 @@ var Za, $a, db = {443372:(a, b, c, d, e) => {
873
873
  a.J.close();
874
874
  a.J = void 0;
875
875
  a.pb = void 0;
876
- }, 449339:a => {
876
+ }, 449499:a => {
877
877
  window.h.Cb(a);
878
- }, 449389:a => {
878
+ }, 449549:a => {
879
879
  a = window.h.ra(a);
880
880
  a.J.resume();
881
881
  a.state = window.h.ga.xb;
882
- }, 449528:a => {
882
+ }, 449688:a => {
883
883
  a = window.h.ra(a);
884
884
  a.J.suspend();
885
885
  a.state = window.h.ga.stopped;
@@ -3365,7 +3365,7 @@ $d();
3365
3365
  /* 2 */
3366
3366
  /***/ ((module) => {
3367
3367
 
3368
- module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"2.23.8","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
3368
+ module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"2.23.10","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
3369
3369
 
3370
3370
  /***/ }),
3371
3371
  /* 3 */
@@ -5740,7 +5740,10 @@ var Rive = /** @class */ (function () {
5740
5740
  });
5741
5741
  return;
5742
5742
  }
5743
- this.animator.stop(animationNames);
5743
+ // If there is no artboard, this.animator will be undefined
5744
+ if (this.animator) {
5745
+ this.animator.stop(animationNames);
5746
+ }
5744
5747
  if (this.eventCleanup) {
5745
5748
  this.eventCleanup();
5746
5749
  }