react-simple-game-engine 0.3.33 → 0.3.35
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"movement-control.d.ts","sourceRoot":"","sources":["../../src/ui-components/movement-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EACZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAMf,OAAO,EACL,cAAc,EAEf,MAAM,qCAAqC,CAAC;AAE7C,oBAAY,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1E,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC5E,CAAC;AACF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,SAAS,CAAC;IACzC,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;CACzD,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,GAAG,EACH,IAAS,EACT,KAAK,EACL,MAAW,EACX,KAAK,EACL,mBAAmB,EACnB,QAAQ,GACT,EAAE,oBAAoB,
|
1
|
+
{"version":3,"file":"movement-control.d.ts","sourceRoot":"","sources":["../../src/ui-components/movement-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EACZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAMf,OAAO,EACL,cAAc,EAEf,MAAM,qCAAqC,CAAC;AAE7C,oBAAY,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1E,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC5E,CAAC;AACF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,SAAS,CAAC;IACzC,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;CACzD,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,GAAG,EACH,IAAS,EACT,KAAK,EACL,MAAW,EACX,KAAK,EACL,mBAAmB,EACnB,QAAQ,GACT,EAAE,oBAAoB,eAyGtB"}
|
@@ -24,6 +24,9 @@ export function MovementControl(_a) {
|
|
24
24
|
return scene.getInitialConfigs();
|
25
25
|
}, [scene]).joystick;
|
26
26
|
useEffect(function () {
|
27
|
+
if (!refJoyWrap.current) {
|
28
|
+
return;
|
29
|
+
}
|
27
30
|
refStick.current = refJoyWrap.current.querySelectorAll("button")[0];
|
28
31
|
onLoaded === null || onLoaded === void 0 ? void 0 : onLoaded(refJoyWrap.current, refStick.current);
|
29
32
|
}, [onLoaded]);
|
@@ -55,6 +58,10 @@ export function MovementControl(_a) {
|
|
55
58
|
event.target.releasePointerCapture(event.pointerId);
|
56
59
|
(_a = containerTouchEvent === null || containerTouchEvent === void 0 ? void 0 : containerTouchEvent.onReleased) === null || _a === void 0 ? void 0 : _a.call(containerTouchEvent, refJoyWrap.current, refStick.current);
|
57
60
|
(_c = (_b = joystickConfigs === null || joystickConfigs === void 0 ? void 0 : joystickConfigs.containerTouchEvent) === null || _b === void 0 ? void 0 : _b.onReleased) === null || _c === void 0 ? void 0 : _c.call(_b, refJoyWrap.current, refStick.current);
|
61
|
+
}, onMouseLeave: function () {
|
62
|
+
var _a, _b, _c;
|
63
|
+
(_a = containerTouchEvent === null || containerTouchEvent === void 0 ? void 0 : containerTouchEvent.onReleased) === null || _a === void 0 ? void 0 : _a.call(containerTouchEvent, refJoyWrap.current, refStick.current);
|
64
|
+
(_c = (_b = joystickConfigs === null || joystickConfigs === void 0 ? void 0 : joystickConfigs.containerTouchEvent) === null || _b === void 0 ? void 0 : _b.onReleased) === null || _c === void 0 ? void 0 : _c.call(_b, refJoyWrap.current, refStick.current);
|
58
65
|
}, style: {
|
59
66
|
position: "absolute",
|
60
67
|
left: right != null ? undefined : left,
|