@rpgjs/common 4.0.0-beta.3 → 4.0.0-beta.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/lib/AbstractObject.js +7 -7
- package/lib/Event.js +1 -1
- package/lib/EventEmitter.js +1 -1
- package/lib/Game.js +6 -6
- package/lib/Hit.js +1 -1
- package/lib/Map.js +5 -5
- package/lib/Module.js +3 -3
- package/lib/Player.js +1 -1
- package/lib/Plugin.js +2 -2
- package/lib/Scheduler.js +2 -2
- package/lib/Shape.js +2 -2
- package/lib/index.js +21 -21
- package/lib/workers/move.js +3 -3
- package/package.json +4 -4
package/lib/AbstractObject.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { intersection, generateUID, toRadians, isInstanceOf } from './Utils';
|
|
2
|
-
import { Hit, HitType } from './Hit';
|
|
3
|
-
import { RpgShape } from './Shape';
|
|
1
|
+
import { intersection, generateUID, toRadians, isInstanceOf } from './Utils.js';
|
|
2
|
+
import { Hit, HitType } from './Hit.js';
|
|
3
|
+
import { RpgShape } from './Shape.js';
|
|
4
4
|
import SAT from 'sat';
|
|
5
|
-
import { RpgCommonMap } from './Map';
|
|
6
|
-
import { RpgPlugin, HookServer } from './Plugin';
|
|
7
|
-
import { GameSide } from './Game';
|
|
8
|
-
import { Vector2d, Vector2dZero } from './Vector2d';
|
|
5
|
+
import { RpgCommonMap } from './Map.js';
|
|
6
|
+
import { RpgPlugin, HookServer } from './Plugin.js';
|
|
7
|
+
import { GameSide } from './Game.js';
|
|
8
|
+
import { Vector2d, Vector2dZero } from './Vector2d.js';
|
|
9
9
|
import { Behavior, Direction, MoveClientMode, PlayerType } from '@rpgjs/types';
|
|
10
10
|
import { from, map, mergeMap, Subject, tap, takeUntil } from 'rxjs';
|
|
11
11
|
const ACTIONS = { IDLE: 0, RUN: 1, ACTION: 2 };
|
package/lib/Event.js
CHANGED
package/lib/EventEmitter.js
CHANGED
package/lib/Game.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { generateUID, isClass } from './Utils';
|
|
2
|
-
import { EventEmitter } from './EventEmitter';
|
|
3
|
-
import { RpgCommonPlayer } from './Player';
|
|
1
|
+
import { generateUID, isClass } from './Utils.js';
|
|
2
|
+
import { EventEmitter } from './EventEmitter.js';
|
|
3
|
+
import { RpgCommonPlayer } from './Player.js';
|
|
4
4
|
import { Control, Direction } from '@rpgjs/types';
|
|
5
|
-
import { RpgPlugin } from './Plugin';
|
|
6
|
-
import { GameWorker } from './Worker';
|
|
7
|
-
import { RpgShape } from './Shape';
|
|
5
|
+
import { RpgPlugin } from './Plugin.js';
|
|
6
|
+
import { GameWorker } from './Worker.js';
|
|
7
|
+
import { RpgShape } from './Shape.js';
|
|
8
8
|
export var GameSide;
|
|
9
9
|
(function (GameSide) {
|
|
10
10
|
GameSide["Server"] = "server";
|
package/lib/Hit.js
CHANGED
package/lib/Map.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import Utils, { random, generateUID } from './Utils';
|
|
2
|
-
import { RpgShape } from './Shape';
|
|
3
|
-
import { Hit } from './Hit';
|
|
4
|
-
import { VirtualGrid } from './VirtualGrid';
|
|
1
|
+
import Utils, { random, generateUID } from './Utils.js';
|
|
2
|
+
import { RpgShape } from './Shape.js';
|
|
3
|
+
import { Hit } from './Hit.js';
|
|
4
|
+
import { VirtualGrid } from './VirtualGrid.js';
|
|
5
5
|
import { MapClass } from '@rpgjs/tiled';
|
|
6
|
-
import { AbstractObject } from './AbstractObject';
|
|
6
|
+
import { AbstractObject } from './AbstractObject.js';
|
|
7
7
|
import { map, Subject, takeUntil, mergeMap, from, filter } from 'rxjs';
|
|
8
8
|
const buffer = new Map();
|
|
9
9
|
const bufferClient = new Map();
|
package/lib/Module.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RpgPlugin, HookServer, HookClient } from './Plugin';
|
|
2
|
-
import { isArray, isClass, isFunction, isPromise } from './Utils';
|
|
3
|
-
import { warning } from './Logger';
|
|
1
|
+
import { RpgPlugin, HookServer, HookClient } from './Plugin.js';
|
|
2
|
+
import { isArray, isClass, isFunction, isPromise } from './Utils.js';
|
|
3
|
+
import { warning } from './Logger.js';
|
|
4
4
|
var Side;
|
|
5
5
|
(function (Side) {
|
|
6
6
|
Side["Server"] = "server";
|
package/lib/Player.js
CHANGED
package/lib/Plugin.js
CHANGED
package/lib/Scheduler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { EventEmitter } from './EventEmitter';
|
|
3
|
-
import Utils from './Utils';
|
|
2
|
+
import { EventEmitter } from './EventEmitter.js';
|
|
3
|
+
import Utils from './Utils.js';
|
|
4
4
|
export class Scheduler extends EventEmitter {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
package/lib/Shape.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Hit, HitType } from './Hit';
|
|
1
|
+
import { Hit, HitType } from './Hit.js';
|
|
2
2
|
import { TiledObjectClass } from '@rpgjs/tiled';
|
|
3
3
|
import { PlayerType } from '@rpgjs/types';
|
|
4
|
-
import { Vector2d } from './Vector2d';
|
|
4
|
+
import { Vector2d } from './Vector2d.js';
|
|
5
5
|
export var ShapePositioning;
|
|
6
6
|
(function (ShapePositioning) {
|
|
7
7
|
ShapePositioning["Default"] = "default";
|
package/lib/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { LiteralDirection, RpgCommonPlayer } from './Player';
|
|
2
|
-
export { AbstractObject } from './AbstractObject';
|
|
3
|
-
export { RpgCommonEvent } from './Event';
|
|
4
|
-
export { RpgCommonMap } from './Map';
|
|
5
|
-
export { RpgCommonGame, GameSide } from './Game';
|
|
6
|
-
export { EventEmitter } from './EventEmitter';
|
|
7
|
-
export { PrebuiltGui } from './gui/PrebuiltGui';
|
|
8
|
-
export * as Utils from './Utils';
|
|
9
|
-
export { RpgPlugin, HookServer, HookClient } from './Plugin';
|
|
10
|
-
export * as TransportIo from './transports/io';
|
|
1
|
+
export { LiteralDirection, RpgCommonPlayer } from './Player.js';
|
|
2
|
+
export { AbstractObject } from './AbstractObject.js';
|
|
3
|
+
export { RpgCommonEvent } from './Event.js';
|
|
4
|
+
export { RpgCommonMap } from './Map.js';
|
|
5
|
+
export { RpgCommonGame, GameSide } from './Game.js';
|
|
6
|
+
export { EventEmitter } from './EventEmitter.js';
|
|
7
|
+
export { PrebuiltGui } from './gui/PrebuiltGui.js';
|
|
8
|
+
export * as Utils from './Utils.js';
|
|
9
|
+
export { RpgPlugin, HookServer, HookClient } from './Plugin.js';
|
|
10
|
+
export * as TransportIo from './transports/io.js';
|
|
11
11
|
export { Input, Control } from '@rpgjs/types';
|
|
12
|
-
export { Hit } from './Hit';
|
|
13
|
-
export { Scheduler } from './Scheduler';
|
|
14
|
-
export { RpgModule, loadModules } from './Module';
|
|
15
|
-
export * as MockIo from './transports/io';
|
|
16
|
-
export * as Logger from './Logger';
|
|
17
|
-
export { RpgShape, ShapePositioning } from './Shape';
|
|
18
|
-
export { VirtualGrid } from './VirtualGrid';
|
|
19
|
-
export { RpgCommonWorldMaps } from './WorldMaps';
|
|
20
|
-
export { Vector2d } from './Vector2d';
|
|
12
|
+
export { Hit } from './Hit.js';
|
|
13
|
+
export { Scheduler } from './Scheduler.js';
|
|
14
|
+
export { RpgModule, loadModules } from './Module.js';
|
|
15
|
+
export * as MockIo from './transports/io.js';
|
|
16
|
+
export * as Logger from './Logger.js';
|
|
17
|
+
export { RpgShape, ShapePositioning } from './Shape.js';
|
|
18
|
+
export { VirtualGrid } from './VirtualGrid.js';
|
|
19
|
+
export { RpgCommonWorldMaps } from './WorldMaps.js';
|
|
20
|
+
export { Vector2d } from './Vector2d.js';
|
|
21
21
|
export { Direction } from '@rpgjs/types';
|
|
22
|
-
export { transitionColor } from './Color';
|
|
23
|
-
export { DefaultInput } from './DefaultInput';
|
|
22
|
+
export { transitionColor } from './Color.js';
|
|
23
|
+
export { DefaultInput } from './DefaultInput.js';
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
package/lib/workers/move.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import workerpool from 'workerpool';
|
|
2
|
-
import { RpgCommonMap } from '../Map';
|
|
3
|
-
import { RpgCommonGame, GameSide } from '../Game';
|
|
4
|
-
import { RpgCommonPlayer } from '../Player';
|
|
2
|
+
import { RpgCommonMap } from '../Map.js';
|
|
3
|
+
import { RpgCommonGame, GameSide } from '../Game.js';
|
|
4
|
+
import { RpgCommonPlayer } from '../Player.js';
|
|
5
5
|
const objects = {};
|
|
6
6
|
let objectsByMap = {};
|
|
7
7
|
const gameEngine = new RpgCommonGame(GameSide.Worker);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgjs/common",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"author": "Samuel Ronce",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@rpgjs/tiled": "^4.0.0-beta.
|
|
19
|
-
"@rpgjs/types": "^4.0.0-beta.
|
|
18
|
+
"@rpgjs/tiled": "^4.0.0-beta.4",
|
|
19
|
+
"@rpgjs/types": "^4.0.0-beta.4",
|
|
20
20
|
"rbush": "^3.0.1",
|
|
21
21
|
"rxjs": "^7.8.0",
|
|
22
22
|
"sat": "^0.9.0",
|
|
23
23
|
"workerpool": "^6.4.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "20c8697cc462bf2a1811bc0ff288dc421f8234f3",
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.0.4"
|
|
28
28
|
},
|