@rive-app/webgl-single 1.0.45 → 1.0.46
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 +1 -1
- package/rive.js +4 -4
- package/rive.js.map +1 -1
package/package.json
CHANGED
package/rive.js
CHANGED
|
@@ -34,9 +34,9 @@ function ca(){function a(g){const h=d;c=b=0;d=new Map;h.forEach(n=>{try{n(g)}cat
|
|
|
34
34
|
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}}
|
|
35
35
|
k.onRuntimeInitialized=function(){function a(u){this.od=u;this.le=u.getContext("2d");this.pe=e;this.td=[];this.Dd=0;this.clear=function(){console.assert(0==this.Dd);this.td=[];f.delete(this)};this.save=function(){++this.Dd;this.td.push(e.save.bind(e))};this.restore=function(){0<this.Dd&&(this.td.push(e.restore.bind(e)),--this.Dd)};this.transform=function(l){this.td.push(e.transform.bind(e,l))};this.align=function(l,t,v,z){this.td.push(e.align.bind(e,l,t,v,z))};this.computeAlignment=function(l,t,v,
|
|
36
36
|
z,E){this.td.push(e.computeAlignment.bind(e,l,t,v,z,E))};this.flush=function(){console.assert(0==this.Dd);f.add(this);d&&c()}}function b(u){var l={alpha:1,depth:0,stencil:8,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0},t=u.getContext("webgl2",l);t||(t=u.getContext("webgl",l));var v=t,z=ea(fa),E={Te:z,attributes:l,version:l.Ue,Td:v};v.canvas&&
|
|
37
|
-
(v.canvas.Re=E);fa[z]=E;("undefined"===typeof l.ue||l.ue)&&ha(E);m=fa[z];k.re=r=m&&m.Td;l=g(u.width,u.height);l.ne=z;l.od=u;l.be=u.width;l.ae=u.height;l.me=t;return l}function c(){
|
|
38
|
-
|
|
39
|
-
D.Id+D.zd,D.Jd+D.yd);let X=new k.Mat2D;X.xx=D.zd/D.od.width;X.yy=D.yd/D.od.height;X.xy=X.yx=0;X.tx=D.Id;X.ty=D.Jd;e.transform(X);for(const pb of D.td)pb();e.restoreClipRect();D.td=[]}for(e.flush();A<E;++A)F=z[A],D=F.le,D.globalCompositeOperation="copy",D.drawImage(e.od,F.Id,F.Jd,F.zd,F.yd,0,0,F.od.width,F.od.height);A=E}}}const d=navigator.userAgent.match(/firefox|fxios/i);let e=null;const f=new Set,g=k.makeRenderer;k.makeRenderer=function(u,l){return l?(e||(e=b(document.createElement("canvas")),
|
|
37
|
+
(v.canvas.Re=E);fa[z]=E;("undefined"===typeof l.ue||l.ue)&&ha(E);m=fa[z];k.re=r=m&&m.Td;l=g(u.width,u.height);l.ne=z;l.od=u;l.be=u.width;l.ae=u.height;l.me=t;return l}function c(){if(e){var u=e.oe,l=0,t=0,v=0,z=Array(f.size),E=0;for(var A of f)A.zd=Math.min(A.od.width,u),A.yd=Math.min(A.od.height,u),A.Ud=A.yd*A.zd,l=Math.max(l,A.zd),t=Math.max(t,A.yd),v+=A.Ud,z[E++]=A;f.clear();if(!(0>=v)){l=1<<(0>=l?0:32-Math.clz32(l-1));for(t=1<<(0>=t?0:32-Math.clz32(t-1));t*l<v;)l<=t?l*=2:t*=2;l=Math.min(l,u);
|
|
38
|
+
l=Math.min(t,u);z.sort((X,pb)=>pb.Ud-X.Ud);v=new k.DynamicRectanizer(u);for(A=0;A<z.length;){v.reset(l,t);for(E=A;E<z.length;++E){var F=z[E],D=v.addRect(F.zd,F.yd);if(0>D){console.assert(E>A);break}F.Id=D&65535;F.Jd=D>>16}F=n.push(v.drawWidth());D=p.push(v.drawHeight());console.assert(F>=v.drawWidth());console.assert(D>=v.drawHeight());console.assert(F<=u);console.assert(D<=u);e.od.width!=F&&(e.od.width=F);e.od.height!=D&&(e.od.height=D);e.clear();for(F=A;F<E;++F){D=z[F];e.saveClipRect(D.Id,D.Jd,
|
|
39
|
+
D.Id+D.zd,D.Jd+D.yd);let X=new k.Mat2D;X.xx=D.zd/D.od.width;X.yy=D.yd/D.od.height;X.xy=X.yx=0;X.tx=D.Id;X.ty=D.Jd;e.transform(X);for(const pb of D.td)pb();e.restoreClipRect();D.td=[]}for(e.flush();A<E;++A)F=z[A],D=F.le,D.globalCompositeOperation="copy",D.drawImage(e.od,F.Id,F.Jd,F.zd,F.yd,0,0,F.od.width,F.od.height);A=E}}}}const d=navigator.userAgent.match(/firefox|fxios/i);let e=null;const f=new Set,g=k.makeRenderer;k.makeRenderer=function(u,l){return l?(e||(e=b(document.createElement("canvas")),
|
|
40
40
|
l=e.me,e.oe=Math.min(l.getParameter(l.MAX_RENDERBUFFER_SIZE),l.getParameter(l.MAX_TEXTURE_SIZE))),new a(u)):b(u)};const h=k.Artboard.prototype.draw;k.Artboard.prototype.draw=function(u){u.td?u.td.push(h.bind(this,u.pe)):h.call(this,u)};const n=new da,p=new da,q=new ca;Rive.requestAnimationFrame=q.requestAnimationFrame.bind(q);Rive.cancelAnimationFrame=q.cancelAnimationFrame.bind(q);Rive.enableFPSCounter=q.ve.bind(q);q.he=c;const x=k.WebGLRenderer.prototype.clear;k.WebGLRenderer.prototype.clear=function(){m=
|
|
41
41
|
fa[this.ne];k.re=r=m&&m.Td;const u=this.od;if(this.be!=u.width||this.ae!=u.height)this.resize(u.width,u.height),this.be=u.width,this.ae=u.height;x.call(this)}};var ia={},ja;for(ja in k)k.hasOwnProperty(ja)&&(ia[ja]=k[ja]);var ka="./this.program",la="object"===typeof window,ma="function"===typeof importScripts,na="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node,w="",oa,pa,qa,ra,sa;
|
|
42
42
|
if(na)w=ma?require("path").dirname(w)+"/":__dirname+"/",oa=function(a,b){var c=ta(a);if(c)return b?c:c.toString();ra||(ra=require("fs"));sa||(sa=require("path"));a=sa.normalize(a);return ra.readFileSync(a,b?null:"utf8")},qa=function(a){a=oa(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},pa=function(a,b,c){var d=ta(a);d&&b(d);ra||(ra=require("fs"));sa||(sa=require("path"));a=sa.normalize(a);ra.readFile(a,function(e,f){e?c(e):b(f.buffer)})},1<process.argv.length&&(ka=process.argv[1].replace(/\\/g,
|
|
@@ -176,7 +176,7 @@ k.run=wd;if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);
|
|
|
176
176
|
/* 2 */
|
|
177
177
|
/***/ ((module) => {
|
|
178
178
|
|
|
179
|
-
module.exports = JSON.parse('{"name":"@rive-app/webgl-single","version":"1.0.
|
|
179
|
+
module.exports = JSON.parse('{"name":"@rive-app/webgl-single","version":"1.0.46","description":"Rive\'s webgl based web api with bundled wasm.","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.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
180
180
|
|
|
181
181
|
/***/ })
|
|
182
182
|
/******/ ]);
|