1
0
forked from noxious/client

Sorted imports

This commit is contained in:
Dennis Postma 2025-01-25 13:49:52 +01:00
parent 69f9944dc7
commit e0a48a089a
2 changed files with 7 additions and 4 deletions

View File

@ -26,11 +26,11 @@
import config from '@/application/config'
import type { Tile } from '@/application/types'
import ChipsInput from '@/components/forms/ChipsInput.vue'
import { TileStorage } from '@/storage/storages'
import { useAssetManagerStore } from '@/stores/assetManagerStore'
import { useGameStore } from '@/stores/gameStore'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { computed, onBeforeUnmount, onMounted, ref, toRaw, watch } from 'vue'
import { TileStorage } from '@/storage/storages'
const gameStore = useGameStore()
const assetManagerStore = useAssetManagerStore()

View File

@ -84,10 +84,10 @@
import config from '@/application/config'
import type { Tile } from '@/application/types'
import Modal from '@/components/utilities/Modal.vue'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { computed, onMounted, onUnmounted, ref } from 'vue'
import { TileStorage } from '@/storage/storages'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { liveQuery } from 'dexie'
import { computed, onMounted, onUnmounted, ref } from 'vue'
const tileStorage = new TileStorage()
const mapEditorStore = useMapEditorStore()
@ -174,7 +174,10 @@ function processTile(tile: Tile) {
}
function getDominantColor(imageData: ImageData) {
let r = 0, g = 0, b = 0, total = 0
let r = 0,
g = 0,
b = 0,
total = 0
for (let i = 0; i < imageData.data.length; i += 4) {
if (imageData.data[i + 3] > 0) {