@rpgjs/client 5.0.0-alpha.10 → 5.0.0-alpha.2
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/Game/EffectManager.d.ts +5 -0
- package/dist/RpgClient.d.ts +68 -99
- package/dist/RpgClientEngine.d.ts +4 -86
- package/dist/components/effects/index.d.ts +4 -0
- package/dist/components/index.d.ts +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.js +4 -4
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +2 -6
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +2 -2
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +35 -95
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +186 -45
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +5 -187
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +383 -5
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +28 -384
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +17 -24
- package/dist/index19.js.map +1 -1
- package/dist/index2.js +25 -147
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +2413 -16
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +88 -2395
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +103 -108
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +57 -95
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +12 -62
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +37 -18
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +3 -25
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +314 -87
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +21 -37
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +9 -3
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +6 -317
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +171 -24
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +497 -7
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +9 -8
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +4400 -9
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +307 -4394
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +85 -310
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +56 -169
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +16 -497
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +10 -51
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +5 -18
- package/dist/index4.js.map +1 -1
- package/dist/index5.js +1 -2
- package/dist/index5.js.map +1 -1
- package/dist/index6.js +1 -1
- package/dist/index7.js +2 -10
- package/dist/index7.js.map +1 -1
- package/dist/index8.js +6 -24
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +2 -2
- package/dist/presets/index.d.ts +0 -102
- package/dist/services/loadMap.d.ts +2 -123
- package/dist/services/mmorpg.d.ts +3 -7
- package/package.json +12 -14
- package/src/Game/{AnimationManager.ts → EffectManager.ts} +2 -2
- package/src/Game/Object.ts +0 -69
- package/src/RpgClient.ts +67 -101
- package/src/RpgClientEngine.ts +24 -159
- package/src/components/character.ce +33 -74
- package/src/components/{animations → effects}/animation.ce +5 -3
- package/src/components/{animations → effects}/index.ts +1 -1
- package/src/components/index.ts +1 -2
- package/src/components/scenes/draw-map.ce +23 -6
- package/src/components/scenes/element-map.ce +23 -0
- package/src/components/scenes/event-layer.ce +3 -3
- package/src/core/setup.ts +0 -2
- package/src/index.ts +1 -1
- package/src/module.ts +5 -23
- package/src/presets/index.ts +1 -5
- package/src/services/loadMap.ts +2 -131
- package/src/services/mmorpg.ts +4 -20
- package/tsconfig.json +1 -1
- package/vite.config.ts +1 -1
- package/dist/Game/AnimationManager.d.ts +0 -8
- package/dist/components/animations/index.d.ts +0 -4
- package/dist/index40.js +0 -20
- package/dist/index40.js.map +0 -1
- package/dist/index41.js +0 -82
- package/dist/index41.js.map +0 -1
- package/dist/presets/animation.d.ts +0 -31
- package/dist/presets/lpc.d.ts +0 -89
- package/src/presets/animation.ts +0 -46
- package/src/presets/lpc.ts +0 -108
- /package/src/components/{animations → effects}/hit.ce +0 -0
package/dist/index27.js
CHANGED
|
@@ -1,95 +1,322 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BehaviorSubject, filter, combineLatest, map, finalize } from 'rxjs';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
var ArraySubject = class extends BehaviorSubject {
|
|
6
|
+
static {
|
|
7
|
+
__name(this, "ArraySubject");
|
|
8
|
+
}
|
|
9
|
+
_items = [];
|
|
10
|
+
constructor(items = []) {
|
|
11
|
+
super({
|
|
12
|
+
type: "init",
|
|
13
|
+
items
|
|
14
|
+
});
|
|
15
|
+
this.createProxy(items);
|
|
16
|
+
}
|
|
17
|
+
createProxy(items) {
|
|
18
|
+
this._items = new Proxy(items, {
|
|
19
|
+
get: /* @__PURE__ */ __name((target, prop, receiver) => {
|
|
20
|
+
const origMethod = target[prop];
|
|
21
|
+
if (typeof origMethod === "function") {
|
|
22
|
+
return (...args) => {
|
|
23
|
+
let changeType = "update";
|
|
24
|
+
let index = void 0;
|
|
25
|
+
let isMutateFn = false;
|
|
26
|
+
let itemsToEmit = [];
|
|
27
|
+
let changeSplice = true;
|
|
28
|
+
switch (prop) {
|
|
29
|
+
case "push":
|
|
30
|
+
index = target.length;
|
|
31
|
+
changeType = "add";
|
|
32
|
+
isMutateFn = true;
|
|
33
|
+
break;
|
|
34
|
+
case "pop":
|
|
35
|
+
index = target.length - 1;
|
|
36
|
+
changeType = "remove";
|
|
37
|
+
isMutateFn = true;
|
|
38
|
+
break;
|
|
39
|
+
case "unshift":
|
|
40
|
+
index = 0;
|
|
41
|
+
changeType = "add";
|
|
42
|
+
isMutateFn = true;
|
|
43
|
+
break;
|
|
44
|
+
case "shift":
|
|
45
|
+
index = 0;
|
|
46
|
+
changeType = "remove";
|
|
47
|
+
isMutateFn = true;
|
|
48
|
+
break;
|
|
49
|
+
case "splice":
|
|
50
|
+
index = args[0];
|
|
51
|
+
const deleteCount = args[1];
|
|
52
|
+
const newItems = args.slice(2);
|
|
53
|
+
itemsToEmit = newItems;
|
|
54
|
+
if (deleteCount > 0 && newItems.length === 0) {
|
|
55
|
+
changeType = "remove";
|
|
56
|
+
} else if (deleteCount === 0 && newItems.length > 0) {
|
|
57
|
+
changeType = "add";
|
|
58
|
+
} else if (deleteCount === 0 && newItems.length === 0) {
|
|
59
|
+
changeSplice = false;
|
|
60
|
+
} else {
|
|
61
|
+
changeType = "update";
|
|
62
|
+
}
|
|
63
|
+
isMutateFn = true;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
const result = origMethod.apply(target, args);
|
|
67
|
+
if (isMutateFn && changeSplice) {
|
|
68
|
+
if (prop === "splice") {
|
|
69
|
+
this.next({
|
|
70
|
+
type: changeType,
|
|
71
|
+
index,
|
|
72
|
+
items: itemsToEmit
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
this.next({
|
|
76
|
+
type: changeType,
|
|
77
|
+
index,
|
|
78
|
+
items: args
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return result;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return Reflect.get(target, prop, receiver);
|
|
86
|
+
}, "get"),
|
|
87
|
+
set: /* @__PURE__ */ __name((target, prop, value) => {
|
|
88
|
+
const index = !isNaN(Number(prop)) ? Number(prop) : void 0;
|
|
89
|
+
target[prop] = value;
|
|
90
|
+
this.next({
|
|
91
|
+
type: "update",
|
|
92
|
+
index,
|
|
93
|
+
items: [
|
|
94
|
+
value
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
return true;
|
|
98
|
+
}, "set")
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
get items() {
|
|
102
|
+
return this._items;
|
|
103
|
+
}
|
|
104
|
+
set items(newItems) {
|
|
105
|
+
this.createProxy(newItems);
|
|
106
|
+
this.next({
|
|
107
|
+
type: "reset",
|
|
108
|
+
items: newItems
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var isArraySubject = /* @__PURE__ */ __name((value) => {
|
|
113
|
+
return "_items" in value;
|
|
114
|
+
}, "isArraySubject");
|
|
115
|
+
var ObjectSubject = class extends BehaviorSubject {
|
|
116
|
+
static {
|
|
117
|
+
__name(this, "ObjectSubject");
|
|
118
|
+
}
|
|
119
|
+
_obj;
|
|
120
|
+
constructor(obj = {}) {
|
|
121
|
+
super({
|
|
122
|
+
type: "init",
|
|
123
|
+
value: obj
|
|
124
|
+
});
|
|
125
|
+
this.createProxy(obj);
|
|
126
|
+
}
|
|
127
|
+
createProxy(obj) {
|
|
128
|
+
this._obj = new Proxy(obj, {
|
|
129
|
+
get: /* @__PURE__ */ __name((target, prop, receiver) => {
|
|
130
|
+
return Reflect.get(target, prop, receiver);
|
|
131
|
+
}, "get"),
|
|
132
|
+
set: /* @__PURE__ */ __name((target, prop, value, receiver) => {
|
|
133
|
+
const key = prop;
|
|
134
|
+
const changeType = key in target ? "update" : "add";
|
|
135
|
+
target[key] = value;
|
|
136
|
+
this.next({
|
|
137
|
+
type: changeType,
|
|
138
|
+
key,
|
|
139
|
+
value
|
|
140
|
+
});
|
|
141
|
+
return true;
|
|
142
|
+
}, "set"),
|
|
143
|
+
deleteProperty: /* @__PURE__ */ __name((target, prop) => {
|
|
144
|
+
const key = prop;
|
|
145
|
+
if (key in target) {
|
|
146
|
+
const value = target[key];
|
|
147
|
+
delete target[key];
|
|
148
|
+
this.next({
|
|
149
|
+
type: "remove",
|
|
150
|
+
key,
|
|
151
|
+
value
|
|
152
|
+
});
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
return false;
|
|
156
|
+
}, "deleteProperty")
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
get obj() {
|
|
160
|
+
return this._obj;
|
|
161
|
+
}
|
|
162
|
+
set obj(newObj) {
|
|
163
|
+
this.createProxy(newObj);
|
|
164
|
+
this.next({
|
|
165
|
+
type: "reset",
|
|
166
|
+
value: newObj
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
var isObjectSubject = /* @__PURE__ */ __name((value) => {
|
|
171
|
+
return "_obj" in value;
|
|
172
|
+
}, "isObjectSubject");
|
|
173
|
+
var getGlobalReactiveStore = /* @__PURE__ */ __name(() => {
|
|
174
|
+
const globalKey = "__REACTIVE_STORE__";
|
|
175
|
+
if (typeof globalThis !== "undefined") {
|
|
176
|
+
if (!globalThis[globalKey]) {
|
|
177
|
+
globalThis[globalKey] = {
|
|
178
|
+
currentDependencyTracker: null,
|
|
179
|
+
currentSubscriptionsTracker: null
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
return globalThis[globalKey];
|
|
183
|
+
}
|
|
184
|
+
let globalObj;
|
|
185
|
+
if (typeof window !== "undefined") {
|
|
186
|
+
globalObj = window;
|
|
187
|
+
} else if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
188
|
+
globalObj = Function("return this")();
|
|
189
|
+
} else if (typeof self !== "undefined") {
|
|
190
|
+
globalObj = self;
|
|
191
|
+
} else {
|
|
192
|
+
console.warn("Unable to find global object, using local instance");
|
|
6
193
|
return {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
194
|
+
currentDependencyTracker: null,
|
|
195
|
+
currentSubscriptionsTracker: null
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (!globalObj[globalKey]) {
|
|
199
|
+
globalObj[globalKey] = {
|
|
200
|
+
currentDependencyTracker: null,
|
|
201
|
+
currentSubscriptionsTracker: null
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return globalObj[globalKey];
|
|
205
|
+
}, "getGlobalReactiveStore");
|
|
206
|
+
var reactiveStore = getGlobalReactiveStore();
|
|
207
|
+
var trackDependency = /* @__PURE__ */ __name((signal2) => {
|
|
208
|
+
if (reactiveStore.currentDependencyTracker) {
|
|
209
|
+
reactiveStore.currentDependencyTracker(signal2);
|
|
210
|
+
}
|
|
211
|
+
}, "trackDependency");
|
|
212
|
+
function signal(defaultValue) {
|
|
213
|
+
let subject;
|
|
214
|
+
if (Array.isArray(defaultValue)) {
|
|
215
|
+
subject = new ArraySubject(defaultValue);
|
|
216
|
+
} else if (typeof defaultValue === "object" && defaultValue !== null) {
|
|
217
|
+
subject = new ObjectSubject(defaultValue);
|
|
218
|
+
} else {
|
|
219
|
+
subject = new BehaviorSubject(defaultValue);
|
|
220
|
+
}
|
|
221
|
+
const getValue = /* @__PURE__ */ __name(() => {
|
|
222
|
+
if (subject instanceof ArraySubject) {
|
|
223
|
+
return subject.items;
|
|
224
|
+
} else if (subject instanceof ObjectSubject) {
|
|
225
|
+
return subject.obj;
|
|
226
|
+
}
|
|
227
|
+
return subject.value;
|
|
228
|
+
}, "getValue");
|
|
229
|
+
const fn = /* @__PURE__ */ __name(function() {
|
|
230
|
+
trackDependency(fn);
|
|
231
|
+
return getValue();
|
|
232
|
+
}, "fn");
|
|
233
|
+
fn.set = (value) => {
|
|
234
|
+
if (subject instanceof ArraySubject) {
|
|
235
|
+
subject.items = value;
|
|
236
|
+
} else if (subject instanceof ObjectSubject) {
|
|
237
|
+
subject.obj = value;
|
|
238
|
+
} else {
|
|
239
|
+
subject.next(value);
|
|
20
240
|
}
|
|
21
|
-
return array;
|
|
22
241
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
y: 512 * ratio
|
|
42
|
-
},
|
|
43
|
-
animations: ({ direction }) => [stand(direction)]
|
|
44
|
-
},
|
|
45
|
-
[Animation.Walk]: {
|
|
46
|
-
offset: {
|
|
47
|
-
x: 0,
|
|
48
|
-
y: 512 * ratio
|
|
49
|
-
},
|
|
50
|
-
framesWidth: 9,
|
|
51
|
-
framesHeight: 4,
|
|
52
|
-
animations: ({ direction }) => [anim(direction, 9)]
|
|
53
|
-
},
|
|
54
|
-
[Animation.Attack]: {
|
|
55
|
-
offset: {
|
|
56
|
-
x: 0,
|
|
57
|
-
y: 768 * ratio
|
|
58
|
-
},
|
|
59
|
-
framesWidth: 6,
|
|
60
|
-
framesHeight: 4,
|
|
61
|
-
animations: ({ direction }) => [anim(direction, 6, 3)]
|
|
62
|
-
},
|
|
63
|
-
[Animation.Skill]: {
|
|
64
|
-
framesWidth: 7,
|
|
65
|
-
framesHeight: 4,
|
|
66
|
-
animations: ({ direction }) => [anim(direction, 7, 3)]
|
|
67
|
-
},
|
|
68
|
-
attack2: {
|
|
69
|
-
offset: {
|
|
70
|
-
x: 0,
|
|
71
|
-
y: 256 * ratio
|
|
72
|
-
},
|
|
73
|
-
framesWidth: 7,
|
|
74
|
-
framesHeight: 8,
|
|
75
|
-
animations: ({ direction }) => [anim(direction, 7, 3)]
|
|
76
|
-
},
|
|
77
|
-
...options.height > 3e3 ? {
|
|
78
|
-
attack3: {
|
|
79
|
-
offset: {
|
|
80
|
-
x: 0,
|
|
81
|
-
y: 5568 - 288 * 4
|
|
82
|
-
},
|
|
83
|
-
rectWidth: 288,
|
|
84
|
-
rectHeight: 288,
|
|
85
|
-
framesWidth: 6,
|
|
86
|
-
framesHeight: 4,
|
|
87
|
-
animations: ({ direction }) => [anim(direction, 6, 3)]
|
|
88
|
-
}
|
|
89
|
-
} : {}
|
|
242
|
+
fn._isFrozen = false;
|
|
243
|
+
fn.freeze = () => {
|
|
244
|
+
fn._isFrozen = true;
|
|
245
|
+
};
|
|
246
|
+
fn.unfreeze = () => {
|
|
247
|
+
fn._isFrozen = false;
|
|
248
|
+
if (subject instanceof ArraySubject) {
|
|
249
|
+
subject.next({
|
|
250
|
+
type: "init",
|
|
251
|
+
items: subject.items
|
|
252
|
+
});
|
|
253
|
+
} else if (subject instanceof ObjectSubject) {
|
|
254
|
+
subject.next({
|
|
255
|
+
type: "init",
|
|
256
|
+
value: subject.obj
|
|
257
|
+
});
|
|
258
|
+
} else {
|
|
259
|
+
subject.next(subject.value);
|
|
90
260
|
}
|
|
91
261
|
};
|
|
92
|
-
|
|
262
|
+
fn.mutate = (mutateFn) => {
|
|
263
|
+
const value = getValue();
|
|
264
|
+
mutateFn(value);
|
|
265
|
+
};
|
|
266
|
+
fn.update = (updateFn) => {
|
|
267
|
+
const updatedValue = updateFn(getValue());
|
|
268
|
+
fn.set(updatedValue);
|
|
269
|
+
};
|
|
270
|
+
fn.observable = subject.asObservable().pipe(filter(() => !fn._isFrozen));
|
|
271
|
+
fn._subject = subject;
|
|
272
|
+
return fn;
|
|
273
|
+
}
|
|
274
|
+
__name(signal, "signal");
|
|
275
|
+
function isSignal(value) {
|
|
276
|
+
return !!(value && value.observable);
|
|
277
|
+
}
|
|
278
|
+
__name(isSignal, "isSignal");
|
|
279
|
+
function isComputed(value) {
|
|
280
|
+
return isSignal(value) && !!value.dependencies;
|
|
281
|
+
}
|
|
282
|
+
__name(isComputed, "isComputed");
|
|
283
|
+
function computed(computeFunction, disposableFn) {
|
|
284
|
+
const dependencies = /* @__PURE__ */ new Set();
|
|
285
|
+
let init = true;
|
|
286
|
+
let lastComputedValue;
|
|
287
|
+
const previousTracker = reactiveStore.currentDependencyTracker;
|
|
288
|
+
reactiveStore.currentDependencyTracker = (signal2) => {
|
|
289
|
+
dependencies.add(signal2);
|
|
290
|
+
};
|
|
291
|
+
lastComputedValue = computeFunction();
|
|
292
|
+
if (computeFunction["isEffect"]) {
|
|
293
|
+
disposableFn = lastComputedValue;
|
|
294
|
+
}
|
|
295
|
+
reactiveStore.currentDependencyTracker = previousTracker;
|
|
296
|
+
const computedObservable = combineLatest([
|
|
297
|
+
...dependencies
|
|
298
|
+
].map((signal2) => signal2.observable)).pipe(filter(() => !init), map(() => computeFunction()), finalize(() => disposableFn?.()));
|
|
299
|
+
const fn = /* @__PURE__ */ __name(function() {
|
|
300
|
+
trackDependency(fn);
|
|
301
|
+
return lastComputedValue;
|
|
302
|
+
}, "fn");
|
|
303
|
+
fn.observable = computedObservable;
|
|
304
|
+
fn.subscription = computedObservable.subscribe((value) => {
|
|
305
|
+
lastComputedValue = value;
|
|
306
|
+
});
|
|
307
|
+
fn.dependencies = dependencies;
|
|
308
|
+
reactiveStore.currentSubscriptionsTracker?.(fn.subscription);
|
|
309
|
+
init = false;
|
|
310
|
+
return fn;
|
|
311
|
+
}
|
|
312
|
+
__name(computed, "computed");
|
|
313
|
+
|
|
314
|
+
// src/effect.ts
|
|
315
|
+
function effect(fn) {
|
|
316
|
+
fn["isEffect"] = true;
|
|
317
|
+
return computed(fn);
|
|
318
|
+
}
|
|
319
|
+
__name(effect, "effect");
|
|
93
320
|
|
|
94
|
-
export {
|
|
321
|
+
export { ArraySubject, ObjectSubject, computed, effect, isArraySubject, isComputed, isObjectSubject, isSignal, signal };
|
|
95
322
|
//# sourceMappingURL=index27.js.map
|
package/dist/index27.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index27.js","sources":["../src/presets/lpc.ts"],"sourcesContent":["import { Animation, Direction } from \"@rpgjs/common\";\n\nexport const LPCSpritesheetPreset = (options: {\n id: string;\n imageSource: string;\n width: number;\n height: number;\n ratio?: number;\n }) => {\n const ratio = options.ratio ?? 1;\n\n const frameY = (direction: Direction) => {\n return {\n [Direction.Down]: 2,\n [Direction.Left]: 1,\n [Direction.Right]: 3,\n [Direction.Up]: 0,\n }[direction];\n };\n \n const stand = (direction: Direction) => [\n { time: 0, frameX: 0, frameY: frameY(direction) },\n ];\n const anim = (\n direction: Direction,\n framesWidth: number,\n speed: number = 5\n ) => {\n const array: any = [];\n for (let i = 0; i < framesWidth; i++) {\n array.push({ time: i * speed, frameX: i, frameY: frameY(direction) });\n }\n return array;\n };\n \n return {\n id: options.id,\n image: options.imageSource,\n width: options.width,\n height: options.height,\n opacity: 1,\n rectWidth: 64 * ratio,\n rectHeight: 64 * ratio,\n framesWidth: 6,\n framesHeight: 4,\n spriteRealSize: {\n width: 48 * ratio,\n height: 52 * ratio,\n },\n textures: {\n [Animation.Stand]: {\n offset: {\n x: 0,\n y: 512 * ratio,\n },\n animations: ({ direction }) => [stand(direction)],\n },\n [Animation.Walk]: {\n offset: {\n x: 0,\n y: 512 * ratio,\n },\n framesWidth: 9,\n framesHeight: 4,\n animations: ({ direction }) => [anim(direction, 9)],\n },\n [Animation.Attack]: {\n offset: {\n x: 0,\n y: 768 * ratio,\n },\n framesWidth: 6,\n framesHeight: 4,\n animations: ({ direction }) => [anim(direction, 6, 3)],\n },\n [Animation.Skill]: {\n framesWidth: 7,\n framesHeight: 4,\n animations: ({ direction }) => [anim(direction, 7, 3)],\n },\n attack2: {\n offset: {\n x: 0,\n y: 256 * ratio,\n },\n framesWidth: 7,\n framesHeight: 8,\n animations: ({ direction }) => [anim(direction, 7, 3)],\n },\n ...(options.height > 3000\n ? {\n attack3: {\n offset: {\n x: 0,\n y: 5568 - 288 * 4,\n },\n rectWidth: 288,\n rectHeight: 288,\n framesWidth: 6,\n framesHeight: 4,\n animations: ({ direction }) => [anim(direction, 6, 3)],\n },\n }\n : {}),\n },\n };\n };\n "],"names":[],"mappings":";;AAEa,MAAA,oBAAA,GAAuB,CAAC,OAM7B,KAAA;AACJ,EAAM,MAAA,KAAA,GAAQ,QAAQ,KAAS,IAAA,CAAA;AAE/B,EAAM,MAAA,MA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YAAc,EAAA,CAAA;AAAA,QACd,UAAA,EAAY,CAAC,EAAE,SAAU,EAAA,KAAM,CAAC,IAAK,CAAA,SAAA,EAAW,CAAG,EAAA,CAAC,CAAC;AAAA,OACvD;AAAA,MACA,GAAI,OAAQ,CAAA,MAAA,GAAS,GACjB,GAAA;AAAA,QACE,OAAS,EAAA;AAAA,UACP,MAAQ,EAAA;AAAA,YACN,CAAG,EAAA,CAAA;AAAA,YACH,CAAA,EAAG,OAAO,GAAM,GAAA;AAAA,WAClB;AAAA,UACA,SAAW,EAAA,GAAA;AAAA,UACX,UAAY,EAAA,GAAA;AAAA,UACZ,WAAa,EAAA,CAAA;AAAA,UACb,YAAc,EAAA,CAAA;AAAA,UACd,UAAA,EAAY,CAAC,EAAE,SAAU,EAAA,KAAM,CAAC,IAAK,CAAA,SAAA,EAAW,CAAG,EAAA,CAAC,CAAC;AAAA;AACvD,UAEF;AAAC;AACP,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index27.js","sources":["../../../node_modules/.pnpm/@signe+reactive@2.3.3/node_modules/@signe/reactive/dist/index.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/ArraySubject.ts\nimport { BehaviorSubject } from \"rxjs\";\nvar ArraySubject = class extends BehaviorSubject {\n static {\n __name(this, \"ArraySubject\");\n }\n _items = [];\n constructor(items = []) {\n super({\n type: \"init\",\n items\n });\n this.createProxy(items);\n }\n createProxy(items) {\n this._items = new Proxy(items, {\n get: /* @__PURE__ */ __name((target, prop, receiver) => {\n const origMethod = target[prop];\n if (typeof origMethod === \"function\") {\n return (...args) => {\n let changeType = \"update\";\n let index = void 0;\n let isMutateFn = false;\n let itemsToEmit = [];\n let changeSplice = true;\n switch (prop) {\n case \"push\":\n index = target.length;\n changeType = \"add\";\n isMutateFn = true;\n break;\n case \"pop\":\n index = target.length - 1;\n changeType = \"remove\";\n isMutateFn = true;\n break;\n case \"unshift\":\n index = 0;\n changeType = \"add\";\n isMutateFn = true;\n break;\n case \"shift\":\n index = 0;\n changeType = \"remove\";\n isMutateFn = true;\n break;\n case \"splice\":\n index = args[0];\n const deleteCount = args[1];\n const newItems = args.slice(2);\n itemsToEmit = newItems;\n if (deleteCount > 0 && newItems.length === 0) {\n changeType = \"remove\";\n } else if (deleteCount === 0 && newItems.length > 0) {\n changeType = \"add\";\n } else if (deleteCount === 0 && newItems.length === 0) {\n changeSplice = false;\n } else {\n changeType = \"update\";\n }\n isMutateFn = true;\n break;\n }\n const result = origMethod.apply(target, args);\n if (isMutateFn && changeSplice) {\n if (prop === \"splice\") {\n this.next({\n type: changeType,\n index,\n items: itemsToEmit\n });\n } else {\n this.next({\n type: changeType,\n index,\n items: args\n });\n }\n }\n return result;\n };\n }\n return Reflect.get(target, prop, receiver);\n }, \"get\"),\n set: /* @__PURE__ */ __name((target, prop, value) => {\n const index = !isNaN(Number(prop)) ? Number(prop) : void 0;\n target[prop] = value;\n this.next({\n type: \"update\",\n index,\n items: [\n value\n ]\n });\n return true;\n }, \"set\")\n });\n }\n get items() {\n return this._items;\n }\n set items(newItems) {\n this.createProxy(newItems);\n this.next({\n type: \"reset\",\n items: newItems\n });\n }\n};\nvar isArraySubject = /* @__PURE__ */ __name((value) => {\n return \"_items\" in value;\n}, \"isArraySubject\");\n\n// src/ObjectSubject.ts\nimport { BehaviorSubject as BehaviorSubject2 } from \"rxjs\";\nvar ObjectSubject = class extends BehaviorSubject2 {\n static {\n __name(this, \"ObjectSubject\");\n }\n _obj;\n constructor(obj = {}) {\n super({\n type: \"init\",\n value: obj\n });\n this.createProxy(obj);\n }\n createProxy(obj) {\n this._obj = new Proxy(obj, {\n get: /* @__PURE__ */ __name((target, prop, receiver) => {\n return Reflect.get(target, prop, receiver);\n }, \"get\"),\n set: /* @__PURE__ */ __name((target, prop, value, receiver) => {\n const key = prop;\n const changeType = key in target ? \"update\" : \"add\";\n target[key] = value;\n this.next({\n type: changeType,\n key,\n value\n });\n return true;\n }, \"set\"),\n deleteProperty: /* @__PURE__ */ __name((target, prop) => {\n const key = prop;\n if (key in target) {\n const value = target[key];\n delete target[key];\n this.next({\n type: \"remove\",\n key,\n value\n });\n return true;\n }\n return false;\n }, \"deleteProperty\")\n });\n }\n get obj() {\n return this._obj;\n }\n set obj(newObj) {\n this.createProxy(newObj);\n this.next({\n type: \"reset\",\n value: newObj\n });\n }\n};\nvar isObjectSubject = /* @__PURE__ */ __name((value) => {\n return \"_obj\" in value;\n}, \"isObjectSubject\");\n\n// src/signal.ts\nimport { BehaviorSubject as BehaviorSubject3, combineLatest, filter, finalize, map } from \"rxjs\";\nvar getGlobalReactiveStore = /* @__PURE__ */ __name(() => {\n const globalKey = \"__REACTIVE_STORE__\";\n if (typeof globalThis !== \"undefined\") {\n if (!globalThis[globalKey]) {\n globalThis[globalKey] = {\n currentDependencyTracker: null,\n currentSubscriptionsTracker: null\n };\n }\n return globalThis[globalKey];\n }\n let globalObj;\n if (typeof window !== \"undefined\") {\n globalObj = window;\n } else if (typeof process !== \"undefined\" && process.versions && process.versions.node) {\n globalObj = Function(\"return this\")();\n } else if (typeof self !== \"undefined\") {\n globalObj = self;\n } else {\n console.warn(\"Unable to find global object, using local instance\");\n return {\n currentDependencyTracker: null,\n currentSubscriptionsTracker: null\n };\n }\n if (!globalObj[globalKey]) {\n globalObj[globalKey] = {\n currentDependencyTracker: null,\n currentSubscriptionsTracker: null\n };\n }\n return globalObj[globalKey];\n}, \"getGlobalReactiveStore\");\nvar reactiveStore = getGlobalReactiveStore();\nvar trackDependency = /* @__PURE__ */ __name((signal2) => {\n if (reactiveStore.currentDependencyTracker) {\n reactiveStore.currentDependencyTracker(signal2);\n }\n}, \"trackDependency\");\nfunction signal(defaultValue) {\n let subject;\n if (Array.isArray(defaultValue)) {\n subject = new ArraySubject(defaultValue);\n } else if (typeof defaultValue === \"object\" && defaultValue !== null) {\n subject = new ObjectSubject(defaultValue);\n } else {\n subject = new BehaviorSubject3(defaultValue);\n }\n const getValue = /* @__PURE__ */ __name(() => {\n if (subject instanceof ArraySubject) {\n return subject.items;\n } else if (subject instanceof ObjectSubject) {\n return subject.obj;\n }\n return subject.value;\n }, \"getValue\");\n const fn = /* @__PURE__ */ __name(function() {\n trackDependency(fn);\n return getValue();\n }, \"fn\");\n fn.set = (value) => {\n if (subject instanceof ArraySubject) {\n subject.items = value;\n } else if (subject instanceof ObjectSubject) {\n subject.obj = value;\n } else {\n subject.next(value);\n }\n };\n fn._isFrozen = false;\n fn.freeze = () => {\n fn._isFrozen = true;\n };\n fn.unfreeze = () => {\n fn._isFrozen = false;\n if (subject instanceof ArraySubject) {\n subject.next({\n type: \"init\",\n items: subject.items\n });\n } else if (subject instanceof ObjectSubject) {\n subject.next({\n type: \"init\",\n value: subject.obj\n });\n } else {\n subject.next(subject.value);\n }\n };\n fn.mutate = (mutateFn) => {\n const value = getValue();\n mutateFn(value);\n };\n fn.update = (updateFn) => {\n const updatedValue = updateFn(getValue());\n fn.set(updatedValue);\n };\n fn.observable = subject.asObservable().pipe(filter(() => !fn._isFrozen));\n fn._subject = subject;\n return fn;\n}\n__name(signal, \"signal\");\nfunction isSignal(value) {\n return !!(value && value.observable);\n}\n__name(isSignal, \"isSignal\");\nfunction isComputed(value) {\n return isSignal(value) && !!value.dependencies;\n}\n__name(isComputed, \"isComputed\");\nfunction computed(computeFunction, disposableFn) {\n const dependencies = /* @__PURE__ */ new Set();\n let init = true;\n let lastComputedValue;\n const previousTracker = reactiveStore.currentDependencyTracker;\n reactiveStore.currentDependencyTracker = (signal2) => {\n dependencies.add(signal2);\n };\n lastComputedValue = computeFunction();\n if (computeFunction[\"isEffect\"]) {\n disposableFn = lastComputedValue;\n }\n reactiveStore.currentDependencyTracker = previousTracker;\n const computedObservable = combineLatest([\n ...dependencies\n ].map((signal2) => signal2.observable)).pipe(filter(() => !init), map(() => computeFunction()), finalize(() => disposableFn?.()));\n const fn = /* @__PURE__ */ __name(function() {\n trackDependency(fn);\n return lastComputedValue;\n }, \"fn\");\n fn.observable = computedObservable;\n fn.subscription = computedObservable.subscribe((value) => {\n lastComputedValue = value;\n });\n fn.dependencies = dependencies;\n reactiveStore.currentSubscriptionsTracker?.(fn.subscription);\n init = false;\n return fn;\n}\n__name(computed, \"computed\");\n\n// src/effect.ts\nfunction effect(fn) {\n fn[\"isEffect\"] = true;\n return computed(fn);\n}\n__name(effect, \"effect\");\nexport {\n ArraySubject,\n ObjectSubject,\n computed,\n effect,\n isArraySubject,\n isComputed,\n isObjectSubject,\n isSignal,\n signal\n};\n//# sourceMappingURL=index.js.map"],"names":["BehaviorSubject2","BehaviorSubject3"],"mappings":";;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc;AACrC,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAIrF,IAAC,YAAY,GAAG,cAAc,eAAe,CAAC;AACjD,EAAE;AACF,IAAI,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC;AAChC;AACA,EAAE,MAAM,GAAG,EAAE;AACb,EAAE,WAAW,CAAC,KAAK,GAAG,EAAE,EAAE;AAC1B,IAAI,KAAK,CAAC;AACV,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM;AACN,KAAK,CAAC;AACN,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B;AACA,EAAE,WAAW,CAAC,KAAK,EAAE;AACrB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE;AACnC,MAAM,GAAG,kBAAkB,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK;AAC9D,QAAQ,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;AACvC,QAAQ,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;AAC9C,UAAU,OAAO,CAAC,GAAG,IAAI,KAAK;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AACV,EAAE,EAAE,CAAC,UAAU,GAAG,kBAAkB;AACpC,EAAE,EAAE,CAAC,YAAY,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC,KAAK,KAAK;AAC5D,IAAI,iBAAiB,GAAG,KAAK;AAC7B,GAAG,CAAC;AACJ,EAAE,EAAE,CAAC,YAAY,GAAG,YAAY;AAChC,EAAE,aAAa,CAAC,2BAA2B,GAAG,EAAE,CAAC,YAAY,CAAC;AAC9D,EAAE,IAAI,GAAG,KAAK;AACd,EAAE,OAAO,EAAE;AACX;AACA,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC;;AAE5B;AACA,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,IAAI;AACvB,EAAE,OAAO,QAAQ,CAAC,EAAE,CAAC;AACrB;AACA,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;;;;","x_google_ignoreList":[0]}
|
package/dist/index28.js
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useProps, useDefineProps, computed, signal, h, Container, loop } from 'canvasengine';
|
|
2
|
+
import { inject } from './index6.js';
|
|
3
|
+
import { RpgClientEngine } from './index2.js';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
for (let i = 0; i < framesWidth; i++) {
|
|
21
|
-
array.push({ time: i * durationFrame, frameX: i, frameY: frameY(direction) });
|
|
22
|
-
}
|
|
23
|
-
array.push({ time: array[array.length - 1].time + durationFrame });
|
|
24
|
-
return array;
|
|
25
|
-
};
|
|
26
|
-
return {
|
|
27
|
-
textures: {
|
|
28
|
-
[Animation.Stand]: {
|
|
29
|
-
animations: ({ direction }) => [stand(direction)]
|
|
30
|
-
},
|
|
31
|
-
[Animation.Walk]: {
|
|
32
|
-
animations: ({ direction }) => [walk(direction)]
|
|
5
|
+
function component($$props) {
|
|
6
|
+
useProps($$props);
|
|
7
|
+
useDefineProps($$props);
|
|
8
|
+
var engine = inject(RpgClientEngine);
|
|
9
|
+
var effects = engine.effects;
|
|
10
|
+
var map = engine.sceneMap.data;
|
|
11
|
+
var sceneComponent = computed(function () { var _a; return (_a = map()) === null || _a === void 0 ? void 0 : _a.component; });
|
|
12
|
+
var mapParams = map().params;
|
|
13
|
+
engine.sceneMap.animations;
|
|
14
|
+
var backgroundMusic = { src: mapParams === null || mapParams === void 0 ? void 0 : mapParams.backgroundMusic, autoplay: true, loop: true };
|
|
15
|
+
var backgroundAmbientSound = { src: mapParams === null || mapParams === void 0 ? void 0 : mapParams.backgroundAmbientSound, autoplay: true, loop: true };
|
|
16
|
+
signal(map().data);
|
|
17
|
+
var scale = (mapParams === null || mapParams === void 0 ? void 0 : mapParams.scale) || 1;
|
|
18
|
+
((mapParams === null || mapParams === void 0 ? void 0 : mapParams.width) || 2048) * scale;
|
|
19
|
+
((mapParams === null || mapParams === void 0 ? void 0 : mapParams.height) || 2048) * scale;
|
|
20
|
+
let $this = h(Container, { sound: backgroundMusic }, [h(Container, { sound: backgroundAmbientSound }), h(sceneComponent(), { data: computed(() => map().data) }), loop(effects, effect => h(Container, null, loop(effect.current, animation => h(effect.component, animation))))]);
|
|
21
|
+
return $this
|
|
33
22
|
}
|
|
34
|
-
},
|
|
35
|
-
framesHeight,
|
|
36
|
-
framesWidth
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
23
|
|
|
40
|
-
export {
|
|
24
|
+
export { component as default };
|
|
41
25
|
//# sourceMappingURL=index28.js.map
|
package/dist/index28.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index28.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index28.js","sources":["../src/components/scenes/draw-map.ce"],"sourcesContent":["<Container sound={backgroundMusic} >\n <Container sound={backgroundAmbientSound} />\n\n <!-- <Sprite image={map.@fullImage} scale /> -->\n\n <sceneComponent() data={map.@data} />\n \n <!-- <Container sortableChildren={true}>\n @for (obj of middleLayer) {\n <ElementMap ...obj image={map.@gridImage} scale /> \n }\n\n @for ((event,id) of events) {\n <Character id={id} object={event} isMe={false} />\n }\n \n @for ((player,id) of players) {\n <Character id={id} object={player} isMe={true} />\n }\n </Container> -->\n\n @for (effect of effects) {\n <Container>\n @for (animation of effect.current) {\n <effect.component ...animation />\n }\n </Container>\n }\n</Container>\n\n<script>\n import { effect, signal, computed, mount } from 'canvasengine'\n import { inject } from \"../../core/inject\";\n import { RpgClientEngine } from \"../../RpgClientEngine\";\n\n const engine = inject(RpgClientEngine);\n const effects = engine.effects\n const map = engine.sceneMap.data\n const sceneComponent = computed(() => map()?.component)\n const mapParams = map().params\n const animations = engine.sceneMap.animations\n const backgroundMusic = { src: mapParams?.backgroundMusic, autoplay: true, loop: true }\n const backgroundAmbientSound = { src: mapParams?.backgroundAmbientSound, autoplay: true, loop: true }\n \n const data = signal(map().data)\n // const middleLayer = computed(() => data().filter(obj => obj.layer === 1))\n // const topLayer = computed(() => data().filter(obj => obj.layer === 2))\n\n const scale = mapParams?.scale || 1\n const worldWidth = (mapParams?.width || 2048) * scale\n const worldHeight = (mapParams?.height || 2048) * scale\n \n const clamp = {\n direction: \"all\"\n }\n</script>"],"names":[],"mappings":";;;;AAQqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAA4B,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AAC5C,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO;AAC5B,IAAI,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI;AAC9B,IAAI,cAAc,GAAG,QAAQ,CAAC,YAAY,EAA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AC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACzR,QAAQ,OAAO;AACf;;;;"}
|
package/dist/index29.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
1
|
+
import { RpgClientObject } from './index38.js';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
class RpgClientPlayer extends RpgClientObject {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.type = "player";
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { RpgClientPlayer };
|
|
5
11
|
//# sourceMappingURL=index29.js.map
|
package/dist/index29.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index29.js","sources":["
|
|
1
|
+
{"version":3,"file":"index29.js","sources":["../src/Game/Player.ts"],"sourcesContent":["import { RpgClientObject } from \"./Object\";\n\nexport class RpgClientPlayer extends RpgClientObject {\n type = 'player'\n} "],"names":[],"mappings":";;AAEO,MAAM,wBAAwB,eAAgB,CAAA;AAAA,EAA9C,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AACH,IAAO,IAAA,CAAA,IAAA,GAAA,QAAA;AAAA;AACX;;;;"}
|
package/dist/index3.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebSocketToken, AbstractWebsocket } from './
|
|
2
|
-
import { ServerIo, ClientIo } from './
|
|
1
|
+
import { WebSocketToken, AbstractWebsocket } from './index16.js';
|
|
2
|
+
import { ServerIo, ClientIo } from './index20.js';
|
|
3
3
|
import { RpgClientEngine } from './index2.js';
|
|
4
4
|
import { UpdateMapToken, UpdateMapService } from '@rpgjs/common';
|
|
5
5
|
import { RpgGui } from './index9.js';
|