forked from noxious/client
POC working new caching method - moved controllers folder, renamed assets to textures, fixed HTTP bug, formatted code
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
<script setup lang="ts">
|
||||
import config from '@/application/config'
|
||||
import 'phaser'
|
||||
import type { AssetDataT } from '@/application/types'
|
||||
import type { TextureData } from '@/application/types'
|
||||
import MapEditor from '@/components/gameMaster/mapEditor/MapEditor.vue'
|
||||
import { loadTexture } from '@/composables/gameComposable'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
@ -72,7 +72,7 @@ const preloadScene = async (scene: Phaser.Scene) => {
|
||||
* Then load them into the scene.
|
||||
*/
|
||||
scene.load.rexAwait(async function (successCallback: any) {
|
||||
const tiles: { data: AssetDataT[] } = await fetch(config.server_endpoint + '/assets/list_tiles').then((response) => response.json())
|
||||
const tiles: { data: TextureData[] } = await fetch(config.server_endpoint + '/assets/list_tiles').then((response) => response.json())
|
||||
|
||||
for await (const tile of tiles?.data ?? []) {
|
||||
await loadTexture(scene, tile)
|
||||
|
Reference in New Issue
Block a user