@rpgjs/client 5.0.0-alpha.10 → 5.0.0-alpha.3
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 +9 -0
- 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 +85 -4397
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +55 -310
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +15 -169
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +15 -496
- package/dist/index38.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/index39.js +0 -61
- package/dist/index39.js.map +0 -1
- 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/index22.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index22.js","sources":["
|
|
1
|
+
{"version":3,"file":"index22.js","sources":["../src/components/gui/dialogbox/index.ce"],"sourcesContent":["<Container justifyContent=\"center\" alignItems=\"center\" width=\"100%\" height=\"100%\">\n <Container\n ref=\"dialogbox\"\n scale={{ x: scaleX }}\n anchor={[0.5, 0.5]}\n width={700}\n height\n controls\n positionType=\"absolute\"\n bottom={10}\n >\n <Rect width={700} height={250} color=\"#1a1a2e\" />\n <Rect\n x={0}\n y={0}\n width={700}\n height\n color=\"#1a1a2e\"\n alpha={0.9}\n borderRadius={10}\n border\n shadow\n />\n <Container\n flexDirection=\"row\"\n width={700}\n height\n alpha={contentOpacity}\n >\n <Container flexDirection=\"column\">\n <Text\n text\n color=\"#fff\"\n fontSize={18}\n margin={40}\n typewriter\n style={textStyle}\n />\n @if (visibleSelection) {\n <Selection selectedIndex={0} items={choices} onSelect />\n }\n </Container>\n </Container>\n</Container> \n\n \n</Container>\n<script>\n import Selection from './selection.ce'\n\n import {\n animatedSignal,\n computed,\n effect,\n signal,\n trigger,\n mount\n } from \"canvasengine\";\n\n import { inject } from \"../../../core/inject\";\n import { RpgClientEngine } from \"../../../RpgClientEngine\";\n\n const {\n message,\n choices: _choices,\n onFinish,\n onInteraction\n } = defineProps();\n\n const client = inject(RpgClientEngine);\n const keyboardControls = client.globalConfig.keyboardControls;\n\n client.stopProcessingInput = true;\n let isDestroyed = false;\n\n const texts = [message()]\n const height = signal(250);\n const isTextCompleted = signal(false);\n\n const drawSpeaker = (g) => {\n g.beginFill(0xffa500); // Orange color\n g.lineStyle(2, 0x000000); // Black border\n g.moveTo(0, 0);\n g.lineTo(70, 0);\n g.lineTo(80, 15);\n g.lineTo(70, 30);\n g.lineTo(0, 30);\n g.lineTo(0, 0);\n g.endFill();\n };\n\n const border = signal({ width: 5, color: \"#595971\" });\n const shadow = signal({ color: \"#000\", blur: 10, offsetX: 10, offsetY: 10 });\n\n const contentOpacity = animatedSignal(0, {\n duration: 1000,\n });\n\n const scaleX = animatedSignal(0, {\n duration: 500,\n });\n\n scaleX.set(1);\n contentOpacity.set(1);\n\n const currentTextIndex = signal(0);\n const currentText = computed(() => texts?.[currentTextIndex()] ?? '');\n const isChoiceDisplayed = signal(false);\n\n const text = computed(() => {\n const current = currentText();\n return typeof current === \"string\" ? current : current.text;\n });\n\n const choices = computed(() => {\n //const current = currentText();\n //return typeof current === \"string\" ? null : current.choices;\n return _choices;\n });\n\n const visibleSelection = computed(() => isChoiceDisplayed() && choices().length != 0)\n\n const triggerSkip = trigger();\n\n const typewriter = {\n speed: 0.3,\n skip: triggerSkip,\n onComplete: () => {\n isTextCompleted.set(true);\n }\n }\n\n const textStyle = {\n wordWrap: true,\n wordWrapWidth: 700 - 256 - 80\n }\n\n const face = signal({ x: 0, y: 0, width: 256, height: 256 });\n\n mount((element) => {\n const [dialogbox] = element.props.children\n return () => {\n dialogbox.directives.controls.onDestroy()\n isDestroyed = true;\n // Wait destroy is finished before start processing input\n setTimeout(() => {\n client.stopProcessingInput = false;\n }, 500)\n }\n })\n\n const controls = signal({\n next: {\n bind: keyboardControls.action,\n keyDown(e) {\n if (isDestroyed) return;\n if (isChoiceDisplayed()) {\n // If choices are displayed, do nothing (wait for selection)\n return;\n }\n\n // If text is still typing, just skip (fast forward) the animation\n if (!isTextCompleted()) {\n triggerSkip.start();\n isTextCompleted.set(true);\n }\n else {\n const isFinished = currentTextIndex() === texts.length - 1;\n currentTextIndex.update((index) => {\n if (index < texts.length - 1) {\n return index + 1;\n }\n return index;\n });\n isChoiceDisplayed.set(false);\n isTextCompleted.set(false);\n if (isFinished && onFinish) {\n onFinish();\n } \n }\n },\n },\n });\n\n const onSelect = (index) => {\n onFinish(index);\n }\n \n effect(() => {\n if (choices().length != 0) {\n isChoiceDisplayed.set(true);\n }\n });\n</script>"],"names":["Selection"],"mappings":";;;;;AAWqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAW,IAAC,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAiB,EAAE,CAAC;AACxH,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AACpC,IAAI,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,gBAAgB;AAC3D,MAAM,CAAC,mBAAmB,GAAG,IAAI;AACjC,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC;AACvB,IAAI,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC;AACxB,IAAI,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC;AAYnC,IAAI,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AACnD,IAAI,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC1E,IAAI,cAAc,GAAG,cAAc,CAAC,CAAC,EAAE;AACvC,IAAI,QAAQ,EAAE,IAAI;AAClB,CAAC,CAAC;AACF,IAAI,MAAM,GAAG,cAAc,CAAC,CAAC,EAAE;AAC/B,IAAI,QAAQ,EAAE,GAAG;AACjB,CAAC,CAAC;A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KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAACA,WAAS,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjuB,QAAQ,OAAO;AACf;;;;"}
|
package/dist/index23.js
CHANGED
|
@@ -1,107 +1,69 @@
|
|
|
1
|
-
import { useProps, useDefineProps,
|
|
2
|
-
import
|
|
3
|
-
import { inject } from './index6.js';
|
|
4
|
-
import { RpgClientEngine } from './index2.js';
|
|
1
|
+
import { useProps, useDefineProps, animatedSignal, signal, mount, tick, h, Text } from 'canvasengine';
|
|
2
|
+
import { Direction } from '@rpgjs/common';
|
|
5
3
|
|
|
6
4
|
function component($$props) {
|
|
7
5
|
useProps($$props);
|
|
8
6
|
const defineProps = useDefineProps($$props);
|
|
9
|
-
var _a = defineProps(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var height = signal(250);
|
|
16
|
-
var isTextCompleted = signal(false);
|
|
17
|
-
var border = signal({ width: 5, color: "#595971" });
|
|
18
|
-
var shadow = signal({ color: "#000", blur: 10, offsetX: 10, offsetY: 10 });
|
|
19
|
-
var contentOpacity = animatedSignal(0, {
|
|
20
|
-
duration: 1000,
|
|
21
|
-
});
|
|
22
|
-
var scaleX = animatedSignal(0, {
|
|
23
|
-
duration: 500,
|
|
24
|
-
});
|
|
25
|
-
scaleX.set(1);
|
|
26
|
-
contentOpacity.set(1);
|
|
27
|
-
var currentTextIndex = signal(0);
|
|
28
|
-
var currentText = computed(function () { var _a; return (_a = texts === null || texts === void 0 ? void 0 : texts[currentTextIndex()]) !== null && _a !== void 0 ? _a : ''; });
|
|
29
|
-
var isChoiceDisplayed = signal(false);
|
|
30
|
-
var text = computed(function () {
|
|
31
|
-
var current = currentText();
|
|
32
|
-
return typeof current === "string" ? current : current.text;
|
|
33
|
-
});
|
|
34
|
-
var choices = computed(function () {
|
|
35
|
-
//const current = currentText();
|
|
36
|
-
//return typeof current === "string" ? null : current.choices;
|
|
37
|
-
return _choices;
|
|
38
|
-
});
|
|
39
|
-
var visibleSelection = computed(function () { return isChoiceDisplayed() && choices().length != 0; });
|
|
40
|
-
var triggerSkip = trigger();
|
|
41
|
-
var typewriter = {
|
|
42
|
-
speed: 0.3,
|
|
43
|
-
skip: triggerSkip,
|
|
44
|
-
onComplete: function () {
|
|
45
|
-
isTextCompleted.set(true);
|
|
7
|
+
var _a = defineProps({
|
|
8
|
+
duration: {
|
|
9
|
+
default: 1000
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
default: 'black'
|
|
46
13
|
}
|
|
47
|
-
};
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
wordWrapWidth: 700 - 256 - 80
|
|
51
|
-
};
|
|
52
|
-
signal({ x: 0, y: 0, width: 256, height: 256 });
|
|
53
|
-
mount(function (element) {
|
|
54
|
-
var dialogbox = element.props.children[0];
|
|
55
|
-
return function () {
|
|
56
|
-
dialogbox.directives.controls.onDestroy();
|
|
57
|
-
isDestroyed = true;
|
|
58
|
-
// Wait destroy is finished before start processing input
|
|
59
|
-
setTimeout(function () {
|
|
60
|
-
client.stopProcessingInput = false;
|
|
61
|
-
}, 500);
|
|
62
|
-
};
|
|
14
|
+
}), text = _a.text, direction = _a.direction, onFinish = _a.onFinish, duration = _a.duration, color = _a.color, positionX = _a.x, positionY = _a.y;
|
|
15
|
+
var scale = animatedSignal(1, {
|
|
16
|
+
duration: duration(),
|
|
63
17
|
});
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
},
|
|
18
|
+
var randomPosition = function () { return Math.floor(Math.random() * 60); };
|
|
19
|
+
var initialY = randomPosition();
|
|
20
|
+
var x = signal(positionX());
|
|
21
|
+
var y = signal(positionY() - initialY);
|
|
22
|
+
var velocityX = 0;
|
|
23
|
+
var velocityY = 0;
|
|
24
|
+
var speed = 200;
|
|
25
|
+
switch (direction()) {
|
|
26
|
+
case Direction.Left:
|
|
27
|
+
velocityX = speed;
|
|
28
|
+
break;
|
|
29
|
+
case Direction.Right:
|
|
30
|
+
velocityX = -200;
|
|
31
|
+
break;
|
|
32
|
+
case Direction.Up:
|
|
33
|
+
velocityY = speed;
|
|
34
|
+
break;
|
|
35
|
+
case Direction.Down:
|
|
36
|
+
velocityY = -200;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
velocityX += (Math.random() - 0.5) * 100;
|
|
40
|
+
velocityY += (Math.random() - 0.5) * 100;
|
|
41
|
+
var gravity = 500;
|
|
42
|
+
var deceleration = 0.98;
|
|
43
|
+
mount(function () {
|
|
44
|
+
scale.set(0.1);
|
|
95
45
|
});
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (
|
|
101
|
-
|
|
46
|
+
var elapsedTime = 0;
|
|
47
|
+
tick(function (_a) {
|
|
48
|
+
var deltaTime = _a.deltaTime;
|
|
49
|
+
elapsedTime += deltaTime;
|
|
50
|
+
if (elapsedTime < duration()) {
|
|
51
|
+
// Update position
|
|
52
|
+
x.update(function (x) { return x + (velocityX * deltaTime) / 1000; });
|
|
53
|
+
y.update(function (y) { return y + (velocityY * deltaTime) / 1000; });
|
|
54
|
+
// Apply gravity
|
|
55
|
+
velocityY += (gravity * deltaTime) / 1000;
|
|
56
|
+
// Apply deceleration
|
|
57
|
+
velocityX *= deceleration;
|
|
58
|
+
velocityY *= deceleration;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
if (onFinish) {
|
|
62
|
+
onFinish();
|
|
63
|
+
}
|
|
102
64
|
}
|
|
103
65
|
});
|
|
104
|
-
let $this = h(
|
|
66
|
+
let $this = h(Text, { x, y, zIndex: 10000, color, scale, size: 30, text });
|
|
105
67
|
return $this
|
|
106
68
|
}
|
|
107
69
|
|
package/dist/index23.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index23.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index23.js","sources":["../src/components/effects/hit.ce"],"sourcesContent":["<Text x y zIndex={10000} color scale size={30} text />\n\n<script>\n import { animatedSignal, mount, signal, tick } from \"canvasengine\";\n import { Direction } from \"@rpgjs/common\";\n const {\n text,\n direction,\n onFinish,\n duration,\n color,\n x: positionX,\n y: positionY\n } = defineProps({\n duration: {\n default: 1000\n },\n color: {\n default: 'black'\n }\n });\n\n const scale = animatedSignal(1, {\n duration: duration(),\n });\n\n // Generate random initial position\n const randomPosition = () => Math.floor(Math.random() * 60);\n const initialY = randomPosition();\n const x = signal(positionX());\n const y = signal(positionY() - initialY);\n\n // Initial velocity\n let velocityX = 0;\n let velocityY = 0;\n\n // Set initial velocity based on direction\n const speed = 200;\n switch (direction()) {\n case Direction.Left:\n velocityX = speed;\n break;\n case Direction.Right:\n velocityX = -speed;\n break;\n case Direction.Up:\n velocityY = speed;\n break;\n case Direction.Down:\n velocityY = -speed;\n break;\n }\n\n // Add some randomness to the velocity\n velocityX += (Math.random() - 0.5) * 100;\n velocityY += (Math.random() - 0.5) * 100;\n\n const gravity = 500; // Gravity effect\n const deceleration = 0.98; // Deceleration factor\n\n mount(() => {\n scale.set(0.1);\n });\n\n let elapsedTime = 0;\n\n tick(({ deltaTime }) => {\n elapsedTime += deltaTime;\n \n if (elapsedTime < duration()) {\n // Update position\n x.update((x) => x + (velocityX * deltaTime) / 1000);\n y.update((y) => y + (velocityY * deltaTime) / 1000);\n\n // Apply gravity\n velocityY += (gravity * deltaTime) / 1000;\n\n // Apply deceleration\n velocityX *= deceleration;\n velocityY *= deceleration;\n } else {\n if (onFinish) {\n onFinish();\n }\n }\n });\n</script>\n"],"names":[],"mappings":";;;AAOqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,EAAE,GAAG,WAAW,CAAC;AAC7B,IAAI,QAAQ,EAAE;AACd,QAAQ,OAAO,EAAE;AACjB,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,OAAO,EAAE;AACjB;AACA,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC;AAClJ,IAAI,KAAK,GAAG,cAAc,CAAC,CAAC,EAAE;AAC9B,IAAI,QAAQ,EAAE,QAAQ,EAAE;AACxB,CAAC,CAAC;AACF,IAAI,cAAc,GAAG,YAAY,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAA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AAI,CAAC,EAAE,CAAC;AAC7E,QAAQ,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC;AAC7E;AACA,QAAQ,SAAS,IAAI,CAAC,OAAO,GAAG,SAAS,IAAI,IAAI;AACjD;AACA,QAAQ,SAAS,IAAI,YAAY;AACjC,QAAQ,SAAS,IAAI,YAAY;AACjC;AACA,SAAS;AACT,QAAQ,IAAI,QAAQ,EAAE;AACtB,YAAY,QAAQ,EAAE;AACtB;AACA;AACA,CAAC,CAAC;AACF,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE;AACjF,QAAQ,OAAO;AACf;;;;"}
|
package/dist/index24.js
CHANGED
|
@@ -1,69 +1,19 @@
|
|
|
1
|
-
import { useProps, useDefineProps,
|
|
2
|
-
import {
|
|
1
|
+
import { useProps, useDefineProps, h, Sprite } from 'canvasengine';
|
|
2
|
+
import { RpgClientEngine } from './index2.js';
|
|
3
|
+
import { inject } from './index6.js';
|
|
3
4
|
|
|
4
5
|
function component($$props) {
|
|
5
6
|
useProps($$props);
|
|
6
7
|
const defineProps = useDefineProps($$props);
|
|
7
|
-
var _a = defineProps(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
duration: duration(),
|
|
17
|
-
});
|
|
18
|
-
var randomPosition = function () { return Math.floor(Math.random() * 60); };
|
|
19
|
-
var initialY = randomPosition();
|
|
20
|
-
var x = signal(positionX());
|
|
21
|
-
var y = signal(positionY() - initialY);
|
|
22
|
-
var velocityX = 0;
|
|
23
|
-
var velocityY = 0;
|
|
24
|
-
var speed = 200;
|
|
25
|
-
switch (direction()) {
|
|
26
|
-
case Direction.Left:
|
|
27
|
-
velocityX = speed;
|
|
28
|
-
break;
|
|
29
|
-
case Direction.Right:
|
|
30
|
-
velocityX = -200;
|
|
31
|
-
break;
|
|
32
|
-
case Direction.Up:
|
|
33
|
-
velocityY = speed;
|
|
34
|
-
break;
|
|
35
|
-
case Direction.Down:
|
|
36
|
-
velocityY = -200;
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
velocityX += (Math.random() - 0.5) * 100;
|
|
40
|
-
velocityY += (Math.random() - 0.5) * 100;
|
|
41
|
-
var gravity = 500;
|
|
42
|
-
var deceleration = 0.98;
|
|
43
|
-
mount(function () {
|
|
44
|
-
scale.set(0.1);
|
|
45
|
-
});
|
|
46
|
-
var elapsedTime = 0;
|
|
47
|
-
tick(function (_a) {
|
|
48
|
-
var deltaTime = _a.deltaTime;
|
|
49
|
-
elapsedTime += deltaTime;
|
|
50
|
-
if (elapsedTime < duration()) {
|
|
51
|
-
// Update position
|
|
52
|
-
x.update(function (x) { return x + (velocityX * deltaTime) / 1000; });
|
|
53
|
-
y.update(function (y) { return y + (velocityY * deltaTime) / 1000; });
|
|
54
|
-
// Apply gravity
|
|
55
|
-
velocityY += (gravity * deltaTime) / 1000;
|
|
56
|
-
// Apply deceleration
|
|
57
|
-
velocityX *= deceleration;
|
|
58
|
-
velocityY *= deceleration;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
if (onFinish) {
|
|
62
|
-
onFinish();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
let $this = h(Text, { x, y, zIndex: 10000, color, scale, size: 30, text });
|
|
8
|
+
var _a = defineProps(), x = _a.x, y = _a.y, name = _a.name, onFinish = _a.onFinish;
|
|
9
|
+
var client = inject(RpgClientEngine);
|
|
10
|
+
var spritesheets = client.spritesheets;
|
|
11
|
+
var sheet = {
|
|
12
|
+
definition: spritesheets.get(name()),
|
|
13
|
+
playing: 'default',
|
|
14
|
+
onFinish: onFinish
|
|
15
|
+
};
|
|
16
|
+
let $this = h(Sprite, { sheet, x, y, anchor: 0.5 });
|
|
67
17
|
return $this
|
|
68
18
|
}
|
|
69
19
|
|
package/dist/index24.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index24.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index24.js","sources":["../src/components/effects/animation.ce"],"sourcesContent":["<Sprite sheet x y anchor={0.5} />\n\n<script>\n import { signal } from \"canvasengine\";\n import { RpgClientEngine } from \"../../RpgClientEngine\";\n import { inject } from \"../../core/inject\";\n\n const { x, y, name, onFinish } = defineProps();\n\n const client = inject(RpgClientEngine);\n const spritesheets = client.spritesheets;\n\n const sheet = {\n definition: spritesheets.get(name()),\n playing: 'default',\n onFinish\n };\n\n</script>\n"],"names":[],"mappings":";;;;AAOqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,EAAE,GAAG,WAAW,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ;AAC1F,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AACpC,IAAI,YAAY,GAAG,MAAM,CAAC,YAAY;AACtC,IAAI,KAAK,GAAG;AACZ,IAAI,UAAU,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AACxC,IAAI,OAAO,EAAE,SAAS;AACtB,IAAI,QAAQ,EAAE;AACd,CAAC;AACD,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;AAC1D,QAAQ,OAAO;AACf;;;;"}
|
package/dist/index25.js
CHANGED
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RpgClientEngine } from './index2.js';
|
|
3
|
-
import { inject } from './index6.js';
|
|
1
|
+
import { Animation, Direction } from '@rpgjs/common';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
const RMSpritesheet = (framesWidth, framesHeight, frameStand = 1) => {
|
|
4
|
+
if (framesWidth <= frameStand) {
|
|
5
|
+
frameStand = framesWidth - 1;
|
|
6
|
+
}
|
|
7
|
+
const frameY = (direction) => {
|
|
8
|
+
const gap = Math.max(4 - framesHeight, 0);
|
|
9
|
+
return {
|
|
10
|
+
[Direction.Down]: 0,
|
|
11
|
+
[Direction.Left]: Math.max(0, 1 - gap),
|
|
12
|
+
[Direction.Right]: Math.max(0, 2 - gap),
|
|
13
|
+
[Direction.Up]: Math.max(0, 3 - gap)
|
|
14
|
+
}[direction];
|
|
15
|
+
};
|
|
16
|
+
const stand = (direction) => [{ time: 0, frameX: frameStand, frameY: frameY(direction) }];
|
|
17
|
+
const walk = (direction) => {
|
|
18
|
+
const array = [];
|
|
19
|
+
const durationFrame = 10;
|
|
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)]
|
|
19
33
|
}
|
|
34
|
+
},
|
|
35
|
+
framesHeight,
|
|
36
|
+
framesWidth
|
|
37
|
+
};
|
|
38
|
+
};
|
|
20
39
|
|
|
21
|
-
export {
|
|
40
|
+
export { RMSpritesheet };
|
|
22
41
|
//# sourceMappingURL=index25.js.map
|
package/dist/index25.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index25.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index25.js","sources":["../src/presets/rmspritesheet.ts"],"sourcesContent":["import { Direction, Animation } from '@rpgjs/common'\n\nexport const RMSpritesheet = (framesWidth: number, framesHeight: number, frameStand: number = 1) => {\n\n if (framesWidth <= frameStand) {\n frameStand = framesWidth - 1\n }\n\n const frameY = direction => {\n const gap = Math.max(4 - framesHeight, 0)\n return {\n [Direction.Down]: 0,\n [Direction.Left]: Math.max(0, 1 - gap),\n [Direction.Right]: Math.max(0, 2 - gap),\n [Direction.Up]: Math.max(0, 3 - gap)\n }[direction]\n }\n\n const stand = (direction: number) => [{ time: 0, frameX: frameStand, frameY: frameY(direction) }]\n const walk = direction => {\n const array: any = []\n const durationFrame = 10\n for (let i = 0; i < framesWidth; i++) {\n array.push({ time: i * durationFrame, frameX: i, frameY: frameY(direction) })\n }\n array.push({ time: array[array.length - 1].time + durationFrame })\n return array\n }\n\n return {\n textures: {\n [Animation.Stand]: {\n animations: ({direction}) => [stand(direction)]\n },\n [Animation.Walk]: {\n animations: ({direction}) => [walk(direction)]\n }\n },\n framesHeight,\n framesWidth\n }\n}"],"names":[],"mappings":";;AAEO,MAAM,aAAgB,GAAA,CAAC,WAAqB,EAAA,YAAA,EAAsB,aAAqB,CAAM,KAAA;AAEhG,EAAA,IAAI,eAAe,UAAY,EAAA;AAC3B,IAAA,UAAA,GAAa,WAAc,GAAA,CAAA;AAAA;AAG/B,EAAA,MAAM,SAAS,CAAa,SAAA,KAAA;AACxB,IAAA,MAAM,GAAM,GAAA,IAA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CAAC;AAAA,OAClD;AAAA,MACA,CAAC,SAAU,CAAA,IAAI,GAAG;AAAA,QACd,UAAA,EAAY,CAAC,EAAC,SAAA,OAAe,CAAC,IAAA,CAAK,SAAS,CAAC;AAAA;AACjD,KACJ;AAAA,IACA,YAAA;AAAA,IACA;AAAA,GACJ;AACJ;;;;"}
|
package/dist/index26.js
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
for (let y = 0; y < framesHeight; y++) {
|
|
4
|
-
for (let x = 0; x < framesWidth; x++) {
|
|
5
|
-
const frameIndex = y * framesWidth + x;
|
|
6
|
-
animations.push({
|
|
7
|
-
time: frameIndex * 10,
|
|
8
|
-
frameX: x,
|
|
9
|
-
frameY: y
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
framesWidth,
|
|
15
|
-
framesHeight,
|
|
16
|
-
textures: {
|
|
17
|
-
default: {
|
|
18
|
-
animations: () => [
|
|
19
|
-
animations
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
};
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
25
3
|
|
|
26
|
-
export {
|
|
4
|
+
export { __name };
|
|
27
5
|
//# sourceMappingURL=index26.js.map
|
package/dist/index26.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index26.js","sources":["
|
|
1
|
+
{"version":3,"file":"index26.js","sources":["../../../node_modules/.pnpm/@signe+sync@2.3.3/node_modules/@signe/sync/dist/chunk-7QVYU63E.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\nexport {\n __name\n};\n//# sourceMappingURL=chunk-7QVYU63E.js.map"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc;AAClC,IAAC,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE;;;;","x_google_ignoreList":[0]}
|