pixijs / layers

Separate the z-hierarchy of your scene tree from its canonical structure.
https://pixijs.io/layers/docs/
MIT License
222 stars 57 forks source link

Not support pixi.js 5.1.4 with using webpack #50

Closed jiroler closed 4 years ago

jiroler commented 4 years ago

Hello. I am using webpack

//like in Readme
import * as PIXI from 'pixi.js'
window.PIXI = PIXI
require('pixi-layers')

After updating pixi.js to 5.1.4, I get error:

Uncaught TypeError: renderer.incDisplayOrder is not a function
    at Stage.Layer._preRender (pixi-layers.js:563)
    at Stage.Layer.render (pixi-layers.js:583)
    at Renderer.render (core.es.js:11310)
    at Application.render (app.es.js:77)
    at TickerListener.emit (ticker.es.js:139)
    at Ticker.update (ticker.es.js:678)
    at Ticker._tick (ticker.es.js:377)

Please deal with this problem. So far rolled back to 5.1.3. Thank you!

ivanpopelyshev commented 4 years ago

5.1.3 nad 5.1.4 have only a few critical changes between them, they are not that different. That means its node_modules problem, again. Delete package.lock, remove node_modules, run npm install.

That problem appears when there are two versions of pixi initialized in the app, and pixi-layers is patching only one of them.

jiroler commented 4 years ago

Thanks! It is helped

ivanpopelyshev commented 4 years ago

@jiroler we just found Critical issue in 5.1.4, so 5.1.5 will be in a few hours or in a day. dont put 5.1.4 in production.

jiroler commented 4 years ago

Thank you for information!