Skip to content

getContainer

Returns the context of the parent Container component.

Any SveltePixi component that renders something to the screen will use a Container, so this will return a Sprite, Graphics, etc. instance if the component is a child of one.

import { getContainer } from 'svelte-pixi'
const { container } = getContainer()
NameTypeDescription
containerPIXI.ContainerThe parent PIXI.Container instance