Creating a Pixi Application
Instantiating the Pixi Application
Section titled “Instantiating the Pixi Application”To start rending in PixiJS, you’ll need to create a PixiApplication component that will instantiate the PIXI.Application instance and provide it to all child components via context.
import { PixiApplication, PixiCanvas, PixiStage } from "pixi-solid";
/** * The DemoApp component sets up the Pixi Application * and can be mounted anywhere in your SolidJS app. * It will render a Canvas element with a Pixi Stage inside it. */export const DemoApp = () => { return ( <PixiApplication> <PixiCanvas> <PixiStage>{/* Your Pixi Solid components go here */}</PixiStage> </PixiCanvas> </PixiApplication> );};