@rpgjs/client 3.0.0-beta.9 → 3.0.0-rc

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.
Files changed (70) hide show
  1. package/lib/Components/ColorComponent.d.ts +8 -0
  2. package/lib/Components/ColorComponent.js +20 -0
  3. package/lib/Components/ColorComponent.js.map +1 -0
  4. package/lib/Components/Component.d.ts +101 -0
  5. package/lib/Components/Component.js +228 -0
  6. package/lib/Components/Component.js.map +1 -0
  7. package/lib/Components/ImageComponent.d.ts +8 -0
  8. package/lib/Components/ImageComponent.js +18 -0
  9. package/lib/Components/ImageComponent.js.map +1 -0
  10. package/lib/Components/TextComponent.d.ts +5 -0
  11. package/lib/Components/TextComponent.js +12 -0
  12. package/lib/Components/TextComponent.js.map +1 -0
  13. package/lib/Components/TileComponent.d.ts +8 -0
  14. package/lib/Components/TileComponent.js +32 -0
  15. package/lib/Components/TileComponent.js.map +1 -0
  16. package/lib/Effects/Animation.d.ts +2 -2
  17. package/lib/Effects/Animation.js +9 -6
  18. package/lib/Effects/Animation.js.map +1 -1
  19. package/lib/GameEngine.d.ts +23 -1
  20. package/lib/GameEngine.js +97 -31
  21. package/lib/GameEngine.js.map +1 -1
  22. package/lib/Renderer.js +2 -2
  23. package/lib/Renderer.js.map +1 -1
  24. package/lib/Resources.js +2 -2
  25. package/lib/Resources.js.map +1 -1
  26. package/lib/RpgClient.d.ts +9 -9
  27. package/lib/RpgClientEngine.d.ts +4 -2
  28. package/lib/RpgClientEngine.js +65 -9
  29. package/lib/RpgClientEngine.js.map +1 -1
  30. package/lib/RpgGui.js +3 -3
  31. package/lib/RpgGui.js.map +1 -1
  32. package/lib/Scene/Map.d.ts +5 -5
  33. package/lib/Scene/Map.js +39 -65
  34. package/lib/Scene/Map.js.map +1 -1
  35. package/lib/Scene/Scene.d.ts +9 -7
  36. package/lib/Scene/Scene.js +5 -3
  37. package/lib/Scene/Scene.js.map +1 -1
  38. package/lib/Sound/RpgSound.js +1 -1
  39. package/lib/Sound/RpgSound.js.map +1 -1
  40. package/lib/Sound/Sounds.js +1 -1
  41. package/lib/Sound/Sounds.js.map +1 -1
  42. package/lib/Sprite/Character.d.ts +5 -74
  43. package/lib/Sprite/Character.js +22 -137
  44. package/lib/Sprite/Character.js.map +1 -1
  45. package/lib/Sprite/Spritesheets.js +1 -1
  46. package/lib/Sprite/Spritesheets.js.map +1 -1
  47. package/lib/Tilemap/CommonLayer.d.ts +8 -0
  48. package/lib/Tilemap/CommonLayer.js +20 -0
  49. package/lib/Tilemap/CommonLayer.js.map +1 -0
  50. package/lib/Tilemap/ImageLayer.d.ts +3 -2
  51. package/lib/Tilemap/ImageLayer.js +11 -7
  52. package/lib/Tilemap/ImageLayer.js.map +1 -1
  53. package/lib/Tilemap/Tile.d.ts +6 -7
  54. package/lib/Tilemap/Tile.js +29 -32
  55. package/lib/Tilemap/Tile.js.map +1 -1
  56. package/lib/Tilemap/TileLayer.d.ts +9 -5
  57. package/lib/Tilemap/TileLayer.js +29 -31
  58. package/lib/Tilemap/TileLayer.js.map +1 -1
  59. package/lib/Tilemap/TileSet.d.ts +4 -15
  60. package/lib/Tilemap/TileSet.js +11 -18
  61. package/lib/Tilemap/TileSet.js.map +1 -1
  62. package/lib/Tilemap/index.d.ts +16 -9
  63. package/lib/Tilemap/index.js +46 -27
  64. package/lib/Tilemap/index.js.map +1 -1
  65. package/lib/clientEntryPoint.js +1 -1
  66. package/lib/clientEntryPoint.js.map +1 -1
  67. package/lib/index.d.ts +2 -2
  68. package/lib/index.js +9 -4
  69. package/lib/index.js.map +1 -1
  70. package/package.json +7 -6
