1
0
forked from noxious/client

npm update, fixed character animation bug (maybe)

This commit is contained in:
Dennis Postma 2024-09-11 14:18:26 +02:00
parent 37c39bd336
commit 20015705c5
2 changed files with 14 additions and 14 deletions

12
package-lock.json generated
View File

@ -3338,9 +3338,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.18",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.18.tgz",
"integrity": "sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==",
"version": "1.5.19",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.19.tgz",
"integrity": "sha512-kpLJJi3zxTR1U828P+LIUDZ5ohixyo68/IcYOHLqnbTPr/wdgn4i1ECvmALN9E16JPA6cvCG5UG79gVwVdEK5w==",
"dev": true,
"license": "ISC"
},
@ -6836,9 +6836,9 @@
"license": "MIT"
},
"node_modules/vite": {
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz",
"integrity": "sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==",
"version": "5.4.4",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.4.tgz",
"integrity": "sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==",
"dev": true,
"license": "MIT",
"dependencies": {

View File

@ -1,8 +1,8 @@
<template>
<Container v-if="props.character" :x="currentX" :y="currentY">
<!-- Start chat bubble -->
<!-- <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' }" />-->
<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' }" />
<!-- End chat bubble -->
<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" />
@ -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
*/
// if (distance >= config.tile_size.x / 1.5) {
// // Teleport: No animation
// currentX.value = targetX
// currentY.value = targetY
// }
if (distance >= config.tile_size.x / 1.2) {
// Teleport: No animation
currentX.value = targetX
currentY.value = targetY
}
/**
* Normal movement: Animate
*/
if (distance <= config.tile_size.x / 1.5) {
if (distance <= config.tile_size.x / 1.2) {
// Normal movement: Animate
const duration = distance * 6 // Adjust this multiplier to control overall speed