@rive-app/webgl2-advanced 2.37.6 → 2.37.7

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/webgl2-advanced",
3
- "version": "2.37.6",
3
+ "version": "2.37.7",
4
4
  "description": "Rive's webgl2 low-level canvas based web api.",
5
5
  "main": "webgl2_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file
@@ -266,6 +266,9 @@ l.onRuntimeInitialized = function() {
266
266
  C.width = 1;
267
267
  C.height = 1;
268
268
  d = b(C, A);
269
+ if (!d) {
270
+ return null;
271
+ }
269
272
  d.Ya = !!d.T.getExtension("WEBGL_shader_pixel_local_storage");
270
273
  d.Db = Math.min(d.T.getParameter(d.T.MAX_RENDERBUFFER_SIZE), d.T.getParameter(d.T.MAX_TEXTURE_SIZE));
271
274
  d.Ka = !d.Ya;
@@ -275,6 +278,9 @@ l.onRuntimeInitialized = function() {
275
278
  return d;
276
279
  }
277
280
  d = z(!0);
281
+ if (!d) {
282
+ throw "Unable to create WebGL context, your environment may not support WebGL. Try out @rive-app/canvas as an alternative.";
283
+ }
278
284
  d.Ka || (d = z(!1));
279
285
  }
280
286
  return u ? new a(r) : b(r, d.Ka);
@@ -412,7 +418,7 @@ function Na(a, b) {
412
418
  return Ma(c, a, b);
413
419
  }));
414
420
  }
415
- var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
421
+ var Oa, Pa, Ta = {569208:(a, b, c, d, e) => {
416
422
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
417
423
  return 0;
418
424
  }
@@ -475,11 +481,11 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
475
481
  }
476
482
  window.h.Ea += 1;
477
483
  return 1;
478
- }, 571770:() => {
484
+ }, 571386:() => {
479
485
  "undefined" !== typeof window.h && (window.h.Xa.map(function(a) {
480
486
  document.removeEventListener(a, window.h.unlock, !0);
481
487
  }), --window.h.Ea, 0 === window.h.Ea && delete window.h);
482
- }, 572074:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 572178:() => {
488
+ }, 571690:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 571794:() => {
483
489
  try {
484
490
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
485
491
  a.close();
@@ -487,7 +493,7 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
487
493
  } catch (c) {
488
494
  return 0;
489
495
  }
490
- }, 572349:(a, b, c, d, e, f) => {
496
+ }, 571965:(a, b, c, d, e, f) => {
491
497
  if ("undefined" === typeof window.h) {
492
498
  return -1;
493
499
  }
@@ -533,7 +539,7 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
533
539
  a == window.h.I.Ba && g.Y.connect(g.K.destination);
534
540
  g.nb = f;
535
541
  return window.h.mc(g);
536
- }, 575226:a => window.h.sa(a).K.sampleRate, 575299:a => {
542
+ }, 574842:a => window.h.sa(a).K.sampleRate, 574915:a => {
537
543
  a = window.h.sa(a);
538
544
  void 0 !== a.Y && (a.Y.onaudioprocess = function() {
539
545
  }, a.Y.disconnect(), a.Y = void 0);
@@ -541,13 +547,13 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
541
547
  a.K.close();
542
548
  a.K = void 0;
543
549
  a.nb = void 0;
544
- }, 575699:a => {
550
+ }, 575315:a => {
545
551
  window.h.yb(a);
546
- }, 575749:a => {
552
+ }, 575365:a => {
547
553
  a = window.h.sa(a);
548
554
  a.K.resume();
549
555
  a.state = window.h.ha.ub;
550
- }, 575888:a => {
556
+ }, 575504:a => {
551
557
  a = window.h.sa(a);
552
558
  a.K.suspend();
553
559
  a.state = window.h.ha.stopped;