@rive-app/webgl-advanced 1.0.71 → 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.71",
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",
package/rive.wasm CHANGED
Binary file
@@ -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,
@@ -128,7 +128,7 @@ b,c,d){t.viewport(a,b,c,d)},ab:function(a,b,c,d){t.waitSync(yc[a],b,(c>>>0)+4294
128
128
  b)},n:cd,h:dd,o:ed,s:fd,hb:gd,ib:hd,q:jd,j:kd,d:ld,p:md,i:nd,kb:od,gb:pd,lb:qd,c:function(a){wa=a},pb:function(a,b,c,d){return Wc(a,b,c,d)}};
129
129
  (function(){function a(e){k.asm=e.exports;ya=k.asm.Hc;Ra();Sa=k.asm.Rc;Ua.unshift(k.asm.Ic);Xa--;k.monitorRunDependencies&&k.monitorRunDependencies(Xa);0==Xa&&(null!==Ya&&(clearInterval(Ya),Ya=null),Za&&(e=Za,Za=null,e()))}function b(e){a(e.instance)}function c(e){return cb().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){va("failed to asynchronously prepare wasm: "+f);ta(f)})}var d={a:rd};Xa++;k.monitorRunDependencies&&k.monitorRunDependencies(Xa);
130
130
  if(k.instantiateWasm)try{return k.instantiateWasm(d,a)}catch(e){return va("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return xa||"function"!==typeof WebAssembly.instantiateStreaming||$a()||H.startsWith("file://")||"function"!==typeof fetch?c(b):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){va("wasm streaming compile failed: "+f);va("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);
131
- return{}})();k.___wasm_call_ctors=function(){return(k.___wasm_call_ctors=k.asm.Ic).apply(null,arguments)};var Hc=k._malloc=function(){return(Hc=k._malloc=k.asm.Jc).apply(null,arguments)},Vb=k._free=function(){return(Vb=k._free=k.asm.Kc).apply(null,arguments)},bd=k.___errno_location=function(){return(bd=k.___errno_location=k.asm.Lc).apply(null,arguments)},Ub=k.___getTypeName=function(){return(Ub=k.___getTypeName=k.asm.Mc).apply(null,arguments)};
131
+ return{}})();k.___wasm_call_ctors=function(){return(k.___wasm_call_ctors=k.asm.Ic).apply(null,arguments)};var Hc=k._malloc=function(){return(Hc=k._malloc=k.asm.Jc).apply(null,arguments)},bd=k.___errno_location=function(){return(bd=k.___errno_location=k.asm.Kc).apply(null,arguments)},Vb=k._free=function(){return(Vb=k._free=k.asm.Lc).apply(null,arguments)},Ub=k.___getTypeName=function(){return(Ub=k.___getTypeName=k.asm.Mc).apply(null,arguments)};
132
132
  k.___embind_register_native_and_builtin_types=function(){return(k.___embind_register_native_and_builtin_types=k.asm.Nc).apply(null,arguments)};var W=k.stackSave=function(){return(W=k.stackSave=k.asm.Oc).apply(null,arguments)},X=k.stackRestore=function(){return(X=k.stackRestore=k.asm.Pc).apply(null,arguments)},Z=k._setThrew=function(){return(Z=k._setThrew=k.asm.Qc).apply(null,arguments)};k.dynCall_iiiij=function(){return(k.dynCall_iiiij=k.asm.Sc).apply(null,arguments)};
133
133
  k.dynCall_viiij=function(){return(k.dynCall_viiij=k.asm.Tc).apply(null,arguments)};k.dynCall_iiij=function(){return(k.dynCall_iiij=k.asm.Uc).apply(null,arguments)};k.dynCall_viij=function(){return(k.dynCall_viij=k.asm.Vc).apply(null,arguments)};k.dynCall_jiiiiji=function(){return(k.dynCall_jiiiiji=k.asm.Wc).apply(null,arguments)};k.dynCall_jiiiiii=function(){return(k.dynCall_jiiiiii=k.asm.Xc).apply(null,arguments)};k.dynCall_viiiiij=function(){return(k.dynCall_viiiiij=k.asm.Yc).apply(null,arguments)};
134
134
  k.dynCall_jii=function(){return(k.dynCall_jii=k.asm.Zc).apply(null,arguments)};k.dynCall_viji=function(){return(k.dynCall_viji=k.asm._c).apply(null,arguments)};k.dynCall_ji=function(){return(k.dynCall_ji=k.asm.$c).apply(null,arguments)};k.dynCall_iij=function(){return(k.dynCall_iij=k.asm.ad).apply(null,arguments)};k.dynCall_vij=function(){return(k.dynCall_vij=k.asm.bd).apply(null,arguments)};k.dynCall_iijj=function(){return(k.dynCall_iijj=k.asm.cd).apply(null,arguments)};