pixijs / pixi-projection

MIT License
191 stars 34 forks source link

Broken convertSubtreeTo2d in pixi v5 #59

Closed kozickikarol closed 4 years ago

kozickikarol commented 5 years ago

Hi,

I am trying to use pixi-projection (0.3.5) with pixi v5 (5.1.5). I've noticed that convertSubtreeTo2d does not work in such a configuration. Here you have a broken sandbox.

https://codesandbox.io/s/broken-pixi-projection-convertsubtreeto2d-ex2pk

Error:

Uncaught TypeError: Cannot read property 'start' of undefined
    at BatchSystem.setObjectRenderer (core.js:5552)
    at Sprite._render (sprite.js:394)
    at Sprite.render (display.js:1626)
    at Container.render (display.js:1631)
    at Container.render (display.js:1631)
    at Renderer.render (core.js:11266)
    at Application.render (app.js:77)
    at TickerListener.emit (ticker.js:138)
    at Ticker.update (ticker.js:677)
    at Ticker._tick (ticker.js:376)

Changing PIXI.Sprite to PIXI.projection.Sprite2d fixes the problem but I think that this is not the way how convertSubtreeTo2d should work.

You can just change dependencies to pixi 4.8.8 and pixi-projection 0.2.8 to see that example work as intended.

ivanpopelyshev commented 4 years ago

Thank you for that notice

amikko92 commented 4 years ago

I've encountered the same issue with pixi 5.2.1 and pixi-projection 0.3.7. Are there any news on this?

ivanpopelyshev commented 4 years ago

I didnt fix it yet. Want to help with it?

amikko92 commented 4 years ago

Unfortunately, I won't have time to help with it alongside everything else that I need to do in our current production. Projection is a nice to have for us but it's not crucial. We'll carry on without it unless it gets solved in the near future.