@rive-app/webgl2-threads 2.49.3 → 2.49.4
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/README.md +21 -0
- package/package.json +7 -3
- package/rive.d.ts +1 -1
- package/rive.js +17 -17
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +2 -0
- package/rive_fallback.wasm +0 -0
- package/rive_threads.wasm +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+

|
|
2
|
+
# Rive
|
|
3
|
+
High-level Rive API using WebGL2 and the Rive Renderer, with threads on cross-origin isolated pages. Please see https://github.com/rive-app/rive-wasm for a list of all the available web runtimes and their details.
|
|
4
|
+
|
|
5
|
+
[Rive](https://rive.app) is an agent-native 2D and 3D engine for games, apps, and interactive UI. Use it as your whole engine, or add it to the products you already have. Build with your coding agent through the [Rive CLI](https://rive.app/agents), or draw, rig, and animate by hand with the professional design and animation tools in the [Rive Editor](https://rive.app/editor). Both work on the same files. Open-source runtimes, no royalties or runtime fees. Rive files (`.riv`) play natively on web, mobile, desktop, game engines, consoles, smart TVs, and cars.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install @rive-app/webgl2-threads
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
[Getting Started](https://github.com/rive-app/rive-wasm#getting-started)
|
|
12
|
+
|
|
13
|
+
## Build with your agent
|
|
14
|
+
|
|
15
|
+
Paste this into Claude Code, Codex, Cursor, or any agent that runs commands on your computer:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
Install the Rive CLI from rive.app/cli. Build an interactive hero for my website as a Rive file and add it to the page with the Rive web runtime.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Your agent installs the [Rive CLI](https://rive.app/agents), writes the scene, and opens a preview window that rebuilds every time it saves. Keep giving it notes, or open the same file in the [Rive Editor](https://editor.rive.app/) and shape it by hand. Trying it needs no account. Writing the `.riv` that ships on your site needs a free Rive account. Free exports play a short Rive splash screen; [paid plans](https://rive.app/pricing) export without it. See [Getting started with the Rive CLI](https://rive.app/docs/cli/getting-started).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rive-app/webgl2-threads",
|
|
3
|
-
"version": "2.49.
|
|
4
|
-
"description": "Rive
|
|
3
|
+
"version": "2.49.4",
|
|
4
|
+
"description": "Rive web runtime with the WebGL2 renderer, using threads on cross-origin isolated pages. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.",
|
|
5
5
|
"main": "rive.js",
|
|
6
6
|
"homepage": "https://rive.app",
|
|
7
7
|
"repository": {
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"rive",
|
|
13
|
-
"animation"
|
|
13
|
+
"animation",
|
|
14
|
+
"interactive",
|
|
15
|
+
"ui",
|
|
16
|
+
"game-engine",
|
|
17
|
+
"graphics"
|
|
14
18
|
],
|
|
15
19
|
"author": "Rive",
|
|
16
20
|
"contributors": [
|
package/rive.d.ts
CHANGED
|
@@ -837,7 +837,7 @@ export declare class Rive {
|
|
|
837
837
|
private ensureKeyboardInteractions;
|
|
838
838
|
/** Runs inside touchend/mouseup so focusing the proxy raises the mobile keyboard. */
|
|
839
839
|
private summonKeyboardForGesture;
|
|
840
|
-
/**
|
|
840
|
+
/** expectsTextInput (not key listeners alone), and with semantics on a textField. */
|
|
841
841
|
private wantsTextInputSession;
|
|
842
842
|
private advanceAndDrainForPointer;
|
|
843
843
|
private cleanupKeyboardInteractions;
|
package/rive.js
CHANGED
|
@@ -789,14 +789,14 @@ return}switch(m){case 1:m=u;lb[g>>2]=m;lb[g+4>>2]=(m-lb[g>>2])/4294967296;break;
|
|
|
789
789
|
!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"])})();
|
|
790
790
|
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?
|
|
791
791
|
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()();
|
|
792
|
-
var Ee={
|
|
792
|
+
var Ee={361988:(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=
|
|
793
793
|
[];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",
|
|
794
|
-
"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},
|
|
795
|
-
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},
|
|
794
|
+
"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},364166:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(d){document.removeEventListener(d,
|
|
795
|
+
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},364470:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,364574:()=>{try{var d=new (window.AudioContext||window.webkitAudioContext),g=d.sampleRate;d.close();return g}catch(m){return 0}},364745:(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=
|
|
796
796
|
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+=
|
|
797
797
|
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);
|
|
798
|
-
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)},
|
|
799
|
-
|
|
798
|
+
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)},367689:d=>window.miniaudio.get_device_by_index(d).L.sampleRate,367762: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},
|
|
799
|
+
368162:d=>{window.miniaudio.untrack_device_by_index(d)},368212:d=>{d=window.miniaudio.get_device_by_index(d);d.L.resume();d.state=window.miniaudio.device_state.started},368351: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,
|
|
800
800
|
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}});
|
|
801
801
|
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,
|
|
802
802
|
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);
|
|
@@ -1238,14 +1238,14 @@ e,m,n,w,B,D,F,J,O,null)},fg=(c,e)=>{var m=N,n=m.uniform1i;var w=N.sc;if(w){var B
|
|
|
1238
1238
|
!1;return m},["delete"](){this.m.u||wi(this);if(this.m.na&&!this.m.ia)throw new ai("Object already scheduled for deletion");ki(this);var m=this.m;--m.count.value;0===m.count.value&&(m.F?m.K.P(m.F):m.v.o.P(m.u));this.m.ia||(this.m.F=void 0,this.m.u=void 0)},isDeleted:function(){return!this.m.u},deleteLater:function(){this.m.u||wi(this);if(this.m.na&&!this.m.ia)throw new ai("Object already scheduled for deletion");xi.push(this);this.m.na=!0;return this}});const e=Symbol.dispose;e&&(c[e]=c["delete"])})();
|
|
1239
1239
|
Object.assign(Mi.prototype,{Cc(c){this.Jb&&(c=this.Jb(c));return c},tb(c){this.P?.(c)},J:pi,s:function(c){function e(){return this.Ka?Li(this.o.N,{v:this.Wc,u:m,K:this,F:c}):Li(this.o.N,{v:this,u:c})}var m=this.Cc(c);if(!m)return this.tb(c),null;var n=Ki(this.o,m);if(void 0!==n){if(0===n.m.count.value)return n.m.u=m,n.m.F=c,n.clone();n=n.clone();this.tb(c);return n}n=this.o.Bc(m);n=zi[n];if(!n)return e.call(this);n=this.Ja?n.qc:n.pointerType;var w=Ji(m,this.o,n.o);return null===w?e.call(this):this.Ka?
|
|
1240
1240
|
Li(n.o.N,{v:n,u:w,K:this,F:c}):Li(n.o.N,{v:n,u:w})}});for(let c=0;32>c;++c)Zj.push(Array(c));sa||(G.wasmMemory?rb=G.wasmMemory:rb=new WebAssembly.Memory({initial:(G.INITIAL_MEMORY||16777216)/65536,maximum:32768,shared:!0}),tb());G.noExitRuntime&&(Mh=G.noExitRuntime);G.print&&(jb=G.print);G.printErr&&(kb=G.printErr);G.wasmBinary&&(lb=G.wasmBinary);G.thisProgram&&(ab=G.thisProgram);if(G.preInit)for("function"==typeof G.preInit&&(G.preInit=[G.preInit]);0<G.preInit.length;)G.preInit.shift()();
|
|
1241
|
-
var oj=[Lh,Nh,Th,gc,hc,ic,Od,Pd,Rd,Sd,Td,Ud],nj={
|
|
1241
|
+
var oj=[Lh,Nh,Th,gc,hc,ic,Od,Pd,Rd,Sd,Td,Ud],nj={356620:()=>{G.riveReplayWorkerListen()},356660:()=>{G.riveReplayCapsArrived()},356699:c=>{G.riveReplayWorkerForget(c)},356741:c=>{G.riveReplaySurfaceRestored(c)},356786:(c,e,m)=>{G.riveReplayWorkerResize(c,e,m)},356836:(c,e,m,n,w)=>{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=
|
|
1242
1242
|
c;window.miniaudio.device_type.capture=e;window.miniaudio.device_type.duplex=m;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=n;window.miniaudio.device_state.started=w;let B=window.miniaudio;B.devices=[];B.track_device=function(D){for(var F=0;F<B.devices.length;++F)if(null==B.devices[F])return B.devices[F]=D,F;B.devices.push(D);return B.devices.length-1};B.untrack_device_by_index=function(D){for(B.devices[D]=null;0<B.devices.length;)if(null==B.devices[B.devices.length-1])B.devices.pop();
|
|
1243
1243
|
else break};B.untrack_device=function(D){for(var F=0;F<B.devices.length;++F)if(B.devices[F]==D)return B.untrack_device_by_index(F)};B.get_device_by_index=function(D){return B.devices[D]};B.unlock_event_types=["touchend","click"];B.unlock=function(){for(var D=0;D<B.devices.length;++D){var F=B.devices[D];null!=F&&null!=F.L&&F.state===B.device_state.started&&F.L.resume().then(()=>{eh(F.Eb)},J=>{console.error("Failed to resume audiocontext",J)})}B.unlock_event_types.map(function(J){document.removeEventListener(J,
|
|
1244
|
-
B.unlock,!0)})};B.unlock_event_types.map(function(D){document.addEventListener(D,B.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},
|
|
1245
|
-
{try{var c=new (window.AudioContext||window.webkitAudioContext),e=c.sampleRate;c.close();return e}catch(m){return 0}},
|
|
1244
|
+
B.unlock,!0)})};B.unlock_event_types.map(function(D){document.addEventListener(D,B.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},359014:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(c){document.removeEventListener(c,window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},359318:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,359422:()=>
|
|
1245
|
+
{try{var c=new (window.AudioContext||window.webkitAudioContext),e=c.sampleRate;c.close();return e}catch(m){return 0}},359593:(c,e,m,n,w,B)=>{if("undefined"===typeof window.miniaudio)return-1;var D={},F={};c==window.miniaudio.device_type.playback&&0!=m&&(F.sampleRate=m);D.L=new (window.AudioContext||window.webkitAudioContext)(F);D.L.suspend();D.state=window.miniaudio.device_state.stopped;m=0;c!=window.miniaudio.device_type.playback&&(m=e);D.W=D.L.createScriptProcessor(n,m,e);D.W.onaudioprocess=function(J){if(null==
|
|
1246
1246
|
D.qa||0==D.qa.length||D.qa.buffer!==(M(),Sb).buffer)D.qa=new Float32Array((M(),Sb).buffer,Number(w),n*e);if(c==window.miniaudio.device_type.capture||c==window.miniaudio.device_type.duplex){for(var O=0;O<e;O+=1)for(var U=J.inputBuffer.getChannelData(O),W=D.qa,X=0;X<n;X+=1)W[X*e+O]=U[X];fh(B,n,w)}if(c==window.miniaudio.device_type.playback||c==window.miniaudio.device_type.duplex)for(gh(B,n,w),O=0;O<J.outputBuffer.numberOfChannels;++O)for(U=J.outputBuffer.getChannelData(O),W=D.qa,X=0;X<n;X+=1)U[X]=W[X*
|
|
1247
1247
|
e+O];else for(O=0;O<J.outputBuffer.numberOfChannels;++O)J.outputBuffer.getChannelData(O).fill(0)};c!=window.miniaudio.device_type.capture&&c!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(J){D.Ra=D.L.createMediaStreamSource(J);D.Ra.connect(D.W);D.W.connect(D.L.destination)}).catch(function(J){console.log("Failed to get user media: "+J)});c==window.miniaudio.device_type.playback&&D.W.connect(D.L.destination);D.Eb=B;return window.miniaudio.track_device(D)},
|
|
1248
|
-
|
|
1248
|
+
362537:c=>window.miniaudio.get_device_by_index(c).L.sampleRate,362610:c=>{c=window.miniaudio.get_device_by_index(c);void 0!==c.W&&(c.W.onaudioprocess=function(){},c.W.disconnect(),c.W=void 0);void 0!==c.Ra&&(c.Ra.disconnect(),c.Ra=void 0);c.L.close();c.L=void 0;c.Eb=void 0},363010:c=>{window.miniaudio.untrack_device_by_index(c)},363060:c=>{c=window.miniaudio.get_device_by_index(c);c.L.resume();c.state=window.miniaudio.device_state.started},363199:c=>{c=window.miniaudio.get_device_by_index(c);c.L.suspend();
|
|
1249
1249
|
c.state=window.miniaudio.device_state.stopped}};function jd(c,e,m,n,w){var B=G.images;B||(B=new Map,G.images=B);m=new Uint8Array(rb.buffer,m,n);n=new Uint8Array(n);n.set(m);n=new Blob([n],{type:"image/png"});if(w)w=G.imageBlobs,w||(w=new Map,G.imageBlobs=w),w.set(e,n),G.riveReplayWorkerDecodeImage(c,e,n);else{var D=new Image;B.set(e,D);D.src=URL.createObjectURL(n);D.onload=function(){G._setWebImage(c,D.width,D.height)}}}
|
|
1250
1250
|
function kd(c,e){var m=G.imageBlobs.get(e),n=new Image;n.src=URL.createObjectURL(m);n.onload=function(){G.images.set(e,n);G._riveWebImagePageDecoded(c,n.width,n.height)}}function Ng(c,e){var m=G.images;m&&(e=m.get(e))&&(c=Kj[c].G,c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,e),c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))}
|
|
1251
1251
|
function ld(c){var e=G.images,m=e&&e.get(c);m&&(m.close&&m.close(),e.delete(c));(e=G.imageBlobs)&&e.delete(c)}
|
|
@@ -1280,7 +1280,7 @@ let riveWorker;
|
|
|
1280
1280
|
/* 6 */
|
|
1281
1281
|
/***/ ((module) => {
|
|
1282
1282
|
|
|
1283
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2-threads","version":"2.49.
|
|
1283
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2-threads","version":"2.49.4","description":"Rive web runtime with the WebGL2 renderer, using threads on cross-origin isolated pages. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation","interactive","ui","game-engine","graphics"],"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_threads.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}}');
|
|
1284
1284
|
|
|
1285
1285
|
/***/ }),
|
|
1286
1286
|
/* 7 */
|
|
@@ -6584,7 +6584,7 @@ var StateMachine = /** @class */ (function () {
|
|
|
6584
6584
|
};
|
|
6585
6585
|
/**
|
|
6586
6586
|
* Get metadata about the state of focus if applicable for this state machine.
|
|
6587
|
-
* @returns FocusState - { hasFocus: boolean, expectsKeyboardInput: boolean }
|
|
6587
|
+
* @returns FocusState - { hasFocus: boolean, expectsKeyboardInput: boolean, expectsTextInput: boolean }
|
|
6588
6588
|
*/
|
|
6589
6589
|
StateMachine.prototype.focusState = function () {
|
|
6590
6590
|
return this.instance.focusState();
|
|
@@ -8453,14 +8453,14 @@ var Rive = /** @class */ (function () {
|
|
|
8453
8453
|
var activeSm = this.focusStateMachine;
|
|
8454
8454
|
if (!activeSm)
|
|
8455
8455
|
return;
|
|
8456
|
-
if (this.wantsTextInputSession(activeSm.focusState().
|
|
8456
|
+
if (this.wantsTextInputSession(activeSm.focusState().expectsTextInput)) {
|
|
8457
8457
|
this._keyboardInteractions.summonForPointer();
|
|
8458
8458
|
}
|
|
8459
8459
|
};
|
|
8460
|
-
/**
|
|
8461
|
-
Rive.prototype.wantsTextInputSession = function (
|
|
8460
|
+
/** expectsTextInput (not key listeners alone), and with semantics on a textField. */
|
|
8461
|
+
Rive.prototype.wantsTextInputSession = function (expectsTextInput) {
|
|
8462
8462
|
var _a;
|
|
8463
|
-
if (!
|
|
8463
|
+
if (!expectsTextInput)
|
|
8464
8464
|
return false;
|
|
8465
8465
|
var node = (_a = this._semanticTree) === null || _a === void 0 ? void 0 : _a.focusedNode();
|
|
8466
8466
|
return node === undefined || node.role === _semantics__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField;
|
|
@@ -8922,8 +8922,8 @@ var Rive = /** @class */ (function () {
|
|
|
8922
8922
|
this._prevWantsTextInputSession = false;
|
|
8923
8923
|
return;
|
|
8924
8924
|
}
|
|
8925
|
-
var _a = activeSm.focusState(), hasFocus = _a.hasFocus,
|
|
8926
|
-
this.syncTextInputSession(ki, this.wantsTextInputSession(
|
|
8925
|
+
var _a = activeSm.focusState(), hasFocus = _a.hasFocus, expectsTextInput = _a.expectsTextInput;
|
|
8926
|
+
this.syncTextInputSession(ki, this.wantsTextInputSession(expectsTextInput));
|
|
8927
8927
|
this.syncRiveFocus(ki, this.canvas, hasFocus);
|
|
8928
8928
|
};
|
|
8929
8929
|
/** Begin/end the text session on wantsSession edges; decorate the proxy while it has DOM focus. */
|