Worked on dynamic texture loading

This commit is contained in:
2024-10-25 22:17:02 +02:00
parent 347fc0e1e8
commit 9f50b062b0
16 changed files with 392 additions and 511 deletions

View File

@ -9,6 +9,7 @@ export const useGameStore = defineStore('game', {
return {
notifications: [] as Notification[],
isAssetsLoaded: false,
loadedAssets: [] as string[],
token: '' as string | null,
connection: null as Socket | null,
user: null as User | null,
@ -30,12 +31,6 @@ export const useGameStore = defineStore('game', {
}
}
},
getters: {
getNotifications: (state: any) => state.notifications,
getAssetByKey: (state) => {
return (key: string) => state.assets.find((asset) => asset.key === key)
}
},
actions: {
addNotification(notification: Notification) {
if (!notification.id) {
@ -108,10 +103,10 @@ export const useGameStore = defineStore('game', {
useCookies().remove('token', {
// for whole domain
// @TODO : #190
domain: window.location.hostname.split('.').slice(-2).join('.')
// domain: window.location.hostname.split('.').slice(-2).join('.')
})
// this.isAssetsLoaded = false
this.isAssetsLoaded = false
this.connection = null
this.token = null
this.user = null