@rive-app/webgl 2.10.1 → 2.10.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/webgl",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "Rive's webgl based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.js CHANGED
@@ -46,12 +46,12 @@ function Aa(){var a=wa.buffer;l.HEAP8=z=new Int8Array(a);l.HEAP16=C=new Int16Arr
46
46
  function va(a){if(l.onAbort)l.onAbort(a);a="Aborted("+a+")";ta(a);xa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function Ia(a){return a.startsWith("data:application/octet-stream;base64,")}var Ja;Ja="webgl_advanced.wasm";if(!Ia(Ja)){var Ka=Ja;Ja=l.locateFile?l.locateFile(Ka,pa):pa+Ka}function La(a){if(a==Ja&&ua)return new Uint8Array(ua);if(ra)return ra(a);throw"both async and sync fetching of the wasm failed";}
47
47
  function Ma(a){if(!ua&&(na||oa)){if("function"==typeof fetch&&!a.startsWith("file://"))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>La(a));if(qa)return new Promise((b,c)=>{qa(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>La(a))}function Na(a,b,c){return Ma(a).then(d=>WebAssembly.instantiate(d,b)).then(d=>d).then(c,d=>{ta("failed to asynchronously prepare wasm: "+d);va(d)})}
48
48
  function Oa(a,b){var c=Ja;return ua||"function"!=typeof WebAssembly.instantiateStreaming||Ia(c)||c.startsWith("file://")||"function"!=typeof fetch?Na(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){ta("wasm streaming compile failed: "+e);ta("falling back to ArrayBuffer instantiation");return Na(c,a,b)}))}
49
- var I,J,Sa={425596:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.yd){window.yd={Je:0};window.yd.Nd={};window.yd.Nd.Ie=a;window.yd.Nd.capture=b;window.yd.Nd.Re=c;window.yd.me={};window.yd.me.stopped=d;window.yd.me.zf=e;let f=window.yd;f.Jd=[];f.Ag=function(g){for(var h=0;h<f.Jd.length;++h)if(null==f.Jd[h])return f.Jd[h]=g,h;f.Jd.push(g);return f.Jd.length-1};f.Ef=function(g){for(f.Jd[g]=null;0<f.Jd.length;)if(null==
49
+ var I,J,Sa={426156:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.yd){window.yd={Je:0};window.yd.Nd={};window.yd.Nd.Ie=a;window.yd.Nd.capture=b;window.yd.Nd.Re=c;window.yd.me={};window.yd.me.stopped=d;window.yd.me.zf=e;let f=window.yd;f.Jd=[];f.Ag=function(g){for(var h=0;h<f.Jd.length;++h)if(null==f.Jd[h])return f.Jd[h]=g,h;f.Jd.push(g);return f.Jd.length-1};f.Ef=function(g){for(f.Jd[g]=null;0<f.Jd.length;)if(null==
50
50
  f.Jd[f.Jd.length-1])f.Jd.pop();else break};f.Pg=function(g){for(var h=0;h<f.Jd.length;++h)if(f.Jd[h]==g)return f.Ef(h)};f.ze=function(g){return f.Jd[g]};f.Df=["touchend","click"];f.unlock=function(){for(var g=0;g<f.Jd.length;++g){var h=f.Jd[g];null!=h&&null!=h.Od&&h.state===f.me.zf&&h.Od.resume().then(()=>{Pa(h.sf)},p=>{console.error("Failed to resume audiocontext",p)})}f.Df.map(function(p){document.removeEventListener(p,f.unlock,!0)})};f.Df.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.yd.Je+=
51
- 1;return 1},427774:()=>{"undefined"!==typeof window.yd&&(--window.yd.Je,0===window.yd.Je&&delete window.yd)},427938:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,428042:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},428213:(a,b,c,d,e,f)=>{if("undefined"===typeof window.yd)return-1;var g={},h={};a==window.yd.Nd.Ie&&0!=c&&(h.sampleRate=c);g.Od=new (window.AudioContext||window.webkitAudioContext)(h);
51
+ 1;return 1},428334:()=>{"undefined"!==typeof window.yd&&(--window.yd.Je,0===window.yd.Je&&delete window.yd)},428498:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,428602:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},428773:(a,b,c,d,e,f)=>{if("undefined"===typeof window.yd)return-1;var g={},h={};a==window.yd.Nd.Ie&&0!=c&&(h.sampleRate=c);g.Od=new (window.AudioContext||window.webkitAudioContext)(h);
52
52
  g.Od.suspend();g.state=window.yd.me.stopped;c=0;a!=window.yd.Nd.Ie&&(c=b);g.ce=g.Od.createScriptProcessor(d,c,b);g.ce.onaudioprocess=function(p){if(null==g.Ae||0==g.Ae.length)g.Ae=new Float32Array(G.buffer,e,d*b);if(a==window.yd.Nd.capture||a==window.yd.Nd.Re){for(var m=0;m<b;m+=1)for(var t=p.inputBuffer.getChannelData(m),u=g.Ae,x=0;x<d;x+=1)u[x*b+m]=t[x];Qa(f,d,e)}if(a==window.yd.Nd.Ie||a==window.yd.Nd.Re)for(Ra(f,d,e),m=0;m<p.outputBuffer.numberOfChannels;++m)for(t=p.outputBuffer.getChannelData(m),
53
- u=g.Ae,x=0;x<d;x+=1)t[x]=u[x*b+m];else for(m=0;m<p.outputBuffer.numberOfChannels;++m)p.outputBuffer.getChannelData(m).fill(0)};a!=window.yd.Nd.capture&&a!=window.yd.Nd.Re||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(p){g.Ke=g.Od.createMediaStreamSource(p);g.Ke.connect(g.ce);g.ce.connect(g.Od.destination)}).catch(function(p){console.log("Failed to get user media: "+p)});a==window.yd.Nd.Ie&&g.ce.connect(g.Od.destination);g.sf=f;return window.yd.Ag(g)},431090:a=>window.yd.ze(a).Od.sampleRate,
54
- 431163:a=>{a=window.yd.ze(a);void 0!==a.ce&&(a.ce.onaudioprocess=function(){},a.ce.disconnect(),a.ce=void 0);void 0!==a.Ke&&(a.Ke.disconnect(),a.Ke=void 0);a.Od.close();a.Od=void 0;a.sf=void 0},431563:a=>{window.yd.Ef(a)},431613:a=>{a=window.yd.ze(a);a.Od.resume();a.state=window.yd.me.zf},431752:a=>{a=window.yd.ze(a);a.Od.suspend();a.state=window.yd.me.stopped}},Ta=a=>{for(;0<a.length;)a.shift()(l)},Ua=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,
53
+ u=g.Ae,x=0;x<d;x+=1)t[x]=u[x*b+m];else for(m=0;m<p.outputBuffer.numberOfChannels;++m)p.outputBuffer.getChannelData(m).fill(0)};a!=window.yd.Nd.capture&&a!=window.yd.Nd.Re||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(p){g.Ke=g.Od.createMediaStreamSource(p);g.Ke.connect(g.ce);g.ce.connect(g.Od.destination)}).catch(function(p){console.log("Failed to get user media: "+p)});a==window.yd.Nd.Ie&&g.ce.connect(g.Od.destination);g.sf=f;return window.yd.Ag(g)},431650:a=>window.yd.ze(a).Od.sampleRate,
54
+ 431723:a=>{a=window.yd.ze(a);void 0!==a.ce&&(a.ce.onaudioprocess=function(){},a.ce.disconnect(),a.ce=void 0);void 0!==a.Ke&&(a.Ke.disconnect(),a.Ke=void 0);a.Od.close();a.Od=void 0;a.sf=void 0},432123:a=>{window.yd.Ef(a)},432173:a=>{a=window.yd.ze(a);a.Od.resume();a.state=window.yd.me.zf},432312:a=>{a=window.yd.ze(a);a.Od.suspend();a.state=window.yd.me.stopped}},Ta=a=>{for(;0<a.length;)a.shift()(l)},Ua=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,
55
55
  1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Va=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ua(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Wa=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},Xa=a=>{if("/"===a)return"/";a=Va(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},
56
56
  Ya=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);va("initRandomDevice")},Za=a=>(Za=Ya())(a);function $a(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Ua(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}
57
57
  var ab="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,bb=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&ab)return ab.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},
@@ -209,7 +209,7 @@ function Ee(){function a(){if(!Ce&&(Ce=!0,l.calledRun=!0,!xa)){l.noFSInit||Ub||(
209
209
  /* 2 */
210
210
  /***/ ((module) => {
211
211
 
212
- module.exports = JSON.parse('{"name":"@rive-app/webgl","version":"2.10.1","description":"Rive\'s webgl 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.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
212
+ module.exports = JSON.parse('{"name":"@rive-app/webgl","version":"2.10.2","description":"Rive\'s webgl 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.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
213
213
 
214
214
  /***/ }),
215
215
  /* 3 */