react-simple-game-engine 0.3.20 → 0.3.23
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/lib/classes/p5.d.ts +4 -0
- package/lib/classes/p5.d.ts.map +1 -1
- package/lib/classes/p5.js +11 -0
- package/lib/classes/scaler.d.ts +4 -0
- package/lib/classes/scaler.d.ts.map +1 -1
- package/lib/classes/scaler.js +11 -0
- package/lib/ui-components/control.d.ts +2 -1
- package/lib/ui-components/control.d.ts.map +1 -1
- package/lib/ui-components/control.js +2 -2
- package/lib/ui-components/game-bootstrap.d.ts.map +1 -1
- package/lib/ui-components/game-bootstrap.js +1 -1
- package/lib/ui-components/scene-runner.d.ts.map +1 -1
- package/lib/ui-components/scene-runner.js +1 -1
- package/package.json +1 -1
package/lib/classes/p5.d.ts
CHANGED
@@ -23,6 +23,10 @@ export declare class P5 extends p5 {
|
|
23
23
|
*/
|
24
24
|
get realMouseY(): number;
|
25
25
|
get isForeground(): boolean;
|
26
|
+
get mouseScreen(): {
|
27
|
+
x: number;
|
28
|
+
y: number;
|
29
|
+
};
|
26
30
|
private emitSizeChangeEvent;
|
27
31
|
addSizeChangeListener(func: SizeChangeListener): () => void;
|
28
32
|
resizeCanvas(width: number, height: number): void;
|
package/lib/classes/p5.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"p5.d.ts","sourceRoot":"","sources":["../../src/classes/p5.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,aAAK,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACtC,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,C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
52
52
|
configurable: true
|
53
53
|
});
|
54
|
+
Object.defineProperty(P5.prototype, "mouseScreen", {
|
55
|
+
get: function () {
|
56
|
+
var _a = this.scaler, viewportDelta = _a.viewportDelta, value = _a.value;
|
57
|
+
return {
|
58
|
+
x: this.mouseX - viewportDelta.x * value,
|
59
|
+
y: this.mouseY - viewportDelta.y * value,
|
60
|
+
};
|
61
|
+
},
|
62
|
+
enumerable: false,
|
63
|
+
configurable: true
|
64
|
+
});
|
54
65
|
P5.prototype.emitSizeChangeEvent = function () {
|
55
66
|
var listeners = this.sizeChangeListeners;
|
56
67
|
for (var _i = 0, listeners_1 = listeners; _i < listeners_1.length; _i++) {
|
package/lib/classes/scaler.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scaler.d.ts","sourceRoot":"","sources":["../../src/classes/scaler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,qBAAa,MAAM;IAKf,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,WAAW;IANrB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAO;gBAGP,aAAa,EAAE,IAAI,EACnB,WAAW,EAAE,IAAI,EAC1B,WAAW,EAAE,UAAU;IAKjC,IAAI,KAAK,IAoBS,MAAM,CAlBvB;IAED,IAAI,UAAU,IAkCc,UAAU,CAhCrC;IAED,IAAI,UAAU,IAyBc,IAAI,CAvB/B;IAED,IAAI,UAAU,SAEb;IAED,IAAI,YAAY,IAYgB,IAAI,CAVnC;IAED,IAAI,KAAK,CAAC,MAAM,EAAE,MAAM,EAMvB;IAED,IAAI,YAAY,CAAC,aAAa,EAAE,IAAI,EAGnC;IAED,IAAI,UAAU,CAAC,WAAW,EAAE,IAAI,EAG/B;IAED,IAAI,UAAU,CAAC,WAAW,EAAE,UAAU,EAGrC;IAED,IAAI,QAAQ;;;MAaX;IAED,sBAAsB,CAAC,EAAE,EAAE,MAAM;IAIjC,OAAO,CAAC,MAAM;CAiBf"}
|
1
|
+
{"version":3,"file":"scaler.d.ts","sourceRoot":"","sources":["../../src/classes/scaler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,qBAAa,MAAM;IAKf,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,WAAW;IANrB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAO;gBAGP,aAAa,EAAE,IAAI,EACnB,WAAW,EAAE,IAAI,EAC1B,WAAW,EAAE,UAAU;IAKjC,IAAI,KAAK,IAoBS,MAAM,CAlBvB;IAED,IAAI,UAAU,IAkCc,UAAU,CAhCrC;IAED,IAAI,UAAU,IAyBc,IAAI,CAvB/B;IAED,IAAI,UAAU,SAEb;IAED,IAAI,YAAY,IAYgB,IAAI,CAVnC;IAED,IAAI,KAAK,CAAC,MAAM,EAAE,MAAM,EAMvB;IAED,IAAI,YAAY,CAAC,aAAa,EAAE,IAAI,EAGnC;IAED,IAAI,UAAU,CAAC,WAAW,EAAE,IAAI,EAG/B;IAED,IAAI,UAAU,CAAC,WAAW,EAAE,UAAU,EAGrC;IAED,IAAI,QAAQ;;;MAaX;IAED,IAAI,aAAa;;;MAMhB;IAED,sBAAsB,CAAC,EAAE,EAAE,MAAM;IAIjC,OAAO,CAAC,MAAM;CAiBf"}
|
package/lib/classes/scaler.js
CHANGED
@@ -81,6 +81,17 @@ var Scaler = /** @class */ (function () {
|
|
81
81
|
enumerable: false,
|
82
82
|
configurable: true
|
83
83
|
});
|
84
|
+
Object.defineProperty(Scaler.prototype, "viewportDelta", {
|
85
|
+
get: function () {
|
86
|
+
var _a = this.viewport, width = _a.width, height = _a.height;
|
87
|
+
return {
|
88
|
+
x: (this._canvasSize.width - width) / 2,
|
89
|
+
y: (this._canvasSize.height - height) / 2,
|
90
|
+
};
|
91
|
+
},
|
92
|
+
enumerable: false,
|
93
|
+
configurable: true
|
94
|
+
});
|
84
95
|
Scaler.prototype.screenUnitToCanvasUnit = function (px) {
|
85
96
|
return px / this._value;
|
86
97
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ReactNode } from "react";
|
2
2
|
import { UseLongPressProps } from "../hooks/interact";
|
3
3
|
export declare type ControlProps = {
|
4
|
+
type?: "abs" | "rel";
|
4
5
|
top?: number;
|
5
6
|
left?: number;
|
6
7
|
right?: number;
|
@@ -12,5 +13,5 @@ export declare type ControlProps = {
|
|
12
13
|
alignment?: "flex-start" | "center" | "flex-end";
|
13
14
|
interact?: Partial<UseLongPressProps>;
|
14
15
|
};
|
15
|
-
export declare function Control({ xAxisOriginCenter, yAxisOriginCenter, top, left, right, bottom, children, orientation, alignment, interact, }: ControlProps): JSX.Element;
|
16
|
+
export declare function Control({ type, xAxisOriginCenter, yAxisOriginCenter, top, left, right, bottom, children, orientation, alignment, interact, }: ControlProps): JSX.Element;
|
16
17
|
//# sourceMappingURL=control.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/ui-components/control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAgB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGpE,oBAAY,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,E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R,WAAwB,EACxB,SAAwB,EACxB,QAAa,GACd,EAAE,YAAY,eA6Bd"}
|
@@ -14,14 +14,14 @@ import { useMemo } from "react";
|
|
14
14
|
import { useLongPress } from "../hooks/interact";
|
15
15
|
import { getClassName } from "../utils";
|
16
16
|
export function Control(_a) {
|
17
|
-
var _b = _a.
|
17
|
+
var _b = _a.type, type = _b === void 0 ? "abs" : _b, _c = _a.xAxisOriginCenter, xAxisOriginCenter = _c === void 0 ? false : _c, _d = _a.yAxisOriginCenter, yAxisOriginCenter = _d === void 0 ? false : _d, top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom, children = _a.children, _e = _a.orientation, orientation = _e === void 0 ? "vertical" : _e, _f = _a.alignment, alignment = _f === void 0 ? "flex-start" : _f, _g = _a.interact, interact = _g === void 0 ? {} : _g;
|
18
18
|
var longPressProps = useLongPress(interact.onLongPress, interact.delay, interact.exts);
|
19
19
|
var transform = useMemo(function () {
|
20
20
|
var x = xAxisOriginCenter ? "".concat(left != null ? -50 : 50, "%") : 0;
|
21
21
|
var y = yAxisOriginCenter ? "".concat(top != null ? -50 : 50, "%") : 0;
|
22
22
|
return "translate(".concat(x, ",").concat(y, ")");
|
23
23
|
}, [left, top, xAxisOriginCenter, yAxisOriginCenter]);
|
24
|
-
return (_jsx("div", __assign({ className: getClassName("ui-control"), style: {
|
24
|
+
return (_jsx("div", __assign({ className: getClassName("ui-control".concat(type === "rel" ? "-relative" : "")), style: {
|
25
25
|
top: top,
|
26
26
|
left: left,
|
27
27
|
right: right,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"game-bootstrap.d.ts","sourceRoot":"","sources":["../../src/ui-components/game-bootstrap.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAmB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,EAAe,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAErE,aAAK,cAAc,GAAG,sBAAsB,GAAG;IAC7C,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,
|
1
|
+
{"version":3,"file":"game-bootstrap.d.ts","sourceRoot":"","sources":["../../src/ui-components/game-bootstrap.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAmB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,EAAe,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAErE,aAAK,cAAc,GAAG,sBAAsB,GAAG;IAC7C,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,eA2M3E"}
|
@@ -55,7 +55,7 @@ export function GameBootstrap(_a) {
|
|
55
55
|
document.head.appendChild(style);
|
56
56
|
var gameRootClass = getClassName("game-root");
|
57
57
|
var gameLoggerClass = getClassName("game-logger");
|
58
|
-
style.appendChild(document.createTextNode("\n .".concat(getClassName("assets-fail-view"), "{\n background-color: #f28181a1;\n min-height: 100px;\n padding: 10px;\n color: #000;\n }\n \n .").concat(getClassName("game-modal"), " {\n position: fixed;\n top: 0;\n left: 0;\n }\n\n .").concat(getClassName("scene-modal-stack"), "{\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n z-index: 2;\n }\n \n .").concat(getClassName("modal-content-main"), "{\n position: relative;\n z-index: 1;\n min-width: 200px;\n min-height: 200px;\n }\n\n .").concat(getClassName("modal-content-closer"), "{\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: 0;\n }\n .").concat(getClassName("modal-content-centered"), "{\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .").concat(getClassName("modal-content-wrap"), "{\n width: 100%;\n height: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .").concat(gameRootClass, ", .").concat(gameRootClass, " *,\n .").concat(gameLoggerClass, ", .").concat(gameLoggerClass, " *\n {\n box-sizing: border-box;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color:
|
58
|
+
style.appendChild(document.createTextNode("\n .".concat(getClassName("assets-fail-view"), "{\n background-color: #f28181a1;\n min-height: 100px;\n padding: 10px;\n color: #000;\n }\n \n .").concat(getClassName("game-modal"), " {\n position: fixed;\n top: 0;\n left: 0;\n }\n\n .").concat(getClassName("scene-modal-stack"), "{\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n z-index: 2;\n }\n \n .").concat(getClassName("modal-content-main"), "{\n position: relative;\n z-index: 1;\n min-width: 200px;\n min-height: 200px;\n }\n\n .").concat(getClassName("modal-content-closer"), "{\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: 0;\n }\n .").concat(getClassName("modal-content-centered"), "{\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .").concat(getClassName("modal-content-wrap"), "{\n width: 100%;\n height: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .").concat(gameRootClass, ", .").concat(gameRootClass, " *,\n .").concat(gameLoggerClass, ", .").concat(gameLoggerClass, " *\n {\n box-sizing: border-box;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n text-size-adjust: none;\n }\n\n .").concat(gameRootClass, " {\n overflow: hidden;\n position: relative;\n }\n\n .").concat(gameLoggerClass, " {\n z-index: 4;\n position: fixed;\n top:0;\n right:0;\n }\n\n .").concat(getClassName("message-stack"), " {\n width: cacl(100vw - 40px);\n max-width: 300px;\n max-height: calc(50vh - 50px);\n min-width: 200px;\n min-height: 150px;\n position: absolute;\n top: 5px;\n right: 5px;\n padding: 5px;\n background-color: #0000007b;\n color: #fff;\n font-size: 0.8rem;\n\n display: flex;\n flex-direction: column;\n }\n\n .").concat(getClassName("message-stack-heading"), "{\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n\n .").concat(getClassName("message-stack-content"), "{\n flex: 1;\n width: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n\n .").concat(getClassName("float-container"), " {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .").concat(getClassName("float-container"), " > div {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .").concat(getClassName("ui-control"), " {\n position: absolute;\n display: inline-flex;\n }\n\n .").concat(getClassName("ui-control-relative"), " {\n position: relative;\n display: inline-flex;\n }\n\n\n .").concat(getClassName("scaler-container"), " {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n\n .").concat(getClassName("scaler-container"), " > div {\n transform-origin: left top;\n position: relative;\n top: 50%;\n left: 50%;\n }\n ")));
|
59
59
|
}, []);
|
60
60
|
return (_jsxs(_Fragment, { children: [_jsx(SceneRunner, __assign({ current: currentScene }, props), currentScene.sessionId), logPopup && _jsx(Logger, {})] }));
|
61
61
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scene-runner.d.ts","sourceRoot":"","sources":["../../src/ui-components/scene-runner.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAKzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"scene-runner.d.ts","sourceRoot":"","sources":["../../src/ui-components/scene-runner.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAKzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAI3E,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACvD,CAAC;AAEF,aAAK,gBAAgB,GAAG,sBAAsB,GAAG;IAC/C,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,OAAO,EACP,UAAiC,EAEjC,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,YAAY,EAAE,YAAY,EAC1B,QAAQ,GACT,EAAE,gBAAgB,eAiJlB"}
|
@@ -16,9 +16,9 @@ import { getClassName, useWindowSize } from "../utils";
|
|
16
16
|
import { LayoutMode } from "../export-enums";
|
17
17
|
import { ScalerContext, UISceneContext } from "../react-context";
|
18
18
|
import { ScalerContainer } from "./scaler-container";
|
19
|
-
import { Sketch } from "./sketch";
|
20
19
|
import { MovementControl } from "./movement-control";
|
21
20
|
import { FloatContainer } from "./float-container";
|
21
|
+
import { Sketch } from "./sketch";
|
22
22
|
export function SceneRunner(_a) {
|
23
23
|
var width = _a.width, height = _a.height, current = _a.current, _b = _a.layoutMode, layoutMode = _b === void 0 ? LayoutMode.LANDSCAPE : _b,
|
24
24
|
//
|