forked from noxious/client
npm update, fixed character animation bug (maybe)
This commit is contained in:
parent
37c39bd336
commit
20015705c5
12
package-lock.json
generated
12
package-lock.json
generated
@ -3338,9 +3338,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.18",
|
"version": "1.5.19",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.18.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.19.tgz",
|
||||||
"integrity": "sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==",
|
"integrity": "sha512-kpLJJi3zxTR1U828P+LIUDZ5ohixyo68/IcYOHLqnbTPr/wdgn4i1ECvmALN9E16JPA6cvCG5UG79gVwVdEK5w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
@ -6836,9 +6836,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "5.4.3",
|
"version": "5.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.4.tgz",
|
||||||
"integrity": "sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==",
|
"integrity": "sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<Container v-if="props.character" :x="currentX" :y="currentY">
|
<Container v-if="props.character" :x="currentX" :y="currentY">
|
||||||
<!-- Start chat bubble -->
|
<!-- Start chat bubble -->
|
||||||
<!-- <RoundRectangle :origin-x="0.5" :origin-y="7.5" :fillColor="0xffffff" :width="194" :height="21" :radius="5" />-->
|
<RoundRectangle :origin-x="0.5" :origin-y="7.5" :fillColor="0xffffff" :width="194" :height="21" :radius="5" />
|
||||||
<!-- <Text @create="createText" :text="`This is a chat message 🤯👋`" :origin-x="0.5" :origin-y="10.9" :style="{ fontSize: 13, fontFamily: 'Arial', color: '#000' }" />-->
|
<Text @create="createText" :text="`This is a chat message 🤯👋`" :origin-x="0.5" :origin-y="10.9" :style="{ fontSize: 13, fontFamily: 'Arial', color: '#000' }" />
|
||||||
<!-- End chat bubble -->
|
<!-- End chat bubble -->
|
||||||
<Text @create="createText" :text="props.character.name" :origin-x="0.5" :origin-y="9" />
|
<Text @create="createText" :text="props.character.name" :origin-x="0.5" :origin-y="9" />
|
||||||
<RoundRectangle :origin-x="0.5" :origin-y="18.5" :fillColor="0xffffff" :width="74" :height="6" :radius="5" />
|
<RoundRectangle :origin-x="0.5" :origin-y="18.5" :fillColor="0xffffff" :width="74" :height="6" :radius="5" />
|
||||||
@ -56,16 +56,16 @@ const updatePosition = (x: number, y: number) => {
|
|||||||
/**
|
/**
|
||||||
* Teleport: No animation, only if the distance is greater than the tile size / 1.5
|
* Teleport: No animation, only if the distance is greater than the tile size / 1.5
|
||||||
*/
|
*/
|
||||||
// if (distance >= config.tile_size.x / 1.5) {
|
if (distance >= config.tile_size.x / 1.2) {
|
||||||
// // Teleport: No animation
|
// Teleport: No animation
|
||||||
// currentX.value = targetX
|
currentX.value = targetX
|
||||||
// currentY.value = targetY
|
currentY.value = targetY
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normal movement: Animate
|
* Normal movement: Animate
|
||||||
*/
|
*/
|
||||||
if (distance <= config.tile_size.x / 1.5) {
|
if (distance <= config.tile_size.x / 1.2) {
|
||||||
// Normal movement: Animate
|
// Normal movement: Animate
|
||||||
const duration = distance * 6 // Adjust this multiplier to control overall speed
|
const duration = distance * 6 // Adjust this multiplier to control overall speed
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user