Depth sorting fix for larger objects

This commit is contained in:
2024-09-15 20:44:06 +02:00
parent ed3955db17
commit f8d3cd1f48
5 changed files with 21 additions and 92 deletions

View File

@ -1,5 +1,5 @@
<template>
<Image v-for="object in zoneStore.zone?.zoneObjects" :depth="calculateIsometricDepth(object.positionX, object.positionY, 0)" :key="object.id" v-bind="getObjectImageProps(object)" />
<Image v-for="object in zoneStore.zone?.zoneObjects" :depth="calculateIsometricDepth(object.positionX, object.positionY, object.object.frameWidth, object.object.frameHeight)" :key="object.id" v-bind="getObjectImageProps(object)" />
</template>
<script setup lang="ts">
@ -7,7 +7,6 @@ import { calculateIsometricDepth, tileToWorldX, tileToWorldY } from '@/services/
import { Image } from 'phavuer'
import { useZoneStore } from '@/stores/zone'
import type { ZoneObject } from '@/types'
import { storeToRefs } from 'pinia'
const zoneStore = useZoneStore()