@rive-app/webgl2 2.43.0 → 2.43.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 +1 -1
- package/rive.js +7 -7
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +47 -0
- package/rive_fallback.wasm +0 -0
package/package.json
CHANGED
package/rive.js
CHANGED
|
@@ -431,14 +431,14 @@ return}switch(c){case 1:c=d;E[b>>2]=c;E[b+4>>2]=(c-E[b>>2])/4294967296;break;cas
|
|
|
431
431
|
!1;return c},["delete"](){this.g.m||dc(this);if(this.g.ka&&!this.g.ia)throw new O("Object already scheduled for deletion");Ub(this);var c=this.g;--c.count.value;0===c.count.value&&(c.D?c.K.R(c.D):c.u.h.R(c.m));this.g.ia||(this.g.D=void 0,this.g.m=void 0)},isDeleted:function(){return!this.g.m},deleteLater:function(){this.g.m||dc(this);if(this.g.ka&&!this.g.ia)throw new O("Object already scheduled for deletion");ec.push(this);this.g.ka=!0;return this}});const b=Symbol.dispose;b&&(a[b]=a["delete"])})();
|
|
432
432
|
Object.assign(tc.prototype,{Mb(a){this.lb&&(a=this.lb(a));return a},Ya(a){this.R?.(a)},J:Zb,o:function(a){function b(){return this.wa?sc(this.h.N,{u:this.$b,m:c,K:this,D:a}):sc(this.h.N,{u:this,m:a})}var c=this.Mb(a);if(!c)return this.Ya(a),null;var d=rc(this.h,c);if(void 0!==d){if(0===d.g.count.value)return d.g.m=c,d.g.D=a,d.clone();d=d.clone();this.Ya(a);return d}d=this.h.Lb(c);d=gc[d];if(!d)return b.call(this);d=this.va?d.Cb:d.pointerType;var e=qc(c,this.h,d.h);return null===e?b.call(this):this.wa?
|
|
433
433
|
sc(d.h.N,{u:d,m:e,K:this,D:a}):sc(d.h.N,{u:d,m:e})}});for(let a=0;32>a;++a)sd.push(Array(a));l.print&&(oa=l.print);l.printErr&&(w=l.printErr);l.wasmBinary&&(pa=l.wasmBinary);l.thisProgram&&(ja=l.thisProgram);if(l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);0<l.preInit.length;)l.preInit.shift()();
|
|
434
|
-
var Cd={
|
|
434
|
+
var Cd={362693:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.miniaudio){window.miniaudio={referenceCount:0};window.miniaudio.device_type={};window.miniaudio.device_type.playback=a;window.miniaudio.device_type.capture=b;window.miniaudio.device_type.duplex=c;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=d;window.miniaudio.device_state.started=e;let f=window.miniaudio;f.devices=
|
|
435
435
|
[];f.track_device=function(g){for(var h=0;h<f.devices.length;++h)if(null==f.devices[h])return f.devices[h]=g,h;f.devices.push(g);return f.devices.length-1};f.untrack_device_by_index=function(g){for(f.devices[g]=null;0<f.devices.length;)if(null==f.devices[f.devices.length-1])f.devices.pop();else break};f.untrack_device=function(g){for(var h=0;h<f.devices.length;++h)if(f.devices[h]==g)return f.untrack_device_by_index(h)};f.get_device_by_index=function(g){return f.devices[g]};f.unlock_event_types=["touchend",
|
|
436
|
-
"click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.L&&h.state===f.device_state.started&&h.L.resume().then(()=>{zd(h.ib)},k=>{console.error("Failed to resume audiocontext",k)})}f.unlock_event_types.map(function(k){document.removeEventListener(k,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},
|
|
437
|
-
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},
|
|
436
|
+
"click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.L&&h.state===f.device_state.started&&h.L.resume().then(()=>{zd(h.ib)},k=>{console.error("Failed to resume audiocontext",k)})}f.unlock_event_types.map(function(k){document.removeEventListener(k,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},364871:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(a){document.removeEventListener(a,
|
|
437
|
+
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},365175:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,365279:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},365450:(a,b,c,d,e,f)=>{if("undefined"===typeof window.miniaudio)return-1;var g={},h={};a==window.miniaudio.device_type.playback&&0!=c&&(h.sampleRate=c);g.L=
|
|
438
438
|
new (window.AudioContext||window.webkitAudioContext)(h);g.L.suspend();g.state=window.miniaudio.device_state.stopped;c=0;a!=window.miniaudio.device_type.playback&&(c=b);g.aa=g.L.createScriptProcessor(d,c,b);g.aa.onaudioprocess=function(k){if(null==g.ua||0==g.ua.length)g.ua=new Float32Array(va.buffer,e,d*b);if(a==window.miniaudio.device_type.capture||a==window.miniaudio.device_type.duplex){for(var n=0;n<b;n+=1)for(var p=k.inputBuffer.getChannelData(n),u=g.ua,t=0;t<d;t+=1)u[t*b+n]=p[t];Ad(f,d,e)}if(a==
|
|
439
439
|
window.miniaudio.device_type.playback||a==window.miniaudio.device_type.duplex)for(Bd(f,d,e),n=0;n<k.outputBuffer.numberOfChannels;++n)for(p=k.outputBuffer.getChannelData(n),u=g.ua,t=0;t<d;t+=1)p[t]=u[t*b+n];else for(n=0;n<k.outputBuffer.numberOfChannels;++n)k.outputBuffer.getChannelData(n).fill(0)};a!=window.miniaudio.device_type.capture&&a!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(k){g.Ea=g.L.createMediaStreamSource(k);g.Ea.connect(g.aa);
|
|
440
|
-
g.aa.connect(g.L.destination)}).catch(function(k){console.log("Failed to get user media: "+k)});a==window.miniaudio.device_type.playback&&g.aa.connect(g.L.destination);g.ib=f;return window.miniaudio.track_device(g)},
|
|
441
|
-
{window.miniaudio.untrack_device_by_index(a)},
|
|
440
|
+
g.aa.connect(g.L.destination)}).catch(function(k){console.log("Failed to get user media: "+k)});a==window.miniaudio.device_type.playback&&g.aa.connect(g.L.destination);g.ib=f;return window.miniaudio.track_device(g)},368327:a=>window.miniaudio.get_device_by_index(a).L.sampleRate,368400:a=>{a=window.miniaudio.get_device_by_index(a);void 0!==a.aa&&(a.aa.onaudioprocess=function(){},a.aa.disconnect(),a.aa=void 0);void 0!==a.Ea&&(a.Ea.disconnect(),a.Ea=void 0);a.L.close();a.L=void 0;a.ib=void 0},368800:a=>
|
|
441
|
+
{window.miniaudio.untrack_device_by_index(a)},368850:a=>{a=window.miniaudio.get_device_by_index(a);a.L.resume();a.state=window.miniaudio.device_state.started},368989:a=>{a=window.miniaudio.get_device_by_index(a);a.L.suspend();a.state=window.miniaudio.device_state.stopped}},Rb,vd,Qb,zd,Ad,Bd,Dd,Ed,Fd,za,vc,Hd={__syscall_fcntl64:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 0:var e=La();if(0>e)break;for(;kb[e];)e++;return xb(d,e).Z;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=
|
|
442
442
|
La(),d.flags|=e,0;case 12:return e=La(),ta[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof Hb||"ErrnoError"!==f.name)throw f;return-f.Y}},__syscall_ioctl:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 21509:return d.s?0:-59;case 21505:if(!d.s)return-59;if(d.s.X.Tb){a=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=La();D[e>>2]=25856;D[e+4>>2]=5;D[e+8>>2]=191;D[e+12>>2]=35387;for(var f=0;32>f;f++)A[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.s?
|
|
443
443
|
0:-59;case 21506:case 21507:case 21508:if(!d.s)return-59;if(d.s.X.Ub)for(e=La(),a=[],f=0;32>f;f++)a.push(A[e+f+17]);return 0;case 21519:if(!d.s)return-59;e=La();return D[e>>2]=0;case 21520:return d.s?-28:-59;case 21537:case 21531:e=La();if(!d.i.Sb)throw new M(59);return d.i.Sb(d,b,e);case 21523:if(!d.s)return-59;d.s.X.Vb&&(f=[24,80],e=La(),ta[e>>1]=f[0],ta[e+2>>1]=f[1]);return 0;case 21524:return d.s?0:-59;case 21515:return d.s?0:-59;default:return-28}}catch(g){if("undefined"==typeof Hb||"ErrnoError"!==
|
|
444
444
|
g.name)throw g;return-g.Y}},__syscall_openat:function(a,b,c,d){Ka=d;try{b=b?K(B,b):"";var e=b;if("/"===e.charAt(0))b=e;else{var f=-100===a?"/":vb(a).path;if(0==e.length)throw new M(44);b=f+"/"+e}var g=d?La():0;return Eb(b,c,g).Z}catch(h){if("undefined"==typeof Hb||"ErrnoError"!==h.name)throw h;return-h.Y}},_abort_js:()=>Aa(""),_embind_create_inheriting_constructor:(a,b,c)=>{a=Q(a);b=Tb(b,"wrapper");c=P(c);var d=b.h,e=d.N,f=d.C.N,g=d.C.constructor;a=Ib(a,function(...h){for(var k of d.C.jb)if(this[k]===
|
|
@@ -505,7 +505,7 @@ Ha.push(d)}Ga(Ha)}}if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.pre
|
|
|
505
505
|
/* 5 */
|
|
506
506
|
/***/ ((module) => {
|
|
507
507
|
|
|
508
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.43.
|
|
508
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.43.1","description":"Rive\'s webgl2 based web api.","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)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive_fallback.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
509
509
|
|
|
510
510
|
/***/ }),
|
|
511
511
|
/* 6 */
|
|
@@ -6837,7 +6837,7 @@ var Rive = /** @class */ (function () {
|
|
|
6837
6837
|
this.canvas.height = dpr * height;
|
|
6838
6838
|
this._needsRedraw = true;
|
|
6839
6839
|
this.resizeToCanvas();
|
|
6840
|
-
if (this.layout.fit === Fit.Layout) {
|
|
6840
|
+
if (this.layout.fit === Fit.Layout && this.artboard) {
|
|
6841
6841
|
var scaleFactor = this._layout.layoutScaleFactor;
|
|
6842
6842
|
this.artboard.width = width / scaleFactor;
|
|
6843
6843
|
this.artboard.height = height / scaleFactor;
|