@@ -0,0 +1,8 @@
1
+ import { RpgComponent } from "./Component";
2
+ export declare class ColorComponent extends PIXI.Graphics {
3
+ private component;
4
+ color: string;
5
+ static readonly id: string;
6
+ constructor(component: RpgComponent, color: string);
7
+ setBackgroundColor(): void;
8
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ColorComponent = void 0;
4
+ class ColorComponent extends PIXI.Graphics {
5
+ constructor(component, color) {
6
+ super();
7
+ this.component = component;
8
+ this.color = color;
9
+ this.setBackgroundColor();
10
+ }
11
+ setBackgroundColor() {
12
+ const color = this.color.replace('#', '');
13
+ this.beginFill(parseInt(color, 16));
14
+ this.drawRect(0, 0, this.component.w, this.component.h);
15
+ this.endFill();
16
+ }
17
+ }
18
+ exports.ColorComponent = ColorComponent;
19
+ ColorComponent.id = 'color';
20
+ //# sourceMappingURL=ColorComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorComponent.js","sourceRoot":"","sources":["../../src/Components/ColorComponent.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAe,SAAQ,IAAI,CAAC,QAAQ;IAG7C,YAAoB,SAAuB,EAAS,KAAa;QAC7D,KAAK,EAAE,CAAA;QADS,cAAS,GAAT,SAAS,CAAc;QAAS,UAAK,GAAL,KAAK,CAAQ;QAE7D,IAAI,CAAC,kBAAkB,EAAE,CAAA;IAC7B,CAAC;IAED,kBAAkB;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QACzC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA;QACnC,IAAI,CAAC,QAAQ,CACT,CAAC,EACD,CAAC,EACD,IAAI,CAAC,SAAS,CAAC,CAAC,EAChB,IAAI,CAAC,SAAS,CAAC,CAAC,CACnB,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAA;IAClB,CAAC;;AAlBL,wCAmBC;AAlBmB,iBAAE,GAAW,OAAO,CAAA"}
@@ -0,0 +1,101 @@
1
+ import { Direction, RpgCommonPlayer, RpgShape } from "@rpgjs/common";
2
+ import { Scene } from "../Scene/Scene";
3
+ export interface IComponent {
4
+ id: string;
5
+ value: any;
6
+ }
7
+ export declare class RpgComponent<T = any> extends PIXI.Container {
8
+ private data;
9
+ private scene;
10
+ protected _x: number;
11
+ protected _y: number;
12
+ private _rotation;
13
+ protected teleported: number;
14
+ protected map: string;
15
+ protected z: number;
16
+ protected fixed: boolean;
17
+ private components;
18
+ private direction;
19
+ private registerComponents;
20
+ constructor(data: RpgCommonPlayer | RpgShape, scene: Scene);
21
+ /**
22
+ * the direction of the sprite
23
+ *
24
+ * @prop {Direction} dir
25
+ * @readonly
26
+ * @memberof RpgSprite
27
+ * */
28
+ get dir(): Direction;
29
+ /**
30
+ * To know if the sprite is a player
31
+ *
32
+ * @prop {boolean} isPlayer
33
+ * @readonly
34
+ * @memberof RpgSprite
35
+ * */
36
+ get isPlayer(): boolean;
37
+ /**
38
+ * To know if the sprite is an event
39
+ *
40
+ * @prop {boolean} isEvent
41
+ * @readonly
42
+ * @memberof RpgSprite
43
+ * */
44
+ get isEvent(): boolean;
45
+ /**
46
+ * To know if the sprite is a shape
47
+ *
48
+ * @prop {boolean} isShape
49
+ * @since 3.0.0-rc
50
+ * @readonly
51
+ * @memberof RpgSprite
52
+ * */
53
+ get isShape(): boolean;
54
+ /**
55
+ * To know if the sprite is the sprite controlled by the player
56
+ *
57
+ * @prop {boolean} isCurrentPlayer
58
+ * @readonly
59
+ * @memberof RpgSprite
60
+ * */
61
+ get isCurrentPlayer(): boolean;
62
+ /**
63
+ * Retrieves the logic of the sprite
64
+ *
65
+ * @prop {RpgSpriteLogic} logic
66
+ * @readonly
67
+ * @since 3.0.0-beta.4
68
+ * @memberof RpgSprite
69
+ * */
70
+ get logic(): RpgCommonPlayer | RpgShape | null;
71
+ get guiDisplay(): boolean;
72
+ set guiDisplay(val: boolean);
73
+ setPosition(smooth?: boolean): void;
74
+ update(obj: any): {
75
+ moving: boolean;
76
+ };
77
+ showAnimation(graphic: string | string[], animationName: string): void;
78
+ /**
79
+ * Recover the position according to the graphic
80
+ * Normally, the position is that of the hitbox but, we retrieve the top left corner of the graphic
81
+ *
82
+ * You can also pass the `middle` value as first parameter to retrieve the positions from the middle of the sprite
83
+ *
84
+ * @title Get Positions of Graphic
85
+ * @method sprite.getPositionsOfGraphic(align)
86
+ * @param {string} [align] middle
87
+ * @returns { x: number, y: number }
88
+ * @memberof RpgSprite
89
+ */
90
+ getPositionsOfGraphic(align: string): {
91
+ x: number;
92
+ y: number;
93
+ };
94
+ private callMethodInComponents;
95
+ private updateComponents;
96
+ getScene<T>(): T;
97
+ onInit(): void;
98
+ onUpdate(obj: any): void;
99
+ onMove(): void;
100
+ onChanges(data: any, old: any): void;
101
+ }
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RpgComponent = void 0;
4
+ const common_1 = require("@rpgjs/common");
5
+ const operators_1 = require("rxjs/operators");
6
+ const Logger_1 = require("../Logger");
7
+ const Player_1 = require("../Sprite/Player");
8
+ const ColorComponent_1 = require("./ColorComponent");
9
+ const ImageComponent_1 = require("./ImageComponent");
10
+ const TextComponent_1 = require("./TextComponent");
11
+ const TileComponent_1 = require("./TileComponent");
12
+ class RpgComponent extends PIXI.Container {
13
+ constructor(data, scene) {
14
+ super();
15
+ this.data = data;
16
+ this.scene = scene;
17
+ /** @internal */
18
+ this.h = 1;
19
+ /** @internal */
20
+ this.w = 1;
21
+ this._x = 0;
22
+ this._y = 0;
23
+ this._rotation = 0;
24
+ this.teleported = 0;
25
+ this.map = '';
26
+ this.z = 0;
27
+ this.fixed = false;
28
+ this.components = [];
29
+ this.direction = 0;
30
+ this.registerComponents = new Map();
31
+ this.setPosition(false);
32
+ this.registerComponents.set(Player_1.RpgSprite.id, Player_1.RpgSprite);
33
+ this.registerComponents.set(TextComponent_1.TextComponent.id, TextComponent_1.TextComponent);
34
+ this.registerComponents.set(ColorComponent_1.ColorComponent.id, ColorComponent_1.ColorComponent);
35
+ this.registerComponents.set(TileComponent_1.TileComponent.id, TileComponent_1.TileComponent);
36
+ this.registerComponents.set(ImageComponent_1.ImageComponent.id, ImageComponent_1.ImageComponent);
37
+ this.scene.game.all
38
+ .pipe((0, operators_1.map)(object => { var _a; return (_a = object[data.id]) === null || _a === void 0 ? void 0 : _a.paramsChanged; }), (0, operators_1.filter)(object => {
39
+ return object && object.components && object.components.length;
40
+ }))
41
+ .subscribe((val) => {
42
+ this.updateComponents(val);
43
+ });
44
+ }
45
+ /**
46
+ * the direction of the sprite
47
+ *
48
+ * @prop {Direction} dir
49
+ * @readonly
50
+ * @memberof RpgSprite
51
+ * */
52
+ get dir() {
53
+ return this.direction;
54
+ }
55
+ /**
56
+ * To know if the sprite is a player
57
+ *
58
+ * @prop {boolean} isPlayer
59
+ * @readonly
60
+ * @memberof RpgSprite
61
+ * */
62
+ get isPlayer() {
63
+ return this.data.type == common_1.PlayerType.Player;
64
+ }
65
+ /**
66
+ * To know if the sprite is an event
67
+ *
68
+ * @prop {boolean} isEvent
69
+ * @readonly
70
+ * @memberof RpgSprite
71
+ * */
72
+ get isEvent() {
73
+ return this.data.type == common_1.PlayerType.Event;
74
+ }
75
+ /**
76
+ * To know if the sprite is a shape
77
+ *
78
+ * @prop {boolean} isShape
79
+ * @since 3.0.0-rc
80
+ * @readonly
81
+ * @memberof RpgSprite
82
+ * */
83
+ get isShape() {
84
+ return common_1.Utils.isInstanceOf(this.data, common_1.RpgShape);
85
+ }
86
+ /**
87
+ * To know if the sprite is the sprite controlled by the player
88
+ *
89
+ * @prop {boolean} isCurrentPlayer
90
+ * @readonly
91
+ * @memberof RpgSprite
92
+ * */
93
+ get isCurrentPlayer() {
94
+ return this.data.id === this.scene.game.playerId;
95
+ }
96
+ /**
97
+ * Retrieves the logic of the sprite
98
+ *
99
+ * @prop {RpgSpriteLogic} logic
100
+ * @readonly
101
+ * @since 3.0.0-beta.4
102
+ * @memberof RpgSprite
103
+ * */
104
+ get logic() {
105
+ return this.scene.game.world.getAll(this.data.id);
106
+ }
107
+ get guiDisplay() {
108
+ return this.logic.guiDisplay;
109
+ }
110
+ set guiDisplay(val) {
111
+ this.logic.guiDisplay = val;
112
+ }
113
+ setPosition(smooth = true) {
114
+ var _a, _b, _c, _d;
115
+ if (this.isShape) {
116
+ const { width, height, x, y } = this.data;
117
+ this.w = width;
118
+ this.h = height;
119
+ this._x = Math.floor(x);
120
+ this._y = Math.floor(y);
121
+ }
122
+ else {
123
+ const { position, direction } = this.data;
124
+ this._x = Math.floor((_a = position === null || position === void 0 ? void 0 : position.x) !== null && _a !== void 0 ? _a : 0);
125
+ this._y = Math.floor((_b = position === null || position === void 0 ? void 0 : position.y) !== null && _b !== void 0 ? _b : 0);
126
+ this.z = Math.floor((_c = position === null || position === void 0 ? void 0 : position.z) !== null && _c !== void 0 ? _c : 0);
127
+ this.direction = direction;
128
+ }
129
+ this._rotation = (_d = this.data['rotation']) !== null && _d !== void 0 ? _d : 0;
130
+ if (!smooth) {
131
+ this.x = this._x;
132
+ this.y = this._y;
133
+ this.angle = this._rotation;
134
+ }
135
+ }
136
+ update(obj) {
137
+ const { speed, teleported, map, fixed, rotation } = obj;
138
+ this.data = obj;
139
+ this.setPosition();
140
+ if (this._rotation != this.angle) {
141
+ this.angle += Math.min(speed, this._rotation - this.angle);
142
+ }
143
+ let moving = false;
144
+ if (!fixed) {
145
+ if (teleported != this.teleported || map != this.map) {
146
+ this.x = this._x;
147
+ this.y = this._y;
148
+ this.teleported = teleported;
149
+ this.map = map;
150
+ }
151
+ this.parent.parent.zIndex = this._y;
152
+ obj.posX = this._x;
153
+ obj.posY = this._y;
154
+ if (this._x > this.x) {
155
+ this.x += Math.min(speed, this._x - this.x);
156
+ moving = true;
157
+ }
158
+ if (this._x < this.x) {
159
+ this.x -= Math.min(speed, this.x - this._x);
160
+ moving = true;
161
+ }
162
+ if (this._y > this.y) {
163
+ this.y += Math.min(speed, this._y - this.y);
164
+ moving = true;
165
+ }
166
+ if (this._y < this.y) {
167
+ this.y -= Math.min(speed, this.y - this._y);
168
+ moving = true;
169
+ }
170
+ }
171
+ this.callMethodInComponents('update', [obj, { moving }]);
172
+ this.onUpdate(obj);
173
+ return {
174
+ moving
175
+ };
176
+ }
177
+ showAnimation(graphic, animationName) {
178
+ return this.callMethodInComponents('showAnimation', [graphic, animationName]);
179
+ }
180
+ /**
181
+ * Recover the position according to the graphic
182
+ * Normally, the position is that of the hitbox but, we retrieve the top left corner of the graphic
183
+ *
184
+ * You can also pass the `middle` value as first parameter to retrieve the positions from the middle of the sprite
185
+ *
186
+ * @title Get Positions of Graphic
187
+ * @method sprite.getPositionsOfGraphic(align)
188
+ * @param {string} [align] middle
189
+ * @returns { x: number, y: number }
190
+ * @memberof RpgSprite
191
+ */
192
+ getPositionsOfGraphic(align) {
193
+ const sprite = this.getChildAt(0);
194
+ const isMiddle = align == 'middle';
195
+ return {
196
+ x: this.x - this.w * sprite.anchor.x + (isMiddle ? this.w / 2 : 0),
197
+ y: this.y - this.h * sprite.anchor.y + (isMiddle ? this.h / 2 : 0)
198
+ };
199
+ }
200
+ callMethodInComponents(name, params) {
201
+ for (let component of this.children) {
202
+ if (component[name])
203
+ component[name](...params);
204
+ }
205
+ }
206
+ updateComponents(object) {
207
+ const components = object.components;
208
+ this.removeChildren();
209
+ for (let component of components) {
210
+ const compClass = this.registerComponents.get(component.id);
211
+ if (!compClass) {
212
+ throw (0, Logger_1.log)(`Impossible to find ${component.id} component`);
213
+ }
214
+ this.addChild(new compClass(this, component.value));
215
+ }
216
+ this.components = components;
217
+ }
218
+ getScene() {
219
+ return this.scene;
220
+ }
221
+ // Hooks
222
+ onInit() { }
223
+ onUpdate(obj) { }
224
+ onMove() { }
225
+ onChanges(data, old) { }
226
+ }
227
+ exports.RpgComponent = RpgComponent;
228
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sourceRoot":"","sources":["../../src/Components/Component.ts"],"names":[],"mappings":";;;AAAA,0CAAuF;AACvF,8CAA4C;AAC5C,sCAA+B;AAE/B,6CAA4C;AAC5C,qDAAiD;AACjD,qDAAiD;AACjD,mDAA+C;AAC/C,mDAA+C;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1
+ import { RpgComponent } from "./Component";
2
+ export declare class ImageComponent extends PIXI.Container {
3
+ private component;
4
+ private source;
5
+ static readonly id: string;
6
+ constructor(component: RpgComponent, source: string);
7
+ setImage(): void;
8
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageComponent = void 0;
4
+ class ImageComponent extends PIXI.Container {
5
+ constructor(component, source) {
6
+ super();
7
+ this.component = component;
8
+ this.source = source;
9
+ this.setImage();
10
+ }
11
+ setImage() {
12
+ const engine = this.component.getScene().game.clientEngine;
13
+ this.addChild(PIXI.Sprite.from(engine.getResourceUrl(this.source)));
14
+ }
15
+ }
16
+ exports.ImageComponent = ImageComponent;
17
+ ImageComponent.id = 'image';
18
+ //# sourceMappingURL=ImageComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageComponent.js","sourceRoot":"","sources":["../../src/Components/ImageComponent.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAe,SAAQ,IAAI,CAAC,SAAS;IAG9C,YAAoB,SAAuB,EAAU,MAAc;QAC/D,KAAK,EAAE,CAAA;QADS,cAAS,GAAT,SAAS,CAAc;QAAU,WAAM,GAAN,MAAM,CAAQ;QAE/D,IAAI,CAAC,QAAQ,EAAE,CAAA;IACnB,CAAC;IAED,QAAQ;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAY,CAAC,IAAI,CAAC,YAAY,CAAA;QACpE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACvE,CAAC;;AAXL,wCAYC;AAXmB,iBAAE,GAAW,OAAO,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare class TextComponent extends PIXI.Text {
2
+ private data;
3
+ static readonly id: string;
4
+ constructor(data: any, _text: string);
5
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextComponent = void 0;
4
+ class TextComponent extends PIXI.Text {
5
+ constructor(data, _text) {
6
+ super(_text);
7
+ this.data = data;
8
+ }
9
+ }
10
+ exports.TextComponent = TextComponent;
11
+ TextComponent.id = 'text';
12
+ //# sourceMappingURL=TextComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextComponent.js","sourceRoot":"","sources":["../../src/Components/TextComponent.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAc,SAAQ,IAAI,CAAC,IAAI;IAGxC,YAAoB,IAAI,EAAE,KAAa;QACnC,KAAK,CAAC,KAAK,CAAC,CAAA;QADI,SAAI,GAAJ,IAAI,CAAA;IAExB,CAAC;;AALL,sCAMC;AALmB,gBAAE,GAAW,MAAM,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { RpgComponent } from "./Component";
2
+ export declare class TileComponent extends PIXI.Container {
3
+ private component;
4
+ private gid;
5
+ static readonly id: string;
6
+ constructor(component: RpgComponent, gid: number);
7
+ setTile(): void;
8
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TileComponent = void 0;
7
+ const Tile_1 = __importDefault(require("../Tilemap/Tile"));
8
+ const TileLayer_1 = __importDefault(require("../Tilemap/TileLayer"));
9
+ class TileComponent extends PIXI.Container {
10
+ constructor(component, gid) {
11
+ super();
12
+ this.component = component;
13
+ this.gid = gid;
14
+ this.setTile();
15
+ }
16
+ setTile() {
17
+ const scene = this.component.getScene();
18
+ const tilemap = scene.tilemap;
19
+ const tileset = TileLayer_1.default.findTileSet(this.gid, tilemap.tilesets);
20
+ if (tileset) {
21
+ const tile = new Tile_1.default({
22
+ gid: this.gid
23
+ }, tileset);
24
+ tile.width = this.component.w;
25
+ tile.height = this.component.h;
26
+ this.addChild(tile);
27
+ }
28
+ }
29
+ }
30
+ exports.TileComponent = TileComponent;
31
+ TileComponent.id = 'tile';
32
+ //# sourceMappingURL=TileComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TileComponent.js","sourceRoot":"","sources":["../../src/Components/TileComponent.ts"],"names":[],"mappings":";;;;;;AACA,2DAAkC;AAClC,qEAA4C;AAG5C,MAAa,aAAc,SAAQ,IAAI,CAAC,SAAS;IAG7C,YAAoB,SAAuB,EAAU,GAAW;QAC5D,KAAK,EAAE,CAAA;QADS,cAAS,GAAT,SAAS,CAAc;QAAU,QAAG,GAAH,GAAG,CAAQ;QAE5D,IAAI,CAAC,OAAO,EAAE,CAAA;IAClB,CAAC;IAED,OAAO;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAY,CAAA;QACjD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC7B,MAAM,OAAO,GAAG,mBAAS,CAAC,WAAW,CACjC,IAAI,CAAC,GAAG,EACR,OAAO,CAAC,QAAQ,CACnB,CAAA;QACD,IAAI,OAAO,EAAE;YACP,MAAM,IAAI,GAAG,IAAI,cAAI,CAAC;gBACpB,GAAG,EAAE,IAAI,CAAC,GAAG;aACT,EAAE,OAAO,CAAC,CAAA;YAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;YAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;YAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;SACtB;IACL,CAAC;;AAvBL,sCAwBC;AAvBmB,gBAAE,GAAW,MAAM,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { AnimationFrames, FrameOptions } from '../Sprite/Spritesheet';
2
- import RpgSprite from '../Sprite/Character';
2
+ import { RpgComponent } from '../Components/Component';
3
3
  declare type AnimationDataFrames = {
4
4
  container: PIXI.Container;
5
5
  sprites: {
@@ -14,7 +14,7 @@ declare type AnimationDataFrames = {
14
14
  };
15
15
  export declare class Animation extends PIXI.Sprite {
16
16
  id: string;
17
- attachTo: RpgSprite;
17
+ attachTo: RpgComponent;
18
18
  hitbox: {
19
19
  w: number;
20
20
  h: number;
@@ -16,7 +16,7 @@ class Animation extends PIXI.Sprite {
16
16
  this.animations = new Map();
17
17
  this.spritesheet = Spritesheets_1.spritesheets.get(this.id);
18
18
  if (!this.spritesheet) {
19
- throw Logger_1.log(`Impossible to find the ${this.id} spritesheet. Did you put the right name or create the spritesheet?`);
19
+ throw (0, Logger_1.log)(`Impossible to find the ${this.id} spritesheet. Did you put the right name or create the spritesheet?`);
20
20
  }
21
21
  this.createAnimations();
22
22
  }
@@ -34,10 +34,10 @@ class Animation extends PIXI.Sprite {
34
34
  const rectX = j * spriteWidth + offsetX;
35
35
  const rectY = i * spriteHeight + offsetY;
36
36
  if (rectY > height) {
37
- throw Logger_1.log(`Warning, there is a problem with the height of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the height of the image.`);
37
+ throw (0, Logger_1.log)(`Warning, there is a problem with the height of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the height of the image.`);
38
38
  }
39
39
  if (rectX > width) {
40
- throw Logger_1.log(`Warning, there is a problem with the width of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the width of the image.`);
40
+ throw (0, Logger_1.log)(`Warning, there is a problem with the width of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the width of the image.`);
41
41
  }
42
42
  frames[i].push(new PIXI.Texture(baseTexture, new PIXI.Rectangle(rectX, rectY, spriteWidth, spriteHeight)));
43
43
  }
@@ -121,9 +121,12 @@ class Animation extends PIXI.Sprite {
121
121
  return;
122
122
  const { frames, container, sprites, data } = this.currentAnimation;
123
123
  if (this.attachTo) {
124
- const { x, y } = this.attachTo.getPositionsOfGraphic('middle');
125
- container.x = x;
126
- container.y = y;
124
+ const sprite = this.attachTo;
125
+ const pos = sprite === null || sprite === void 0 ? void 0 : sprite.getPositionsOfGraphic('middle');
126
+ if (pos) {
127
+ container.x = pos.x;
128
+ container.y = pos.y;
129
+ }
127
130
  }
128
131
  for (let _sprite of container.children) {
129
132
  const sprite = _sprite;
@@ -1 +1 @@
1
- {"version":3,"file":"Animation.js","sourceRoot":"","sources":["../../src/Effects/Animation.ts"],"names":[],"mappings":";;;AAAA,0CAAqC;AACrC,yDAAqD;AAGrD,sCAA+B;AAC/B,gDAA4C;AAE5C,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,cAAK,CAAA;AAezC,MAAa,SAAU,SAAQ,IAAI,CAAC,MAAM;IAatC,YAAmB,EAAU;QACzB,KAAK,EAAE,CAAA;QADQ,OAAE,GAAF,EAAE,CAAQ;QARrB,WAAM,GAAqB,EAAE,CAAA;QAE7B,qBAAgB,GAA+B,IAAI,CAAA;QACnD,SAAI,GAAW,CAAC,CAAA;QAChB,eAAU,GAAqC,IAAI,GAAG,EAAE,CAAA;QAM5D,IAAI,CAAC,WAAW,GAAG,2BAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC5C,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,MAAM,YAAG,CAAC,0BAA0B,IAAI,CAAC,EAAE,qEAAqE,CAAC,CAAA;SACpH;QACD,IAAI,CAAC,gBAAgB,EAAE,CAAA;IAC3B,CAAC;IAEO,cAAc,CAAC,OAAuB;QAC1C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,GAAQ,OAAO,CAAA;QAChF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAChD,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;QAC1C,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;QAC5C,MAAM,MAA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,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE;YAC3C,IAAI,CAAC,IAAI,GAAG,CAAC,CAAA;YACb,IAAI,IAAI,CAAC,QAAQ;gBAAE,IAAI,CAAC,QAAQ,EAAE,CAAA;SACrC;IACL,CAAC;CACJ;AAzND,8BAyNC"}
@@ -1,4 +1,4 @@
1
- import { RpgCommonGame, RpgCommonPlayer } from "@rpgjs/common";
1
+ import { RpgCommonGame, RpgCommonPlayer, RpgShape } from "@rpgjs/common";
2
2
  import { Observable } from "rxjs";
3
3
  import { RpgRenderer } from "./Renderer";
4
4
  import { RpgClientEngine } from "./RpgClientEngine";
@@ -12,23 +12,45 @@ export declare class GameEngineClient extends RpgCommonGame {
12
12
  clientEngine: RpgClientEngine;
13
13
  renderer: RpgRenderer;
14
14
  private _objects;
15
+ private _shapes;
15
16
  world: {
16
17
  getObjects: () => {
17
18
  [id: string]: ObjectFixture;
18
19
  };
19
20
  getObject: (id: string) => RpgCommonPlayer | null;
21
+ getShape: (id: string) => RpgShape | null;
22
+ getAll: (id: string) => RpgCommonPlayer | RpgShape | null;
20
23
  removeObject: (id: any) => boolean;
21
24
  getObjectsOfGroup: () => any;
25
+ getShapesOfGroup: () => {
26
+ [id: string]: ObjectFixture;
27
+ };
22
28
  };
23
29
  constructor();
30
+ private _get;
24
31
  get objects(): Observable<{
25
32
  [id: string]: ObjectFixture;
26
33
  }>;
34
+ get shapes(): Observable<{
35
+ [id: string]: ObjectFixture;
36
+ }>;
37
+ get all(): Observable<{
38
+ [id: string]: ObjectFixture;
39
+ }>;
40
+ getShapes(): {
41
+ [id: string]: ObjectFixture;
42
+ };
27
43
  getObjects(): {
28
44
  [id: string]: ObjectFixture;
29
45
  };
30
46
  getObject(id: string): ObjectFixture | null;
47
+ getShape(id: string): ObjectFixture | null;
48
+ getObjectAndShape(id: string): ObjectFixture | null;
31
49
  resetObjects(): void;
50
+ private _remove;
32
51
  removeObject(id: any): boolean;
52
+ removeShape(id: any): boolean;
53
+ removeObjectAndShape(id: string): boolean;
54
+ static toArray(obj: any, prop: string): void;
33
55
  updateObject(obj: any): any;
34
56
  }