layers icon indicating copy to clipboard operation
layers copied to clipboard

generateTexture not working when in pixi-layers layer/group

Open nicokruger opened this issue 5 years ago • 2 comments

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.

nicokruger avatar Jan 11 '20 10:01 nicokruger

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.

ivanpopelyshev avatar Jan 11 '20 11:01 ivanpopelyshev

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!

nicokruger avatar Jan 11 '20 11:01 nicokruger