@rive-app/canvas-advanced 1.0.34 → 1.0.37

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.
@@ -15,7 +15,7 @@ lineTo:function(n,t){this.ea.lineTo(n,t)},cubicTo:function(n,t,v,w,y,L){this.ea.
15
15
  n},blendMode:function(n){this.Ia=a(n)},linearGradient:function(n,t,v,w){this.na={Ga:n,Ha:t,Ba:v,Ca:w,wa:[]}},radialGradient:function(n,t,v,w){this.na={Ga:n,Ha:t,Ba:v,Ca:w,wa:[],Va:!0}},addStop:function(n,t){this.na.wa.push({color:n,stop:t})},completeGradient:function(){},draw:function(n,t){let v=this.Ka;var w=this.za,y=this.na;n.globalCompositeOperation=this.Ia;if(null!=y){w=y.Ga;var L=y.Ha;const cb=y.Ba;var sa=y.Ca;const db=y.wa;y.Va?(y=cb-w,sa-=L,w=n.createRadialGradient(w,L,0,w,L,Math.sqrt(y*y+
16
16
  sa*sa))):w=n.createLinearGradient(w,L,cb,sa);for(let Ma=0,Gb=db.length;Ma<Gb;Ma++)L=db[Ma],w.addColorStop(L.stop,b(L.color));this.za=w;this.na=null}switch(v){case p:n.strokeStyle=w;n.lineWidth=this.La;n.lineCap=this.qa;n.lineJoin=this.ra;n.stroke(t.ea);break;case l:n.fillStyle=w,n.fill(t.ea,t.ya===q?"evenodd":"nonzero")}}}),I=Rive.CanvasRenderer=f.extend("Renderer",{__construct:function(n){this.__parent.__construct.call(this);this.ha=n.getContext("2d");this.xa=n},save:function(){this.ha.save()},restore:function(){this.ha.restore()},
17
17
  transform:function(n){this.ha.transform(n.xx,n.xy,n.yx,n.yy,n.tx,n.ty)},drawPath:function(n,t){t.draw(this.ha,n)},drawImage:function(n,t,v){if(n=n.Ja){var w=this.ha;w.globalCompositeOperation=a(t);w.globalAlpha=v;w.drawImage(n,0,0);w.globalAlpha=1}},clipPath:function(n){this.ha.clip(n.ea,n.ya===q?"evenodd":"nonzero")},clear:function(){this.ha.clearRect(0,0,this.xa.width,this.xa.height)},flush:function(){}});Rive.makeRenderer=function(n){return new I(n)};Rive.renderFactory={makeRenderPaint:function(){return new x},
18
- makeRenderPath:function(){return new z},makeRenderImage:function(){return new u}}};var ca={},r;for(r in h)h.hasOwnProperty(r)&&(ca[r]=h[r]);var da="object"===typeof window,ea="function"===typeof importScripts,A="",fa,ha,ia,B,C;
18
+ makeRenderPath:function(){return new z},makeRenderImage:function(){return new u}};Rive.requestAnimationFrame=window.requestAnimationFrame.bind(window);Rive.cancelAnimationFrame=window.cancelAnimationFrame.bind(window)};var ca={},r;for(r in h)h.hasOwnProperty(r)&&(ca[r]=h[r]);var da="object"===typeof window,ea="function"===typeof importScripts,A="",fa,ha,ia,B,C;
19
19
  if("object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node)A=ea?require("path").dirname(A)+"/":__dirname+"/",fa=function(a,b){B||(B=require("fs"));C||(C=require("path"));a=C.normalize(a);return B.readFileSync(a,b?null:"utf8")},ia=function(a){a=fa(a,!0);a.buffer||(a=new Uint8Array(a));a.buffer||D("Assertion failed: undefined");return a},ha=function(a,b,c){B||(B=require("fs"));C||(C=require("path"));a=C.normalize(a);B.readFile(a,function(d,e){d?c(d):b(e.buffer)})},
20
20
  1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(a){throw a;}),process.on("unhandledRejection",function(a){throw a;}),h.inspect=function(){return"[Emscripten Module object]"};else if(da||ea)ea?A=self.location.href:"undefined"!==typeof document&&document.currentScript&&(A=document.currentScript.src),_scriptDir&&(A=_scriptDir),0!==A.indexOf("blob:")?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",fa=function(a){var b=
21
21
  new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ea&&(ia=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ha=function(a,b,c){var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var ja=h.print||console.log.bind(console),ka=h.printErr||console.warn.bind(console);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-advanced",
3
- "version": "1.0.34",
3
+ "version": "1.0.37",
4
4
  "description": "Rive's lightweight low-level canvas based web api.",
5
5
  "main": "canvas_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file