Closed evan-lc closed 1 year ago
As a potential solution, you may resize your application manually:
const app = useApplication()
const { clientWidth } = document.documentElement
const { clientHeight } = document.documentElement
const { innerWidth = 0, innerHeight = 0 } = window
const realWidth = Math.max(clientWidth, innerWidth)
const realHeight = Math.max(clientHeight, innerHeight)
app.view.style.width = `${realWidth}px`
app.view.style.height = `${realHeight}px`
I usually bind through the useElementSize of vueuse, like this:
import { useElementSize } from '@vueuse/core'
const { width, height } = useElementSize(myElement)
<Application :width="width" :height="height">...</Application>
However, the Application component should support the resizeTo attribute, and I will fix it
https://github.com/hairyf/vue3-pixi/blob/main/packages/vue3-pixi/src/components/application/index.ts There is no
resizeTo
props declartion pass tonew _Application({ view: canvas.value, ...props })