@rive-app/webgl2-advanced 2.49.1 → 2.49.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/webgl2-advanced",
3
- "version": "2.49.1",
3
+ "version": "2.49.2",
4
4
  "description": "Rive's webgl2 low-level canvas based web api.",
5
5
  "main": "webgl2_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file
@@ -319,6 +319,11 @@ export declare class RendererWrapper {
319
319
  * is as many frames behind as it queues. Skip the frame rather than record it.
320
320
  */
321
321
  acceptsFrame?(): boolean;
322
+ /**
323
+ * @experimental How long the replay worker's recent frames took to finish,
324
+ * in milliseconds, or 0 before its first.
325
+ */
326
+ replayMs?(): number;
322
327
  /**
323
328
  * @experimental True once the replay worker's context was lost and restored.
324
329
  * What it held is gone, so the renderer and the file's session must be
Binary file
@@ -284,14 +284,14 @@ return}switch(m){case 1:m=u;lb[g>>2]=m;lb[g+4>>2]=(m-lb[g>>2])/4294967296;break;
284
284
  !1;return m},["delete"](){this.m.u||zc(this);if(this.m.la&&!this.m.ga)throw new Vb("Object already scheduled for deletion");nc(this);var m=this.m;--m.count.value;0===m.count.value&&(m.D?m.K.O(m.D):m.v.o.O(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||zc(this);if(this.m.la&&!this.m.ga)throw new Vb("Object already scheduled for deletion");Ac.push(this);this.m.la=!0;return this}});const g=Symbol.dispose;g&&(d[g]=d["delete"])})();
285
285
  Object.assign($c.prototype,{vc(d){this.Db&&(d=this.Db(d));return d},ob(d){this.O?.(d)},J:sc,s:function(d){function g(){return this.Ga?Zc(this.o.N,{v:this.Oc,u:m,K:this,D:d}):Zc(this.o.N,{v:this,u:d})}var m=this.vc(d);if(!m)return this.ob(d),null;var u=Yc(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.ob(d);return u}u=this.o.uc(m);u=Cc[u];if(!u)return g.call(this);u=this.Fa?u.jc:u.pointerType;var y=Xc(m,this.o,u.o);return null===y?g.call(this):this.Ga?
286
286
  Zc(u.o.N,{v:u,u:y,K:this,D:d}):Zc(u.o.N,{v:u,u:y})}});for(let d=0;32>d;++d)se.push(Array(d));K.print&&(Va=K.print);K.printErr&&(Wa=K.printErr);K.wasmBinary&&(Xa=K.wasmBinary);K.thisProgram&&(Pa=K.thisProgram);if(K.preInit)for("function"==typeof K.preInit&&(K.preInit=[K.preInit]);0<K.preInit.length;)K.preInit.shift()();
287
- var Ee={361364:(d,g,m,u,y)=>{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=y;let D=window.miniaudio;D.devices=
287
+ var Ee={362116:(d,g,m,u,y)=>{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=y;let D=window.miniaudio;D.devices=
288
288
  [];D.track_device=function(E){for(var F=0;F<D.devices.length;++F)if(null==D.devices[F])return D.devices[F]=E,F;D.devices.push(E);return D.devices.length-1};D.untrack_device_by_index=function(E){for(D.devices[E]=null;0<D.devices.length;)if(null==D.devices[D.devices.length-1])D.devices.pop();else break};D.untrack_device=function(E){for(var F=0;F<D.devices.length;++F)if(D.devices[F]==E)return D.untrack_device_by_index(F)};D.get_device_by_index=function(E){return D.devices[E]};D.unlock_event_types=["touchend",
289
- "click"];D.unlock=function(){for(var E=0;E<D.devices.length;++E){var F=D.devices[E];null!=F&&null!=F.L&&F.state===D.device_state.started&&F.L.resume().then(()=>{Be(F.yb)},L=>{console.error("Failed to resume audiocontext",L)})}D.unlock_event_types.map(function(L){document.removeEventListener(L,D.unlock,!0)})};D.unlock_event_types.map(function(E){document.addEventListener(E,D.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},363542:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(d){document.removeEventListener(d,
290
- window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},363846:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,363950:()=>{try{var d=new (window.AudioContext||window.webkitAudioContext),g=d.sampleRate;d.close();return g}catch(m){return 0}},364121:(d,g,m,u,y,D)=>{if("undefined"===typeof window.miniaudio)return-1;var E={},F={};d==window.miniaudio.device_type.playback&&0!=m&&(F.sampleRate=m);E.L=
289
+ "click"];D.unlock=function(){for(var E=0;E<D.devices.length;++E){var F=D.devices[E];null!=F&&null!=F.L&&F.state===D.device_state.started&&F.L.resume().then(()=>{Be(F.yb)},L=>{console.error("Failed to resume audiocontext",L)})}D.unlock_event_types.map(function(L){document.removeEventListener(L,D.unlock,!0)})};D.unlock_event_types.map(function(E){document.addEventListener(E,D.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},364294:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(d){document.removeEventListener(d,
290
+ window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},364598:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,364702:()=>{try{var d=new (window.AudioContext||window.webkitAudioContext),g=d.sampleRate;d.close();return g}catch(m){return 0}},364873:(d,g,m,u,y,D)=>{if("undefined"===typeof window.miniaudio)return-1;var E={},F={};d==window.miniaudio.device_type.playback&&0!=m&&(F.sampleRate=m);E.L=
291
291
  new (window.AudioContext||window.webkitAudioContext)(F);E.L.suspend();E.state=window.miniaudio.device_state.stopped;m=0;d!=window.miniaudio.device_type.playback&&(m=g);E.U=E.L.createScriptProcessor(u,m,g);E.U.onaudioprocess=function(L){if(null==E.oa||0==E.oa.length||E.oa.buffer!==mb.buffer)E.oa=new Float32Array(mb.buffer,Number(y),u*g);if(d==window.miniaudio.device_type.capture||d==window.miniaudio.device_type.duplex){for(var P=0;P<g;P+=1)for(var T=L.inputBuffer.getChannelData(P),U=E.oa,W=0;W<u;W+=
292
292
  1)U[W*g+P]=T[W];Ce(D,u,y)}if(d==window.miniaudio.device_type.playback||d==window.miniaudio.device_type.duplex)for(De(D,u,y),P=0;P<L.outputBuffer.numberOfChannels;++P)for(T=L.outputBuffer.getChannelData(P),U=E.oa,W=0;W<u;W+=1)T[W]=U[W*g+P];else for(P=0;P<L.outputBuffer.numberOfChannels;++P)L.outputBuffer.getChannelData(P).fill(0)};d!=window.miniaudio.device_type.capture&&d!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(L){E.Na=E.L.createMediaStreamSource(L);
293
- E.Na.connect(E.U);E.U.connect(E.L.destination)}).catch(function(L){console.log("Failed to get user media: "+L)});d==window.miniaudio.device_type.playback&&E.U.connect(E.L.destination);E.yb=D;return window.miniaudio.track_device(E)},367065:d=>window.miniaudio.get_device_by_index(d).L.sampleRate,367138:d=>{d=window.miniaudio.get_device_by_index(d);void 0!==d.U&&(d.U.onaudioprocess=function(){},d.U.disconnect(),d.U=void 0);void 0!==d.Na&&(d.Na.disconnect(),d.Na=void 0);d.L.close();d.L=void 0;d.yb=void 0},
294
- 367538:d=>{window.miniaudio.untrack_device_by_index(d)},367588:d=>{d=window.miniaudio.get_device_by_index(d);d.L.resume();d.state=window.miniaudio.device_state.started},367727:d=>{d=window.miniaudio.get_device_by_index(d);d.L.suspend();d.state=window.miniaudio.device_state.stopped}},dc,ve,cc,Fe,Ge,He,Ie,Je,Ke,Le,Me,Ne,Oe,Pe,Be,Ce,De,Qe,Re,Hb,ze,Jb,rb,cd,Te={__syscall_fcntl64:function(){return 0},__syscall_ioctl:function(){return 0},__syscall_openat:function(){},_abort_js:()=>sb(""),_embind_create_inheriting_constructor:(d,
293
+ E.Na.connect(E.U);E.U.connect(E.L.destination)}).catch(function(L){console.log("Failed to get user media: "+L)});d==window.miniaudio.device_type.playback&&E.U.connect(E.L.destination);E.yb=D;return window.miniaudio.track_device(E)},367817:d=>window.miniaudio.get_device_by_index(d).L.sampleRate,367890:d=>{d=window.miniaudio.get_device_by_index(d);void 0!==d.U&&(d.U.onaudioprocess=function(){},d.U.disconnect(),d.U=void 0);void 0!==d.Na&&(d.Na.disconnect(),d.Na=void 0);d.L.close();d.L=void 0;d.yb=void 0},
294
+ 368290:d=>{window.miniaudio.untrack_device_by_index(d)},368340:d=>{d=window.miniaudio.get_device_by_index(d);d.L.resume();d.state=window.miniaudio.device_state.started},368479:d=>{d=window.miniaudio.get_device_by_index(d);d.L.suspend();d.state=window.miniaudio.device_state.stopped}},dc,ve,cc,Fe,Ge,He,Ie,Je,Ke,Le,Me,Ne,Oe,Pe,Be,Ce,De,Qe,Re,Hb,ze,Jb,rb,cd,Te={__syscall_fcntl64:function(){return 0},__syscall_ioctl:function(){return 0},__syscall_openat:function(){},_abort_js:()=>sb(""),_embind_create_inheriting_constructor:(d,
295
295
  g,m)=>{d=Zb(d);g=mc(g,"wrapper");m=Wb(m);var u=g.o,y=u.N,D=u.C.N,E=u.C.constructor;d=Sb(d,function(...F){for(var L of u.C.Ab)if(this[L]===D[L])throw new Yb(`Pure virtual function ${L} must be implemented in JavaScript`);Object.defineProperty(this,"__parent",{value:y});this.__construct(...F)});y.__construct=function(...F){if(this===y)throw new Vb("Pass correct 'this' to __construct");F=E.implement(this,...F);nc(F);var L=F.m;F.notifyOnDestruction();L.ga=!0;Object.defineProperties(this,{m:{value:L}});
296
296
  pc(this);F=L.u;F=ac(u,F);if($b.hasOwnProperty(F))throw new Vb(`Tried to register registered instance: ${F}`);$b[F]=this};y.__destruct=function(){if(this===y)throw new Vb("Pass correct 'this' to __destruct");nc(this);var F=this.m.u;F=ac(u,F);if($b.hasOwnProperty(F))delete $b[F];else throw new Vb(`Tried to unregister unregistered instance: ${F}`);};d.prototype=Object.create(y);Object.assign(d.prototype,m);return Xb(d)},_embind_finalize_value_object:d=>{var g=qc[d];delete qc[d];var m=g.cb,u=g.O,y=g.qb,
297
297
  D=y.map(E=>E.yc).concat(y.map(E=>E.Sj));xc([d],D,E=>{var F={},L,P;for([L,P]of y.entries()){const T=E[L],U=P.wc,W=P.xc,na=E[L+y.length],oa=P.Rj,wa=P.Tj;F[P.rc]={read:aa=>T.s(U(W,aa)),write:(aa,ca)=>{var ha=[];oa(wa,aa,na.B(ha,ca));rc(ha)},optional:T.optional}}return[{name:g.name,s:T=>{var U={},W;for(W in F)U[W]=F[W].read(T);u(T);return U},B:(T,U)=>{for(var W in F)if(!(W in U||F[W].optional))throw new TypeError(`Missing field: "${W}"`);var na=m();for(W in F)F[W].write(na,U[W]);null!==T&&T.push(u,na);