1
0
forked from noxious/client

npm run format, moved some files for improved file structure, removed redundant logic

This commit is contained in:
2025-02-05 00:19:55 +01:00
parent aee18956f3
commit 2b40741ca7
26 changed files with 218 additions and 238 deletions

View File

@ -3,13 +3,13 @@
</template>
<script setup lang="ts">
import type { UUID } from '@/application/types'
import Controls from '@/components/utilities/Controls.vue'
import { createTileMap, createTileLayer, loadMapTilesIntoScene, setLayerTiles } from '@/composables/mapComposable'
import { createTileLayer, createTileMap, loadTileTexturesFromMapTileArray, setLayerTiles } from '@/services/mapService'
import { MapStorage } from '@/storage/storages'
import { useMapStore } from '@/stores/mapStore'
import { useScene } from 'phavuer'
import { onBeforeUnmount, shallowRef } from 'vue'
import type { UUID } from '@/application/types'
const emit = defineEmits(['tileMap:create'])
const scene = useScene()
@ -19,7 +19,7 @@ const mapStorage = new MapStorage()
const tileMap = shallowRef<Phaser.Tilemaps.Tilemap>()
const tileLayer = shallowRef<Phaser.Tilemaps.TilemapLayer>()
loadMapTilesIntoScene(mapStore.mapId as UUID, scene)
loadTileTexturesFromMapTileArray(mapStore.mapId as UUID, scene)
.then(() => mapStorage.get(mapStore.mapId))
.then((mapData) => {
if (!mapData || !mapData?.tiles) return