getContainer

Returns the context of the parent Container component.

Any Svelte Pixi 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()
Name Type Description
container PIXI.Container The parent PIXI.Container instance