@rpgjs/client 5.0.0-beta.1 → 5.0.0-beta.11
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/CHANGELOG.md +49 -0
- package/LICENSE +19 -0
- package/dist/Game/AnimationManager.d.ts +1 -1
- package/dist/Game/AnimationManager.js +18 -9
- package/dist/Game/AnimationManager.js.map +1 -1
- package/dist/Game/AnimationManager.spec.d.ts +1 -0
- package/dist/Game/Event.js.map +1 -1
- package/dist/Game/Map.d.ts +9 -1
- package/dist/Game/Map.js +63 -5
- package/dist/Game/Map.js.map +1 -1
- package/dist/Game/Object.d.ts +47 -15
- package/dist/Game/Object.js +82 -38
- package/dist/Game/Object.js.map +1 -1
- package/dist/Game/Player.js.map +1 -1
- package/dist/Game/ProjectileManager.d.ts +89 -0
- package/dist/Game/ProjectileManager.js +179 -0
- package/dist/Game/ProjectileManager.js.map +1 -0
- package/dist/Game/ProjectileManager.spec.d.ts +1 -0
- package/dist/Gui/Gui.d.ts +17 -4
- package/dist/Gui/Gui.js +78 -48
- package/dist/Gui/Gui.js.map +1 -1
- package/dist/Gui/Gui.spec.d.ts +1 -0
- package/dist/Gui/NotificationManager.js.map +1 -1
- package/dist/Resource.js +1 -1
- package/dist/Resource.js.map +1 -1
- package/dist/RpgClient.d.ts +110 -15
- package/dist/RpgClientEngine.d.ts +86 -10
- package/dist/RpgClientEngine.js +306 -49
- package/dist/RpgClientEngine.js.map +1 -1
- package/dist/Sound.js.map +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.122.0 → _@oxc-project_runtime@0.130.0}/helpers/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.122.0 → _@oxc-project_runtime@0.130.0}/helpers/decorateMetadata.js +1 -1
- package/dist/components/animations/animation.ce.js +4 -5
- package/dist/components/animations/animation.ce.js.map +1 -1
- package/dist/components/animations/hit.ce.js +19 -25
- package/dist/components/animations/hit.ce.js.map +1 -1
- package/dist/components/animations/index.js +4 -4
- package/dist/components/animations/index.js.map +1 -1
- package/dist/components/character.ce.js +422 -240
- package/dist/components/character.ce.js.map +1 -1
- package/dist/components/dynamics/bar.ce.js +97 -0
- package/dist/components/dynamics/bar.ce.js.map +1 -0
- package/dist/components/dynamics/image.ce.js +24 -0
- package/dist/components/dynamics/image.ce.js.map +1 -0
- package/dist/components/dynamics/parse-value.d.ts +3 -0
- package/dist/components/dynamics/parse-value.js +54 -35
- package/dist/components/dynamics/parse-value.js.map +1 -1
- package/dist/components/dynamics/parse-value.spec.d.ts +1 -0
- package/dist/components/dynamics/shape-utils.d.ts +16 -0
- package/dist/components/dynamics/shape-utils.js +73 -0
- package/dist/components/dynamics/shape-utils.js.map +1 -0
- package/dist/components/dynamics/shape-utils.spec.d.ts +1 -0
- package/dist/components/dynamics/shape.ce.js +84 -0
- package/dist/components/dynamics/shape.ce.js.map +1 -0
- package/dist/components/dynamics/text.ce.js +34 -56
- package/dist/components/dynamics/text.ce.js.map +1 -1
- package/dist/components/gui/box.ce.js +6 -8
- package/dist/components/gui/box.ce.js.map +1 -1
- package/dist/components/gui/dialogbox/index.ce.js +56 -62
- package/dist/components/gui/dialogbox/index.ce.js.map +1 -1
- package/dist/components/gui/gameover.ce.js +42 -65
- package/dist/components/gui/gameover.ce.js.map +1 -1
- package/dist/components/gui/hud/hud.ce.js +21 -30
- package/dist/components/gui/hud/hud.ce.js.map +1 -1
- package/dist/components/gui/menu/equip-menu.ce.js +112 -165
- package/dist/components/gui/menu/equip-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/exit-menu.ce.js +8 -6
- package/dist/components/gui/menu/exit-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/items-menu.ce.js +52 -69
- package/dist/components/gui/menu/items-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/main-menu.ce.js +75 -92
- package/dist/components/gui/menu/main-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/options-menu.ce.js +5 -4
- package/dist/components/gui/menu/options-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/skills-menu.ce.js +12 -17
- package/dist/components/gui/menu/skills-menu.ce.js.map +1 -1
- package/dist/components/gui/mobile/index.js +2 -2
- package/dist/components/gui/mobile/index.js.map +1 -1
- package/dist/components/gui/mobile/mobile.ce.js +5 -4
- package/dist/components/gui/mobile/mobile.ce.js.map +1 -1
- package/dist/components/gui/notification/notification.ce.js +22 -24
- package/dist/components/gui/notification/notification.ce.js.map +1 -1
- package/dist/components/gui/save-load.ce.js +72 -249
- package/dist/components/gui/save-load.ce.js.map +1 -1
- package/dist/components/gui/shop/shop.ce.js +90 -127
- package/dist/components/gui/shop/shop.ce.js.map +1 -1
- package/dist/components/gui/title-screen.ce.js +45 -70
- package/dist/components/gui/title-screen.ce.js.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/player-components-utils.d.ts +67 -0
- package/dist/components/player-components-utils.js +162 -0
- package/dist/components/player-components-utils.js.map +1 -0
- package/dist/components/player-components-utils.spec.d.ts +1 -0
- package/dist/components/player-components.ce.js +189 -0
- package/dist/components/player-components.ce.js.map +1 -0
- package/dist/components/prebuilt/hp-bar.ce.js +42 -44
- package/dist/components/prebuilt/hp-bar.ce.js.map +1 -1
- package/dist/components/prebuilt/light-halo.ce.js +36 -59
- package/dist/components/prebuilt/light-halo.ce.js.map +1 -1
- package/dist/components/scenes/canvas.ce.js +165 -21
- package/dist/components/scenes/canvas.ce.js.map +1 -1
- package/dist/components/scenes/draw-map.ce.js +25 -32
- package/dist/components/scenes/draw-map.ce.js.map +1 -1
- package/dist/components/scenes/event-layer.ce.js +9 -8
- package/dist/components/scenes/event-layer.ce.js.map +1 -1
- package/dist/core/inject.js +1 -1
- package/dist/core/inject.js.map +1 -1
- package/dist/core/setup.js +1 -1
- package/dist/core/setup.js.map +1 -1
- package/dist/decorators/spritesheet.d.ts +1 -0
- package/dist/decorators/spritesheet.js +11 -0
- package/dist/decorators/spritesheet.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +26 -21
- package/dist/module.js +15 -1
- package/dist/module.js.map +1 -1
- package/dist/node_modules/.pnpm/{@signe_di@2.9.0 → @signe_di@3.0.1}/node_modules/@signe/di/dist/index.js +7 -117
- package/dist/node_modules/.pnpm/@signe_di@3.0.1/node_modules/@signe/di/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_reactive@3.0.1/node_modules/@signe/reactive/dist/index.js +239 -0
- package/dist/node_modules/.pnpm/@signe_reactive@3.0.1/node_modules/@signe/reactive/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/chunk-EUXUH3YW.js +13 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/chunk-EUXUH3YW.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/index.js +696 -0
- package/dist/node_modules/.pnpm/@signe_room@3.0.1/node_modules/@signe/room/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/client/index.js +44 -0
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/client/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{@signe_sync@2.9.0 → @signe_sync@3.0.1}/node_modules/@signe/sync/dist/index.js +57 -141
- package/dist/node_modules/.pnpm/@signe_sync@3.0.1/node_modules/@signe/sync/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-HAC622V3.js.map +1 -1
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-S74YV6PU.js.map +1 -1
- package/dist/node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.js +27 -27
- package/dist/node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.js.map +1 -1
- package/dist/presets/animation.js.map +1 -1
- package/dist/presets/faceset.js.map +1 -1
- package/dist/presets/icon.js.map +1 -1
- package/dist/presets/index.js.map +1 -1
- package/dist/presets/lpc.js.map +1 -1
- package/dist/presets/rmspritesheet.js.map +1 -1
- package/dist/services/AbstractSocket.js.map +1 -1
- package/dist/services/actionInput.d.ts +12 -0
- package/dist/services/actionInput.js +27 -0
- package/dist/services/actionInput.js.map +1 -0
- package/dist/services/actionInput.spec.d.ts +1 -0
- package/dist/services/keyboardControls.js.map +1 -1
- package/dist/services/loadMap.d.ts +6 -0
- package/dist/services/loadMap.js +1 -1
- package/dist/services/loadMap.js.map +1 -1
- package/dist/services/mmorpg-connection.d.ts +5 -0
- package/dist/services/mmorpg-connection.js +50 -0
- package/dist/services/mmorpg-connection.js.map +1 -0
- package/dist/services/mmorpg-connection.spec.d.ts +1 -0
- package/dist/services/mmorpg.d.ts +10 -4
- package/dist/services/mmorpg.js +56 -33
- package/dist/services/mmorpg.js.map +1 -1
- package/dist/services/pointerContext.d.ts +11 -0
- package/dist/services/pointerContext.js +48 -0
- package/dist/services/pointerContext.js.map +1 -0
- package/dist/services/pointerContext.spec.d.ts +1 -0
- package/dist/services/save.js.map +1 -1
- package/dist/services/save.spec.d.ts +1 -0
- package/dist/services/standalone-message.d.ts +1 -0
- package/dist/services/standalone-message.js +9 -0
- package/dist/services/standalone-message.js.map +1 -0
- package/dist/services/standalone.js +4 -3
- package/dist/services/standalone.js.map +1 -1
- package/dist/services/standalone.spec.d.ts +1 -0
- package/dist/utils/getEntityProp.js +4 -3
- package/dist/utils/getEntityProp.js.map +1 -1
- package/dist/utils/getEntityProp.spec.d.ts +1 -0
- package/dist/utils/readPropValue.d.ts +2 -0
- package/dist/utils/readPropValue.js +13 -0
- package/dist/utils/readPropValue.js.map +1 -0
- package/package.json +13 -14
- package/src/Game/AnimationManager.spec.ts +30 -0
- package/src/Game/AnimationManager.ts +22 -10
- package/src/Game/Map.ts +91 -2
- package/src/Game/Object.ts +148 -69
- package/src/Game/ProjectileManager.spec.ts +338 -0
- package/src/Game/ProjectileManager.ts +324 -0
- package/src/Gui/Gui.spec.ts +273 -0
- package/src/Gui/Gui.ts +105 -50
- package/src/Resource.ts +1 -2
- package/src/RpgClient.ts +125 -17
- package/src/RpgClientEngine.ts +457 -87
- package/src/components/character.ce +441 -32
- package/src/components/dynamics/bar.ce +88 -0
- package/src/components/dynamics/image.ce +21 -0
- package/src/components/dynamics/parse-value.spec.ts +83 -0
- package/src/components/dynamics/parse-value.ts +111 -37
- package/src/components/dynamics/shape-utils.spec.ts +46 -0
- package/src/components/dynamics/shape-utils.ts +61 -0
- package/src/components/dynamics/shape.ce +90 -0
- package/src/components/dynamics/text.ce +35 -149
- package/src/components/gui/dialogbox/index.ce +18 -8
- package/src/components/gui/gameover.ce +2 -1
- package/src/components/gui/menu/equip-menu.ce +2 -1
- package/src/components/gui/menu/exit-menu.ce +2 -1
- package/src/components/gui/menu/items-menu.ce +3 -2
- package/src/components/gui/menu/main-menu.ce +2 -1
- package/src/components/gui/save-load.ce +2 -1
- package/src/components/gui/shop/shop.ce +3 -2
- package/src/components/gui/title-screen.ce +2 -1
- package/src/components/index.ts +2 -1
- package/src/components/player-components-utils.spec.ts +109 -0
- package/src/components/player-components-utils.ts +205 -0
- package/src/components/player-components.ce +222 -0
- package/src/components/prebuilt/hp-bar.ce +4 -3
- package/src/components/prebuilt/light-halo.ce +2 -2
- package/src/components/scenes/canvas.ce +175 -8
- package/src/components/scenes/draw-map.ce +18 -17
- package/src/components/scenes/event-layer.ce +1 -2
- package/src/core/setup.ts +2 -2
- package/src/decorators/spritesheet.ts +8 -0
- package/src/index.ts +4 -0
- package/src/module.ts +18 -1
- package/src/services/actionInput.spec.ts +101 -0
- package/src/services/actionInput.ts +53 -0
- package/src/services/loadMap.ts +2 -0
- package/src/services/mmorpg-connection.spec.ts +99 -0
- package/src/services/mmorpg-connection.ts +69 -0
- package/src/services/mmorpg.ts +68 -36
- package/src/services/pointerContext.spec.ts +36 -0
- package/src/services/pointerContext.ts +84 -0
- package/src/services/save.spec.ts +127 -0
- package/src/services/standalone-message.ts +7 -0
- package/src/services/standalone.spec.ts +34 -0
- package/src/services/standalone.ts +3 -2
- package/src/utils/getEntityProp.spec.ts +96 -0
- package/src/utils/getEntityProp.ts +4 -3
- package/src/utils/readPropValue.ts +16 -0
- package/dist/node_modules/.pnpm/@signe_di@2.9.0/node_modules/@signe/di/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@signe_reactive@2.8.3/node_modules/@signe/reactive/dist/index.js +0 -457
- package/dist/node_modules/.pnpm/@signe_reactive@2.8.3/node_modules/@signe/reactive/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@signe_reactive@2.9.0/node_modules/@signe/reactive/dist/index.js +0 -463
- package/dist/node_modules/.pnpm/@signe_reactive@2.9.0/node_modules/@signe/reactive/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@signe_room@2.9.0/node_modules/@signe/room/dist/index.js +0 -2191
- package/dist/node_modules/.pnpm/@signe_room@2.9.0/node_modules/@signe/room/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@signe_sync@2.9.0/node_modules/@signe/sync/dist/chunk-7QVYU63E.js +0 -10
- package/dist/node_modules/.pnpm/@signe_sync@2.9.0/node_modules/@signe/sync/dist/chunk-7QVYU63E.js.map +0 -1
- package/dist/node_modules/.pnpm/@signe_sync@2.9.0/node_modules/@signe/sync/dist/client/index.js +0 -91
- package/dist/node_modules/.pnpm/@signe_sync@2.9.0/node_modules/@signe/sync/dist/client/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@signe_sync@2.9.0/node_modules/@signe/sync/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.js +0 -14
- package/dist/node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { inject } from "../../core/inject.js";
|
|
2
|
+
import { getKeyboardControlBind } from "../../services/actionInput.js";
|
|
2
3
|
import { RpgGui } from "../../Gui/Gui.js";
|
|
3
4
|
import { RpgClientEngine } from "../../RpgClientEngine.js";
|
|
4
5
|
import { DOMContainer, DOMElement, Navigation, computed, cond, effect, h, loop, signal, useDefineProps, useProps } from "canvasengine";
|
|
@@ -7,99 +8,72 @@ import { PrebuiltGui } from "@rpgjs/common";
|
|
|
7
8
|
function component($$props) {
|
|
8
9
|
useProps($$props);
|
|
9
10
|
const defineProps = useDefineProps($$props);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return t;
|
|
17
|
-
};
|
|
18
|
-
return __assign.apply(this, arguments);
|
|
19
|
-
};
|
|
20
|
-
var engine = inject(RpgClientEngine);
|
|
21
|
-
var guiService = inject(RpgGui);
|
|
22
|
-
var keyboardControls = engine.globalConfig.keyboardControls;
|
|
23
|
-
var _a = defineProps({
|
|
24
|
-
entries: { default: function() {
|
|
25
|
-
return [];
|
|
26
|
-
} },
|
|
27
|
-
saveLoad: { default: function() {
|
|
28
|
-
return {};
|
|
29
|
-
} },
|
|
11
|
+
const engine = inject(RpgClientEngine);
|
|
12
|
+
const guiService = inject(RpgGui);
|
|
13
|
+
const keyboardControls = engine.globalConfig.keyboardControls;
|
|
14
|
+
const { data, onInteraction } = defineProps({
|
|
15
|
+
entries: { default: () => [] },
|
|
16
|
+
saveLoad: { default: () => ({}) },
|
|
30
17
|
localActions: { default: false }
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
});
|
|
19
|
+
const { entries, title, subtitle, version, saveLoad, localActions } = data();
|
|
20
|
+
const defaultEntries = [{
|
|
34
21
|
id: "start",
|
|
35
22
|
label: "Start"
|
|
36
23
|
}, {
|
|
37
24
|
id: "load",
|
|
38
25
|
label: "Load"
|
|
39
26
|
}];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return resolveProp(subtitle) || "";
|
|
48
|
-
});
|
|
49
|
-
var versionText = computed(function() {
|
|
50
|
-
return resolveProp(version) || "";
|
|
51
|
-
});
|
|
52
|
-
var localActionsEnabled = computed(function() {
|
|
53
|
-
return resolveProp(localActions) === true;
|
|
54
|
-
});
|
|
55
|
-
var entryList = computed(function() {
|
|
56
|
-
var list = resolveProp(entries);
|
|
27
|
+
const resolveProp = (value) => typeof value === "function" ? value() : value;
|
|
28
|
+
const titleText = computed(() => resolveProp(title) || "RPG");
|
|
29
|
+
const subtitleText = computed(() => resolveProp(subtitle) || "");
|
|
30
|
+
const versionText = computed(() => resolveProp(version) || "");
|
|
31
|
+
const localActionsEnabled = computed(() => resolveProp(localActions) === true);
|
|
32
|
+
const entryList = computed(() => {
|
|
33
|
+
const list = resolveProp(entries);
|
|
57
34
|
if (Array.isArray(list) && list.length) return list;
|
|
58
35
|
return defaultEntries;
|
|
59
36
|
});
|
|
60
|
-
|
|
37
|
+
const isEntryDisabled = (entry) => {
|
|
61
38
|
if (!entry) return true;
|
|
62
39
|
if (entry.disabled) return true;
|
|
63
40
|
if (entry.enabled === false) return true;
|
|
64
41
|
return false;
|
|
65
42
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return entryList().map(
|
|
69
|
-
return isEntryDisabled(entry) ? null : index;
|
|
70
|
-
}).filter(function(value) {
|
|
71
|
-
return value !== null;
|
|
72
|
-
});
|
|
43
|
+
const selectedEntry = signal(0);
|
|
44
|
+
const selectableIndexes = computed(() => {
|
|
45
|
+
return entryList().map((entry, index) => isEntryDisabled(entry) ? null : index).filter((value) => value !== null);
|
|
73
46
|
});
|
|
74
|
-
effect(
|
|
75
|
-
|
|
47
|
+
effect(() => {
|
|
48
|
+
const available = selectableIndexes();
|
|
76
49
|
if (!available.length) return;
|
|
77
|
-
|
|
50
|
+
const current = selectedEntry();
|
|
78
51
|
if (!available.includes(current)) selectedEntry.set(available[0]);
|
|
79
52
|
});
|
|
80
|
-
|
|
81
|
-
|
|
53
|
+
const moveSelection = (delta) => {
|
|
54
|
+
const available = selectableIndexes();
|
|
82
55
|
if (!available.length) return;
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
const current = selectedEntry();
|
|
57
|
+
const nextIndex = (Math.max(0, available.indexOf(current)) + delta + available.length) % available.length;
|
|
85
58
|
selectedEntry.set(available[nextIndex]);
|
|
86
59
|
};
|
|
87
|
-
|
|
88
|
-
|
|
60
|
+
const triggerSelect = (index) => {
|
|
61
|
+
const entry = entryList()[index];
|
|
89
62
|
if (!entry || isEntryDisabled(entry)) return;
|
|
90
63
|
if (localActionsEnabled()) {
|
|
91
64
|
if (entry.id === "start") guiService.hide(PrebuiltGui.TitleScreen);
|
|
92
65
|
if (entry.id === "load") {
|
|
93
|
-
|
|
94
|
-
|
|
66
|
+
const config = resolveProp(saveLoad) || {};
|
|
67
|
+
const slots = Array.isArray(config.slots) ? config.slots : [
|
|
95
68
|
null,
|
|
96
69
|
null,
|
|
97
70
|
null
|
|
98
71
|
];
|
|
99
|
-
guiService.display(PrebuiltGui.Save,
|
|
72
|
+
guiService.display(PrebuiltGui.Save, {
|
|
73
|
+
...config,
|
|
100
74
|
mode: config.mode || "load",
|
|
101
75
|
slots
|
|
102
|
-
})
|
|
76
|
+
});
|
|
103
77
|
}
|
|
104
78
|
}
|
|
105
79
|
if (onInteraction) onInteraction("select", {
|
|
@@ -114,12 +88,12 @@ function component($$props) {
|
|
|
114
88
|
triggerSelect(index);
|
|
115
89
|
};
|
|
116
90
|
}
|
|
117
|
-
|
|
91
|
+
const controls = signal({
|
|
118
92
|
up: {
|
|
119
93
|
repeat: true,
|
|
120
94
|
bind: keyboardControls.up,
|
|
121
95
|
throttle: 150,
|
|
122
|
-
keyDown
|
|
96
|
+
keyDown() {
|
|
123
97
|
if (guiService.isDisplaying(PrebuiltGui.Save)) return;
|
|
124
98
|
moveSelection(-1);
|
|
125
99
|
}
|
|
@@ -128,14 +102,14 @@ function component($$props) {
|
|
|
128
102
|
repeat: true,
|
|
129
103
|
bind: keyboardControls.down,
|
|
130
104
|
throttle: 150,
|
|
131
|
-
keyDown
|
|
105
|
+
keyDown() {
|
|
132
106
|
if (guiService.isDisplaying(PrebuiltGui.Save)) return;
|
|
133
107
|
moveSelection(1);
|
|
134
108
|
}
|
|
135
109
|
},
|
|
136
110
|
action: {
|
|
137
|
-
bind: keyboardControls.action,
|
|
138
|
-
keyDown
|
|
111
|
+
bind: getKeyboardControlBind(keyboardControls.action),
|
|
112
|
+
keyDown() {
|
|
139
113
|
if (guiService.isDisplaying(PrebuiltGui.Save)) return;
|
|
140
114
|
triggerSelect(selectedEntry());
|
|
141
115
|
}
|
|
@@ -156,7 +130,7 @@ function component($$props) {
|
|
|
156
130
|
element: "div",
|
|
157
131
|
attrs: { class: "rpg-ui-title-screen-title" },
|
|
158
132
|
textContent: computed(() => titleText())
|
|
159
|
-
}), cond(subtitleText(), () => h(DOMElement, {
|
|
133
|
+
}), cond(computed(() => subtitleText()), () => h(DOMElement, {
|
|
160
134
|
element: "div",
|
|
161
135
|
attrs: { class: "rpg-ui-title-screen-subtitle" },
|
|
162
136
|
textContent: computed(() => subtitleText())
|
|
@@ -167,7 +141,7 @@ function component($$props) {
|
|
|
167
141
|
}, h(DOMElement, {
|
|
168
142
|
element: "div",
|
|
169
143
|
attrs: { class: "rpg-ui-menu rpg-ui-title-screen-menu rpg-anim-slide-up" }
|
|
170
|
-
}, loop(entryList(), (entry, index) => h(DOMElement, {
|
|
144
|
+
}, loop(computed(() => entryList()), (entry, index) => h(DOMElement, {
|
|
171
145
|
element: "div",
|
|
172
146
|
attrs: {
|
|
173
147
|
class: ["rpg-ui-menu-item", computed(() => ({ disabled: isEntryDisabled(entry) }))],
|
|
@@ -177,14 +151,15 @@ function component($$props) {
|
|
|
177
151
|
},
|
|
178
152
|
textContent: entry.label
|
|
179
153
|
})))),
|
|
180
|
-
cond(versionText(), () => h(DOMElement, {
|
|
154
|
+
cond(computed(() => versionText()), () => h(DOMElement, {
|
|
181
155
|
element: "div",
|
|
182
156
|
attrs: { class: "rpg-ui-title-screen-version" },
|
|
183
157
|
textContent: computed(() => versionText())
|
|
184
158
|
}))
|
|
185
159
|
]));
|
|
186
160
|
}
|
|
161
|
+
var __ce_component = component;
|
|
187
162
|
//#endregion
|
|
188
|
-
export {
|
|
163
|
+
export { __ce_component as default };
|
|
189
164
|
|
|
190
165
|
//# sourceMappingURL=title-screen.ce.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title-screen.ce.js","names":[],"sources":["../../../src/components/gui/title-screen.ce"],"sourcesContent":["<DOMContainer width=\"100%\" height=\"100%\">\n <div class=\"rpg-ui-title-screen rpg-anim-fade-in\">\n <div class=\"rpg-ui-title-screen-header rpg-anim-float\">\n <div class=\"rpg-ui-title-screen-title\">{titleText()}</div>\n @if (subtitleText()) {\n <div class=\"rpg-ui-title-screen-subtitle\">{subtitleText()}</div>\n }\n </div>\n <Navigation tabindex={selectedEntry} controls={controls}>\n <div class=\"rpg-ui-menu rpg-ui-title-screen-menu rpg-anim-slide-up\">\n @for ((entry,index) of entryList()) {\n <div\n class=\"rpg-ui-menu-item\"\n class={{disabled: isEntryDisabled(entry)}}\n data-selected={selectedEntry() === index ? \"true\" : \"false\"}\n tabindex={index}\n click={selectEntry(index)}\n >{entry.label}</div>\n }\n </div>\n </Navigation>\n @if (versionText()) {\n <div class=\"rpg-ui-title-screen-version\">{versionText()}</div>\n }\n </div>\n</DOMContainer>\n\n<script>\n import { signal, computed, effect } from \"canvasengine\";\n import { PrebuiltGui } from \"@rpgjs/common\";\n import { inject } from \"../../core/inject\";\n import { RpgClientEngine } from \"../../RpgClientEngine\";\n import { RpgGui } from \"../../Gui/Gui\";\n\n const engine = inject(RpgClientEngine);\n const guiService = inject(RpgGui);\n const keyboardControls = engine.globalConfig.keyboardControls;\n\n const { data, onInteraction } = defineProps({\n entries: {\n default: () => []\n },\n saveLoad: {\n default: () => ({})\n },\n localActions: {\n default: false\n }\n });\n\n const { entries, title, subtitle, version, saveLoad, localActions } = data();\n\n const defaultEntries = [\n { id: \"start\", label: \"Start\" },\n { id: \"load\", label: \"Load\" }\n ];\n\n const resolveProp = (value) => typeof value === \"function\" ? value() : value;\n const titleText = computed(() => resolveProp(title) || \"RPG\");\n const subtitleText = computed(() => resolveProp(subtitle) || \"\");\n const versionText = computed(() => resolveProp(version) || \"\");\n const localActionsEnabled = computed(() => resolveProp(localActions) === true);\n\n const entryList = computed(() => {\n const list = resolveProp(entries);\n if (Array.isArray(list) && list.length) return list;\n return defaultEntries;\n });\n\n const isEntryDisabled = (entry) => {\n if (!entry) return true;\n if (entry.disabled) return true;\n if (entry.enabled === false) return true;\n return false;\n };\n\n const selectedEntry = signal(0);\n const selectableIndexes = computed(() => {\n const list = entryList();\n return list\n .map((entry, index) => (isEntryDisabled(entry) ? null : index))\n .filter((value) => value !== null);\n });\n\n effect(() => {\n const available = selectableIndexes();\n if (!available.length) return;\n const current = selectedEntry();\n if (!available.includes(current)) {\n selectedEntry.set(available[0]);\n }\n });\n\n const moveSelection = (delta) => {\n const available = selectableIndexes();\n if (!available.length) return;\n const current = selectedEntry();\n const currentIndex = Math.max(0, available.indexOf(current));\n const nextIndex = (currentIndex + delta + available.length) % available.length;\n selectedEntry.set(available[nextIndex]);\n };\n\n const triggerSelect = (index) => {\n const list = entryList();\n const entry = list[index];\n if (!entry || isEntryDisabled(entry)) return;\n if (localActionsEnabled()) {\n if (entry.id === \"start\") {\n guiService.hide(PrebuiltGui.TitleScreen);\n }\n if (entry.id === \"load\") {\n const config = resolveProp(saveLoad) || {};\n const slots = Array.isArray(config.slots) ? config.slots : [null, null, null];\n guiService.display(PrebuiltGui.Save, {\n ...config,\n mode: config.mode || \"load\",\n slots\n });\n }\n }\n if (onInteraction) {\n onInteraction(\"select\", { id: entry.id, index, entry });\n }\n };\n\n function selectEntry(index) {\n return function() {\n selectedEntry.set(index);\n triggerSelect(index);\n };\n }\n\n const controls = signal({\n up: {\n repeat: true,\n bind: keyboardControls.up,\n throttle: 150,\n keyDown() {\n if (guiService.isDisplaying(PrebuiltGui.Save)) return;\n moveSelection(-1);\n }\n },\n down: {\n repeat: true,\n bind: keyboardControls.down,\n throttle: 150,\n keyDown() {\n if (guiService.isDisplaying(PrebuiltGui.Save)) return;\n moveSelection(1);\n }\n },\n action: {\n bind: keyboardControls.action,\n keyDown() {\n if (guiService.isDisplaying(PrebuiltGui.Save)) return;\n triggerSelect(selectedEntry());\n }\n },\n gamepad: {\n enabled: true\n }\n });\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"title-screen.ce.js","names":[],"sources":["../../../src/components/gui/title-screen.ce"],"sourcesContent":["<DOMContainer width=\"100%\" height=\"100%\">\n <div class=\"rpg-ui-title-screen rpg-anim-fade-in\">\n <div class=\"rpg-ui-title-screen-header rpg-anim-float\">\n <div class=\"rpg-ui-title-screen-title\">{titleText()}</div>\n @if (subtitleText()) {\n <div class=\"rpg-ui-title-screen-subtitle\">{subtitleText()}</div>\n }\n </div>\n <Navigation tabindex={selectedEntry} controls={controls}>\n <div class=\"rpg-ui-menu rpg-ui-title-screen-menu rpg-anim-slide-up\">\n @for ((entry,index) of entryList()) {\n <div\n class=\"rpg-ui-menu-item\"\n class={{disabled: isEntryDisabled(entry)}}\n data-selected={selectedEntry() === index ? \"true\" : \"false\"}\n tabindex={index}\n click={selectEntry(index)}\n >{entry.label}</div>\n }\n </div>\n </Navigation>\n @if (versionText()) {\n <div class=\"rpg-ui-title-screen-version\">{versionText()}</div>\n }\n </div>\n</DOMContainer>\n\n<script>\n import { signal, computed, effect } from \"canvasengine\";\n import { PrebuiltGui } from \"@rpgjs/common\";\n import { inject } from \"../../core/inject\";\n import { RpgClientEngine } from \"../../RpgClientEngine\";\n import { RpgGui } from \"../../Gui/Gui\";\n import { getKeyboardControlBind } from \"../../services/actionInput\";\n\n const engine = inject(RpgClientEngine);\n const guiService = inject(RpgGui);\n const keyboardControls = engine.globalConfig.keyboardControls;\n\n const { data, onInteraction } = defineProps({\n entries: {\n default: () => []\n },\n saveLoad: {\n default: () => ({})\n },\n localActions: {\n default: false\n }\n });\n\n const { entries, title, subtitle, version, saveLoad, localActions } = data();\n\n const defaultEntries = [\n { id: \"start\", label: \"Start\" },\n { id: \"load\", label: \"Load\" }\n ];\n\n const resolveProp = (value) => typeof value === \"function\" ? value() : value;\n const titleText = computed(() => resolveProp(title) || \"RPG\");\n const subtitleText = computed(() => resolveProp(subtitle) || \"\");\n const versionText = computed(() => resolveProp(version) || \"\");\n const localActionsEnabled = computed(() => resolveProp(localActions) === true);\n\n const entryList = computed(() => {\n const list = resolveProp(entries);\n if (Array.isArray(list) && list.length) return list;\n return defaultEntries;\n });\n\n const isEntryDisabled = (entry) => {\n if (!entry) return true;\n if (entry.disabled) return true;\n if (entry.enabled === false) return true;\n return false;\n };\n\n const selectedEntry = signal(0);\n const selectableIndexes = computed(() => {\n const list = entryList();\n return list\n .map((entry, index) => (isEntryDisabled(entry) ? null : index))\n .filter((value) => value !== null);\n });\n\n effect(() => {\n const available = selectableIndexes();\n if (!available.length) return;\n const current = selectedEntry();\n if (!available.includes(current)) {\n selectedEntry.set(available[0]);\n }\n });\n\n const moveSelection = (delta) => {\n const available = selectableIndexes();\n if (!available.length) return;\n const current = selectedEntry();\n const currentIndex = Math.max(0, available.indexOf(current));\n const nextIndex = (currentIndex + delta + available.length) % available.length;\n selectedEntry.set(available[nextIndex]);\n };\n\n const triggerSelect = (index) => {\n const list = entryList();\n const entry = list[index];\n if (!entry || isEntryDisabled(entry)) return;\n if (localActionsEnabled()) {\n if (entry.id === \"start\") {\n guiService.hide(PrebuiltGui.TitleScreen);\n }\n if (entry.id === \"load\") {\n const config = resolveProp(saveLoad) || {};\n const slots = Array.isArray(config.slots) ? config.slots : [null, null, null];\n guiService.display(PrebuiltGui.Save, {\n ...config,\n mode: config.mode || \"load\",\n slots\n });\n }\n }\n if (onInteraction) {\n onInteraction(\"select\", { id: entry.id, index, entry });\n }\n };\n\n function selectEntry(index) {\n return function() {\n selectedEntry.set(index);\n triggerSelect(index);\n };\n }\n\n const controls = signal({\n up: {\n repeat: true,\n bind: keyboardControls.up,\n throttle: 150,\n keyDown() {\n if (guiService.isDisplaying(PrebuiltGui.Save)) return;\n moveSelection(-1);\n }\n },\n down: {\n repeat: true,\n bind: keyboardControls.down,\n throttle: 150,\n keyDown() {\n if (guiService.isDisplaying(PrebuiltGui.Save)) return;\n moveSelection(1);\n }\n },\n action: {\n bind: getKeyboardControlBind(keyboardControls.action),\n keyDown() {\n if (guiService.isDisplaying(PrebuiltGui.Save)) return;\n triggerSelect(selectedEntry());\n }\n },\n gamepad: {\n enabled: true\n }\n });\n</script>\n"],"mappings":";;;;;;;AAaM,SAAS,UAAS,SAAQ;CACT,SAAM,OAAU;CAC/B,MAAM,cAAU,eAAe,OAAA;CAC/B,MAAM,SAAS,OAAO,eAAa;CAC3C,MAAM,aAAa,OAAG,MAAM;CAC5B,MAAM,mBAAU,OAAA,aAAA;CAChB,MAAM,EAAE,MAAM,kBAAG,YAAA;EACb,SAAM,EACF,eAAK,CAAW,EACpB;EACA,UAAI,EACF,gBAAG,CAAA,GACP;kBAEK,SAAA,MACH;CACJ,CAAC;CACD,MAAI,EAAA,SAAS,OAAS,UAAY,SAAK,UAAO,iBAAA,KAAA;CAC9C,MAAI,iBAAS,CACT;EAAA,IAAM;EAAS,OAAO;CAAQ,GAC9B;EAAA,IAAM;EAAG,OAAA;CAAA,CAAA;CAEb,MAAI,eAAe,UAAO,OAAA,UAAgB,aAAA,MAAA,IAAA;CAC1C,MAAI,YAAM,eAAoB,YAAO,KAAA,KAAA,KAAA;CACrC,MAAI,eAAM,eAA0B,YAAY,QAAC,KAAA,EAAA;;CAEjD,MAAI,sBAAc,eAAkB,YAAY,YAAA,MAAA,IAAA;CAChD,MAAM,YAAW,eAAA;EACb,MAAM,OAAE,YAAgB,OAAA;EACxB,IAAI,MAAC,QAAA,IAAA,KAAA,KAAA,QACD,OAAA;EACJ,OAAO;CACX,C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AA,QAAA,SAAA,OAAA;IAAA,UAAA;IAAA,OAAA,YAAA,KAAA;GAAA;GAAA,aAAA,MAAA;EAAA,CAAA,CAAA,CAAA,CAAA;EAAA,KAAA,eAAA,YAAA,CAAA,SAAA,EAAA,YAAA;GAAA,SAAA;GAAA,OAAA,EAAA,OAAA,8BAAA;GAAA,aAAA,eAAA,YAAA,CAAA;EAAA,CAAA,CAAA;CAAA,CAAA,CACK;AACR;AAEA,IAAM,iBAAa"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as EventLayerComponent } from './scenes/event-layer.ce';
|
|
2
|
+
import { default as SceneMap } from './scenes/draw-map.ce';
|
|
2
3
|
import { default as CharacterComponent } from './character.ce';
|
|
3
4
|
export { HpBar } from './prebuilt';
|
|
4
|
-
export { EventLayerComponent, CharacterComponent };
|
|
5
|
+
export { EventLayerComponent, SceneMap, CharacterComponent };
|
package/dist/components/index.js
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare const DEFAULT_HP_BAR_STYLE: {
|
|
2
|
+
fillColor: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const DEFAULT_SP_BAR_STYLE: {
|
|
5
|
+
fillColor: string;
|
|
6
|
+
};
|
|
7
|
+
type NumberResolver = (value: any, fallback?: number) => number;
|
|
8
|
+
export declare function getPointBounds(points?: any[], toNumber?: NumberResolver): {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function getComponentId(definition: any): any;
|
|
13
|
+
export declare function getComponentProps(definition: any): any;
|
|
14
|
+
export declare function estimateComponentSize(definition: any, { toNumber, estimateTextWidth }?: {
|
|
15
|
+
toNumber?: NumberResolver;
|
|
16
|
+
estimateTextWidth?: (value: any, style?: any) => number;
|
|
17
|
+
}): {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function computeBlockSize({ position, layout, rowMetrics, gap, graphic, hitbox }: {
|
|
22
|
+
position: string;
|
|
23
|
+
layout?: any;
|
|
24
|
+
rowMetrics: Array<{
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
cells: any[];
|
|
28
|
+
}>;
|
|
29
|
+
gap?: {
|
|
30
|
+
row: number;
|
|
31
|
+
column: number;
|
|
32
|
+
};
|
|
33
|
+
graphic: {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
};
|
|
37
|
+
hitbox: {
|
|
38
|
+
w: number;
|
|
39
|
+
h: number;
|
|
40
|
+
};
|
|
41
|
+
}): {
|
|
42
|
+
width: any;
|
|
43
|
+
height: any;
|
|
44
|
+
};
|
|
45
|
+
export declare function computeBlockPosition({ position, size, layout, graphic, hitbox }: {
|
|
46
|
+
position: string;
|
|
47
|
+
size: {
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
layout?: any;
|
|
52
|
+
graphic: {
|
|
53
|
+
left: number;
|
|
54
|
+
top: number;
|
|
55
|
+
right: number;
|
|
56
|
+
centerX: number;
|
|
57
|
+
centerY: number;
|
|
58
|
+
};
|
|
59
|
+
hitbox: {
|
|
60
|
+
w: number;
|
|
61
|
+
h: number;
|
|
62
|
+
};
|
|
63
|
+
}): {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
};
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
//#region src/components/player-components-utils.ts
|
|
2
|
+
var DEFAULT_HP_BAR_STYLE = { fillColor: "#ef4444" };
|
|
3
|
+
var DEFAULT_SP_BAR_STYLE = { fillColor: "#3b82f6" };
|
|
4
|
+
var DEFAULT_CELL_HEIGHT = 16;
|
|
5
|
+
var DEFAULT_CELL_WIDTH = 32;
|
|
6
|
+
var defaultToNumber = (value, fallback = 0) => {
|
|
7
|
+
const num = typeof value === "number" ? value : parseFloat(value);
|
|
8
|
+
return Number.isFinite(num) ? num : fallback;
|
|
9
|
+
};
|
|
10
|
+
function getPointBounds(points = [], toNumber = defaultToNumber) {
|
|
11
|
+
if (!Array.isArray(points) || points.length < 2) return {
|
|
12
|
+
width: 1,
|
|
13
|
+
height: 1
|
|
14
|
+
};
|
|
15
|
+
let minX = Infinity;
|
|
16
|
+
let minY = Infinity;
|
|
17
|
+
let maxX = -Infinity;
|
|
18
|
+
let maxY = -Infinity;
|
|
19
|
+
for (let i = 0; i < points.length; i += 2) {
|
|
20
|
+
const x = toNumber(points[i], 0);
|
|
21
|
+
const y = toNumber(points[i + 1], 0);
|
|
22
|
+
minX = Math.min(minX, x);
|
|
23
|
+
minY = Math.min(minY, y);
|
|
24
|
+
maxX = Math.max(maxX, x);
|
|
25
|
+
maxY = Math.max(maxY, y);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
width: Math.max(1, maxX - minX),
|
|
29
|
+
height: Math.max(1, maxY - minY)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function getComponentId(definition) {
|
|
33
|
+
if (!definition) return void 0;
|
|
34
|
+
if (definition.id) return definition.id;
|
|
35
|
+
if (definition.type === "text") return "rpg:text";
|
|
36
|
+
if (definition.type === "hpBar") return "rpg:hpBar";
|
|
37
|
+
if (definition.type === "spBar") return "rpg:spBar";
|
|
38
|
+
if (definition.type === "bar") return "rpg:bar";
|
|
39
|
+
if (definition.type === "shape") return "rpg:shape";
|
|
40
|
+
if (definition.type === "image") return "rpg:image";
|
|
41
|
+
if (definition.type === "tile") return "rpg:tile";
|
|
42
|
+
return definition.type;
|
|
43
|
+
}
|
|
44
|
+
function getComponentProps(definition) {
|
|
45
|
+
if (definition.props) return definition.props;
|
|
46
|
+
if (definition.type === "text") return {
|
|
47
|
+
value: definition.value,
|
|
48
|
+
style: definition.style
|
|
49
|
+
};
|
|
50
|
+
if (definition.type === "hpBar") return {
|
|
51
|
+
current: "{hp}",
|
|
52
|
+
max: "{param.maxHp}",
|
|
53
|
+
style: {
|
|
54
|
+
...DEFAULT_HP_BAR_STYLE,
|
|
55
|
+
...definition.style
|
|
56
|
+
},
|
|
57
|
+
text: definition.text
|
|
58
|
+
};
|
|
59
|
+
if (definition.type === "spBar") return {
|
|
60
|
+
current: "{sp}",
|
|
61
|
+
max: "{param.maxSp}",
|
|
62
|
+
style: {
|
|
63
|
+
...DEFAULT_SP_BAR_STYLE,
|
|
64
|
+
...definition.style
|
|
65
|
+
},
|
|
66
|
+
text: definition.text
|
|
67
|
+
};
|
|
68
|
+
if (definition.type === "bar") return {
|
|
69
|
+
current: `{${definition.current}}`,
|
|
70
|
+
max: `{${definition.max}}`,
|
|
71
|
+
style: definition.style,
|
|
72
|
+
text: definition.text
|
|
73
|
+
};
|
|
74
|
+
if (definition.type === "shape") return definition.value;
|
|
75
|
+
if (definition.type === "image" || definition.type === "tile") return { value: definition.value };
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
function estimateComponentSize(definition, { toNumber = defaultToNumber, estimateTextWidth = (value) => String(value ?? "").length * 8 } = {}) {
|
|
79
|
+
const props = getComponentProps(definition);
|
|
80
|
+
const style = props?.style ?? definition?.style ?? {};
|
|
81
|
+
if (definition?.type === "text" || definition?.id === "rpg:text") return {
|
|
82
|
+
width: estimateTextWidth(props.value ?? definition.value, style),
|
|
83
|
+
height: toNumber(style.fontSize, 12)
|
|
84
|
+
};
|
|
85
|
+
if (definition?.type === "hpBar" || definition?.type === "spBar" || definition?.type === "bar" || definition?.id === "rpg:hpBar" || definition?.id === "rpg:spBar" || definition?.id === "rpg:bar") {
|
|
86
|
+
const barHeight = toNumber(style.height, 8);
|
|
87
|
+
const labelHeight = props.text != null && props.text !== "" ? toNumber(style.fontSize, 10) + 2 : 0;
|
|
88
|
+
return {
|
|
89
|
+
width: toNumber(style.width, 50),
|
|
90
|
+
height: barHeight + labelHeight
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (definition?.type === "shape" || definition?.id === "rpg:shape") {
|
|
94
|
+
const shape = props ?? {};
|
|
95
|
+
if (shape.type === "circle") {
|
|
96
|
+
const radius = toNumber(shape.radius, 8);
|
|
97
|
+
return {
|
|
98
|
+
width: radius * 2,
|
|
99
|
+
height: radius * 2
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (shape.type === "line") return {
|
|
103
|
+
width: Math.max(1, Math.abs(toNumber(shape.x2, 16) - toNumber(shape.x1, 0))),
|
|
104
|
+
height: Math.max(1, Math.abs(toNumber(shape.y2, 0) - toNumber(shape.y1, 0)))
|
|
105
|
+
};
|
|
106
|
+
if (shape.type === "polygon") return getPointBounds(shape.points, toNumber);
|
|
107
|
+
return {
|
|
108
|
+
width: toNumber(shape.width, 16),
|
|
109
|
+
height: toNumber(shape.height, 16)
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
width: toNumber(definition?.props?.width, DEFAULT_CELL_WIDTH),
|
|
114
|
+
height: toNumber(definition?.props?.height, DEFAULT_CELL_HEIGHT)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function computeBlockSize({ position, layout = {}, rowMetrics, gap = {
|
|
118
|
+
row: 0,
|
|
119
|
+
column: 0
|
|
120
|
+
}, graphic, hitbox }) {
|
|
121
|
+
const rowGapTotal = Math.max(0, rowMetrics.length - 1) * gap.row;
|
|
122
|
+
const maxColumns = rowMetrics.reduce((max, row) => Math.max(max, row.cells.length), 0);
|
|
123
|
+
const columnGapTotal = Math.max(0, maxColumns - 1) * gap.column;
|
|
124
|
+
const contentWidth = rowMetrics.reduce((max, row) => Math.max(max, row.width), 0) + columnGapTotal;
|
|
125
|
+
const contentHeight = rowMetrics.reduce((sum, row) => sum + row.height, 0) + rowGapTotal;
|
|
126
|
+
return {
|
|
127
|
+
width: layout.width ?? Math.max(contentWidth, position === "bottom" ? hitbox.w : position === "top" || position === "center" ? graphic.width : contentWidth),
|
|
128
|
+
height: layout.height ?? Math.max(contentHeight, position === "bottom" ? hitbox.h : position === "left" || position === "right" || position === "center" ? graphic.height : contentHeight)
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function computeBlockPosition({ position, size, layout = {}, graphic, hitbox }) {
|
|
132
|
+
const marginLeft = layout.marginLeft ?? 0;
|
|
133
|
+
const marginRight = layout.marginRight ?? 0;
|
|
134
|
+
const marginTop = layout.marginTop ?? 0;
|
|
135
|
+
const marginBottom = layout.marginBottom ?? 0;
|
|
136
|
+
switch (position) {
|
|
137
|
+
case "bottom": return {
|
|
138
|
+
x: hitbox.w / 2 - size.width / 2 + marginLeft - marginRight,
|
|
139
|
+
y: hitbox.h / 2 - size.height / 2 + marginBottom - marginTop
|
|
140
|
+
};
|
|
141
|
+
case "center": return {
|
|
142
|
+
x: graphic.centerX - size.width / 2 + marginLeft - marginRight,
|
|
143
|
+
y: graphic.centerY - size.height / 2 + marginTop - marginBottom
|
|
144
|
+
};
|
|
145
|
+
case "left": return {
|
|
146
|
+
x: graphic.left - size.width + marginLeft - marginRight,
|
|
147
|
+
y: graphic.centerY - size.height / 2 + marginTop - marginBottom
|
|
148
|
+
};
|
|
149
|
+
case "right": return {
|
|
150
|
+
x: graphic.right + marginLeft - marginRight,
|
|
151
|
+
y: graphic.centerY - size.height / 2 + marginTop - marginBottom
|
|
152
|
+
};
|
|
153
|
+
default: return {
|
|
154
|
+
x: graphic.centerX - size.width / 2 + marginLeft - marginRight,
|
|
155
|
+
y: graphic.top - size.height + marginTop - marginBottom
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { computeBlockPosition, computeBlockSize, estimateComponentSize, getComponentId, getComponentProps };
|
|
161
|
+
|
|
162
|
+
//# sourceMappingURL=player-components-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-components-utils.js","names":[],"sources":["../../src/components/player-components-utils.ts"],"sourcesContent":["export const DEFAULT_HP_BAR_STYLE = { fillColor: '#ef4444' };\nexport const DEFAULT_SP_BAR_STYLE = { fillColor: '#3b82f6' };\n\nconst DEFAULT_CELL_HEIGHT = 16;\nconst DEFAULT_CELL_WIDTH = 32;\n\ntype NumberResolver = (value: any, fallback?: number) => number;\n\nconst defaultToNumber: NumberResolver = (value, fallback = 0) => {\n const num = typeof value === 'number' ? value : parseFloat(value);\n return Number.isFinite(num) ? num : fallback;\n};\n\nexport function getPointBounds(points: any[] = [], toNumber: NumberResolver = defaultToNumber) {\n if (!Array.isArray(points) || points.length < 2) {\n return { width: 1, height: 1 };\n }\n\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < points.length; i += 2) {\n const x = toNumber(points[i], 0);\n const y = toNumber(points[i + 1], 0);\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n\n return {\n width: Math.max(1, maxX - minX),\n height: Math.max(1, maxY - minY)\n };\n}\n\nexport function getComponentId(definition: any) {\n if (!definition) return undefined;\n if (definition.id) return definition.id;\n if (definition.type === 'text') return 'rpg:text';\n if (definition.type === 'hpBar') return 'rpg:hpBar';\n if (definition.type === 'spBar') return 'rpg:spBar';\n if (definition.type === 'bar') return 'rpg:bar';\n if (definition.type === 'shape') return 'rpg:shape';\n if (definition.type === 'image') return 'rpg:image';\n if (definition.type === 'tile') return 'rpg:tile';\n return definition.type;\n}\n\nexport function getComponentProps(definition: any) {\n if (definition.props) return definition.props;\n\n if (definition.type === 'text') {\n return { value: definition.value, style: definition.style };\n }\n if (definition.type === 'hpBar') {\n return { current: '{hp}', max: '{param.maxHp}', style: { ...DEFAULT_HP_BAR_STYLE, ...definition.style }, text: definition.text };\n }\n if (definition.type === 'spBar') {\n return { current: '{sp}', max: '{param.maxSp}', style: { ...DEFAULT_SP_BAR_STYLE, ...definition.style }, text: definition.text };\n }\n if (definition.type === 'bar') {\n return { current: `{${definition.current}}`, max: `{${definition.max}}`, style: definition.style, text: definition.text };\n }\n if (definition.type === 'shape') {\n return definition.value;\n }\n if (definition.type === 'image' || definition.type === 'tile') {\n return { value: definition.value };\n }\n\n return {};\n}\n\nexport function estimateComponentSize(\n definition: any,\n {\n toNumber = defaultToNumber,\n estimateTextWidth = (value: any) => String(value ?? '').length * 8\n }: {\n toNumber?: NumberResolver;\n estimateTextWidth?: (value: any, style?: any) => number;\n } = {}\n) {\n const props = getComponentProps(definition);\n const style = props?.style ?? definition?.style ?? {};\n\n if (definition?.type === 'text' || definition?.id === 'rpg:text') {\n return {\n width: estimateTextWidth(props.value ?? definition.value, style),\n height: toNumber(style.fontSize, 12)\n };\n }\n\n if (definition?.type === 'hpBar' || definition?.type === 'spBar' || definition?.type === 'bar' || definition?.id === 'rpg:hpBar' || definition?.id === 'rpg:spBar' || definition?.id === 'rpg:bar') {\n const barHeight = toNumber(style.height, 8);\n const labelHeight = props.text != null && props.text !== '' ? toNumber(style.fontSize, 10) + 2 : 0;\n return {\n width: toNumber(style.width, 50),\n height: barHeight + labelHeight\n };\n }\n\n if (definition?.type === 'shape' || definition?.id === 'rpg:shape') {\n const shape = props ?? {};\n if (shape.type === 'circle') {\n const radius = toNumber(shape.radius, 8);\n return { width: radius * 2, height: radius * 2 };\n }\n if (shape.type === 'line') {\n return {\n width: Math.max(1, Math.abs(toNumber(shape.x2, 16) - toNumber(shape.x1, 0))),\n height: Math.max(1, Math.abs(toNumber(shape.y2, 0) - toNumber(shape.y1, 0)))\n };\n }\n if (shape.type === 'polygon') {\n return getPointBounds(shape.points, toNumber);\n }\n return {\n width: toNumber(shape.width, 16),\n height: toNumber(shape.height, 16)\n };\n }\n\n return {\n width: toNumber(definition?.props?.width, DEFAULT_CELL_WIDTH),\n height: toNumber(definition?.props?.height, DEFAULT_CELL_HEIGHT)\n };\n}\n\nexport function computeBlockSize({\n position,\n layout = {},\n rowMetrics,\n gap = { row: 0, column: 0 },\n graphic,\n hitbox\n}: {\n position: string;\n layout?: any;\n rowMetrics: Array<{ width: number; height: number; cells: any[] }>;\n gap?: { row: number; column: number };\n graphic: { width: number; height: number };\n hitbox: { w: number; h: number };\n}) {\n const rowGapTotal = Math.max(0, rowMetrics.length - 1) * gap.row;\n const maxColumns = rowMetrics.reduce((max, row) => Math.max(max, row.cells.length), 0);\n const columnGapTotal = Math.max(0, maxColumns - 1) * gap.column;\n const contentWidth = rowMetrics.reduce((max, row) => Math.max(max, row.width), 0) + columnGapTotal;\n const contentHeight = rowMetrics.reduce((sum, row) => sum + row.height, 0) + rowGapTotal;\n const width = layout.width ?? Math.max(contentWidth, position === 'bottom' ? hitbox.w : position === 'top' || position === 'center' ? graphic.width : contentWidth);\n const height = layout.height ?? Math.max(contentHeight, position === 'bottom' ? hitbox.h : position === 'left' || position === 'right' || position === 'center' ? graphic.height : contentHeight);\n\n return { width, height };\n}\n\nexport function computeBlockPosition({\n position,\n size,\n layout = {},\n graphic,\n hitbox\n}: {\n position: string;\n size: { width: number; height: number };\n layout?: any;\n graphic: { left: number; top: number; right: number; centerX: number; centerY: number };\n hitbox: { w: number; h: number };\n}) {\n const marginLeft = layout.marginLeft ?? 0;\n const marginRight = layout.marginRight ?? 0;\n const marginTop = layout.marginTop ?? 0;\n const marginBottom = layout.marginBottom ?? 0;\n\n switch (position) {\n case 'bottom':\n return {\n x: (hitbox.w / 2) - (size.width / 2) + marginLeft - marginRight,\n y: (hitbox.h / 2) - (size.height / 2) + marginBottom - marginTop\n };\n case 'center':\n return {\n x: graphic.centerX - (size.width / 2) + marginLeft - marginRight,\n y: graphic.centerY - (size.height / 2) + marginTop - marginBottom\n };\n case 'left':\n return {\n x: graphic.left - size.width + marginLeft - marginRight,\n y: graphic.centerY - (size.height / 2) + marginTop - marginBottom\n };\n case 'right':\n return {\n x: graphic.right + marginLeft - marginRight,\n y: graphic.centerY - (size.height / 2) + marginTop - marginBottom\n };\n case 'top':\n default:\n return {\n x: graphic.centerX - (size.width / 2) + marginLeft - marginRight,\n y: graphic.top - size.height + marginTop - marginBottom\n };\n }\n}\n"],"mappings":";AAAA,IAAa,uBAAuB,EAAE,WA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