@rpgjs/tiledmap 5.0.0-alpha.9 → 5.0.0-beta.10

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/server.d.ts DELETED
@@ -1,65 +0,0 @@
1
- import { RpgMap } from '@rpgjs/server';
2
- import { MapClass } from '@canvasengine/tiled';
3
- declare module "@rpgjs/server" {
4
- interface RpgMap {
5
- tiled?: MapClass;
6
- }
7
- }
8
- /**
9
- * Interface for an RpgMap extended with Tiled functionality
10
- *
11
- * @description This interface combines RpgMap with MapClass to enable
12
- * the use of Tiled methods on RPG maps
13
- */
14
- export interface RpgTiledMap extends RpgMap {
15
- tiled: MapClass;
16
- }
17
- /**
18
- * Tiled Module for RPGJS
19
- *
20
- * @description This module extends RPGJS maps with Tiled functionality,
21
- * allowing TMX map parsing and automatic hitbox creation
22
- * based on collisions defined in Tiled
23
- *
24
- * ## Features
25
- *
26
- * - **Automatic parsing**: Parses TMX files from Tiled Map Editor
27
- * - **Collision detection**: Scans all tiles to detect collisions
28
- * - **Hitbox creation**: Automatically generates hitboxes for each collision tile
29
- * - **RpgMap extension**: Adds the `tiled` property to all RpgMap instances
30
- *
31
- * ## Usage
32
- *
33
- * Once this module is activated, you can use Tiled methods on your maps:
34
- *
35
- * @example
36
- * ```ts
37
- * // In a map class
38
- * class MyMap extends RpgMap {
39
- * onLoad() {
40
- * // Access Tiled functionality
41
- * const tiles = this.tiled.getTileByPosition(100, 100);
42
- *
43
- * if (tiles.hasCollision) {
44
- * console.log('This position has a collision');
45
- * }
46
- *
47
- * // Iterate through all tiles by index
48
- * for (let i = 0; i < this.tiled.width * this.tiled.height; i++) {
49
- * const tileInfo = this.tiled.getTileByIndex(i);
50
- * if (tileInfo.hasCollision) {
51
- * console.log(`Tile ${i} has collision`);
52
- * }
53
- * }
54
- *
55
- * // Get information about a specific layer
56
- * const layer = this.tiled.getLayerByName('Collision');
57
- * if (layer) {
58
- * console.log('Collision layer found:', layer);
59
- * }
60
- * }
61
- * }
62
- * ```
63
- */
64
- declare const _default: any;
65
- export default _default;