@rive-app/canvas 2.42.1 → 2.42.2
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 +6 -6
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_fallback.wasm +0 -0
package/package.json
CHANGED
package/rive.js
CHANGED
|
@@ -449,14 +449,14 @@ c.va.count.value+=1;c.va.qb=!1;return c},["delete"](){this.va.Ba||zc(this);if(th
|
|
|
449
449
|
const b=Symbol.dispose;b&&(a[b]=a["delete"])})();
|
|
450
450
|
Object.assign(Pc.prototype,{hd(a){this.Ec&&(a=this.Ec(a));return a},qc(a){this.Wa?.(a)},Na:tc,Aa:function(a){function b(){return this.Bb?Oc(this.wa.Ta,{Da:this.zd,Ba:c,Qa:this,Ja:a}):Oc(this.wa.Ta,{Da:this,Ba:a})}var c=this.hd(a);if(!c)return this.qc(a),null;var d=Nc(this.wa,c);if(void 0!==d){if(0===d.va.count.value)return d.va.Ba=c,d.va.Ja=a,d.clone();d=d.clone();this.qc(a);return d}d=this.wa.gd(c);d=Cc[d];if(!d)return b.call(this);d=this.Ab?d.Yc:d.pointerType;var e=Mc(c,this.wa,d.wa);return null===
|
|
451
451
|
e?b.call(this):this.Bb?Oc(d.wa.Ta,{Da:d,Ba:e,Qa:this,Ja:a}):Oc(d.wa.Ta,{Da:d,Ba:e})}});k.noExitRuntime&&(Wa=k.noExitRuntime);k.print&&(sa=k.print);k.printErr&&(ta=k.printErr);k.wasmBinary&&(va=k.wasmBinary);k.thisProgram&&(la=k.thisProgram);if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);0<k.preInit.length;)k.preInit.shift()();
|
|
452
|
-
var Id={
|
|
452
|
+
var Id={258222:(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=
|
|
453
453
|
[];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",
|
|
454
|
-
"click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.Ra&&h.state===f.device_state.started&&h.Ra.resume().then(()=>{Fd(h.Cc)},l=>{console.error("Failed to resume audiocontext",l)})}f.unlock_event_types.map(function(l){document.removeEventListener(l,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},
|
|
455
|
-
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},
|
|
454
|
+
"click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.Ra&&h.state===f.device_state.started&&h.Ra.resume().then(()=>{Fd(h.Cc)},l=>{console.error("Failed to resume audiocontext",l)})}f.unlock_event_types.map(function(l){document.removeEventListener(l,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},260400:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(a){document.removeEventListener(a,
|
|
455
|
+
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},260704:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,260808:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},260979:(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.Ra=
|
|
456
456
|
new (window.AudioContext||window.webkitAudioContext)(h);g.Ra.suspend();g.state=window.miniaudio.device_state.stopped;c=0;a!=window.miniaudio.device_type.playback&&(c=b);g.hb=g.Ra.createScriptProcessor(d,c,b);g.hb.onaudioprocess=function(l){if(null==g.zb||0==g.zb.length)g.zb=new Float32Array(Ca.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 t=l.inputBuffer.getChannelData(n),u=g.zb,r=0;r<d;r+=1)u[r*b+n]=t[r];Gd(f,d,e)}if(a==
|
|
457
457
|
window.miniaudio.device_type.playback||a==window.miniaudio.device_type.duplex)for(Hd(f,d,e),n=0;n<l.outputBuffer.numberOfChannels;++n)for(t=l.outputBuffer.getChannelData(n),u=g.zb,r=0;r<d;r+=1)t[r]=u[r*b+n];else for(n=0;n<l.outputBuffer.numberOfChannels;++n)l.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(l){g.Ib=g.Ra.createMediaStreamSource(l);g.Ib.connect(g.hb);
|
|
458
|
-
g.hb.connect(g.Ra.destination)}).catch(function(l){console.log("Failed to get user media: "+l)});a==window.miniaudio.device_type.playback&&g.hb.connect(g.Ra.destination);g.Cc=f;return window.miniaudio.track_device(g)},
|
|
459
|
-
{window.miniaudio.untrack_device_by_index(a)},
|
|
458
|
+
g.hb.connect(g.Ra.destination)}).catch(function(l){console.log("Failed to get user media: "+l)});a==window.miniaudio.device_type.playback&&g.hb.connect(g.Ra.destination);g.Cc=f;return window.miniaudio.track_device(g)},263856:a=>window.miniaudio.get_device_by_index(a).Ra.sampleRate,263929:a=>{a=window.miniaudio.get_device_by_index(a);void 0!==a.hb&&(a.hb.onaudioprocess=function(){},a.hb.disconnect(),a.hb=void 0);void 0!==a.Ib&&(a.Ib.disconnect(),a.Ib=void 0);a.Ra.close();a.Ra=void 0;a.Cc=void 0},264329:a=>
|
|
459
|
+
{window.miniaudio.untrack_device_by_index(a)},264379:a=>{a=window.miniaudio.get_device_by_index(a);a.Ra.resume();a.state=window.miniaudio.device_state.started},264518:a=>{a=window.miniaudio.get_device_by_index(a);a.Ra.suspend();a.state=window.miniaudio.device_state.stopped}},lc,Jd,kc,Fd,Gd,Hd,Kd,Ld,Md,Nd,Ka,Rc,Pd={s:function(a,b,c){Xa=c;try{var d=Lb(a);switch(b){case 0:var e=Ya();if(0>e)break;for(;Ab[e];)e++;return Nb(d,e).fb;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=Ya(),d.flags|=
|
|
460
460
|
e,0;case 12:return e=Ya(),Aa[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof ac||"ErrnoError"!==f.name)throw f;return-f.eb}},L:function(a,b,c){Xa=c;try{var d=Lb(a);switch(b){case 21509:return d.Ca?0:-59;case 21505:if(!d.Ca)return-59;if(d.Ca.bb.od){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=Ya();F[e>>2]=25856;F[e+4>>2]=5;F[e+8>>2]=191;F[e+12>>2]=35387;for(var f=0;32>f;f++)w[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.Ca?
|
|
461
461
|
0:-59;case 21506:case 21507:case 21508:if(!d.Ca)return-59;if(d.Ca.bb.pd)for(e=Ya(),a=[],f=0;32>f;f++)a.push(w[e+f+17]);return 0;case 21519:if(!d.Ca)return-59;e=Ya();return F[e>>2]=0;case 21520:return d.Ca?-28:-59;case 21537:case 21531:e=Ya();if(!d.xa.nd)throw new P(59);return d.xa.nd(d,b,e);case 21523:if(!d.Ca)return-59;d.Ca.bb.qd&&(f=[24,80],e=Ya(),Aa[e>>1]=f[0],Aa[e+2>>1]=f[1]);return 0;case 21524:return d.Ca?0:-59;case 21515:return d.Ca?0:-59;default:return-28}}catch(g){if("undefined"==typeof ac||
|
|
462
462
|
"ErrnoError"!==g.name)throw g;return-g.eb}},M:function(a,b,c,d){Xa=d;try{b=b?gb(E,b):"";var e=b;if("/"===e.charAt(0))b=e;else{var f=-100===a?"/":Lb(a).path;if(0==e.length)throw new P(44);b=f+"/"+e}var g=d?Ya():0;return Yb(b,c,g).fb}catch(h){if("undefined"==typeof ac||"ErrnoError"!==h.name)throw h;return-h.eb}},P:()=>La(""),o:(a,b,c)=>{a=T(a);b=nc(b,"wrapper");c=ec(c);var d=b.wa,e=d.Ta,f=d.Ha.Ta,g=d.Ha.constructor;a=bc(a,function(...h){for(var l of d.Ha.Dc)if(this[l]===f[l])throw new gc(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
@@ -498,7 +498,7 @@ if(k.preRun)for("function"==typeof k.preRun&&(k.preRun=[k.preRun]);k.preRun.leng
|
|
|
498
498
|
/* 5 */
|
|
499
499
|
/***/ ((module) => {
|
|
500
500
|
|
|
501
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.42.
|
|
501
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.42.2","description":"Rive\'s canvas 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)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
502
502
|
|
|
503
503
|
/***/ }),
|
|
504
504
|
/* 6 */
|