@rpgjs/client 3.0.3 → 3.2.0
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/LICENSE +19 -0
- package/lib/Components/Component.d.ts +4 -4
- package/lib/Components/Component.js +43 -5
- package/lib/Components/Component.js.map +1 -1
- package/lib/Effects/Animation.d.ts +15 -5
- package/lib/Effects/Animation.js +19 -14
- package/lib/Effects/Animation.js.map +1 -1
- package/lib/Effects/AnimationCharacter.d.ts +4 -1
- package/lib/Effects/AnimationCharacter.js +3 -0
- package/lib/Effects/AnimationCharacter.js.map +1 -1
- package/lib/GameEngine.d.ts +4 -7
- package/lib/GameEngine.js +2 -1
- package/lib/GameEngine.js.map +1 -1
- package/lib/KeyboardControls.d.ts +21 -10
- package/lib/KeyboardControls.js +29 -4
- package/lib/KeyboardControls.js.map +1 -1
- package/lib/RpgClientEngine.d.ts +22 -16
- package/lib/RpgClientEngine.js +43 -75
- package/lib/RpgClientEngine.js.map +1 -1
- package/lib/Scene/Map.d.ts +2 -0
- package/lib/Scene/Map.js +20 -0
- package/lib/Scene/Map.js.map +1 -1
- package/lib/Scene/Scene.d.ts +1 -1
- package/lib/Scene/Scene.js +0 -5
- package/lib/Scene/Scene.js.map +1 -1
- package/lib/Sound/Sound.d.ts +47 -28
- package/lib/Sound/Sound.js +4 -2
- package/lib/Sound/Sound.js.map +1 -1
- package/lib/Sprite/Character.js +5 -2
- package/lib/Sprite/Character.js.map +1 -1
- package/lib/Sprite/Spritesheet.d.ts +85 -48
- package/lib/Sprite/Spritesheet.js +4 -2
- package/lib/Sprite/Spritesheet.js.map +1 -1
- package/lib/Sprite/Spritesheets.d.ts +2 -1
- package/lib/Sprite/Spritesheets.js.map +1 -1
- package/lib/Tilemap/TileLayer.js +1 -1
- package/lib/Tilemap/TileLayer.js.map +1 -1
- package/lib/index.d.ts +19 -19
- package/lib/index.js +22 -22
- package/lib/index.js.map +1 -1
- package/package.json +5 -4
package/lib/Sound/Sound.d.ts
CHANGED
|
@@ -1,31 +1,4 @@
|
|
|
1
1
|
interface SoundOptions {
|
|
2
|
-
/**
|
|
3
|
-
* Put the different sounds that are concerned by the properties below.
|
|
4
|
-
* The key of the object is the identifier of the sound and the value and the link to the sound.
|
|
5
|
-
*
|
|
6
|
-
* > Remember to wrap the link to the sound with the `require` function.
|
|
7
|
-
*
|
|
8
|
-
* ```ts
|
|
9
|
-
* sounds: {
|
|
10
|
-
* hero: require('./assets/sound.ogg')
|
|
11
|
-
* }
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @prop { { [id: string]: string } } [sounds]
|
|
15
|
-
* @memberof Sound
|
|
16
|
-
* */
|
|
17
|
-
sounds?: {
|
|
18
|
-
[id: string]: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Sound identifier.
|
|
22
|
-
*
|
|
23
|
-
* > Do not use the `sounds` property
|
|
24
|
-
*
|
|
25
|
-
* @prop {string} [id]
|
|
26
|
-
* @memberof Sound
|
|
27
|
-
* */
|
|
28
|
-
id?: string;
|
|
29
2
|
/**
|
|
30
3
|
* The link to the sound
|
|
31
4
|
*
|
|
@@ -55,5 +28,51 @@ interface SoundOptions {
|
|
|
55
28
|
* */
|
|
56
29
|
volume?: number;
|
|
57
30
|
}
|
|
58
|
-
|
|
31
|
+
declare type SoundIdOptions = SoundOptions & {
|
|
32
|
+
/**
|
|
33
|
+
* Sound identifier.
|
|
34
|
+
*
|
|
35
|
+
* > Do not use the `sounds` property
|
|
36
|
+
*
|
|
37
|
+
* @prop {string} [id]
|
|
38
|
+
* @memberof Sound
|
|
39
|
+
* */
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* The link to the sound
|
|
43
|
+
*
|
|
44
|
+
* > Do not use the `images` property
|
|
45
|
+
* > Remember to wrap the link to the image with the `require` function.
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* sound: require('./assets/sound.ogg')
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @prop {string} [sound]
|
|
52
|
+
* @memberof Sound
|
|
53
|
+
* */
|
|
54
|
+
sound: string;
|
|
55
|
+
};
|
|
56
|
+
declare type SoundIdsOptions = SoundOptions & {
|
|
57
|
+
/**
|
|
58
|
+
* Put the different sounds that are concerned by the properties below.
|
|
59
|
+
* The key of the object is the identifier of the sound and the value and the link to the sound.
|
|
60
|
+
*
|
|
61
|
+
* > Remember to wrap the link to the sound with the `require` function.
|
|
62
|
+
*
|
|
63
|
+
* ```ts
|
|
64
|
+
* sounds: {
|
|
65
|
+
* hero: require('./assets/sound.ogg')
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @prop { { [id: string]: string } } [sounds]
|
|
70
|
+
* @memberof Sound
|
|
71
|
+
* */
|
|
72
|
+
sounds?: {
|
|
73
|
+
[id: string]: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare function Sound(options: SoundIdOptions): any;
|
|
77
|
+
export declare function Sound(options: SoundIdsOptions): any;
|
|
59
78
|
export {};
|
package/lib/Sound/Sound.js
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Sound = void 0;
|
|
4
4
|
function Sound(options) {
|
|
5
5
|
return (target) => {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
if ('sounds' in options)
|
|
7
|
+
target['sounds'] = options.sounds;
|
|
8
|
+
if ('id' in options)
|
|
9
|
+
target['id'] = options.id;
|
|
8
10
|
for (let key in options) {
|
|
9
11
|
target.prototype[key] = options[key];
|
|
10
12
|
}
|
package/lib/Sound/Sound.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sound.js","sourceRoot":"","sources":["../../src/Sound/Sound.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Sound.js","sourceRoot":"","sources":["../../src/Sound/Sound.ts"],"names":[],"mappings":";;;AAkFA,SAAgB,KAAK,CAAC,OAAyC;IAC3D,OAAO,CAAC,MAAgB,EAAE,EAAE;QACxB,IAAI,QAAQ,IAAI,OAAO;YAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAA;QAC3D,IAAI,IAAI,IAAI,OAAO;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,EAAE,CAAA;QAC9C,KAAK,IAAI,GAAG,IAAI,OAAO,EAAE;YACrB,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;SACvC;IACL,CAAC,CAAA;AACL,CAAC;AARD,sBAQC"}
|
package/lib/Sprite/Character.js
CHANGED
|
@@ -63,13 +63,16 @@ class Character extends PIXI.Sprite {
|
|
|
63
63
|
this.animation.hitbox = { h: this.data.hHitbox, w: this.data.wHitbox };
|
|
64
64
|
this.animation.applyTransform = (frame, animation, spritesheet) => {
|
|
65
65
|
const { spriteWidth, spriteHeight } = animation;
|
|
66
|
-
const prop = '
|
|
66
|
+
const prop = 'spriteRealSize';
|
|
67
67
|
const currentAnchor = frame[prop] || animation[prop] || spritesheet[prop];
|
|
68
68
|
if (currentAnchor) {
|
|
69
69
|
return {};
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
72
|
-
|
|
72
|
+
spriteRealSize: {
|
|
73
|
+
width: spriteWidth,
|
|
74
|
+
height: spriteHeight
|
|
75
|
+
}
|
|
73
76
|
};
|
|
74
77
|
};
|
|
75
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Character.js","sourceRoot":"","sources":["../../src/Sprite/Character.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"Character.js","sourceRoot":"","sources":["../../src/Sprite/Character.ts"],"names":[],"mappings":";;AAAA,0CAA4D;AAC5D,iDAA6C;AAC7C,oDAAgD;AAChD,sEAA0E;AAI1E,MAAM,EAAE,UAAU,EAAE,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CAAC,IAAI,CAAC,EAAE;YACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAA;SAC/B;aACI,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;SACnD;IACL,CAAC;;AA5HL,4BA8HC;AA7HmB,YAAE,GAAW,SAAS,CAAA"}
|
|
@@ -36,7 +36,20 @@ export interface TransformOptions {
|
|
|
36
36
|
* @memberof Spritesheet
|
|
37
37
|
* */
|
|
38
38
|
anchor?: number[];
|
|
39
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Defines the actual size of the sprite that is inside a larger rectangle.
|
|
41
|
+
* For example, if the texture rectangle is 192x192 while the character, which is in the center, is only 64x64 then set `spriteRealSize: 64`. This way the character will be well positioned in relation to the animations that have a different rectangle
|
|
42
|
+
*
|
|
43
|
+
* > You can also put `spriteRealSize: { width: 64, height: 64 }` but be aware that the width is not concerned because it will always be centered while the height depends on the hitbox
|
|
44
|
+
*
|
|
45
|
+
* @prop {{ width: number, height: number } | number} [spriteRealSize]
|
|
46
|
+
* @since 3.2.0
|
|
47
|
+
* @memberof Spritesheet
|
|
48
|
+
* */
|
|
49
|
+
spriteRealSize?: {
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
} | number;
|
|
40
53
|
/**
|
|
41
54
|
* The global value of rotation
|
|
42
55
|
*
|
|
@@ -122,50 +135,54 @@ export interface FrameOptions extends TransformOptions {
|
|
|
122
135
|
frameY?: number;
|
|
123
136
|
}
|
|
124
137
|
export interface TextureOptions {
|
|
125
|
-
/**
|
|
126
|
-
* The link to the image
|
|
127
|
-
*
|
|
128
|
-
* > Do not use the `images` property
|
|
129
|
-
* > Remember to wrap the link to the image with the `require` function.
|
|
130
|
-
*
|
|
131
|
-
* ```ts
|
|
132
|
-
* image: require('./assets/hero.png')
|
|
133
|
-
* ```
|
|
134
|
-
*
|
|
135
|
-
* @prop {string} [image]
|
|
136
|
-
* @memberof Spritesheet
|
|
137
|
-
* */
|
|
138
|
-
image?: string;
|
|
139
138
|
/**
|
|
140
139
|
* The number of frames on the width
|
|
141
140
|
*
|
|
142
|
-
* @prop {number}
|
|
141
|
+
* @prop {number} framesWidth
|
|
143
142
|
* @memberof Spritesheet
|
|
144
143
|
* */
|
|
145
144
|
framesWidth?: number;
|
|
146
145
|
/**
|
|
147
146
|
* The number of frames on the height
|
|
148
147
|
*
|
|
149
|
-
* @prop {number}
|
|
148
|
+
* @prop {number} framesHeight
|
|
150
149
|
* @memberof Spritesheet
|
|
151
150
|
* */
|
|
152
151
|
framesHeight?: number;
|
|
153
152
|
/**
|
|
154
153
|
* The width of the image (in pixels)
|
|
155
154
|
*
|
|
156
|
-
* @prop {number}
|
|
155
|
+
* @prop {number} width
|
|
157
156
|
* @memberof Spritesheet
|
|
158
157
|
* */
|
|
159
158
|
width?: number;
|
|
160
159
|
/**
|
|
161
160
|
* The height of the image (in pixels)
|
|
162
161
|
*
|
|
163
|
-
* @prop {number}
|
|
162
|
+
* @prop {number} height
|
|
164
163
|
* @memberof Spritesheet
|
|
165
164
|
* */
|
|
166
165
|
height?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Takes a width of a rectangle in the image. Equivalent to `width / framesWidth`
|
|
168
|
+
*
|
|
169
|
+
* @prop {number} [rectWidth]
|
|
170
|
+
* @memberof Spritesheet
|
|
171
|
+
* */
|
|
167
172
|
rectWidth?: number;
|
|
173
|
+
/**
|
|
174
|
+
* Takes a height of a rectangle in the image. Equivalent to `height / framesHeight`
|
|
175
|
+
*
|
|
176
|
+
* @prop {number} [rectHeight]
|
|
177
|
+
* @memberof Spritesheet
|
|
178
|
+
* */
|
|
168
179
|
rectHeight?: number;
|
|
180
|
+
/**
|
|
181
|
+
* To take the texture, start at a well defined X and Y position. Otherwise, it starts at 0,0
|
|
182
|
+
*
|
|
183
|
+
* @prop {number} [offset]
|
|
184
|
+
* @memberof Spritesheet
|
|
185
|
+
* */
|
|
169
186
|
offset?: {
|
|
170
187
|
x: number;
|
|
171
188
|
y: number;
|
|
@@ -176,33 +193,6 @@ export interface TexturesOptions extends TextureOptions, TransformOptions {
|
|
|
176
193
|
animations: AnimationFrames;
|
|
177
194
|
}
|
|
178
195
|
export interface SpritesheetOptions extends TransformOptions, TextureOptions {
|
|
179
|
-
/**
|
|
180
|
-
* Put the different images that are concerned by the properties below.
|
|
181
|
-
* The key of the object is the identifier of the spritesheet and the value and the link to the image.
|
|
182
|
-
*
|
|
183
|
-
* > Remember to wrap the link to the image with the `require` function.
|
|
184
|
-
*
|
|
185
|
-
* ```ts
|
|
186
|
-
* images: {
|
|
187
|
-
* hero: require('./assets/hero.png')
|
|
188
|
-
* }
|
|
189
|
-
* ```
|
|
190
|
-
*
|
|
191
|
-
* @prop { { [id: string]: string } } [images]
|
|
192
|
-
* @memberof Spritesheet
|
|
193
|
-
* */
|
|
194
|
-
images?: {
|
|
195
|
-
[id: string]: string;
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* Spritesheet identifier.
|
|
199
|
-
*
|
|
200
|
-
* > Do not use the `images` property
|
|
201
|
-
*
|
|
202
|
-
* @prop {string} [id]
|
|
203
|
-
* @memberof Spritesheet
|
|
204
|
-
* */
|
|
205
|
-
id?: string;
|
|
206
196
|
/**
|
|
207
197
|
* Object containing all animations.
|
|
208
198
|
* The key to the object is the name of the animation. The value is a two-dimensional array
|
|
@@ -322,7 +312,54 @@ export interface SpritesheetOptions extends TransformOptions, TextureOptions {
|
|
|
322
312
|
* @memberof Spritesheet
|
|
323
313
|
* */
|
|
324
314
|
textures?: {
|
|
325
|
-
[animationName: string]: TexturesOptions
|
|
315
|
+
[animationName: string]: Partial<TexturesOptions> & Pick<TexturesOptions, 'animations'>;
|
|
326
316
|
};
|
|
327
317
|
}
|
|
328
|
-
|
|
318
|
+
declare type SpritesheetImageOptions = SpritesheetOptions & {
|
|
319
|
+
/**
|
|
320
|
+
* The link to the image
|
|
321
|
+
*
|
|
322
|
+
* > Do not use the `images` property
|
|
323
|
+
* > Remember to wrap the link to the image with the `require` function.
|
|
324
|
+
*
|
|
325
|
+
* ```ts
|
|
326
|
+
* image: require('./assets/hero.png')
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* @prop {string} [image]
|
|
330
|
+
* @memberof Spritesheet
|
|
331
|
+
* */
|
|
332
|
+
image: string;
|
|
333
|
+
/**
|
|
334
|
+
* Spritesheet identifier.
|
|
335
|
+
*
|
|
336
|
+
* > Do not use the `images` property
|
|
337
|
+
*
|
|
338
|
+
* @prop {string} [id]
|
|
339
|
+
* @memberof Spritesheet
|
|
340
|
+
* */
|
|
341
|
+
id: string;
|
|
342
|
+
};
|
|
343
|
+
declare type SpritesheetImagesOptions = SpritesheetOptions & {
|
|
344
|
+
/**
|
|
345
|
+
* Put the different images that are concerned by the properties below.
|
|
346
|
+
* The key of the object is the identifier of the spritesheet and the value and the link to the image.
|
|
347
|
+
*
|
|
348
|
+
* > Remember to wrap the link to the image with the `require` function.
|
|
349
|
+
*
|
|
350
|
+
* ```ts
|
|
351
|
+
* images: {
|
|
352
|
+
* hero: require('./assets/hero.png')
|
|
353
|
+
* }
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* @prop { { [id: string]: string } } [images]
|
|
357
|
+
* @memberof Spritesheet
|
|
358
|
+
* */
|
|
359
|
+
images: {
|
|
360
|
+
[id: string]: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
export declare function Spritesheet(options: SpritesheetImageOptions): any;
|
|
364
|
+
export declare function Spritesheet(options: SpritesheetImagesOptions): any;
|
|
365
|
+
export {};
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Spritesheet = void 0;
|
|
4
4
|
function Spritesheet(options) {
|
|
5
5
|
return (target) => {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
if ('images' in options)
|
|
7
|
+
target['images'] = options.images;
|
|
8
|
+
if ('id' in options)
|
|
9
|
+
target['id'] = options.id;
|
|
8
10
|
for (let key in options) {
|
|
9
11
|
target.prototype[key] = options[key];
|
|
10
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spritesheet.js","sourceRoot":"","sources":["../../src/Sprite/Spritesheet.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Spritesheet.js","sourceRoot":"","sources":["../../src/Sprite/Spritesheet.ts"],"names":[],"mappings":";;;AA8XA,SAAgB,WAAW,CAAC,OAA2D;IACnF,OAAO,CAAC,MAAgB,EAAE,EAAE;QACxB,IAAI,QAAQ,IAAI,OAAO;YAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAA;QAC1D,IAAI,IAAI,IAAI,OAAO;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,EAAE,CAAA;QAC9C,KAAK,IAAI,GAAG,IAAI,OAAO,EAAE;YACrB,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;SACvC;QACD,OAAM;IACV,CAAC,CAAA;AACL,CAAC;AATD,kCASC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spritesheets.js","sourceRoot":"","sources":["../../src/Sprite/Spritesheets.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Spritesheets.js","sourceRoot":"","sources":["../../src/Sprite/Spritesheets.ts"],"names":[],"mappings":";;;AACA,4CAA4C;AAE/B,QAAA,YAAY,GAAqB,IAAI,GAAG,EAAE,CAAA;AAEvD,SAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAuB;IACnE,OAAO,IAAA,yBAAa,EAAC,oBAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AACtE,CAAC;AAFD,4CAEC"}
|
package/lib/Tilemap/TileLayer.js
CHANGED
|
@@ -34,7 +34,7 @@ class TileLayer extends CommonLayer_1.CommonLayer {
|
|
|
34
34
|
y = Math.floor(y / tileheight);
|
|
35
35
|
}
|
|
36
36
|
const i = x + y * width;
|
|
37
|
-
const tiledTile = this.layer.
|
|
37
|
+
const tiledTile = this.layer.getTileByIndex(i);
|
|
38
38
|
if (!tiledTile || (tiledTile && tiledTile.gid == 0))
|
|
39
39
|
return;
|
|
40
40
|
const tileset = TileLayer.findTileSet(tiledTile.gid, this.tileSets);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileLayer.js","sourceRoot":"","sources":["../../src/Tilemap/TileLayer.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,+CAAsF;AAItF,+CAA4C;AAE5C,2BAAY,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAA;AACrC,2BAAY,CAAC,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAA;AAS1C,MAAqB,SAAU,SAAQ,yBAAW;IAgB9C,YAAY,KAAY,EAAU,QAAmB,EAAE,GAAY;QAC/D,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QADa,aAAQ,GAAR,QAAQ,CAAW;QAd7C,WAAM,GAAQ,EAAE,CAAA;IAgBxB,CAAC;IAbD,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,QAAmB;QAC/C,IAAI,OAA4B,CAAA;QAChC,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3C,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YACrB,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,IAAI,GAAG,EAAE;gBAC7C,MAAM;aACT;SACJ;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAMD,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Logic } from '@rpgjs/common';
|
|
2
|
+
export { default as entryPoint } from './clientEntryPoint';
|
|
3
|
+
export { RpgClient, RpgSceneHooks, RpgSceneMapHooks, RpgSpriteHooks, RpgClientEngineHooks } from './RpgClient';
|
|
4
|
+
export { Scene as RpgScene } from './Scene/Scene';
|
|
5
|
+
export { RpgClientEngine } from './RpgClientEngine';
|
|
6
|
+
export { Spritesheet } from './Sprite/Spritesheet';
|
|
7
|
+
export { Sound } from './Sound/Sound';
|
|
8
|
+
export { Howler as RpgGlobalSound } from 'howler';
|
|
9
|
+
export { RpgSound } from './Sound/RpgSound';
|
|
10
|
+
export * as Presets from './Presets/AnimationSpritesheet';
|
|
11
|
+
export { Animation } from './Effects/AnimationCharacter';
|
|
12
|
+
export { Animation as AnimationClass } from './Effects/Animation';
|
|
13
|
+
export { ISpriteCharacter } from './Interfaces/Character';
|
|
14
|
+
export { SceneData } from './Scene/SceneData';
|
|
15
|
+
export { SceneMap as RpgSceneMap } from './Scene/Map';
|
|
16
|
+
export { RpgGui } from './RpgGui';
|
|
17
|
+
export { Timeline, Ease } from './Effects/Timeline';
|
|
18
|
+
export { RpgComponent, RpgComponent as RpgSprite } from './Components/Component';
|
|
19
|
+
export declare const RpgResource: {
|
|
19
20
|
spritesheets: Map<string, any>;
|
|
20
21
|
sounds: Map<any, any>;
|
|
21
22
|
};
|
|
22
|
-
export { RpgClient, entryPoint, Spritesheet, RpgComponent as RpgSprite, Sound, RpgGlobalSound, RpgSound, Presets, Animation, Timeline, Ease, Direction, ISpriteCharacter, SceneData, RpgSceneMap, RpgGui, Control, Input, PrebuiltGui, HookServer, HookClient, RpgModule, RpgSceneHooks, RpgSceneMapHooks, RpgSpriteHooks, RpgClientEngineHooks, RpgResource, RpgClientEngine, RpgPlugin, RpgScene, RpgSpriteLogic, RpgComponent };
|
package/lib/index.js
CHANGED
|
@@ -26,8 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
|
|
29
|
+
exports.RpgResource = exports.RpgSprite = exports.RpgComponent = exports.Ease = exports.Timeline = exports.RpgGui = exports.RpgSceneMap = exports.SceneData = exports.AnimationClass = exports.Animation = exports.Presets = exports.RpgSound = exports.RpgGlobalSound = exports.Sound = exports.Spritesheet = exports.RpgClientEngine = exports.RpgScene = exports.entryPoint = exports.RpgSpriteLogic = exports.RpgModule = exports.RpgPlugin = exports.HookClient = exports.HookServer = exports.PrebuiltGui = exports.Input = exports.Control = exports.Direction = void 0;
|
|
30
|
+
var common_1 = require("@rpgjs/common");
|
|
31
31
|
Object.defineProperty(exports, "Direction", { enumerable: true, get: function () { return common_1.Direction; } });
|
|
32
32
|
Object.defineProperty(exports, "Control", { enumerable: true, get: function () { return common_1.Control; } });
|
|
33
33
|
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return common_1.Input; } });
|
|
@@ -37,41 +37,41 @@ Object.defineProperty(exports, "HookClient", { enumerable: true, get: function (
|
|
|
37
37
|
Object.defineProperty(exports, "RpgPlugin", { enumerable: true, get: function () { return common_1.RpgPlugin; } });
|
|
38
38
|
Object.defineProperty(exports, "RpgModule", { enumerable: true, get: function () { return common_1.RpgModule; } });
|
|
39
39
|
Object.defineProperty(exports, "RpgSpriteLogic", { enumerable: true, get: function () { return common_1.RpgCommonPlayer; } });
|
|
40
|
-
|
|
41
|
-
exports
|
|
42
|
-
|
|
40
|
+
var clientEntryPoint_1 = require("./clientEntryPoint");
|
|
41
|
+
Object.defineProperty(exports, "entryPoint", { enumerable: true, get: function () { return __importDefault(clientEntryPoint_1).default; } });
|
|
42
|
+
var Scene_1 = require("./Scene/Scene");
|
|
43
43
|
Object.defineProperty(exports, "RpgScene", { enumerable: true, get: function () { return Scene_1.Scene; } });
|
|
44
|
-
|
|
44
|
+
var RpgClientEngine_1 = require("./RpgClientEngine");
|
|
45
45
|
Object.defineProperty(exports, "RpgClientEngine", { enumerable: true, get: function () { return RpgClientEngine_1.RpgClientEngine; } });
|
|
46
|
-
|
|
46
|
+
var Spritesheet_1 = require("./Sprite/Spritesheet");
|
|
47
47
|
Object.defineProperty(exports, "Spritesheet", { enumerable: true, get: function () { return Spritesheet_1.Spritesheet; } });
|
|
48
|
-
|
|
48
|
+
var Sound_1 = require("./Sound/Sound");
|
|
49
49
|
Object.defineProperty(exports, "Sound", { enumerable: true, get: function () { return Sound_1.Sound; } });
|
|
50
|
-
|
|
50
|
+
var howler_1 = require("howler");
|
|
51
51
|
Object.defineProperty(exports, "RpgGlobalSound", { enumerable: true, get: function () { return howler_1.Howler; } });
|
|
52
|
-
|
|
52
|
+
var RpgSound_1 = require("./Sound/RpgSound");
|
|
53
53
|
Object.defineProperty(exports, "RpgSound", { enumerable: true, get: function () { return RpgSound_1.RpgSound; } });
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const AnimationCharacter_1 = require("./Effects/AnimationCharacter");
|
|
54
|
+
exports.Presets = __importStar(require("./Presets/AnimationSpritesheet"));
|
|
55
|
+
var AnimationCharacter_1 = require("./Effects/AnimationCharacter");
|
|
57
56
|
Object.defineProperty(exports, "Animation", { enumerable: true, get: function () { return AnimationCharacter_1.Animation; } });
|
|
58
|
-
|
|
57
|
+
var Animation_1 = require("./Effects/Animation");
|
|
58
|
+
Object.defineProperty(exports, "AnimationClass", { enumerable: true, get: function () { return Animation_1.Animation; } });
|
|
59
|
+
var SceneData_1 = require("./Scene/SceneData");
|
|
59
60
|
Object.defineProperty(exports, "SceneData", { enumerable: true, get: function () { return SceneData_1.SceneData; } });
|
|
60
|
-
|
|
61
|
+
var Map_1 = require("./Scene/Map");
|
|
61
62
|
Object.defineProperty(exports, "RpgSceneMap", { enumerable: true, get: function () { return Map_1.SceneMap; } });
|
|
62
|
-
|
|
63
|
+
var RpgGui_1 = require("./RpgGui");
|
|
63
64
|
Object.defineProperty(exports, "RpgGui", { enumerable: true, get: function () { return RpgGui_1.RpgGui; } });
|
|
64
|
-
|
|
65
|
+
var Timeline_1 = require("./Effects/Timeline");
|
|
65
66
|
Object.defineProperty(exports, "Timeline", { enumerable: true, get: function () { return Timeline_1.Timeline; } });
|
|
66
67
|
Object.defineProperty(exports, "Ease", { enumerable: true, get: function () { return Timeline_1.Ease; } });
|
|
68
|
+
var Component_1 = require("./Components/Component");
|
|
69
|
+
Object.defineProperty(exports, "RpgComponent", { enumerable: true, get: function () { return Component_1.RpgComponent; } });
|
|
70
|
+
Object.defineProperty(exports, "RpgSprite", { enumerable: true, get: function () { return Component_1.RpgComponent; } });
|
|
67
71
|
const Spritesheets_1 = require("./Sprite/Spritesheets");
|
|
68
72
|
const Sounds_1 = require("./Sound/Sounds");
|
|
69
|
-
|
|
70
|
-
Object.defineProperty(exports, "RpgSprite", { enumerable: true, get: function () { return Component_1.RpgComponent; } });
|
|
71
|
-
Object.defineProperty(exports, "RpgComponent", { enumerable: true, get: function () { return Component_1.RpgComponent; } });
|
|
72
|
-
const RpgResource = {
|
|
73
|
+
exports.RpgResource = {
|
|
73
74
|
spritesheets: Spritesheets_1.spritesheets,
|
|
74
75
|
sounds: Sounds_1.sounds
|
|
75
76
|
};
|
|
76
|
-
exports.RpgResource = RpgResource;
|
|
77
77
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAuJ;AAA9I,mGAAA,SAAS,OAAA;AAAE,iGAAA,OAAO,OAAA;AAAE,+FAAA,KAAK,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,wGAAA,eAAe,OAAkB;AAChI,uDAA0D;AAAjD,+HAAA,OAAO,OAAc;AAE9B,uCAAiD;AAAxC,iGAAA,KAAK,OAAY;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,oDAAkD;AAAzC,0GAAA,WAAW,OAAA;AACpB,uCAAqC;AAA5B,8FAAA,KAAK,OAAA;AACd,iCAAkD;AAAzC,wGAAA,MAAM,OAAkB;AACjC,6CAA2C;AAAlC,oGAAA,QAAQ,OAAA;AACjB,0EAAyD;AACzD,mEAAwD;AAA/C,+GAAA,SAAS,OAAA;AAClB,iDAAiE;AAAxD,2GAAA,SAAS,OAAkB;AAEpC,+CAA6C;AAApC,sGAAA,SAAS,OAAA;AAClB,mCAAqD;AAA5C,kGAAA,QAAQ,OAAe;AAChC,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,+CAAoD;AAA3C,oGAAA,QAAQ,OAAA;AAAE,gGAAA,IAAI,OAAA;AACvB,oDAAgF;AAAvE,yGAAA,YAAY,OAAA;AAAE,sGAAA,YAAY,OAAa;AAEhD,wDAAoD;AACpD,2CAAuC;AAC1B,QAAA,WAAW,GAAG;IACvB,YAAY,EAAZ,2BAAY;IACZ,MAAM,EAAN,eAAM;CACT,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgjs/client",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"author": "Samuel Ronce",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@rpgjs/common": "^3.0
|
|
22
|
-
"@rpgjs/tiled": "^3.
|
|
21
|
+
"@rpgjs/common": "^3.2.0",
|
|
22
|
+
"@rpgjs/tiled": "^3.2.0",
|
|
23
|
+
"@rpgjs/types": "^3.2.0",
|
|
23
24
|
"@types/howler": "2.2.1",
|
|
24
25
|
"howler": "2.2.1",
|
|
25
26
|
"lodash.merge": "4.6.2",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"simple-room-client": "^1.0.0",
|
|
31
32
|
"vue": "^3.2.39"
|
|
32
33
|
},
|
|
33
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "90bd3ad9ca9cbd823165c39c6c9b2c97399c7b10",
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"typescript": "^4.7.4"
|
|
36
37
|
}
|