pixijs / pixi-react

Write PIXI apps using React declarative style
https://pixijs.io/pixi-react/
MIT License
2.42k stars 180 forks source link

Quick Start doesn't work #369

Closed tansanDOTeth closed 1 year ago

tansanDOTeth commented 1 year ago

The code shared in the README under Quick Start doesn't work. I would make a PR, but this is my first time using Pixi and I am unfamiliar with the APIs. I tried searching to find examples of the filters, but didn't see any in the tests for the Text component.

import { Stage, Container, Sprite } from '@inlet/react-pixi'

export const MyComponent = () => (
  <Stage>
    <Sprite image="./my-image.png" x={100} y={100} />

    <Container x={500}>
      <Text text="Hello World" filter={[blurFilter]} />
    </Container>
  </Stage>
)
baseten commented 1 year ago

@tansanDOTeth what versions of the library, React and PIXI are you using? Currently we don't support PIXI v7 and React 18 is only supported by the new alpha package available here:

npm i @pixi/react-pixi

We're still in the process of updating the old docs

tansanDOTeth commented 1 year ago

There is that issue too, but I was mostly referencing the blurFilter and the image using a src that is inaccessible.

baseten commented 1 year ago

Ah indeed, that's not a great example! I'll get that resolved as I update the docs over the coming days