@rive-app/webgl-advanced 1.0.73 → 1.0.74

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/webgl-advanced",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "Rive's webgl low-level canvas based web api.",
5
5
  "main": "webgl_advanced.mjs",
6
6
  "homepage": "https://rive.app",
@@ -8,8 +8,8 @@ function(Rive) {
8
8
 
9
9
 
10
10
  null;var k;k||(k=typeof Rive !== 'undefined' ? Rive : {});var aa,ba;k.ready=new Promise(function(a,b){aa=a;ba=b});
11
- function ca(){function a(g){const h=d;c=b=0;d=new Map;h.forEach(n=>{try{n(g)}catch(p){console.error(p)}});this.he();e&&e.xe()}let b=0,c=0,d=new Map,e=null,f=null;this.requestAnimationFrame=function(g){b||(b=window.requestAnimationFrame(a.bind(this)));const h=++c;d.set(h,g);return h};this.cancelAnimationFrame=function(g){d.delete(g);b&&0==d.size&&(window.cancelAnimationFrame(b),b=0)};this.ve=function(g){f&&(document.body.remove(f),f=null);g||(f=document.createElement("div"),f.style.backgroundColor=
12
- "black",f.style.position="fixed",f.style.right=0,f.style.top=0,f.style.color="white",f.style.padding="4px",f.innerHTML="RIVE FPS",g=function(h){f.innerHTML="RIVE FPS "+h.toFixed(1)},document.body.appendChild(f));e=new function(){let h=0,n=0;this.xe=function(){var p=performance.now();n?(++h,p-=n,1E3<p&&(g(1E3*h/p),h=n=0)):(n=p,h=0)}}};this.he=function(){}}
11
+ function ca(){function a(g){const h=d;c=b=0;d=new Map;h.forEach(n=>{try{n(g)}catch(p){console.error(p)}});this.he();e&&e.xe()}let b=0,c=0,d=new Map,e=null,f=null;this.requestAnimationFrame=function(g){b||(b=requestAnimationFrame(a.bind(this)));const h=++c;d.set(h,g);return h};this.cancelAnimationFrame=function(g){d.delete(g);b&&0==d.size&&(cancelAnimationFrame(b),b=0)};this.ve=function(g){f&&(document.body.remove(f),f=null);g||(f=document.createElement("div"),f.style.backgroundColor="black",f.style.position=
12
+ "fixed",f.style.right=0,f.style.top=0,f.style.color="white",f.style.padding="4px",f.innerHTML="RIVE FPS",g=function(h){f.innerHTML="RIVE FPS "+h.toFixed(1)},document.body.appendChild(f));e=new function(){let h=0,n=0;this.xe=function(){var p=performance.now();n?(++h,p-=n,1E3<p&&(g(1E3*h/p),h=n=0)):(n=p,h=0)}}};this.he=function(){}}
13
13
  function da(){console.assert(!0);const a=new Map;let b=-Infinity;this.push=function(c){c=c+255>>8;a.has(c)&&clearTimeout(a.get(c));a.set(c,setTimeout(function(){a.delete(c);0==a.length?b=-Infinity:c==b&&(b=Math.max(...a.keys()),console.assert(b<c))},1E3));b=Math.max(c,b);return b<<8}}
14
14
  k.onRuntimeInitialized=function(){function a(m){this.od=m;this.le=m.getContext("2d");this.pe=e;this.ud=[];this.Dd=0;this.clear=function(){console.assert(0==this.Dd);this.ud=[];f.delete(this)};this.save=function(){++this.Dd;this.ud.push(e.save.bind(e))};this.restore=function(){0<this.Dd&&(this.ud.push(e.restore.bind(e)),--this.Dd)};this.transform=function(q){this.ud.push(e.transform.bind(e,q))};this.align=function(q,u,y,C){this.ud.push(e.align.bind(e,q,u,y,C))};this.flush=function(){console.assert(0==
15
15
  this.Dd);f.add(this);d&&c()}}function b(m){var q={alpha:1,depth:0,stencil:8,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0},u=m.getContext("webgl2",q);u||(u=m.getContext("webgl",q));var y=u,C=ea(fa),G={Te:C,attributes:q,version:q.Ue,Td:y};y.canvas&&(y.canvas.Re=G);fa[C]=G;("undefined"===typeof q.ue||q.ue)&&ha(G);l=fa[C];k.re=t=l&&l.Td;q=g(m.width,