@rpgjs/tiledmap 5.0.0-alpha.5 → 5.0.0-alpha.6
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/client/index.js +2 -10
- package/dist/client/index3.js +4649 -11
- package/dist/client/index4.js +14 -0
- package/dist/server/index.js +1 -1
- package/dist/server/index2.js +1 -1
- package/dist/server/index3.js +5232 -0
- package/dist/server.d.ts +1 -1
- package/package.json +9 -7
- package/src/index.ts +1 -10
- package/src/server.ts +1 -4
package/dist/server.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgjs/tiledmap",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -22,13 +22,12 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"description": "RPGJS is a framework for creating RPG/MMORPG games",
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"canvasengine": "2.0.0-beta.21",
|
|
26
25
|
"@canvasengine/presets": "2.0.0-beta.21",
|
|
27
|
-
"@rpgjs/
|
|
28
|
-
"@rpgjs/
|
|
29
|
-
"@rpgjs/
|
|
30
|
-
"@rpgjs/
|
|
31
|
-
"
|
|
26
|
+
"@rpgjs/client": "5.0.0-alpha.6",
|
|
27
|
+
"@rpgjs/common": "5.0.0-alpha.6",
|
|
28
|
+
"@rpgjs/server": "5.0.0-alpha.6",
|
|
29
|
+
"@rpgjs/vite": "5.0.0-alpha.6",
|
|
30
|
+
"canvasengine": "2.0.0-beta.21"
|
|
32
31
|
},
|
|
33
32
|
"publishConfig": {
|
|
34
33
|
"access": "public"
|
|
@@ -39,6 +38,9 @@
|
|
|
39
38
|
"vite-plugin-dts": "^4.5.3"
|
|
40
39
|
},
|
|
41
40
|
"type": "module",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@canvasengine/tiled": "2.0.0-beta.25"
|
|
43
|
+
},
|
|
42
44
|
"scripts": {
|
|
43
45
|
"dev": "vite build --watch",
|
|
44
46
|
"build": "vite build"
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import server from "./server";
|
|
|
2
2
|
import client from "./client";
|
|
3
3
|
import { createModule } from "@rpgjs/common";
|
|
4
4
|
import { provideLoadMap } from "@rpgjs/client";
|
|
5
|
-
import { TiledParser } from "@
|
|
5
|
+
import { TiledParser } from "@canvasengine/tiled";
|
|
6
6
|
import Tiled from "./tiled.ce";
|
|
7
7
|
|
|
8
8
|
export function provideTiledMap(options: {
|
|
@@ -38,19 +38,10 @@ export function provideTiledMap(options: {
|
|
|
38
38
|
}
|
|
39
39
|
parsedMap.tilesets = tilesets;
|
|
40
40
|
|
|
41
|
-
const events = [
|
|
42
|
-
{
|
|
43
|
-
"event": eval("function Event(options = {}) {\n return {\n async onInit() {\n this.setGraphic('male')\n //new BattleAi(this)\n },\n \n async onAction(player) {\n await player.showText('Comment vas tu ?')\n },\n\n async onChanges(player) {\n },\n\n async onPlayerTouch(player) {\n }\n }\n}"),
|
|
44
|
-
"x": 200,
|
|
45
|
-
"y": 200
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
|
|
49
41
|
const obj = {
|
|
50
42
|
data: mapData,
|
|
51
43
|
component: Tiled,
|
|
52
44
|
parsedMap,
|
|
53
|
-
events,
|
|
54
45
|
id: map,
|
|
55
46
|
};
|
|
56
47
|
|
package/src/server.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { RpgMap, RpgServer } from "@rpgjs/server";
|
|
2
|
-
import {
|
|
2
|
+
import { MapClass } from "@canvasengine/tiled";
|
|
3
3
|
import { defineModule } from "@rpgjs/common";
|
|
4
4
|
|
|
5
|
-
// Import TileInfo depuis le bon endroit
|
|
6
|
-
import type { TileInfo } from "@rpgjs/tiled/src/classes/Map";
|
|
7
|
-
|
|
8
5
|
// Extend RpgMap interface to include tiled property
|
|
9
6
|
declare module "@rpgjs/server" {
|
|
10
7
|
interface RpgMap {
|