1
0
forked from noxious/client

Restored tile editing and proper map clearing behavior

This commit is contained in:
2025-02-04 14:09:57 -06:00
parent cf54ab842a
commit aee18956f3
5 changed files with 21 additions and 20 deletions

View File

@ -40,12 +40,11 @@ function calculateObjectPlacement(mapObj: PlacedMapObject) : {x: number; y: numb
return {
x: position.worldPositionX - mapObj.mapObject.frameWidth/2,
y: position.worldPositionY - mapObj.mapObject.frameHeight + (config.tile_size.height * 1.5)
y: position.worldPositionY - mapObj.mapObject.frameHeight/2 + config.tile_size.height
}
}
onMounted(async () => {
await loadTexture(scene, {
loadTexture(scene, {
key: props.placedMapObject.mapObject.id,
data: '/textures/map_objects/' + props.placedMapObject.mapObject.id + '.png',
group: 'map_objects',
@ -55,5 +54,4 @@ onMounted(async () => {
} as TextureData).catch((error) => {
console.error('Error loading texture:', error)
})
})
</script>