@rive-app/webgl2-advanced 2.37.6 → 2.37.8
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_advanced.mjs.d.ts +17 -0
- package/webgl2_advanced.mjs +14 -8
package/package.json
CHANGED
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -877,6 +877,23 @@ export declare class StateMachineInstance {
|
|
|
877
877
|
*/
|
|
878
878
|
pointerExit(x: number, y: number, id: number): void;
|
|
879
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Returns true if this state machine has any focus nodes registered in its focus tree.
|
|
882
|
+
* Since the focus tree is unified across nested artboards, this covers the full scene.
|
|
883
|
+
* Use this to gate whether tab/focus traversal DOM listeners should be attached.
|
|
884
|
+
*/
|
|
885
|
+
hasFocusNodes(): boolean;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Move focus to the next focusable node in the focus tree via the state machine's focus manager.
|
|
889
|
+
*/
|
|
890
|
+
focusNext(): boolean;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Move focus to the previous focusable node in the focus tree via the state machine's focus manager.
|
|
894
|
+
*/
|
|
895
|
+
focusPrevious(): boolean;
|
|
896
|
+
|
|
880
897
|
/**
|
|
881
898
|
* Deletes the underlying instance created via the WASM. It's important to clean up this instance
|
|
882
899
|
* when no longer in use
|
package/webgl2_advanced.mjs
CHANGED
|
@@ -266,6 +266,9 @@ l.onRuntimeInitialized = function() {
|
|
|
266
266
|
C.width = 1;
|
|
267
267
|
C.height = 1;
|
|
268
268
|
d = b(C, A);
|
|
269
|
+
if (!d) {
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
269
272
|
d.Ya = !!d.T.getExtension("WEBGL_shader_pixel_local_storage");
|
|
270
273
|
d.Db = Math.min(d.T.getParameter(d.T.MAX_RENDERBUFFER_SIZE), d.T.getParameter(d.T.MAX_TEXTURE_SIZE));
|
|
271
274
|
d.Ka = !d.Ya;
|
|
@@ -275,6 +278,9 @@ l.onRuntimeInitialized = function() {
|
|
|
275
278
|
return d;
|
|
276
279
|
}
|
|
277
280
|
d = z(!0);
|
|
281
|
+
if (!d) {
|
|
282
|
+
throw "Unable to create WebGL context, your environment may not support WebGL. Try out @rive-app/canvas as an alternative.";
|
|
283
|
+
}
|
|
278
284
|
d.Ka || (d = z(!1));
|
|
279
285
|
}
|
|
280
286
|
return u ? new a(r) : b(r, d.Ka);
|
|
@@ -412,7 +418,7 @@ function Na(a, b) {
|
|
|
412
418
|
return Ma(c, a, b);
|
|
413
419
|
}));
|
|
414
420
|
}
|
|
415
|
-
var Oa, Pa, Ta = {
|
|
421
|
+
var Oa, Pa, Ta = {569016:(a, b, c, d, e) => {
|
|
416
422
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
417
423
|
return 0;
|
|
418
424
|
}
|
|
@@ -475,11 +481,11 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
|
|
|
475
481
|
}
|
|
476
482
|
window.h.Ea += 1;
|
|
477
483
|
return 1;
|
|
478
|
-
},
|
|
484
|
+
}, 571194:() => {
|
|
479
485
|
"undefined" !== typeof window.h && (window.h.Xa.map(function(a) {
|
|
480
486
|
document.removeEventListener(a, window.h.unlock, !0);
|
|
481
487
|
}), --window.h.Ea, 0 === window.h.Ea && delete window.h);
|
|
482
|
-
},
|
|
488
|
+
}, 571498:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 571602:() => {
|
|
483
489
|
try {
|
|
484
490
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
485
491
|
a.close();
|
|
@@ -487,7 +493,7 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
|
|
|
487
493
|
} catch (c) {
|
|
488
494
|
return 0;
|
|
489
495
|
}
|
|
490
|
-
},
|
|
496
|
+
}, 571773:(a, b, c, d, e, f) => {
|
|
491
497
|
if ("undefined" === typeof window.h) {
|
|
492
498
|
return -1;
|
|
493
499
|
}
|
|
@@ -533,7 +539,7 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
|
|
|
533
539
|
a == window.h.I.Ba && g.Y.connect(g.K.destination);
|
|
534
540
|
g.nb = f;
|
|
535
541
|
return window.h.mc(g);
|
|
536
|
-
},
|
|
542
|
+
}, 574650:a => window.h.sa(a).K.sampleRate, 574723:a => {
|
|
537
543
|
a = window.h.sa(a);
|
|
538
544
|
void 0 !== a.Y && (a.Y.onaudioprocess = function() {
|
|
539
545
|
}, a.Y.disconnect(), a.Y = void 0);
|
|
@@ -541,13 +547,13 @@ var Oa, Pa, Ta = {569592:(a, b, c, d, e) => {
|
|
|
541
547
|
a.K.close();
|
|
542
548
|
a.K = void 0;
|
|
543
549
|
a.nb = void 0;
|
|
544
|
-
},
|
|
550
|
+
}, 575123:a => {
|
|
545
551
|
window.h.yb(a);
|
|
546
|
-
},
|
|
552
|
+
}, 575173:a => {
|
|
547
553
|
a = window.h.sa(a);
|
|
548
554
|
a.K.resume();
|
|
549
555
|
a.state = window.h.ha.ub;
|
|
550
|
-
},
|
|
556
|
+
}, 575312:a => {
|
|
551
557
|
a = window.h.sa(a);
|
|
552
558
|
a.K.suspend();
|
|
553
559
|
a.state = window.h.ha.stopped;
|