@rive-app/webgl2-advanced 2.53.0 → 2.54.0
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.wasm +0 -0
- package/rive_fallback.wasm +0 -0
- package/webgl2_advanced.mjs +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rive-app/webgl2-advanced",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.54.0",
|
|
4
4
|
"description": "Rive web runtime, low-level API, WebGL2 renderer. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.",
|
|
5
5
|
"main": "webgl2_advanced.mjs",
|
|
6
6
|
"homepage": "https://rive.app",
|
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_fallback.wasm
CHANGED
|
Binary file
|
package/webgl2_advanced.mjs
CHANGED
|
@@ -300,14 +300,14 @@ Ke=d=>Je(d);
|
|
|
300
300
|
!1;return m},["delete"](){this.m.u||Fc(this);if(this.m.ka&&!this.m.ga)throw new Zb("Object already scheduled for deletion");tc(this);var m=this.m;--m.count.value;0===m.count.value&&(m.D?m.K.P(m.D):m.v.o.P(m.u));this.m.ga||(this.m.D=void 0,this.m.u=void 0)},isDeleted:function(){return!this.m.u},deleteLater:function(){this.m.u||Fc(this);if(this.m.ka&&!this.m.ga)throw new Zb("Object already scheduled for deletion");Gc.push(this);this.m.ka=!0;return this}});const g=Symbol.dispose;g&&(d[g]=d["delete"])})();
|
|
301
301
|
Object.assign(fd.prototype,{vc(d){this.Db&&(d=this.Db(d));return d},pb(d){this.P?.(d)},J:yc,s:function(d){function g(){return this.Ha?ed(this.o.O,{v:this.Oc,u:m,K:this,D:d}):ed(this.o.O,{v:this,u:d})}var m=this.vc(d);if(!m)return this.pb(d),null;var u=dd(this.o,m);if(void 0!==u){if(0===u.m.count.value)return u.m.u=m,u.m.D=d,u.clone();u=u.clone();this.pb(d);return u}u=this.o.uc(m);u=Ic[u];if(!u)return g.call(this);u=this.Ga?u.jc:u.pointerType;var z=cd(m,this.o,u.o);return null===z?g.call(this):this.Ha?
|
|
302
302
|
ed(u.o.O,{v:u,u:z,K:this,D:d}):ed(u.o.O,{v:u,u:z})}});for(let d=0;32>d;++d)ze.push(Array(d));J.print&&(Xa=J.print);J.printErr&&(Ya=J.printErr);J.wasmBinary&&(Za=J.wasmBinary);J.thisProgram&&(Ra=J.thisProgram);if(J.preInit)for("function"==typeof J.preInit&&(J.preInit=[J.preInit]);0<J.preInit.length;)J.preInit.shift()();
|
|
303
|
-
var Oe={
|
|
303
|
+
var Oe={395128:()=>{J.onAssetChange&&J.onAssetChange()},395186:(d,g,m,u,z)=>{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=d;window.miniaudio.device_type.capture=g;window.miniaudio.device_type.duplex=m;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=u;window.miniaudio.device_state.started=
|
|
304
304
|
z;let D=window.miniaudio;D.devices=[];D.track_device=function(F){for(var E=0;E<D.devices.length;++E)if(null==D.devices[E])return D.devices[E]=F,E;D.devices.push(F);return D.devices.length-1};D.untrack_device_by_index=function(F){for(D.devices[F]=null;0<D.devices.length;)if(null==D.devices[D.devices.length-1])D.devices.pop();else break};D.untrack_device=function(F){for(var E=0;E<D.devices.length;++E)if(D.devices[E]==F)return D.untrack_device_by_index(E)};D.get_device_by_index=function(F){return D.devices[F]};
|
|
305
|
-
D.unlock_event_types=["touchend","click"];D.unlock=function(){for(var F=0;F<D.devices.length;++F){var E=D.devices[F];null!=E&&null!=E.L&&E.state===D.device_state.started&&E.L.resume().then(()=>{Le(E.zb)},I=>{console.error("Failed to resume audiocontext",I)})}D.unlock_event_types.map(function(I){document.removeEventListener(I,D.unlock,!0)})};D.unlock_event_types.map(function(F){document.addEventListener(F,D.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},
|
|
306
|
-
(window.miniaudio.unlock_event_types.map(function(d){document.removeEventListener(d,window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},
|
|
305
|
+
D.unlock_event_types=["touchend","click"];D.unlock=function(){for(var F=0;F<D.devices.length;++F){var E=D.devices[F];null!=E&&null!=E.L&&E.state===D.device_state.started&&E.L.resume().then(()=>{Le(E.zb)},I=>{console.error("Failed to resume audiocontext",I)})}D.unlock_event_types.map(function(I){document.removeEventListener(I,D.unlock,!0)})};D.unlock_event_types.map(function(F){document.addEventListener(F,D.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},397364:()=>{"undefined"!==typeof window.miniaudio&&
|
|
306
|
+
(window.miniaudio.unlock_event_types.map(function(d){document.removeEventListener(d,window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},397668:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,397772:()=>{try{var d=new (window.AudioContext||window.webkitAudioContext),g=d.sampleRate;d.close();return g}catch(m){return 0}},397943:(d,g,m,u,z,D)=>{if("undefined"===typeof window.miniaudio)return-1;
|
|
307
307
|
var F={},E={};d==window.miniaudio.device_type.playback&&0!=m&&(E.sampleRate=m);F.L=new (window.AudioContext||window.webkitAudioContext)(E);F.L.suspend();F.state=window.miniaudio.device_state.stopped;m=0;d!=window.miniaudio.device_type.playback&&(m=g);F.V=F.L.createScriptProcessor(u,m,g);F.V.onaudioprocess=function(I){if(null==F.na||0==F.na.length||F.na.buffer!==mb.buffer)F.na=new Float32Array(mb.buffer,Number(z),u*g);if(d==window.miniaudio.device_type.capture||d==window.miniaudio.device_type.duplex){for(var P=
|
|
308
308
|
0;P<g;P+=1)for(var S=I.inputBuffer.getChannelData(P),T=F.na,U=0;U<u;U+=1)T[U*g+P]=S[U];Me(D,u,z)}if(d==window.miniaudio.device_type.playback||d==window.miniaudio.device_type.duplex)for(Ne(D,u,z),P=0;P<I.outputBuffer.numberOfChannels;++P)for(S=I.outputBuffer.getChannelData(P),T=F.na,U=0;U<u;U+=1)S[U]=T[U*g+P];else for(P=0;P<I.outputBuffer.numberOfChannels;++P)I.outputBuffer.getChannelData(P).fill(0)};d!=window.miniaudio.device_type.capture&&d!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,
|
|
309
|
-
video:!1}).then(function(I){F.Oa=F.L.createMediaStreamSource(I);F.Oa.connect(F.V);F.V.connect(F.L.destination)}).catch(function(I){console.log("Failed to get user media: "+I)});d==window.miniaudio.device_type.playback&&F.V.connect(F.L.destination);F.zb=D;return window.miniaudio.track_device(F)},
|
|
310
|
-
(d.Oa.disconnect(),d.Oa=void 0);d.L.close();d.L=void 0;d.zb=void 0},
|
|
309
|
+
video:!1}).then(function(I){F.Oa=F.L.createMediaStreamSource(I);F.Oa.connect(F.V);F.V.connect(F.L.destination)}).catch(function(I){console.log("Failed to get user media: "+I)});d==window.miniaudio.device_type.playback&&F.V.connect(F.L.destination);F.zb=D;return window.miniaudio.track_device(F)},400887:d=>window.miniaudio.get_device_by_index(d).L.sampleRate,400960:d=>{d=window.miniaudio.get_device_by_index(d);void 0!==d.V&&(d.V.onaudioprocess=function(){},d.V.disconnect(),d.V=void 0);void 0!==d.Oa&&
|
|
310
|
+
(d.Oa.disconnect(),d.Oa=void 0);d.L.close();d.L=void 0;d.zb=void 0},401360:d=>{window.miniaudio.untrack_device_by_index(d)},401410:d=>{d=window.miniaudio.get_device_by_index(d);d.L.resume();d.state=window.miniaudio.device_state.started},401549:d=>{d=window.miniaudio.get_device_by_index(d);d.L.suspend();d.state=window.miniaudio.device_state.stopped}},hc,Ce,gc,Pe,Qe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,Le,Me,Ne,$e,af,Kb,Je,Mb,tb,jd,cf={__syscall_fcntl64:function(){return 0},__syscall_ioctl:function(){return 0},
|
|
311
311
|
__syscall_openat:function(){},_abort_js:()=>ub(""),_embind_create_inheriting_constructor:(d,g,m)=>{d=cc(d);g=sc(g,"wrapper");m=$b(m);var u=g.o,z=u.O,D=u.C.O,F=u.C.constructor;d=Wb(d,function(...E){for(var I of u.C.Bb)if(this[I]===D[I])throw new bc(`Pure virtual function ${I} must be implemented in JavaScript`);Object.defineProperty(this,"__parent",{value:z});this.__construct(...E)});z.__construct=function(...E){if(this===z)throw new Zb("Pass correct 'this' to __construct");E=F.implement(this,...E);
|
|
312
312
|
tc(E);var I=E.m;E.notifyOnDestruction();I.ga=!0;Object.defineProperties(this,{m:{value:I}});vc(this);E=I.u;E=ec(u,E);if(dc.hasOwnProperty(E))throw new Zb(`Tried to register registered instance: ${E}`);dc[E]=this};z.__destruct=function(){if(this===z)throw new Zb("Pass correct 'this' to __destruct");tc(this);var E=this.m.u;E=ec(u,E);if(dc.hasOwnProperty(E))delete dc[E];else throw new Zb(`Tried to unregister unregistered instance: ${E}`);};d.prototype=Object.create(z);Object.assign(d.prototype,m);return ac(d)},
|
|
313
313
|
_embind_finalize_value_object:d=>{var g=wc[d];delete wc[d];var m=g.eb,u=g.P,z=g.rb,D=z.map(F=>F.yc).concat(z.map(F=>F.pk));Dc([d],D,F=>{var E={},I,P;for([I,P]of z.entries()){const S=F[I],T=P.wc,U=P.xc,ja=F[I+z.length],oa=P.nk,xa=P.qk;E[P.rc]={read:Y=>S.s(T(U,Y)),write:(Y,da)=>{var ia=[];oa(xa,Y,ja.B(ia,da));xc(ia)},optional:S.optional}}return[{name:g.name,s:S=>{var T={},U;for(U in E)T[U]=E[U].read(S);u(S);return T},B:(S,T)=>{for(var U in E)if(!(U in T||E[U].optional))throw new TypeError(`Missing field: "${U}"`);
|