Skip to content

Commit

Permalink
feat: support transferControlToOffscreen #125
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr.Mao committed Nov 6, 2024
1 parent f85747b commit e82450e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vue3-pixi/src/components/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const Application = defineComponent({
height: Number,
resolution: Number,
resizeTo: Object as PropType<HTMLElement | Window | undefined>,
transferControlToOffscreen: Boolean,
},
setup(props, { slots, expose }) {
const { appContext } = getCurrentInstance()!
Expand All @@ -56,6 +57,9 @@ export const Application = defineComponent({
stencil: props.stencil,
})

if (props.transferControlToOffscreen)
canvas.value?.transferControlToOffscreen()

if (!context)
warn('could not crate webgl context')

Expand Down

0 comments on commit e82450e

Please sign in to comment.