@rpg-engine/shared 0.1.50 → 0.1.53
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/dist/constants/world.constants.d.ts.map +1 -1
- package/dist/constants/world.constants.js +2 -2
- package/dist/constants/world.constants.js.map +1 -1
- package/dist/types/entity.types.d.ts +13 -0
- package/dist/types/entity.types.d.ts.map +1 -0
- package/dist/types/entity.types.js +9 -0
- package/dist/types/entity.types.js.map +1 -0
- package/dist/types/player.types.d.ts +5 -11
- package/dist/types/player.types.d.ts.map +1 -1
- package/dist/types/player.types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.constants.d.ts","sourceRoot":"","sources":["../../src/constants/world.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,WAAW,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"world.constants.d.ts","sourceRoot":"","sources":["../../src/constants/world.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,WAAW,KAAK,CAAC;AAK9B,eAAO,MAAM,wBAAwB,QAAkB,CAAC;AACxD,eAAO,MAAM,wBAAwB,QAAmB,CAAC"}
|
|
@@ -9,6 +9,6 @@ exports.GRID_WIDTH = 16;
|
|
|
9
9
|
exports.GRID_HEIGHT = 16;
|
|
10
10
|
exports.TILE_WIDTH = 16;
|
|
11
11
|
exports.TILE_HEIGHT = 16;
|
|
12
|
-
exports.CAMERA_VIEWPORT_OFFSET_X = exports.GRID_WIDTH *
|
|
13
|
-
exports.CAMERA_VIEWPORT_OFFSET_Y = exports.GRID_HEIGHT *
|
|
12
|
+
exports.CAMERA_VIEWPORT_OFFSET_X = exports.GRID_WIDTH * 10;
|
|
13
|
+
exports.CAMERA_VIEWPORT_OFFSET_Y = exports.GRID_HEIGHT * 10;
|
|
14
14
|
//# sourceMappingURL=world.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.constants.js","sourceRoot":"","sources":["../../src/constants/world.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,IAAI,CAAC;AACnB,QAAA,YAAY,GAAG,IAAI,CAAC;AAEpB,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAC5B,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE7B,QAAA,UAAU,GAAG,EAAE,CAAC;AAChB,QAAA,WAAW,GAAG,EAAE,CAAC;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAC;AAChB,QAAA,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"world.constants.js","sourceRoot":"","sources":["../../src/constants/world.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,IAAI,CAAC;AACnB,QAAA,YAAY,GAAG,IAAI,CAAC;AAEpB,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAC5B,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE7B,QAAA,UAAU,GAAG,EAAE,CAAC;AAChB,QAAA,WAAW,GAAG,EAAE,CAAC;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAC;AAChB,QAAA,WAAW,GAAG,EAAE,CAAC;AAKjB,QAAA,wBAAwB,GAAG,kBAAU,GAAG,EAAE,CAAC;AAC3C,QAAA,wBAAwB,GAAG,mBAAW,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IEntityBasicInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
type: EntityType;
|
|
4
|
+
name: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
direction: string;
|
|
8
|
+
}
|
|
9
|
+
export declare enum EntityType {
|
|
10
|
+
Player = "Player",
|
|
11
|
+
NPC = "Npc"
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=entity.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.types.d.ts","sourceRoot":"","sources":["../../src/types/entity.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityType = void 0;
|
|
4
|
+
var EntityType;
|
|
5
|
+
(function (EntityType) {
|
|
6
|
+
EntityType["Player"] = "Player";
|
|
7
|
+
EntityType["NPC"] = "Npc";
|
|
8
|
+
})(EntityType = exports.EntityType || (exports.EntityType = {}));
|
|
9
|
+
//# sourceMappingURL=entity.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.types.js","sourceRoot":"","sources":["../../src/types/entity.types.ts"],"names":[],"mappings":";;;AASA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;AACb,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IEntityBasicInfo } from "./entity.types";
|
|
1
2
|
export declare enum PlayerSocketEvents {
|
|
2
3
|
PlayerCreate = "PlayerCreate",
|
|
3
4
|
PlayerPositionUpdate = "PlayerPositionUpdate",
|
|
@@ -25,7 +26,10 @@ export interface IConnectedPlayer {
|
|
|
25
26
|
direction?: string;
|
|
26
27
|
isMoving?: boolean;
|
|
27
28
|
cameraCoordinates: ICameraCoordinates;
|
|
28
|
-
|
|
29
|
+
otherEntitiesInView: IEntitiesInView;
|
|
30
|
+
}
|
|
31
|
+
export interface IEntitiesInView {
|
|
32
|
+
[id: string]: IEntityBasicInfo;
|
|
29
33
|
}
|
|
30
34
|
export interface IConnectedPlayers {
|
|
31
35
|
[id: string]: IConnectedPlayer;
|
|
@@ -39,16 +43,6 @@ export interface ICameraCoordinates {
|
|
|
39
43
|
width: number;
|
|
40
44
|
height: number;
|
|
41
45
|
}
|
|
42
|
-
export interface IOtherPlayerInView {
|
|
43
|
-
[id: string]: IOtherPlayer;
|
|
44
|
-
}
|
|
45
|
-
export interface IOtherPlayer {
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
x: number;
|
|
49
|
-
y: number;
|
|
50
|
-
direction: string;
|
|
51
|
-
}
|
|
52
46
|
export interface IPlayerForceDisconnect {
|
|
53
47
|
reason: string;
|
|
54
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player.types.d.ts","sourceRoot":"","sources":["../../src/types/player.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"player.types.d.ts","sourceRoot":"","sources":["../../src/types/player.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,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sources":["../../src/types/player.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"player.types.js","sourceRoot":"","sources":["../../src/types/player.types.ts"],"names":[],"mappings":";;;AAGA,IAAY,kBAQX;AARD,WAAY,kBAAkB;IAC5B,mDAA6B,CAAA;IAC7B,mEAA6C,CAAA;IAC7C,iFAA2D,CAAA;IAC3D,mDAA6B,CAAA;IAC7B,mEAA6C,CAAA;IAC7C,+CAAyB,CAAA;IACzB,qEAA+C,CAAA;AACjD,CAAC,EARW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAQ7B"}
|