@rpg-engine/shared 0.8.92 → 0.8.94
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 +29 -29
- package/dist/constants/date.constants.d.ts +2 -2
- package/dist/constants/date.constants.js +5 -5
- package/dist/constants/npc.constants.d.ts +1 -1
- package/dist/constants/npc.constants.js +4 -4
- package/dist/constants/socket.constants.d.ts +2 -2
- package/dist/constants/socket.constants.js +6 -6
- package/dist/constants/world.constants.d.ts +10 -10
- package/dist/constants/world.constants.js +13 -13
- package/dist/helpers/deviceHelpers.d.ts +2 -2
- package/dist/helpers/deviceHelpers.js +16 -16
- package/dist/helpers/itemSlotHelper.d.ts +7 -7
- package/dist/helpers/itemSlotHelper.js +27 -27
- package/dist/helpers/skillHelpers.d.ts +4 -4
- package/dist/helpers/skillHelpers.js +25 -25
- package/dist/helpers/weightHelper.d.ts +1 -1
- package/dist/helpers/weightHelper.js +14 -14
- package/dist/index.d.ts +57 -57
- package/dist/index.js +73 -73
- package/dist/libs/GridHelper.d.ts +11 -11
- package/dist/libs/GridHelper.js +37 -37
- package/dist/libs/MathHelper.d.ts +16 -16
- package/dist/libs/MathHelper.js +14 -14
- package/dist/libs/SocketHelper.d.ts +2 -2
- package/dist/libs/SocketHelper.js +14 -14
- package/dist/libs/TextHelper.d.ts +7 -7
- package/dist/libs/TextHelper.js +21 -21
- package/dist/libs/TypeHelper.d.ts +3 -3
- package/dist/libs/TypeHelper.js +16 -16
- package/dist/translations/app-rate.lang.json +38 -38
- package/dist/translations/assets.lang.json +82 -82
- package/dist/translations/auth.lang.json +182 -182
- package/dist/translations/email.lang.json +70 -70
- package/dist/translations/error.lang.json +18 -18
- package/dist/translations/form.lang.json +94 -94
- package/dist/translations/global.lang.json +90 -90
- package/dist/translations/logs.lang.json +6 -6
- package/dist/translations/onboarding.lang.d.ts +10 -10
- package/dist/translations/onboarding.lang.js +21 -21
- package/dist/translations/onboarding.lang.json +50 -50
- package/dist/translations/order.lang.json +90 -90
- package/dist/translations/search.lang.json +50 -50
- package/dist/translations/settings.lang.json +14 -14
- package/dist/translations/tabs.lang.json +22 -22
- package/dist/translations/users.lang.json +22 -22
- package/dist/translations/validation.lang.json +86 -86
- package/dist/types/animation.types.d.ts +69 -69
- package/dist/types/animation.types.js +46 -46
- package/dist/types/api.types.d.ts +21 -21
- package/dist/types/api.types.js +20 -20
- package/dist/types/asset.types.d.ts +6 -6
- package/dist/types/asset.types.js +2 -2
- package/dist/types/auth.types.d.ts +7 -7
- package/dist/types/auth.types.js +2 -2
- package/dist/types/battle.types.d.ts +41 -41
- package/dist/types/battle.types.js +18 -18
- package/dist/types/buff.types.d.ts +39 -39
- package/dist/types/buff.types.js +13 -13
- package/dist/types/character.types.d.ts +233 -233
- package/dist/types/character.types.js +65 -65
- package/dist/types/chat.types.d.ts +71 -72
- package/dist/types/chat.types.d.ts.map +1 -1
- package/dist/types/chat.types.js +22 -22
- package/dist/types/chat.types.js.map +1 -1
- package/dist/types/depot.types.d.ts +18 -18
- package/dist/types/depot.types.js +9 -9
- package/dist/types/device.types.d.ts +24 -24
- package/dist/types/device.types.js +7 -7
- package/dist/types/displayText.types.d.ts +10 -10
- package/dist/types/displayText.types.js +7 -7
- package/dist/types/entity.types.d.ts +30 -30
- package/dist/types/entity.types.js +20 -20
- package/dist/types/env.types.d.ts +5 -5
- package/dist/types/env.types.js +9 -9
- package/dist/types/equipment.types.d.ts +35 -35
- package/dist/types/equipment.types.js +18 -18
- package/dist/types/googleOAuth.types.d.ts +47 -47
- package/dist/types/googleOAuth.types.js +2 -2
- package/dist/types/inventory.types.d.ts +7 -7
- package/dist/types/inventory.types.js +2 -2
- package/dist/types/item.types.d.ts +377 -377
- package/dist/types/item.types.js +154 -154
- package/dist/types/itemContainer.types.d.ts +83 -83
- package/dist/types/itemContainer.types.js +11 -11
- package/dist/types/leaderboard.types.d.ts +32 -32
- package/dist/types/leaderboard.types.js +9 -9
- package/dist/types/macro.types.d.ts +8 -8
- package/dist/types/macro.types.js +12 -12
- package/dist/types/maps.types.d.ts +90 -90
- package/dist/types/maps.types.js +85 -85
- package/dist/types/marketplace.types.d.ts +61 -61
- package/dist/types/marketplace.types.js +15 -15
- package/dist/types/notification.types.d.ts +14 -14
- package/dist/types/notification.types.js +2 -2
- package/dist/types/npc.types.d.ts +165 -165
- package/dist/types/npc.types.js +49 -49
- package/dist/types/pagination.types.d.ts +13 -13
- package/dist/types/pagination.types.js +2 -2
- package/dist/types/party.types.d.ts +83 -83
- package/dist/types/party.types.js +54 -54
- package/dist/types/places.types.d.ts +16 -16
- package/dist/types/places.types.js +9 -9
- package/dist/types/preloadScene.types.d.ts +4 -4
- package/dist/types/preloadScene.types.js +7 -7
- package/dist/types/premiumAccount.types.d.ts +7 -7
- package/dist/types/premiumAccount.types.js +11 -11
- package/dist/types/quest.types.d.ts +74 -74
- package/dist/types/quest.types.js +21 -21
- package/dist/types/raid.types.d.ts +6 -6
- package/dist/types/raid.types.js +2 -2
- package/dist/types/resource.types.d.ts +5 -5
- package/dist/types/resource.types.js +2 -2
- package/dist/types/scene.types.d.ts +8 -8
- package/dist/types/scene.types.js +8 -8
- package/dist/types/shortcut.types.d.ts +11 -11
- package/dist/types/shortcut.types.js +9 -9
- package/dist/types/skills.types.d.ts +144 -144
- package/dist/types/skills.types.js +106 -106
- package/dist/types/socket.types.d.ts +18 -18
- package/dist/types/socket.types.js +8 -8
- package/dist/types/spell.types.d.ts +156 -156
- package/dist/types/spell.types.d.ts.map +1 -1
- package/dist/types/spell.types.js +108 -108
- package/dist/types/tiled.types.d.ts +119 -119
- package/dist/types/tiled.types.js +7 -7
- package/dist/types/trade.types.d.ts +65 -65
- package/dist/types/trade.types.js +15 -15
- package/dist/types/translation.types.d.ts +5 -5
- package/dist/types/translation.types.js +8 -8
- package/dist/types/ui.types.d.ts +8 -8
- package/dist/types/ui.types.js +7 -7
- package/dist/types/useWith.types.d.ts +25 -25
- package/dist/types/useWith.types.js +9 -9
- package/dist/types/user.types.d.ts +104 -104
- package/dist/types/user.types.js +38 -38
- package/dist/types/validation.types.d.ts +9 -9
- package/dist/types/validation.types.js +2 -2
- package/dist/types/view.types.d.ts +15 -15
- package/dist/types/view.types.js +7 -7
- package/package.json +43 -43
package/dist/index.js
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./constants/date.constants"), exports);
|
|
18
|
-
__exportStar(require("./constants/npc.constants"), exports);
|
|
19
|
-
__exportStar(require("./constants/socket.constants"), exports);
|
|
20
|
-
__exportStar(require("./constants/world.constants"), exports);
|
|
21
|
-
__exportStar(require("./helpers/deviceHelpers"), exports);
|
|
22
|
-
__exportStar(require("./helpers/itemSlotHelper"), exports);
|
|
23
|
-
__exportStar(require("./helpers/skillHelpers"), exports);
|
|
24
|
-
__exportStar(require("./helpers/weightHelper"), exports);
|
|
25
|
-
__exportStar(require("./libs/GridHelper"), exports);
|
|
26
|
-
__exportStar(require("./libs/MathHelper"), exports);
|
|
27
|
-
__exportStar(require("./libs/SocketHelper"), exports);
|
|
28
|
-
__exportStar(require("./libs/TextHelper"), exports);
|
|
29
|
-
__exportStar(require("./libs/TypeHelper"), exports);
|
|
30
|
-
__exportStar(require("./types/animation.types"), exports);
|
|
31
|
-
__exportStar(require("./types/api.types"), exports);
|
|
32
|
-
__exportStar(require("./types/asset.types"), exports);
|
|
33
|
-
__exportStar(require("./types/auth.types"), exports);
|
|
34
|
-
__exportStar(require("./types/battle.types"), exports);
|
|
35
|
-
__exportStar(require("./types/buff.types"), exports);
|
|
36
|
-
__exportStar(require("./types/character.types"), exports);
|
|
37
|
-
__exportStar(require("./types/chat.types"), exports);
|
|
38
|
-
__exportStar(require("./types/depot.types"), exports);
|
|
39
|
-
__exportStar(require("./types/device.types"), exports);
|
|
40
|
-
__exportStar(require("./types/displayText.types"), exports);
|
|
41
|
-
__exportStar(require("./types/entity.types"), exports);
|
|
42
|
-
__exportStar(require("./types/env.types"), exports);
|
|
43
|
-
__exportStar(require("./types/equipment.types"), exports);
|
|
44
|
-
__exportStar(require("./types/googleOAuth.types"), exports);
|
|
45
|
-
__exportStar(require("./types/inventory.types"), exports);
|
|
46
|
-
__exportStar(require("./types/item.types"), exports);
|
|
47
|
-
__exportStar(require("./types/itemContainer.types"), exports);
|
|
48
|
-
__exportStar(require("./types/leaderboard.types"), exports);
|
|
49
|
-
__exportStar(require("./types/macro.types"), exports);
|
|
50
|
-
__exportStar(require("./types/maps.types"), exports);
|
|
51
|
-
__exportStar(require("./types/marketplace.types"), exports);
|
|
52
|
-
__exportStar(require("./types/notification.types"), exports);
|
|
53
|
-
__exportStar(require("./types/npc.types"), exports);
|
|
54
|
-
__exportStar(require("./types/pagination.types"), exports);
|
|
55
|
-
__exportStar(require("./types/party.types"), exports);
|
|
56
|
-
__exportStar(require("./types/places.types"), exports);
|
|
57
|
-
__exportStar(require("./types/preloadScene.types"), exports);
|
|
58
|
-
__exportStar(require("./types/premiumAccount.types"), exports);
|
|
59
|
-
__exportStar(require("./types/quest.types"), exports);
|
|
60
|
-
__exportStar(require("./types/resource.types"), exports);
|
|
61
|
-
__exportStar(require("./types/scene.types"), exports);
|
|
62
|
-
__exportStar(require("./types/shortcut.types"), exports);
|
|
63
|
-
__exportStar(require("./types/skills.types"), exports);
|
|
64
|
-
__exportStar(require("./types/socket.types"), exports);
|
|
65
|
-
__exportStar(require("./types/spell.types"), exports);
|
|
66
|
-
__exportStar(require("./types/tiled.types"), exports);
|
|
67
|
-
__exportStar(require("./types/trade.types"), exports);
|
|
68
|
-
__exportStar(require("./types/translation.types"), exports);
|
|
69
|
-
__exportStar(require("./types/ui.types"), exports);
|
|
70
|
-
__exportStar(require("./types/useWith.types"), exports);
|
|
71
|
-
__exportStar(require("./types/user.types"), exports);
|
|
72
|
-
__exportStar(require("./types/validation.types"), exports);
|
|
73
|
-
__exportStar(require("./types/view.types"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants/date.constants"), exports);
|
|
18
|
+
__exportStar(require("./constants/npc.constants"), exports);
|
|
19
|
+
__exportStar(require("./constants/socket.constants"), exports);
|
|
20
|
+
__exportStar(require("./constants/world.constants"), exports);
|
|
21
|
+
__exportStar(require("./helpers/deviceHelpers"), exports);
|
|
22
|
+
__exportStar(require("./helpers/itemSlotHelper"), exports);
|
|
23
|
+
__exportStar(require("./helpers/skillHelpers"), exports);
|
|
24
|
+
__exportStar(require("./helpers/weightHelper"), exports);
|
|
25
|
+
__exportStar(require("./libs/GridHelper"), exports);
|
|
26
|
+
__exportStar(require("./libs/MathHelper"), exports);
|
|
27
|
+
__exportStar(require("./libs/SocketHelper"), exports);
|
|
28
|
+
__exportStar(require("./libs/TextHelper"), exports);
|
|
29
|
+
__exportStar(require("./libs/TypeHelper"), exports);
|
|
30
|
+
__exportStar(require("./types/animation.types"), exports);
|
|
31
|
+
__exportStar(require("./types/api.types"), exports);
|
|
32
|
+
__exportStar(require("./types/asset.types"), exports);
|
|
33
|
+
__exportStar(require("./types/auth.types"), exports);
|
|
34
|
+
__exportStar(require("./types/battle.types"), exports);
|
|
35
|
+
__exportStar(require("./types/buff.types"), exports);
|
|
36
|
+
__exportStar(require("./types/character.types"), exports);
|
|
37
|
+
__exportStar(require("./types/chat.types"), exports);
|
|
38
|
+
__exportStar(require("./types/depot.types"), exports);
|
|
39
|
+
__exportStar(require("./types/device.types"), exports);
|
|
40
|
+
__exportStar(require("./types/displayText.types"), exports);
|
|
41
|
+
__exportStar(require("./types/entity.types"), exports);
|
|
42
|
+
__exportStar(require("./types/env.types"), exports);
|
|
43
|
+
__exportStar(require("./types/equipment.types"), exports);
|
|
44
|
+
__exportStar(require("./types/googleOAuth.types"), exports);
|
|
45
|
+
__exportStar(require("./types/inventory.types"), exports);
|
|
46
|
+
__exportStar(require("./types/item.types"), exports);
|
|
47
|
+
__exportStar(require("./types/itemContainer.types"), exports);
|
|
48
|
+
__exportStar(require("./types/leaderboard.types"), exports);
|
|
49
|
+
__exportStar(require("./types/macro.types"), exports);
|
|
50
|
+
__exportStar(require("./types/maps.types"), exports);
|
|
51
|
+
__exportStar(require("./types/marketplace.types"), exports);
|
|
52
|
+
__exportStar(require("./types/notification.types"), exports);
|
|
53
|
+
__exportStar(require("./types/npc.types"), exports);
|
|
54
|
+
__exportStar(require("./types/pagination.types"), exports);
|
|
55
|
+
__exportStar(require("./types/party.types"), exports);
|
|
56
|
+
__exportStar(require("./types/places.types"), exports);
|
|
57
|
+
__exportStar(require("./types/preloadScene.types"), exports);
|
|
58
|
+
__exportStar(require("./types/premiumAccount.types"), exports);
|
|
59
|
+
__exportStar(require("./types/quest.types"), exports);
|
|
60
|
+
__exportStar(require("./types/resource.types"), exports);
|
|
61
|
+
__exportStar(require("./types/scene.types"), exports);
|
|
62
|
+
__exportStar(require("./types/shortcut.types"), exports);
|
|
63
|
+
__exportStar(require("./types/skills.types"), exports);
|
|
64
|
+
__exportStar(require("./types/socket.types"), exports);
|
|
65
|
+
__exportStar(require("./types/spell.types"), exports);
|
|
66
|
+
__exportStar(require("./types/tiled.types"), exports);
|
|
67
|
+
__exportStar(require("./types/trade.types"), exports);
|
|
68
|
+
__exportStar(require("./types/translation.types"), exports);
|
|
69
|
+
__exportStar(require("./types/ui.types"), exports);
|
|
70
|
+
__exportStar(require("./types/useWith.types"), exports);
|
|
71
|
+
__exportStar(require("./types/user.types"), exports);
|
|
72
|
+
__exportStar(require("./types/validation.types"), exports);
|
|
73
|
+
__exportStar(require("./types/view.types"), exports);
|
|
74
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { AnimationDirection } from "../types/animation.types";
|
|
2
|
-
export declare const ToGridX: (x: number) => number;
|
|
3
|
-
export declare const ToGridY: (y: number) => number;
|
|
4
|
-
export declare const FromGridX: (gridX: number) => number;
|
|
5
|
-
export declare const FromGridY: (gridY: number) => number;
|
|
6
|
-
interface INewCalculatedPosition {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const calculateNewPositionXY: (x: number, y: number, moveToDirection: AnimationDirection) => INewCalculatedPosition;
|
|
11
|
-
export {};
|
|
1
|
+
import { AnimationDirection } from "../types/animation.types";
|
|
2
|
+
export declare const ToGridX: (x: number) => number;
|
|
3
|
+
export declare const ToGridY: (y: number) => number;
|
|
4
|
+
export declare const FromGridX: (gridX: number) => number;
|
|
5
|
+
export declare const FromGridY: (gridY: number) => number;
|
|
6
|
+
interface INewCalculatedPosition {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const calculateNewPositionXY: (x: number, y: number, moveToDirection: AnimationDirection) => INewCalculatedPosition;
|
|
11
|
+
export {};
|
|
12
12
|
//# sourceMappingURL=GridHelper.d.ts.map
|
package/dist/libs/GridHelper.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateNewPositionXY = exports.FromGridY = exports.FromGridX = exports.ToGridY = exports.ToGridX = void 0;
|
|
4
|
-
const world_constants_1 = require("../constants/world.constants");
|
|
5
|
-
const ToGridX = (x) => Math.round(x / world_constants_1.GRID_WIDTH);
|
|
6
|
-
exports.ToGridX = ToGridX;
|
|
7
|
-
const ToGridY = (y) => Math.round(y / world_constants_1.GRID_HEIGHT);
|
|
8
|
-
exports.ToGridY = ToGridY;
|
|
9
|
-
const FromGridX = (gridX) => Math.round(gridX * world_constants_1.GRID_WIDTH);
|
|
10
|
-
exports.FromGridX = FromGridX;
|
|
11
|
-
const FromGridY = (gridY) => Math.round(gridY * world_constants_1.GRID_HEIGHT);
|
|
12
|
-
exports.FromGridY = FromGridY;
|
|
13
|
-
const calculateNewPositionXY = (x, y, moveToDirection) => {
|
|
14
|
-
switch (moveToDirection) {
|
|
15
|
-
case "down":
|
|
16
|
-
return {
|
|
17
|
-
x,
|
|
18
|
-
y: y + world_constants_1.GRID_HEIGHT,
|
|
19
|
-
};
|
|
20
|
-
case "up":
|
|
21
|
-
return {
|
|
22
|
-
x,
|
|
23
|
-
y: y - world_constants_1.GRID_HEIGHT,
|
|
24
|
-
};
|
|
25
|
-
case "left":
|
|
26
|
-
return {
|
|
27
|
-
x: x - world_constants_1.GRID_WIDTH,
|
|
28
|
-
y,
|
|
29
|
-
};
|
|
30
|
-
case "right":
|
|
31
|
-
return {
|
|
32
|
-
x: x + world_constants_1.GRID_WIDTH,
|
|
33
|
-
y,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
exports.calculateNewPositionXY = calculateNewPositionXY;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateNewPositionXY = exports.FromGridY = exports.FromGridX = exports.ToGridY = exports.ToGridX = void 0;
|
|
4
|
+
const world_constants_1 = require("../constants/world.constants");
|
|
5
|
+
const ToGridX = (x) => Math.round(x / world_constants_1.GRID_WIDTH);
|
|
6
|
+
exports.ToGridX = ToGridX;
|
|
7
|
+
const ToGridY = (y) => Math.round(y / world_constants_1.GRID_HEIGHT);
|
|
8
|
+
exports.ToGridY = ToGridY;
|
|
9
|
+
const FromGridX = (gridX) => Math.round(gridX * world_constants_1.GRID_WIDTH);
|
|
10
|
+
exports.FromGridX = FromGridX;
|
|
11
|
+
const FromGridY = (gridY) => Math.round(gridY * world_constants_1.GRID_HEIGHT);
|
|
12
|
+
exports.FromGridY = FromGridY;
|
|
13
|
+
const calculateNewPositionXY = (x, y, moveToDirection) => {
|
|
14
|
+
switch (moveToDirection) {
|
|
15
|
+
case "down":
|
|
16
|
+
return {
|
|
17
|
+
x,
|
|
18
|
+
y: y + world_constants_1.GRID_HEIGHT,
|
|
19
|
+
};
|
|
20
|
+
case "up":
|
|
21
|
+
return {
|
|
22
|
+
x,
|
|
23
|
+
y: y - world_constants_1.GRID_HEIGHT,
|
|
24
|
+
};
|
|
25
|
+
case "left":
|
|
26
|
+
return {
|
|
27
|
+
x: x - world_constants_1.GRID_WIDTH,
|
|
28
|
+
y,
|
|
29
|
+
};
|
|
30
|
+
case "right":
|
|
31
|
+
return {
|
|
32
|
+
x: x + world_constants_1.GRID_WIDTH,
|
|
33
|
+
y,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.calculateNewPositionXY = calculateNewPositionXY;
|
|
38
38
|
//# sourceMappingURL=GridHelper.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
interface Point {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
interface Rect {
|
|
6
|
-
bottom: number;
|
|
7
|
-
left: number;
|
|
8
|
-
top: number;
|
|
9
|
-
right: number;
|
|
10
|
-
}
|
|
11
|
-
declare class MathHelper {
|
|
12
|
-
getDistanceBetweenPoints(x1: number, y1: number, x2: number, y2: number): number;
|
|
13
|
-
isXYInsideRectangle(point: Point, rect: Rect): boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const mathHelper: MathHelper;
|
|
16
|
-
export {};
|
|
1
|
+
interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
interface Rect {
|
|
6
|
+
bottom: number;
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
right: number;
|
|
10
|
+
}
|
|
11
|
+
declare class MathHelper {
|
|
12
|
+
getDistanceBetweenPoints(x1: number, y1: number, x2: number, y2: number): number;
|
|
13
|
+
isXYInsideRectangle(point: Point, rect: Rect): boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const mathHelper: MathHelper;
|
|
16
|
+
export {};
|
|
17
17
|
//# sourceMappingURL=MathHelper.d.ts.map
|
package/dist/libs/MathHelper.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mathHelper = void 0;
|
|
4
|
-
class MathHelper {
|
|
5
|
-
getDistanceBetweenPoints(x1, y1, x2, y2) {
|
|
6
|
-
let y = x2 - x1;
|
|
7
|
-
let x = y2 - y1;
|
|
8
|
-
return Math.sqrt(x * x + y * y);
|
|
9
|
-
}
|
|
10
|
-
isXYInsideRectangle(point, rect) {
|
|
11
|
-
return point.x > rect.left && point.x < rect.right && point.y > rect.top && point.y < rect.bottom;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.mathHelper = new MathHelper();
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mathHelper = void 0;
|
|
4
|
+
class MathHelper {
|
|
5
|
+
getDistanceBetweenPoints(x1, y1, x2, y2) {
|
|
6
|
+
let y = x2 - x1;
|
|
7
|
+
let x = y2 - y1;
|
|
8
|
+
return Math.sqrt(x * x + y * y);
|
|
9
|
+
}
|
|
10
|
+
isXYInsideRectangle(point, rect) {
|
|
11
|
+
return point.x > rect.left && point.x < rect.right && point.y > rect.top && point.y < rect.bottom;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.mathHelper = new MathHelper();
|
|
15
15
|
//# sourceMappingURL=MathHelper.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ISocketTransmissionZone } from "../types/socket.types";
|
|
2
|
-
export declare const calculateSocketTransmissionZone: (entityX: number, entityY: number, entityWidth?: number, entityHeight?: number, zoneWidth?: number, zoneHeight?: number) => ISocketTransmissionZone;
|
|
1
|
+
import { ISocketTransmissionZone } from "../types/socket.types";
|
|
2
|
+
export declare const calculateSocketTransmissionZone: (entityX: number, entityY: number, entityWidth?: number, entityHeight?: number, zoneWidth?: number, zoneHeight?: number) => ISocketTransmissionZone;
|
|
3
3
|
//# sourceMappingURL=SocketHelper.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateSocketTransmissionZone = void 0;
|
|
4
|
-
const socket_constants_1 = require("../constants/socket.constants");
|
|
5
|
-
const world_constants_1 = require("../constants/world.constants");
|
|
6
|
-
const calculateSocketTransmissionZone = (entityX, entityY, entityWidth = world_constants_1.GRID_WIDTH, entityHeight = world_constants_1.GRID_HEIGHT, zoneWidth = socket_constants_1.SOCKET_TRANSMISSION_ZONE_WIDTH, zoneHeight = socket_constants_1.SOCKET_TRANSMISSION_ZONE_HEIGHT) => {
|
|
7
|
-
return {
|
|
8
|
-
x: entityX - zoneWidth / 2 + entityWidth / 2,
|
|
9
|
-
y: entityY - zoneHeight / 2 + entityHeight / 2,
|
|
10
|
-
width: entityX + zoneWidth / 2 - entityWidth / 2,
|
|
11
|
-
height: entityY + zoneHeight / 2 - entityHeight / 2,
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
exports.calculateSocketTransmissionZone = calculateSocketTransmissionZone;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateSocketTransmissionZone = void 0;
|
|
4
|
+
const socket_constants_1 = require("../constants/socket.constants");
|
|
5
|
+
const world_constants_1 = require("../constants/world.constants");
|
|
6
|
+
const calculateSocketTransmissionZone = (entityX, entityY, entityWidth = world_constants_1.GRID_WIDTH, entityHeight = world_constants_1.GRID_HEIGHT, zoneWidth = socket_constants_1.SOCKET_TRANSMISSION_ZONE_WIDTH, zoneHeight = socket_constants_1.SOCKET_TRANSMISSION_ZONE_HEIGHT) => {
|
|
7
|
+
return {
|
|
8
|
+
x: entityX - zoneWidth / 2 + entityWidth / 2,
|
|
9
|
+
y: entityY - zoneHeight / 2 + entityHeight / 2,
|
|
10
|
+
width: entityX + zoneWidth / 2 - entityWidth / 2,
|
|
11
|
+
height: entityY + zoneHeight / 2 - entityHeight / 2,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
exports.calculateSocketTransmissionZone = calculateSocketTransmissionZone;
|
|
15
15
|
//# sourceMappingURL=SocketHelper.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare class TextHelper {
|
|
2
|
-
static capitalizeFirstLetter(str: string): string;
|
|
3
|
-
private static _escapeRegExp;
|
|
4
|
-
static replaceAll(str: string, find: string, replace: string): string;
|
|
5
|
-
static stringPrepare(str: string): string;
|
|
6
|
-
static getFileExtension(path: string): string;
|
|
7
|
-
}
|
|
1
|
+
export declare class TextHelper {
|
|
2
|
+
static capitalizeFirstLetter(str: string): string;
|
|
3
|
+
private static _escapeRegExp;
|
|
4
|
+
static replaceAll(str: string, find: string, replace: string): string;
|
|
5
|
+
static stringPrepare(str: string): string;
|
|
6
|
+
static getFileExtension(path: string): string;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=TextHelper.d.ts.map
|
package/dist/libs/TextHelper.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextHelper = void 0;
|
|
4
|
-
class TextHelper {
|
|
5
|
-
static capitalizeFirstLetter(str) {
|
|
6
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
7
|
-
}
|
|
8
|
-
static _escapeRegExp(str) {
|
|
9
|
-
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
|
10
|
-
}
|
|
11
|
-
static replaceAll(str, find, replace) {
|
|
12
|
-
return str.replace(new RegExp(TextHelper._escapeRegExp(find), "g"), replace);
|
|
13
|
-
}
|
|
14
|
-
static stringPrepare(str) {
|
|
15
|
-
return str.toLowerCase().trim();
|
|
16
|
-
}
|
|
17
|
-
static getFileExtension(path) {
|
|
18
|
-
return path.slice((Math.max(0, path.lastIndexOf(".")) || Infinity) + 1);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.TextHelper = TextHelper;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextHelper = void 0;
|
|
4
|
+
class TextHelper {
|
|
5
|
+
static capitalizeFirstLetter(str) {
|
|
6
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
7
|
+
}
|
|
8
|
+
static _escapeRegExp(str) {
|
|
9
|
+
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
|
10
|
+
}
|
|
11
|
+
static replaceAll(str, find, replace) {
|
|
12
|
+
return str.replace(new RegExp(TextHelper._escapeRegExp(find), "g"), replace);
|
|
13
|
+
}
|
|
14
|
+
static stringPrepare(str) {
|
|
15
|
+
return str.toLowerCase().trim();
|
|
16
|
+
}
|
|
17
|
+
static getFileExtension(path) {
|
|
18
|
+
return path.slice((Math.max(0, path.lastIndexOf(".")) || Infinity) + 1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TextHelper = TextHelper;
|
|
22
22
|
//# sourceMappingURL=TextHelper.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class TypeHelper {
|
|
2
|
-
static enumToStringArray(data: object): string[];
|
|
3
|
-
}
|
|
1
|
+
export declare class TypeHelper {
|
|
2
|
+
static enumToStringArray(data: object): string[];
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=TypeHelper.d.ts.map
|
package/dist/libs/TypeHelper.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeHelper = void 0;
|
|
4
|
-
class TypeHelper {
|
|
5
|
-
static enumToStringArray(data) {
|
|
6
|
-
const enumKv = Object.entries(data).map(([key, value]) => ({ key, value }));
|
|
7
|
-
const keys = [];
|
|
8
|
-
enumKv.forEach((kv) => {
|
|
9
|
-
if (typeof kv.value === "string") {
|
|
10
|
-
keys.push(kv.value);
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
return keys;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.TypeHelper = TypeHelper;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeHelper = void 0;
|
|
4
|
+
class TypeHelper {
|
|
5
|
+
static enumToStringArray(data) {
|
|
6
|
+
const enumKv = Object.entries(data).map(([key, value]) => ({ key, value }));
|
|
7
|
+
const keys = [];
|
|
8
|
+
enumKv.forEach((kv) => {
|
|
9
|
+
if (typeof kv.value === "string") {
|
|
10
|
+
keys.push(kv.value);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return keys;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.TypeHelper = TypeHelper;
|
|
17
17
|
//# sourceMappingURL=TypeHelper.js.map
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": {
|
|
3
|
-
"eng": "Would you mind rating BlueShip?",
|
|
4
|
-
"ptBr": "Gostaria de avaliar BlueShip?"
|
|
5
|
-
},
|
|
6
|
-
"message": {
|
|
7
|
-
"eng": "It will not take more than a minute and helps to promote our app. Thanks for your support!",
|
|
8
|
-
"ptBr": "Se gostou de utilizar o BlueShip, importa-se de avaliá-lo? Não vai demorar mais do que um minuto. Obrigado pelo seu apoio!"
|
|
9
|
-
},
|
|
10
|
-
"cancelButtonLabel": {
|
|
11
|
-
"eng": "No, Thanks",
|
|
12
|
-
"ptBr": "Não, obrigado"
|
|
13
|
-
},
|
|
14
|
-
"laterButtonLabel": {
|
|
15
|
-
"eng": "Remind Me Later",
|
|
16
|
-
"ptBr": "Lembrar mais tarde"
|
|
17
|
-
},
|
|
18
|
-
"rateButtonLabel": {
|
|
19
|
-
"eng": "Rate It Now",
|
|
20
|
-
"ptBr": "Avaliar agora"
|
|
21
|
-
},
|
|
22
|
-
"yesButtonLabel": {
|
|
23
|
-
"eng": "Yes!",
|
|
24
|
-
"ptBr": "Sim!"
|
|
25
|
-
},
|
|
26
|
-
"noButtonLabel": {
|
|
27
|
-
"eng": "Not really",
|
|
28
|
-
"ptBr": "Não"
|
|
29
|
-
},
|
|
30
|
-
"appRatePromptTitle": {
|
|
31
|
-
"eng": "Do you like using BlueShip?",
|
|
32
|
-
"ptBr": "Você gosta de utilizar BlueShip?"
|
|
33
|
-
},
|
|
34
|
-
"feedbackPromptTitle": {
|
|
35
|
-
"eng": "Mind giving us some feedback?",
|
|
36
|
-
"ptBr": "Poderia nos dar um feedback?"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"title": {
|
|
3
|
+
"eng": "Would you mind rating BlueShip?",
|
|
4
|
+
"ptBr": "Gostaria de avaliar BlueShip?"
|
|
5
|
+
},
|
|
6
|
+
"message": {
|
|
7
|
+
"eng": "It will not take more than a minute and helps to promote our app. Thanks for your support!",
|
|
8
|
+
"ptBr": "Se gostou de utilizar o BlueShip, importa-se de avaliá-lo? Não vai demorar mais do que um minuto. Obrigado pelo seu apoio!"
|
|
9
|
+
},
|
|
10
|
+
"cancelButtonLabel": {
|
|
11
|
+
"eng": "No, Thanks",
|
|
12
|
+
"ptBr": "Não, obrigado"
|
|
13
|
+
},
|
|
14
|
+
"laterButtonLabel": {
|
|
15
|
+
"eng": "Remind Me Later",
|
|
16
|
+
"ptBr": "Lembrar mais tarde"
|
|
17
|
+
},
|
|
18
|
+
"rateButtonLabel": {
|
|
19
|
+
"eng": "Rate It Now",
|
|
20
|
+
"ptBr": "Avaliar agora"
|
|
21
|
+
},
|
|
22
|
+
"yesButtonLabel": {
|
|
23
|
+
"eng": "Yes!",
|
|
24
|
+
"ptBr": "Sim!"
|
|
25
|
+
},
|
|
26
|
+
"noButtonLabel": {
|
|
27
|
+
"eng": "Not really",
|
|
28
|
+
"ptBr": "Não"
|
|
29
|
+
},
|
|
30
|
+
"appRatePromptTitle": {
|
|
31
|
+
"eng": "Do you like using BlueShip?",
|
|
32
|
+
"ptBr": "Você gosta de utilizar BlueShip?"
|
|
33
|
+
},
|
|
34
|
+
"feedbackPromptTitle": {
|
|
35
|
+
"eng": "Mind giving us some feedback?",
|
|
36
|
+
"ptBr": "Poderia nos dar um feedback?"
|
|
37
|
+
}
|
|
38
|
+
}
|