@rive-app/webgl2 2.19.2 → 2.19.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/package.json +1 -1
- package/rive.js +50 -13
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
package/package.json
CHANGED
package/rive.js
CHANGED
|
@@ -415,7 +415,7 @@ function Na(a, b) {
|
|
|
415
415
|
return Ma(c, a, b);
|
|
416
416
|
}));
|
|
417
417
|
}
|
|
418
|
-
var Oa, Pa, Ta = {
|
|
418
|
+
var Oa, Pa, Ta = {475492:(a, b, c, d, e) => {
|
|
419
419
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
420
420
|
return 0;
|
|
421
421
|
}
|
|
@@ -478,9 +478,9 @@ var Oa, Pa, Ta = {476212:(a, b, c, d, e) => {
|
|
|
478
478
|
}
|
|
479
479
|
window.h.Da += 1;
|
|
480
480
|
return 1;
|
|
481
|
-
},
|
|
481
|
+
}, 477670:() => {
|
|
482
482
|
"undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
|
|
483
|
-
},
|
|
483
|
+
}, 477834:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 477938:() => {
|
|
484
484
|
try {
|
|
485
485
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
486
486
|
a.close();
|
|
@@ -488,7 +488,7 @@ var Oa, Pa, Ta = {476212:(a, b, c, d, e) => {
|
|
|
488
488
|
} catch (c) {
|
|
489
489
|
return 0;
|
|
490
490
|
}
|
|
491
|
-
},
|
|
491
|
+
}, 478109:(a, b, c, d, e, f) => {
|
|
492
492
|
if ("undefined" === typeof window.h) {
|
|
493
493
|
return -1;
|
|
494
494
|
}
|
|
@@ -534,7 +534,7 @@ var Oa, Pa, Ta = {476212:(a, b, c, d, e) => {
|
|
|
534
534
|
a == window.h.I.Ba && g.Y.connect(g.J.destination);
|
|
535
535
|
g.jb = f;
|
|
536
536
|
return window.h.lc(g);
|
|
537
|
-
},
|
|
537
|
+
}, 480986:a => window.h.va(a).J.sampleRate, 481059:a => {
|
|
538
538
|
a = window.h.va(a);
|
|
539
539
|
void 0 !== a.Y && (a.Y.onaudioprocess = function() {
|
|
540
540
|
}, a.Y.disconnect(), a.Y = void 0);
|
|
@@ -542,13 +542,13 @@ var Oa, Pa, Ta = {476212:(a, b, c, d, e) => {
|
|
|
542
542
|
a.J.close();
|
|
543
543
|
a.J = void 0;
|
|
544
544
|
a.jb = void 0;
|
|
545
|
-
},
|
|
545
|
+
}, 481459:a => {
|
|
546
546
|
window.h.wb(a);
|
|
547
|
-
},
|
|
547
|
+
}, 481509:a => {
|
|
548
548
|
a = window.h.va(a);
|
|
549
549
|
a.J.resume();
|
|
550
550
|
a.state = window.h.ha.rb;
|
|
551
|
-
},
|
|
551
|
+
}, 481648:a => {
|
|
552
552
|
a = window.h.va(a);
|
|
553
553
|
a.J.suspend();
|
|
554
554
|
a.state = window.h.ha.stopped;
|
|
@@ -3459,8 +3459,8 @@ n.dynCall_viijii = (a, b, c, d, e, f, g) => (n.dynCall_viijii = B.dynCall_viijii
|
|
|
3459
3459
|
n.dynCall_iiiiij = (a, b, c, d, e, f, g) => (n.dynCall_iiiiij = B.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3460
3460
|
n.dynCall_iiiiijj = (a, b, c, d, e, f, g, m, p) => (n.dynCall_iiiiijj = B.dynCall_iiiiijj)(a, b, c, d, e, f, g, m, p);
|
|
3461
3461
|
n.dynCall_iiiiiijj = (a, b, c, d, e, f, g, m, p, l) => (n.dynCall_iiiiiijj = B.dynCall_iiiiiijj)(a, b, c, d, e, f, g, m, p, l);
|
|
3462
|
-
n.___start_em_js =
|
|
3463
|
-
n.___stop_em_js =
|
|
3462
|
+
n.___start_em_js = 472868;
|
|
3463
|
+
n.___stop_em_js = 475492;
|
|
3464
3464
|
var Wd;
|
|
3465
3465
|
Ga = function Xd() {
|
|
3466
3466
|
Wd || Yd();
|
|
@@ -3520,7 +3520,7 @@ Yd();
|
|
|
3520
3520
|
/* 2 */
|
|
3521
3521
|
/***/ ((module) => {
|
|
3522
3522
|
|
|
3523
|
-
module.exports = JSON.parse('{"name":"@rive-app/webgl2","version":"2.19.
|
|
3523
|
+
module.exports = JSON.parse('{"name":"@rive-app/webgl2","version":"2.19.4","description":"Rive\'s webgl2 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)","Chris Dalton <chris@rive.app> (https://rive.app)"],"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}}');
|
|
3524
3524
|
|
|
3525
3525
|
/***/ }),
|
|
3526
3526
|
/* 3 */
|
|
@@ -3730,7 +3730,40 @@ var registerTouchInteractions = function (_a) {
|
|
|
3730
3730
|
typeof window === "undefined") {
|
|
3731
3731
|
return null;
|
|
3732
3732
|
}
|
|
3733
|
+
/**
|
|
3734
|
+
* After a touchend event, some browsers may fire synthetic mouse events
|
|
3735
|
+
* (mouseover, mousedown, mousemove, mouseup) if the touch interaction did not cause
|
|
3736
|
+
* any default action (such as scrolling).
|
|
3737
|
+
*
|
|
3738
|
+
* This is done to simulate the behavior of a mouse for applications that do not support
|
|
3739
|
+
* touch events.
|
|
3740
|
+
*
|
|
3741
|
+
* We're keeping track of the previous event to not send the synthetic mouse events if the
|
|
3742
|
+
* touch event was a click (touchstart -> touchend).
|
|
3743
|
+
*
|
|
3744
|
+
* This is only needed when `isTouchScrollEnabled` is false
|
|
3745
|
+
* When true, `preventDefault()` is called which prevents this behaviour.
|
|
3746
|
+
**/
|
|
3747
|
+
var _prevEventType = null;
|
|
3748
|
+
var _syntheticEventsActive = false;
|
|
3733
3749
|
var processEventCallback = function (event) {
|
|
3750
|
+
// Exit early out of all synthetic mouse events
|
|
3751
|
+
// https://stackoverflow.com/questions/9656990/how-to-prevent-simulated-mouse-events-in-mobile-browsers
|
|
3752
|
+
// https://stackoverflow.com/questions/25572070/javascript-touchend-versus-click-dilemma
|
|
3753
|
+
if (_syntheticEventsActive && event instanceof MouseEvent) {
|
|
3754
|
+
// Synthetic event finished
|
|
3755
|
+
if (event.type == "mouseup") {
|
|
3756
|
+
_syntheticEventsActive = false;
|
|
3757
|
+
}
|
|
3758
|
+
return;
|
|
3759
|
+
}
|
|
3760
|
+
// Test if it's a "touch click". This could cause the browser to send
|
|
3761
|
+
// synthetic mouse events.
|
|
3762
|
+
_syntheticEventsActive =
|
|
3763
|
+
isTouchScrollEnabled &&
|
|
3764
|
+
event.type === "touchend" &&
|
|
3765
|
+
_prevEventType === "touchstart";
|
|
3766
|
+
_prevEventType = event.type;
|
|
3734
3767
|
var boundingRect = event.currentTarget.getBoundingClientRect();
|
|
3735
3768
|
var _a = getClientCoordinates(event, isTouchScrollEnabled), clientX = _a.clientX, clientY = _a.clientY;
|
|
3736
3769
|
if (!clientX && !clientY) {
|
|
@@ -3810,8 +3843,12 @@ var registerTouchInteractions = function (_a) {
|
|
|
3810
3843
|
canvas.addEventListener("mousemove", callback);
|
|
3811
3844
|
canvas.addEventListener("mousedown", callback);
|
|
3812
3845
|
canvas.addEventListener("mouseup", callback);
|
|
3813
|
-
canvas.addEventListener("touchmove", callback
|
|
3814
|
-
|
|
3846
|
+
canvas.addEventListener("touchmove", callback, {
|
|
3847
|
+
passive: isTouchScrollEnabled,
|
|
3848
|
+
});
|
|
3849
|
+
canvas.addEventListener("touchstart", callback, {
|
|
3850
|
+
passive: isTouchScrollEnabled,
|
|
3851
|
+
});
|
|
3815
3852
|
canvas.addEventListener("touchend", callback);
|
|
3816
3853
|
return function () {
|
|
3817
3854
|
canvas.removeEventListener("mouseover", callback);
|