npm run format

This commit is contained in:
Dennis Postma 2024-10-18 02:49:35 +02:00
parent 5cc1821922
commit 95dcf237cf
6 changed files with 68 additions and 72 deletions

View File

@ -1,10 +1,6 @@
<template> <template>
<SelectedZoneObject v-if="selectedZoneObject" :zoneObject="selectedZoneObject" @move="moveZoneObject" @rotate="rotateZoneObject" @delete="deleteZoneObject" /> <SelectedZoneObject v-if="selectedZoneObject" :zoneObject="selectedZoneObject" @move="moveZoneObject" @rotate="rotateZoneObject" @delete="deleteZoneObject" />
<Image <Image v-for="object in zoneEditorStore.zone?.zoneObjects" v-bind="getObjectImageProps(object)" @pointerup="() => (selectedZoneObject = object)" />
v-for="object in zoneEditorStore.zone?.zoneObjects"
v-bind="getObjectImageProps(object)"
@pointerup="() => selectedZoneObject = object"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -27,7 +23,7 @@ const props = defineProps<{
function getObjectImageProps(object: ZoneObject) { function getObjectImageProps(object: ZoneObject) {
return { return {
alpha: object.id === movingZoneObject.value?.id ? .5 : 1, alpha: object.id === movingZoneObject.value?.id ? 0.5 : 1,
depth: calculateIsometricDepth(object.positionX, object.positionY, object.object.frameWidth, object.object.frameHeight), depth: calculateIsometricDepth(object.positionX, object.positionY, object.object.frameWidth, object.object.frameHeight),
tint: selectedZoneObject.value?.id === object.id ? 0x00ff00 : 0xffffff, tint: selectedZoneObject.value?.id === object.id ? 0x00ff00 : 0xffffff,
x: tileToWorldX(props.tilemap, object.positionX, object.positionY), x: tileToWorldX(props.tilemap, object.positionX, object.positionY),