These are chat archives for pixijs/pixi.js

5th
Jan 2018
Mark Knol
@markknol
Jan 05 2018 13:16 UTC
I want to make a snapshot of my stage using renderer.extract.base64(stage);. In my project there can be elements outside the stage. If I add a mask to the stage, still the image contains whitespace
how/can I extract with a certain rectangle
Mark Knol
@markknol
Jan 05 2018 13:22 UTC
wait, I think i first have to use RenderTexture.create(480, 480); renderer.render(stage, renderTexture); and then renderer.extract.base64(renderTexture);
Ivan Popelyshev
@ivanpopelyshev
Jan 05 2018 13:24 UTC
yep, you can extract renderTexture
dont forget to destroy it afterwards
renderTexture.destroy(true)
Mark Knol
@markknol
Jan 05 2018 13:25 UTC
thanks!
Ivan Popelyshev
@ivanpopelyshev
Jan 05 2018 13:26 UTC
ill make PR to add region there
oh there's another idea
var tempTexture = renderer.generateTexture(stage, undefined, undefined, myArea) where myArea is rectangle, you can take renderer.screen for it
Mark Knol
@markknol
Jan 05 2018 13:29 UTC
ah
the initial idea already works :D
done, now its in wiki
cant make PR because we have to discuss this thing , and we'll add it in v5
Mark Knol
@markknol
Jan 05 2018 13:58 UTC
Thanks for picking it up