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

generateTexture not working when in pixi-layers layer/group #53

Open nicokruger opened 4 years ago

nicokruger commented 4 years ago

When you put a container into a layer from pixi-layers, renderer.generateTexture no longer works to create a texture from a container.

Check out this example: https://www.pixiplayground.com/#/edit/0VYy5repkmlke0oaUvA2v

If you comment out the line:

// TODO: comment out this line to see generateTexture working
container.parentLayer = layer;

You will see that the generating of a texture starts working again.

ivanpopelyshev commented 4 years ago

I did not define behaviour for partial renders of stage with layers. Like, at all. I don't know what to do in that case, maybe ignore all parentLayer's?

I need help with this.

nicokruger commented 4 years ago

I think as a start just ignoring parentLayer's could work. Ideally you would want the partial render to respect the ordering of the layers in the sub-tree you are rendering though.

Maybe if we can get started by just ignoring parentLayer's for now we can try and try other solutions later?

Thanks for the quick reply!