@rive-app/webgl2-advanced 2.23.11 → 2.24.1

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.23.11",
3
+ "version": "2.24.1",
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
@@ -169,7 +169,7 @@ m.onRuntimeInitialized = function() {
169
169
  if (!q) {
170
170
  return null;
171
171
  }
172
- var y = ha(r), B = {handle:y, attributes:v, version:v.Dc, H:q};
172
+ var y = ha(r), B = {handle:y, attributes:v, version:v.Dc, J:q};
173
173
  q.canvas && (q.canvas.oc = B);
174
174
  r[y] = B;
175
175
  ("undefined" == typeof v.Ib || v.Ib) && ia(B);
@@ -406,16 +406,16 @@ function Na(a, b) {
406
406
  return Ma(c, a, b);
407
407
  }));
408
408
  }
409
- var Oa, Pa, Ta = {491878:(a, b, c, d, e) => {
409
+ var Oa, Pa, Ta = {494190:(a, b, c, d, e) => {
410
410
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
411
411
  return 0;
412
412
  }
413
413
  if ("undefined" === typeof window.h) {
414
414
  window.h = {Da:0};
415
- window.h.I = {};
416
- window.h.I.Ba = a;
417
- window.h.I.capture = b;
418
- window.h.I.La = c;
415
+ window.h.H = {};
416
+ window.h.H.Ba = a;
417
+ window.h.H.capture = b;
418
+ window.h.H.La = c;
419
419
  window.h.ia = {};
420
420
  window.h.ia.stopped = d;
421
421
  window.h.ia.sb = e;
@@ -453,7 +453,7 @@ var Oa, Pa, Ta = {491878:(a, b, c, d, e) => {
453
453
  f.unlock = function() {
454
454
  for (var g = 0; g < f.C.length; ++g) {
455
455
  var n = f.C[g];
456
- null != n && null != n.J && n.state === f.ia.sb && n.J.resume().then(() => {
456
+ null != n && null != n.I && n.state === f.ia.sb && n.I.resume().then(() => {
457
457
  Qa(n.kb);
458
458
  }, p => {
459
459
  console.error("Failed to resume audiocontext", p);
@@ -469,9 +469,9 @@ var Oa, Pa, Ta = {491878:(a, b, c, d, e) => {
469
469
  }
470
470
  window.h.Da += 1;
471
471
  return 1;
472
- }, 494056:() => {
472
+ }, 496368:() => {
473
473
  "undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
474
- }, 494220:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 494324:() => {
474
+ }, 496532:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 496636:() => {
475
475
  try {
476
476
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
477
477
  a.close();
@@ -479,23 +479,23 @@ var Oa, Pa, Ta = {491878:(a, b, c, d, e) => {
479
479
  } catch (c) {
480
480
  return 0;
481
481
  }
482
- }, 494495:(a, b, c, d, e, f) => {
482
+ }, 496807:(a, b, c, d, e, f) => {
483
483
  if ("undefined" === typeof window.h) {
484
484
  return -1;
485
485
  }
486
486
  var g = {}, n = {};
487
- a == window.h.I.Ba && 0 != c && (n.sampleRate = c);
488
- g.J = new (window.AudioContext || window.webkitAudioContext)(n);
489
- g.J.suspend();
487
+ a == window.h.H.Ba && 0 != c && (n.sampleRate = c);
488
+ g.I = new (window.AudioContext || window.webkitAudioContext)(n);
489
+ g.I.suspend();
490
490
  g.state = window.h.ia.stopped;
491
491
  c = 0;
492
- a != window.h.I.Ba && (c = b);
493
- g.Z = g.J.createScriptProcessor(d, c, b);
492
+ a != window.h.H.Ba && (c = b);
493
+ g.Z = g.I.createScriptProcessor(d, c, b);
494
494
  g.Z.onaudioprocess = function(p) {
495
495
  if (null == g.wa || 0 == g.wa.length) {
496
496
  g.wa = new Float32Array(wa.buffer, e, d * b);
497
497
  }
498
- if (a == window.h.I.capture || a == window.h.I.La) {
498
+ if (a == window.h.H.capture || a == window.h.H.La) {
499
499
  for (var l = 0; l < b; l += 1) {
500
500
  for (var t = p.inputBuffer.getChannelData(l), u = g.wa, x = 0; x < d; x += 1) {
501
501
  u[x * b + l] = t[x];
@@ -503,7 +503,7 @@ var Oa, Pa, Ta = {491878:(a, b, c, d, e) => {
503
503
  }
504
504
  Ra(f, d, e);
505
505
  }
506
- if (a == window.h.I.Ba || a == window.h.I.La) {
506
+ if (a == window.h.H.Ba || a == window.h.H.La) {
507
507
  for (Sa(f, d, e), l = 0; l < p.outputBuffer.numberOfChannels; ++l) {
508
508
  for (t = p.outputBuffer.getChannelData(l), u = g.wa, x = 0; x < d; x += 1) {
509
509
  t[x] = u[x * b + l];
@@ -515,33 +515,33 @@ var Oa, Pa, Ta = {491878:(a, b, c, d, e) => {
515
515
  }
516
516
  }
517
517
  };
518
- a != window.h.I.capture && a != window.h.I.La || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(p) {
519
- g.Ea = g.J.createMediaStreamSource(p);
518
+ a != window.h.H.capture && a != window.h.H.La || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(p) {
519
+ g.Ea = g.I.createMediaStreamSource(p);
520
520
  g.Ea.connect(g.Z);
521
- g.Z.connect(g.J.destination);
521
+ g.Z.connect(g.I.destination);
522
522
  }).catch(function(p) {
523
523
  console.log("Failed to get user media: " + p);
524
524
  });
525
- a == window.h.I.Ba && g.Z.connect(g.J.destination);
525
+ a == window.h.H.Ba && g.Z.connect(g.I.destination);
526
526
  g.kb = f;
527
527
  return window.h.mc(g);
528
- }, 497372:a => window.h.va(a).J.sampleRate, 497445:a => {
528
+ }, 499684:a => window.h.va(a).I.sampleRate, 499757:a => {
529
529
  a = window.h.va(a);
530
530
  void 0 !== a.Z && (a.Z.onaudioprocess = function() {
531
531
  }, a.Z.disconnect(), a.Z = void 0);
532
532
  void 0 !== a.Ea && (a.Ea.disconnect(), a.Ea = void 0);
533
- a.J.close();
534
- a.J = void 0;
533
+ a.I.close();
534
+ a.I = void 0;
535
535
  a.kb = void 0;
536
- }, 497845:a => {
536
+ }, 500157:a => {
537
537
  window.h.xb(a);
538
- }, 497895:a => {
538
+ }, 500207:a => {
539
539
  a = window.h.va(a);
540
- a.J.resume();
540
+ a.I.resume();
541
541
  a.state = window.h.ia.sb;
542
- }, 498034:a => {
542
+ }, 500346:a => {
543
543
  a = window.h.va(a);
544
- a.J.suspend();
544
+ a.I.suspend();
545
545
  a.state = window.h.ia.stopped;
546
546
  }}, Ua = a => {
547
547
  for (; 0 < a.length;) {
@@ -1808,14 +1808,14 @@ function ha(a) {
1808
1808
  }
1809
1809
  function ja(a) {
1810
1810
  Dd = r[a];
1811
- m.xc = Z = Dd && Dd.H;
1811
+ m.xc = Z = Dd && Dd.J;
1812
1812
  return !(a && !Z);
1813
1813
  }
1814
1814
  function ia(a) {
1815
1815
  a || (a = Dd);
1816
1816
  if (!a.Tb) {
1817
1817
  a.Tb = !0;
1818
- var b = a.H;
1818
+ var b = a.J;
1819
1819
  sd(b);
1820
1820
  td(b);
1821
1821
  2 <= a.version && (b.Za = b.getExtension("EXT_disjoint_timer_query_webgl2"));
@@ -2876,7 +2876,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
2876
2876
  }, abort:() => {
2877
2877
  sa("");
2878
2878
  }, beginPixelLocalStorageWEBGL:function(a, b, c) {
2879
- (a = r[a].H.ja) && a.beginPixelLocalStorageWEBGL(m.HEAPU32.subarray(c, c + b));
2879
+ (a = r[a].J.ja) && a.beginPixelLocalStorageWEBGL(m.HEAPU32.subarray(c, c + b));
2880
2880
  }, decode_image:function(a, b, c) {
2881
2881
  var d = m.images;
2882
2882
  d || (d = new Map(), m.images = d);
@@ -2935,21 +2935,21 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
2935
2935
  "WEBGL_draw_instanced_base_vertex_base_instance" == b && sd(Z);
2936
2936
  "WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && td(Z);
2937
2937
  "WEBGL_multi_draw" == b && Ed(Z);
2938
- return !!a.H.getExtension(b);
2938
+ return !!a.J.getExtension(b);
2939
2939
  }, emscripten_webgl_get_current_context:function() {
2940
2940
  return Dd ? Dd.handle : 0;
2941
2941
  }, emscripten_webgl_make_context_current:function(a) {
2942
2942
  return ja(a) ? 0 : -5;
2943
2943
  }, enable_WEBGL_provoking_vertex:function(a) {
2944
- a = r[a].H;
2944
+ a = r[a].J;
2945
2945
  a.mb = a.getExtension("WEBGL_provoking_vertex");
2946
2946
  return !!a.mb;
2947
2947
  }, enable_WEBGL_shader_pixel_local_storage_coherent:function(a) {
2948
- a = r[a].H;
2948
+ a = r[a].J;
2949
2949
  a.ja = a.getExtension("WEBGL_shader_pixel_local_storage");
2950
2950
  return !(!a.ja || !a.ja.isCoherent());
2951
2951
  }, endPixelLocalStorageWEBGL:function(a, b, c) {
2952
- (a = r[a].H.ja) && a.endPixelLocalStorageWEBGL(m.HEAPU32.subarray(c, c + b));
2952
+ (a = r[a].J.ja) && a.endPixelLocalStorageWEBGL(m.HEAPU32.subarray(c, c + b));
2953
2953
  }, environ_get:(a, b) => {
2954
2954
  var c = 0;
2955
2955
  Hd().forEach(function(d, e) {
@@ -3117,9 +3117,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
3117
3117
  return D.aa;
3118
3118
  }
3119
3119
  }, framebufferPixelLocalClearValuefvWEBGL:function(a, b, c, d, e, f) {
3120
- (a = r[a].H.ja) && a.framebufferPixelLocalClearValuefvWEBGL(b, [c, d, e, f]);
3120
+ (a = r[a].J.ja) && a.framebufferPixelLocalClearValuefvWEBGL(b, [c, d, e, f]);
3121
3121
  }, framebufferTexturePixelLocalStorageWEBGL:function(a, b, c, d, e) {
3122
- (a = r[a].H.ja) && a.framebufferTexturePixelLocalStorageWEBGL(b, yd[c], d, e);
3122
+ (a = r[a].J.ja) && a.framebufferTexturePixelLocalStorageWEBGL(b, yd[c], d, e);
3123
3123
  }, glActiveTexture:function(a) {
3124
3124
  Z.activeTexture(a);
3125
3125
  }, glAttachShader:function(a, b) {
@@ -3393,13 +3393,10 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
3393
3393
  }, glViewport:function(a, b, c, d) {
3394
3394
  Z.viewport(a, b, c, d);
3395
3395
  }, provokingVertexWEBGL:function(a, b) {
3396
- (a = r[a].H.mb) && a.provokingVertexWEBGL(b);
3396
+ (a = r[a].J.mb) && a.provokingVertexWEBGL(b);
3397
3397
  }, strftime_l:(a, b, c, d) => Rd(a, b, c, d), upload_image:function(a, b) {
3398
3398
  var c = m.images;
3399
- c && (b = c.get(b)) && (a = r[a].H, a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b));
3400
- }, webgl_texSubImage2DWithOffset:function(a, b, c, d, e, f, g, n, p, l) {
3401
- a = r[a].H;
3402
- a.texSubImage2D(b, c, d, e, f, g, n, p, l);
3399
+ c && (b = c.get(b)) && (a = r[a].J, a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b));
3403
3400
  }};
3404
3401
  (function() {
3405
3402
  function a(c) {
@@ -3448,8 +3445,8 @@ m.dynCall_viijii = (a, b, c, d, e, f, g) => (m.dynCall_viijii = A.dynCall_viijii
3448
3445
  m.dynCall_iiiiij = (a, b, c, d, e, f, g) => (m.dynCall_iiiiij = A.dynCall_iiiiij)(a, b, c, d, e, f, g);
3449
3446
  m.dynCall_iiiiijj = (a, b, c, d, e, f, g, n, p) => (m.dynCall_iiiiijj = A.dynCall_iiiiijj)(a, b, c, d, e, f, g, n, p);
3450
3447
  m.dynCall_iiiiiijj = (a, b, c, d, e, f, g, n, p, l) => (m.dynCall_iiiiiijj = A.dynCall_iiiiiijj)(a, b, c, d, e, f, g, n, p, l);
3451
- m.___start_em_js = 489148;
3452
- m.___stop_em_js = 491878;
3448
+ m.___start_em_js = 491756;
3449
+ m.___stop_em_js = 494190;
3453
3450
  var Xd;
3454
3451
  Ga = function Yd() {
3455
3452
  Xd || Zd();