@rpgjs/client 5.0.0-alpha.43 → 5.0.0-alpha.44
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/AnimationManager.js +25 -24
- package/dist/Game/AnimationManager.js.map +1 -1
- package/dist/Game/Event.js +11 -10
- package/dist/Game/Event.js.map +1 -1
- package/dist/Game/Map.js +78 -94
- package/dist/Game/Map.js.map +1 -1
- package/dist/Game/Object.js +182 -216
- package/dist/Game/Object.js.map +1 -1
- package/dist/Game/Player.js +11 -10
- package/dist/Game/Player.js.map +1 -1
- package/dist/Gui/Gui.js +440 -473
- package/dist/Gui/Gui.js.map +1 -1
- package/dist/Gui/NotificationManager.js +48 -50
- package/dist/Gui/NotificationManager.js.map +1 -1
- package/dist/Resource.js +132 -113
- package/dist/Resource.js.map +1 -1
- package/dist/RpgClientEngine.js +1333 -1486
- package/dist/RpgClientEngine.js.map +1 -1
- package/dist/Sound.js +162 -92
- package/dist/Sound.js.map +1 -1
- package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorate.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorateMetadata.js +6 -0
- package/dist/components/animations/animation.ce.js +22 -19
- package/dist/components/animations/animation.ce.js.map +1 -1
- package/dist/components/animations/hit.ce.js +67 -68
- package/dist/components/animations/hit.ce.js.map +1 -1
- package/dist/components/animations/index.js +9 -8
- package/dist/components/animations/index.js.map +1 -1
- package/dist/components/character.ce.js +390 -314
- package/dist/components/character.ce.js.map +1 -1
- package/dist/components/dynamics/parse-value.js +42 -52
- package/dist/components/dynamics/parse-value.js.map +1 -1
- package/dist/components/dynamics/text.ce.js +71 -139
- package/dist/components/dynamics/text.ce.js.map +1 -1
- package/dist/components/gui/box.ce.js +26 -25
- package/dist/components/gui/box.ce.js.map +1 -1
- package/dist/components/gui/dialogbox/index.ce.js +202 -149
- package/dist/components/gui/dialogbox/index.ce.js.map +1 -1
- package/dist/components/gui/gameover.ce.js +190 -138
- package/dist/components/gui/gameover.ce.js.map +1 -1
- package/dist/components/gui/hud/hud.ce.js +90 -33
- package/dist/components/gui/hud/hud.ce.js.map +1 -1
- package/dist/components/gui/index.js +14 -0
- package/dist/components/gui/menu/equip-menu.ce.js +478 -346
- package/dist/components/gui/menu/equip-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/exit-menu.ce.js +52 -33
- package/dist/components/gui/menu/exit-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/items-menu.ce.js +341 -226
- package/dist/components/gui/menu/items-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/main-menu.ce.js +414 -205
- package/dist/components/gui/menu/main-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/options-menu.ce.js +46 -26
- package/dist/components/gui/menu/options-menu.ce.js.map +1 -1
- package/dist/components/gui/menu/skills-menu.ce.js +104 -50
- package/dist/components/gui/menu/skills-menu.ce.js.map +1 -1
- package/dist/components/gui/mobile/index.js +18 -21
- package/dist/components/gui/mobile/index.js.map +1 -1
- package/dist/components/gui/mobile/mobile.ce.js +76 -15
- package/dist/components/gui/mobile/mobile.ce.js.map +1 -1
- package/dist/components/gui/notification/notification.ce.js +62 -36
- package/dist/components/gui/notification/notification.ce.js.map +1 -1
- package/dist/components/gui/save-load.ce.js +386 -239
- package/dist/components/gui/save-load.ce.js.map +1 -1
- package/dist/components/gui/shop/shop.ce.js +649 -319
- package/dist/components/gui/shop/shop.ce.js.map +1 -1
- package/dist/components/gui/title-screen.ce.js +187 -145
- package/dist/components/gui/title-screen.ce.js.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/prebuilt/hp-bar.ce.js +114 -104
- package/dist/components/prebuilt/hp-bar.ce.js.map +1 -1
- package/dist/components/prebuilt/index.js +2 -0
- package/dist/components/prebuilt/light-halo.ce.js +92 -74
- package/dist/components/prebuilt/light-halo.ce.js.map +1 -1
- package/dist/components/scenes/canvas.ce.js +58 -42
- package/dist/components/scenes/canvas.ce.js.map +1 -1
- package/dist/components/scenes/draw-map.ce.js +87 -64
- package/dist/components/scenes/draw-map.ce.js.map +1 -1
- package/dist/components/scenes/event-layer.ce.js +26 -16
- package/dist/components/scenes/event-layer.ce.js.map +1 -1
- package/dist/core/inject.js +11 -10
- package/dist/core/inject.js.map +1 -1
- package/dist/core/setup.js +13 -13
- package/dist/core/setup.js.map +1 -1
- package/dist/index.js +44 -41
- package/dist/module.js +169 -168
- package/dist/module.js.map +1 -1
- package/dist/node_modules/.pnpm/@signe_di@2.8.3/node_modules/@signe/di/dist/index.js +209 -298
- package/dist/node_modules/.pnpm/@signe_di@2.8.3/node_modules/@signe/di/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@signe_reactive@2.8.3/node_modules/@signe/reactive/dist/index.js +430 -507
- package/dist/node_modules/.pnpm/@signe_reactive@2.8.3/node_modules/@signe/reactive/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@signe_room@2.8.3/node_modules/@signe/room/dist/index.js +2062 -2571
- package/dist/node_modules/.pnpm/@signe_room@2.8.3/node_modules/@signe/room/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@signe_sync@2.8.3/node_modules/@signe/sync/dist/chunk-7QVYU63E.js +8 -3
- package/dist/node_modules/.pnpm/@signe_sync@2.8.3/node_modules/@signe/sync/dist/chunk-7QVYU63E.js.map +1 -1
- package/dist/node_modules/.pnpm/@signe_sync@2.8.3/node_modules/@signe/sync/dist/client/index.js +78 -101
- package/dist/node_modules/.pnpm/@signe_sync@2.8.3/node_modules/@signe/sync/dist/client/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@signe_sync@2.8.3/node_modules/@signe/sync/dist/index.js +264 -401
- package/dist/node_modules/.pnpm/@signe_sync@2.8.3/node_modules/@signe/sync/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.js +9 -7
- package/dist/node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-HAC622V3.js +106 -165
- 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 +361 -461
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/chunk-S74YV6PU.js.map +1 -1
- package/dist/node_modules/.pnpm/partysocket@1.1.3/node_modules/partysocket/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.js +3633 -4280
- package/dist/node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.js.map +1 -1
- package/dist/presets/animation.js +37 -25
- package/dist/presets/animation.js.map +1 -1
- package/dist/presets/faceset.js +49 -22
- package/dist/presets/faceset.js.map +1 -1
- package/dist/presets/icon.js +13 -13
- package/dist/presets/icon.js.map +1 -1
- package/dist/presets/index.js +15 -14
- package/dist/presets/index.js.map +1 -1
- package/dist/presets/lpc.js +96 -93
- package/dist/presets/lpc.js.map +1 -1
- package/dist/presets/rmspritesheet.js +40 -39
- package/dist/presets/rmspritesheet.js.map +1 -1
- package/dist/services/AbstractSocket.js +10 -8
- package/dist/services/AbstractSocket.js.map +1 -1
- package/dist/services/keyboardControls.js +20 -18
- package/dist/services/keyboardControls.js.map +1 -1
- package/dist/services/loadMap.js +120 -36
- package/dist/services/loadMap.js.map +1 -1
- package/dist/services/mmorpg.js +128 -136
- package/dist/services/mmorpg.js.map +1 -1
- package/dist/services/save.js +74 -66
- package/dist/services/save.js.map +1 -1
- package/dist/services/standalone.js +165 -167
- package/dist/services/standalone.js.map +1 -1
- package/dist/utils/getEntityProp.js +49 -51
- package/dist/utils/getEntityProp.js.map +1 -1
- package/package.json +8 -8
- package/src/components/character.ce +1 -1
- package/src/components/scenes/draw-map.ce +3 -1
- package/dist/index.js.map +0 -1
|
@@ -1,38 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
document.head.appendChild(styleElement);
|
|
1
|
+
import { inject } from "../../../core/inject.js";
|
|
2
|
+
import { RpgClientEngine } from "../../../RpgClientEngine.js";
|
|
3
|
+
import { DOMContainer, DOMElement, DOMSprite, computed, cond, effect, h, loop, useDefineProps, useProps } from "canvasengine";
|
|
4
|
+
//#region src/components/gui/notification/notification.ce
|
|
5
|
+
if (typeof document !== "undefined" && !document.getElementById("ce-style--home-runner-work-RPG-JS-RPG-JS-packages-client-src-components-gui-notification-notification-ce")) {
|
|
6
|
+
const styleElement = document.createElement("style");
|
|
7
|
+
styleElement.id = "ce-style--home-runner-work-RPG-JS-RPG-JS-packages-client-src-components-gui-notification-notification-ce";
|
|
8
|
+
styleElement.textContent = ".notification {\n pointer-events: none !important;\n }";
|
|
9
|
+
document.head.appendChild(styleElement);
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
11
|
+
function component($$props) {
|
|
12
|
+
useProps($$props);
|
|
13
|
+
useDefineProps($$props);
|
|
14
|
+
var engine = inject(RpgClientEngine);
|
|
15
|
+
var notifications = computed(function() {
|
|
16
|
+
return engine.notificationManager.stack();
|
|
17
|
+
});
|
|
18
|
+
var iconSheet = function(iconId) {
|
|
19
|
+
return {
|
|
20
|
+
definition: engine.getSpriteSheet(iconId),
|
|
21
|
+
playing: "default"
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
effect(function() {
|
|
25
|
+
var list = notifications();
|
|
26
|
+
var rowHeight = 68;
|
|
27
|
+
list.forEach(function(notif, index) {
|
|
28
|
+
notif.layoutY.set(index * rowHeight);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
var notificationStyle = function(notif) {
|
|
32
|
+
return {
|
|
33
|
+
opacity: notif.opacity(),
|
|
34
|
+
transform: "translateY(".concat(notif.layoutY() + notif.offset(), "px)")
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
return h(DOMContainer, {
|
|
38
|
+
width: "100%",
|
|
39
|
+
height: "100%",
|
|
40
|
+
zIndex: 100,
|
|
41
|
+
attrs: { class: "notification" }
|
|
42
|
+
}, h(DOMElement, {
|
|
43
|
+
element: "div",
|
|
44
|
+
attrs: { class: "rpg-ui-notifications" }
|
|
45
|
+
}, loop(notifications, (notif, index) => h(DOMElement, {
|
|
46
|
+
element: "div",
|
|
47
|
+
attrs: {
|
|
48
|
+
class: "rpg-ui-notification",
|
|
49
|
+
"data-type": computed(() => notif.type || "info"),
|
|
50
|
+
style: computed(() => notificationStyle(notif))
|
|
51
|
+
}
|
|
52
|
+
}, [cond(notif.icon, () => h(DOMElement, {
|
|
53
|
+
element: "div",
|
|
54
|
+
attrs: { class: "rpg-ui-notification-icon" }
|
|
55
|
+
}, h(DOMSprite, { sheet: computed(() => iconSheet(notif.icon)) }))), h(DOMElement, {
|
|
56
|
+
element: "div",
|
|
57
|
+
attrs: { class: "rpg-ui-notification-message" },
|
|
58
|
+
textContent: notif.message
|
|
59
|
+
})]))));
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
37
62
|
export { component as default };
|
|
38
|
-
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=notification.ce.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.ce.js","sources":["../../../../src/components/gui/notification/notification.ce"],"sourcesContent":["<DOMContainer width=\"100%\" height=\"100%\" zIndex={100} class=\"notification\">\n <div class=\"rpg-ui-notifications\">\n @for ((notif,index) of notifications) {\n <div\n class=\"rpg-ui-notification\"\n data-type={notif.type || \"info\"}\n style={notificationStyle(notif)}\n >\n @if (notif.icon) {\n <div class=\"rpg-ui-notification-icon\">\n <DOMSprite sheet={iconSheet(notif.icon)} />\n </div>\n }\n <div class=\"rpg-ui-notification-message\">{notif.message}</div>\n </div>\n }\n </div>\n</DOMContainer>\n\n<style>\n .notification {\n pointer-events: none !important;\n }\n</style>\n\n<script>\n import { effect, computed } from \"canvasengine\";\n import { inject } from \"../../../core/inject\";\n import { RpgClientEngine } from \"../../../RpgClientEngine\";\n\n const engine = inject(RpgClientEngine);\n const notifications = computed(() => engine.notificationManager.stack());\n\n const iconSheet = (iconId) => ({\n definition: engine.getSpriteSheet(iconId),\n playing: \"default\"\n });\n\n effect(() => {\n const list = notifications();\n const rowHeight = 68;\n list.forEach((notif, index) => {\n notif.layoutY.set(index * rowHeight);\n });\n });\n\n const notificationStyle = (notif) => ({\n opacity: notif.opacity(),\n transform: `translateY(${notif.layoutY() + notif.offset()}px)`\n });\n</script>\n"],"
|
|
1
|
+
{"version":3,"file":"notification.ce.js","names":[],"sources":["../../../../src/components/gui/notification/notification.ce"],"sourcesContent":["<DOMContainer width=\"100%\" height=\"100%\" zIndex={100} class=\"notification\">\n <div class=\"rpg-ui-notifications\">\n @for ((notif,index) of notifications) {\n <div\n class=\"rpg-ui-notification\"\n data-type={notif.type || \"info\"}\n style={notificationStyle(notif)}\n >\n @if (notif.icon) {\n <div class=\"rpg-ui-notification-icon\">\n <DOMSprite sheet={iconSheet(notif.icon)} />\n </div>\n }\n <div class=\"rpg-ui-notification-message\">{notif.message}</div>\n </div>\n }\n </div>\n</DOMContainer>\n\n<style>\n .notification {\n pointer-events: none !important;\n }\n</style>\n\n<script>\n import { effect, computed } from \"canvasengine\";\n import { inject } from \"../../../core/inject\";\n import { RpgClientEngine } from \"../../../RpgClientEngine\";\n\n const engine = inject(RpgClientEngine);\n const notifications = computed(() => engine.notificationManager.stack());\n\n const iconSheet = (iconId) => ({\n definition: engine.getSpriteSheet(iconId),\n playing: \"default\"\n });\n\n effect(() => {\n const list = notifications();\n const rowHeight = 68;\n list.forEach((notif, index) => {\n notif.layoutY.set(index * rowHeight);\n });\n });\n\n const notificationStyle = (notif) => ({\n opacity: notif.opacity(),\n transform: `translateY(${notif.layoutY() + notif.offset()}px)`\n });\n</script>\n"],"mappings":";;;;AAUA,IAAI,OAAO,aAAa,eAAW,CAAK,SAAE,eAAsB,2GAAE,EAAA;CAChE,MAAM,eAAc,SAAG,cAAA,QAAA;AACvB,cAAa,KAAC;AACd,cAAa,cAAa;AAC1B,UAAS,KAAG,YAAG,aAAA;;AAGf,SAAY,UAAA,SAAA;;AAER,gBAAA,QAAA;CACD,IAAA,SAAa,OAAA,gBAAA;CAClB,IAAI,gBAAY,SAAa,WAAU;AAAA,SAAA,OAAA,oBAAA,OAAA;GAAA;CACvC,IAAI,YAAA,SAAA,QAAA;AAAA,SAAA;GACF,YAAK,OAAA,eAAA,OAAA;;GAEN;;AACD,QAAI,WAAe;EACf,IAAA,OAAS,eAAiB;EAC1B,IAAA,YAAS;;AAET,SAAM,QAAS,IAAO,QAAA,UAAgB;IACtC;;CAEJ,IAAI,oBAAmB,SAAW,OAAC;AAAA,SAAA;GAC/B,SAAI,MAAW,SAAQ;GACvB,WAAW,cAAU,OAAA,MAAA,SAAA,GAAA,MAAA,QAAA,EAAA,MAAA;GACxB;;AAEG,QAAA,EAAA,cAAA"}
|