npm run format
This commit is contained in:
parent
208b58d05f
commit
57b503142e
@ -1,21 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<Zone
|
<Zone :originX="mapObj?.originX" :originY="mapObj?.originY" :width="mapObj?.frameWidth" :height="mapObj?.frameHeight" :x="x" :y="y" />
|
||||||
:originX="mapObj?.originX"
|
|
||||||
:originY="mapObj?.originY"
|
|
||||||
:width="mapObj?.frameWidth"
|
|
||||||
:height="mapObj?.frameHeight"
|
|
||||||
:x="x"
|
|
||||||
:y="y"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onPreUpdate, useScene } from 'phavuer'
|
|
||||||
import { calculateIsometricDepth } from '@/services/mapService'
|
|
||||||
import { onUnmounted, defineProps } from 'vue'
|
|
||||||
import type { MapObject, PlacedMapObject } from '@/application/types'
|
import type { MapObject, PlacedMapObject } from '@/application/types'
|
||||||
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
|
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
|
||||||
import {Zone} from "phavuer";
|
import { calculateIsometricDepth } from '@/services/mapService'
|
||||||
|
import { onPreUpdate, useScene, Zone } from 'phavuer'
|
||||||
|
import { defineProps, onUnmounted } from 'vue'
|
||||||
|
|
||||||
const mapEditor = useMapEditorComposable()
|
const mapEditor = useMapEditorComposable()
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { MapObject, PlacedMapObject } from '@/application/types'
|
import type { MapObject, PlacedMapObject } from '@/application/types'
|
||||||
|
import ImageGroup from '@/components/game/map/partials/ImageGroup.vue'
|
||||||
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
|
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
|
||||||
import { loadMapObjectTextures, tileToWorldXY } from '@/services/mapService'
|
import { loadMapObjectTextures, tileToWorldXY } from '@/services/mapService'
|
||||||
import { MapObjectStorage } from '@/storage/storages'
|
import { MapObjectStorage } from '@/storage/storages'
|
||||||
@ -14,8 +15,6 @@ import { computed, onMounted, ref, watch } from 'vue'
|
|||||||
import Tilemap = Phaser.Tilemaps.Tilemap
|
import Tilemap = Phaser.Tilemaps.Tilemap
|
||||||
import TilemapLayer = Phaser.Tilemaps.TilemapLayer
|
import TilemapLayer = Phaser.Tilemaps.TilemapLayer
|
||||||
|
|
||||||
import ImageGroup from '@/components/game/map/partials/ImageGroup.vue'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
placedMapObject: PlacedMapObject
|
placedMapObject: PlacedMapObject
|
||||||
tileMap: Tilemap
|
tileMap: Tilemap
|
||||||
@ -32,7 +31,7 @@ const mapObject = ref<MapObject>()
|
|||||||
const groupProps = computed(() => ({
|
const groupProps = computed(() => ({
|
||||||
...calculateObjectPlacement(props.placedMapObject),
|
...calculateObjectPlacement(props.placedMapObject),
|
||||||
mapObj: mapObject.value,
|
mapObj: mapObject.value,
|
||||||
obj: props.placedMapObject,
|
obj: props.placedMapObject
|
||||||
}))
|
}))
|
||||||
|
|
||||||
async function initialize() {
|
async function initialize() {
|
||||||
|
@ -94,14 +94,14 @@
|
|||||||
<span class="text-sm">Hairstyle</span>
|
<span class="text-sm">Hairstyle</span>
|
||||||
<div class="flex gap-2 flex-wrap">
|
<div class="flex gap-2 flex-wrap">
|
||||||
<div
|
<div
|
||||||
class="hair-deselect relative flex justify-center items-center bg-gray default-border w-[18px] h-[18px] p-2 rounded-sm hover:bg-gray-500 hover:border-gray-400 focus-visible:outline-none focus-visible:border-white focus-visible:bg-cyan has-[:checked]:bg-cyan has-[:checked]:border-transparent"
|
class="hair-deselect relative flex justify-center items-center bg-gray default-border w-[18px] h-[18px] p-2 rounded-sm hover:bg-gray-500 hover:border-gray-400 focus-visible:outline-none focus-visible:border-white focus-visible:bg-cyan has-[:checked]:bg-cyan has-[:checked]:border-transparent"
|
||||||
>
|
>
|
||||||
<img src="/assets/icons/x-button-gray.svg" class="w-4 h-4" alt="Empty button" />
|
<img src="/assets/icons/x-button-gray.svg" class="w-4 h-4" alt="Empty button" />
|
||||||
<input type="radio" name="hair" :value="null" v-model="selectedHairId" class="h-full w-full absolute left-0 top-0 m-0 z-10 hover:cursor-pointer focus-visible:outline-offset-0 focus-visible:outline-white" />
|
<input type="radio" name="hair" :value="null" v-model="selectedHairId" class="h-full w-full absolute left-0 top-0 m-0 z-10 hover:cursor-pointer focus-visible:outline-offset-0 focus-visible:outline-white" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="hair in filteredHairs"
|
v-for="hair in filteredHairs"
|
||||||
class="relative flex justify-center items-center bg-gray default-border w-[18px] h-[18px] p-2 rounded-sm hover:bg-gray-500 hover:border-gray-400 focus-visible:outline-none focus-visible:border-gray-300 focus-visible:bg-gray-500 has-[:checked]:bg-cyan has-[:checked]:border-transparent overflow-hidden"
|
class="relative flex justify-center items-center bg-gray default-border w-[18px] h-[18px] p-2 rounded-sm hover:bg-gray-500 hover:border-gray-400 focus-visible:outline-none focus-visible:border-gray-300 focus-visible:bg-gray-500 has-[:checked]:bg-cyan has-[:checked]:border-transparent overflow-hidden"
|
||||||
>
|
>
|
||||||
<div class="absolute inset-0 flex items-center justify-center">
|
<div class="absolute inset-0 flex items-center justify-center">
|
||||||
<img class="h-16 object-contain scale-[1] mt-8 origin-center" :src="config.server_endpoint + '/textures/sprites/' + hair.sprite + '/front.png'" alt="Hair sprite" />
|
<img class="h-16 object-contain scale-[1] mt-8 origin-center" :src="config.server_endpoint + '/textures/sprites/' + hair.sprite + '/front.png'" alt="Hair sprite" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user