import { type PointLike, Texture } from 'pixi.js'
import { Show, createEffect, createSignal } from 'solid-js'
} from '../../../../solid-pixi/src/index'
render(() => <TextureSwap canvas={document.getElementById('root')! as HTMLCanvasElement} />)
'https://pixijs.com/assets/flowerTop.png',
'https://pixijs.com/assets/eggHead.png'
function SwapContainer() {
const app = useApplication()
const [textures] = useAssets(_textures)
const [texture, setTexture] = createSignal(0)
texture={Texture.from(_textures[texture()]!)}
setTexture(1 - texture())
anchor={{ x: 0.5, y: 0.5 } as PointLike}
x={app!.screen.width / 2}
y={app!.screen.height / 2}
function TextureSwap(props) {
<Application background='#1099bb' resizeTo={window} canvas={props.canvas}>