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

Will it support V8 version? #476

Closed erdezhuang closed 4 months ago

erdezhuang commented 7 months ago

Will it support V8 version?

hlevring commented 6 months ago

I think some work is ongoing here https://github.com/davidfig/pixi-viewport/pull/468

WillYuum commented 5 months ago

I made quick update on-top of https://github.com/davidfig/pixi-viewport/pull/468 to use Pixi v8.0.4 and it seems to work well on my project.

My forked version: https://github.com/WillYuum/pixi-viewport

I'm not sure if I should contribute to the repo in the 468 or just make a pull request directly on main pixi-viewport. So made a pull request here: https://github.com/davidfig/pixi-viewport/pull/483

matthewgapp commented 5 months ago

@davidfig would you mind checking out @WillYuum's PR? This is blocking our upgrade to pixi v8. Thank you!

VitalyEmelyanov commented 5 months ago

I made quick update on-top of #468 to use Pixi v8.0.4 and it seems to work well on my project.

My forked version: https://github.com/WillYuum/pixi-viewport

I'm not sure if I should contribute to the repo in the 468 or just make a pull request directly on main pixi-viewport. So made a pull request here: #483

Thanks, for me your fork works great with 8.1.0. @davidfig please, consider merging this to the main

muhajirdev commented 4 months ago

anynone got it working with this line? @VitalyEmelyanov @matthewgapp

app.stage.addChild(viewport)

// Argument of type 'Viewport' is not assignable to parameter of type 'Container'.
//  Type 'Viewport' is missing the following properties from type 'Container': uid, _updateFlags, isRenderGroupRoot, 
// renderGroup, and 101 more.ts(2345)

I am on typescript.

full code looks like this

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

  const viewport = new Viewport({
    screenHeight: window.innerHeight,
    screenWidth: window.innerWidth,
    worldHeight: 1024,
    worldWidth: 1024,
    passiveWheel: false,

  })

  app.stage.addChild(viewport)
RecursiveVoid commented 4 months ago

it would be also super nice if viewport can support V8 renderGroup feature. Would give out of the box performance boost.

nightgrey commented 4 months ago

Anyone having issues, check https://github.com/davidfig/pixi-viewport/issues/487