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

Update pixi-viewport to pixi 8.0.4 #483

Closed WillYuum closed 5 months ago

WillYuum commented 5 months ago

I found pull request https://github.com/davidfig/pixi-viewport/pull/468 with changes to pixi-prereleased 8 and needed to work with higher version.

Tested with local demo and seems to work well.

Plus I have tested on my personal project and have done it by using verdaccio to install the dependency since npm link was causing a currentTarget.isInteractive() doesn't exist crash.

davidfig commented 5 months ago

Thanks for the upgrade!

muhajirdev commented 4 months ago

I am getting this error on my side.

image

wondering if you get the same error @WillYuum ? 👀

Thanks for helping upgrading to v8 btw


My code looks like this

const app = new Application()
  await app.init({
    width: 1080,
    height: 1080,
    backgroundColor: 0xffffff,
  })

  const viewport = new Viewport({
    screenWidth: 100,
    screenHeight: 100,
    worldWidth: 1000,
    worldHeight: 1000,
  })
  const container = new Container({})

  app.stage.addChild(container)
  container.addChild(viewport)