davidfig / pixi-viewport

A highly configurable viewport/2D camera designed to work with pixi.js
https://davidfig.github.io/pixi-viewport/
MIT License
1.04k stars 174 forks source link

Latest release is v5, API Documentation and examples are for v4.3 #455

Open Heilemann opened 1 year ago

Heilemann commented 1 year ago

There seems to be some major changes, including events/interaction and divWheel, and so far I haven't been able to figure out how to make it work with @pixi/react.

psyko-gh commented 1 year ago

Same for me. In pixi-react, using pixi 7.2, I always get this error:

this.viewport.options.events is undefined

Even though I'm following the note about events/interaction

 const viewport = new PixiViewport({
            screenWidth: props.width,
            screenHeight: props.height,
            worldWidth: props.width * 2,
            worldHeight: props.height * 2,
            ticker: props.app.ticker,
            events: props.app.renderer.events
        });