@rpgjs/client 5.0.0-alpha.4 → 5.0.0-alpha.5
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/components/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index12.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +80 -39
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +45 -186
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +187 -5
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +5 -383
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +384 -28
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +24 -17
- package/dist/index19.js.map +1 -1
- package/dist/index2.js +6 -6
- package/dist/index20.js +16 -2413
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +2395 -88
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +108 -103
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +95 -57
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +62 -12
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +17 -37
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +39 -3
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +1 -318
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +319 -22
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +22 -8
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +4 -4
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +8 -9
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +9 -4400
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +4394 -307
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +307 -165
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +56 -496
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +170 -87
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +496 -56
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +17 -17
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +17 -17
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +2 -2
- package/dist/index5.js +1 -1
- package/dist/index6.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index8.js +1 -1
- package/dist/index9.js +2 -2
- package/package.json +7 -5
- package/src/components/index.ts +2 -1
- package/src/components/scenes/draw-map.ce +0 -18
- package/src/components/scenes/event-layer.ce +1 -1
- package/vite.config.ts +1 -1
- package/src/components/scenes/element-map.ce +0 -23
package/dist/index38.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index38.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index38.js","sources":["../src/Game/Object.ts"],"sourcesContent":["import { RpgCommonPlayer } from \"@rpgjs/common\";\nimport { trigger, signal } from \"canvasengine\";\n\nexport abstract class RpgClientObject extends RpgCommonPlayer {\n abstract type: string;\n emitParticleTrigger = trigger()\n particleName = signal('')\n\n flash(color: string, duration: number = 100) {\n const lastTint = this.tint()\n this.tint.set(color);\n setTimeout(() => {\n this.tint.set(lastTint)\n }, duration)\n }\n} "],"names":[],"mappings":";;;AAGO,MAAe,wBAAwB,eAAgB,CAAA;AAAA,EAAvD,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEL,IAAA,IAAA,CAAA,mBAAA,GAAsB,OAAQ,EAAA;AAC9B,IAAA,IAAA,CAAA,YAAA,GAAe,OAAO,EAAE,CAAA;AAAA;AAAA,EAExB,KAAA,CAAM,KAAe,EAAA,QAAA,GAAmB,GAAK,EAAA;AAC3C,IAAM,MAAA,QAAA,GAAW,KAAK,IAAK,EAAA;AAC3B,IAAK,IAAA,CAAA,IAAA,CAAK,IAAI,KAAK,CAAA;AACnB,IAAA,UAAA,CAAW,MAAM;AACf,MAAK,IAAA,CAAA,IAAA,CAAK,IAAI,QAAQ,CAAA;AAAA,OACrB,QAAQ,CAAA;AAAA;AAEf;;;;"}
|
package/dist/index39.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { trigger, signal } from 'canvasengine';
|
|
1
|
+
import { useProps, useDefineProps, animatedSignal, h, Container, Rect, Text } from 'canvasengine';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
function component($$props) {
|
|
4
|
+
useProps($$props);
|
|
5
|
+
const defineProps = useDefineProps($$props);
|
|
6
|
+
var _a = defineProps(), text = _a.text, isSelected = _a.isSelected;
|
|
7
|
+
var alpha = animatedSignal(1, {
|
|
8
|
+
repeatType: "reverse",
|
|
9
|
+
duration: 500,
|
|
10
|
+
repeat: Infinity,
|
|
11
|
+
});
|
|
12
|
+
alpha.set(0.5);
|
|
13
|
+
var height = 40;
|
|
14
|
+
var width = 256;
|
|
15
|
+
let $this = h(Container, null, [h(Rect, { width, height, color: '#595971', alpha, visible: isSelected }), h(Container, { flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }, h(Text, { text, color: '#fff', fontSize: 18, margin: 10 }))]);
|
|
16
|
+
return $this
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { component as default };
|
|
20
20
|
//# sourceMappingURL=index39.js.map
|
package/dist/index39.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index39.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index39.js","sources":["../src/components/gui/dialogbox/itemMenu.ce"],"sourcesContent":["<Container>\n <Rect width height color=\"#595971\" alpha visible={isSelected} />\n <Container flexDirection=\"row\" alignItems=\"center\" justifyContent=\"center\">\n <Text text color=\"#fff\" fontSize={18} margin={10} />\n </Container>\n</Container>\n\n<script>\nimport { animatedSignal } from \"canvasengine\";\n\nconst { text, isSelected } = defineProps();\n\nconst alpha = animatedSignal(1, {\n repeatType: \"reverse\",\n duration: 500,\n repeat: Infinity,\n});\n\nalpha.set(0.5);\n\nconst height = 40;\nconst width = 256;\n</script>"],"names":[],"mappings":";;AAQqB,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,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU;AAC1E,IAAI,KAAK,GAAG,cAAc,CAAC,CAAC,EAAE;AAC9B,IAAI,UAAU,EAAE,SAAS;AACzB,IAAI,QAAQ,EAAE,GAAG;AACjB,IAAI,MAAM,EAAE,QAAQ;AACpB,CAAC,CAAC;AACF,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACd,IAAI,MAAM,GAAG,EAAE;AACf,IAAI,KAAK,GAAG,GAAG;AACf,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AACrQ,QAAQ,OAAO;AACf;;;;"}
|
package/dist/index4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { connectionRoom } from './
|
|
1
|
+
import { connectionRoom } from './index22.js';
|
|
2
2
|
import { RpgGui } from './index9.js';
|
|
3
3
|
import { RpgClientEngine } from './index2.js';
|
|
4
|
-
import { WebSocketToken, AbstractWebsocket } from './
|
|
4
|
+
import { WebSocketToken, AbstractWebsocket } from './index17.js';
|
|
5
5
|
import { UpdateMapToken, UpdateMapService } from '@rpgjs/common';
|
|
6
6
|
|
|
7
7
|
class BridgeWebsocket extends AbstractWebsocket {
|
package/dist/index5.js
CHANGED
package/dist/index6.js
CHANGED
package/dist/index7.js
CHANGED
package/dist/index8.js
CHANGED
package/dist/index9.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject } from './
|
|
1
|
+
import { inject } from './index16.js';
|
|
2
2
|
import { signal } from 'canvasengine';
|
|
3
|
-
import { WebSocketToken } from './
|
|
3
|
+
import { WebSocketToken } from './index17.js';
|
|
4
4
|
import { PrebuiltGui } from './index10.js';
|
|
5
5
|
|
|
6
6
|
const throwError = (id) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgjs/client",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.5",
|
|
4
4
|
"description": "RPGJS is a framework for creating RPG/MMORPG games",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,14 +16,16 @@
|
|
|
16
16
|
],
|
|
17
17
|
"author": "Samuel Ronce",
|
|
18
18
|
"license": "MIT",
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"canvasengine": "^2.0.0-beta.22",
|
|
21
|
+
"@canvasengine/presets": "^2.0.0-beta.22",
|
|
22
|
+
"pixi.js": "^8.9.2"
|
|
23
|
+
},
|
|
19
24
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@rpgjs/common": "5.0.0-alpha.4",
|
|
25
|
+
"@rpgjs/common": "5.0.0-alpha.5",
|
|
22
26
|
"@signe/di": "^2.3.3",
|
|
23
27
|
"@signe/room": "^2.3.3",
|
|
24
28
|
"@signe/sync": "^2.3.3",
|
|
25
|
-
"canvasengine": "2.0.0-beta.22",
|
|
26
|
-
"pixi.js": "^8.10.1",
|
|
27
29
|
"rxjs": "^7.8.2"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
package/src/components/index.ts
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
<Container sound={backgroundMusic} >
|
|
2
2
|
<Container sound={backgroundAmbientSound} />
|
|
3
3
|
|
|
4
|
-
<!-- <Sprite image={map.@fullImage} scale /> -->
|
|
5
|
-
|
|
6
4
|
<sceneComponent() data={map.@data} />
|
|
7
5
|
|
|
8
|
-
<!-- <Container sortableChildren={true}>
|
|
9
|
-
@for (obj of middleLayer) {
|
|
10
|
-
<ElementMap ...obj image={map.@gridImage} scale />
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@for ((event,id) of events) {
|
|
14
|
-
<Character id={id} object={event} isMe={false} />
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@for ((player,id) of players) {
|
|
18
|
-
<Character id={id} object={player} isMe={true} />
|
|
19
|
-
}
|
|
20
|
-
</Container> -->
|
|
21
|
-
|
|
22
6
|
@for (effect of effects) {
|
|
23
7
|
<Container>
|
|
24
8
|
@for (animation of effect.current) {
|
|
@@ -43,8 +27,6 @@
|
|
|
43
27
|
const backgroundAmbientSound = { src: mapParams?.backgroundAmbientSound, autoplay: true, loop: true }
|
|
44
28
|
|
|
45
29
|
const data = signal(map().data)
|
|
46
|
-
// const middleLayer = computed(() => data().filter(obj => obj.layer === 1))
|
|
47
|
-
// const topLayer = computed(() => data().filter(obj => obj.layer === 2))
|
|
48
30
|
|
|
49
31
|
const scale = mapParams?.scale || 1
|
|
50
32
|
const worldWidth = (mapParams?.width || 2048) * scale
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</Container>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
|
-
import { effect, signal
|
|
12
|
+
import { effect, signal } from 'canvasengine'
|
|
13
13
|
import { inject } from "../../core/inject";
|
|
14
14
|
import { RpgClientEngine } from "../../RpgClientEngine";
|
|
15
15
|
import Character from "../character.ce";
|
package/vite.config.ts
CHANGED
|
@@ -24,7 +24,7 @@ export default defineConfig({
|
|
|
24
24
|
fileName: 'index'
|
|
25
25
|
},
|
|
26
26
|
rollupOptions: {
|
|
27
|
-
external: [/@rpgjs/, 'esbuild', 'canvasengine', '@canvasengine/presets', 'rxjs'],
|
|
27
|
+
external: [/@rpgjs/, 'esbuild', 'canvasengine', '@canvasengine/presets', 'rxjs', 'pixi.js'],
|
|
28
28
|
output: {
|
|
29
29
|
preserveModules: true,
|
|
30
30
|
preserveModulesRoot: 'src'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<Sprite image rectangle x y zIndex />
|
|
2
|
-
|
|
3
|
-
<script>
|
|
4
|
-
const {
|
|
5
|
-
image,
|
|
6
|
-
rect,
|
|
7
|
-
drawIn,
|
|
8
|
-
id,
|
|
9
|
-
} = defineProps()
|
|
10
|
-
|
|
11
|
-
const rectangle = {
|
|
12
|
-
x: rect[0],
|
|
13
|
-
y: rect[1],
|
|
14
|
-
width: rect[2],
|
|
15
|
-
height: rect[3]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const x = drawIn[0]
|
|
19
|
-
const y = drawIn[1]
|
|
20
|
-
|
|
21
|
-
const zIndex = y + rectangle.height
|
|
22
|
-
</script>
|
|
23
|
-
|