npm run format, started working on follow player logic, refactor some camera logic
This commit is contained in:
@ -19,29 +19,26 @@ import { onMounted, ref } from 'vue'
|
||||
|
||||
const zoneEditorStore = useZoneEditorStore()
|
||||
const gameStore = useGameStore()
|
||||
const modalWidth = ref(200);
|
||||
const modalHeight = ref(160);
|
||||
const modalWidth = ref(200)
|
||||
const modalHeight = ref(160)
|
||||
|
||||
let posXY = ref({x: 0, y: 0});
|
||||
let posXY = ref({ x: 0, y: 0 })
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
posXY.value = customPositionGmPanel(modalWidth.value);
|
||||
posXY.value = customPositionGmPanel(modalWidth.value)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
const customPositionGmPanel = (modalWidth: number) => {
|
||||
const padding = 25
|
||||
const width = window.innerWidth
|
||||
|
||||
const x = width - (modalWidth+4) - 25
|
||||
const x = width - (modalWidth + 4) - 25
|
||||
const y = padding
|
||||
|
||||
return { x, y }
|
||||
}
|
||||
|
||||
posXY.value = customPositionGmPanel(modalWidth.value)
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user