munasinghecm Posted June 6, 2022 Share Posted June 6, 2022 I created an app using PixiJS. I set height and width for the PIXI.Application. I added containers which are having the graphics relevant to my application. When I draw those graphics some of them are go beyond the boundary limit of the application. When I render the application it's totally fine. Only the application area get rendered without the graphics which drew beyond the boundary limit of the app. Though when I get an image from the application using the following code, the graphics which drew beyond the boundary limit of the application are also available in that image. this.pixiApp.renderer.plugins.extract.image(this.pixiApp.stage, 'image/jpge', 1) How can I download an image only containing the graphics which are available within the app boundary limit. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 9, 2022 Share Posted June 9, 2022 (edited) > I set height and width for the PIXI.Application its screen size , and it gets stored in "app.screen" > beyond the boundary limit of the application yep image() and a few others functions of extract are actually using getLocalBounds() of object you pass there, and of course its bigger than screen. You have to use method that creates you a texture of arbitrary size, like https://pixijs.download/dev/docs/PIXI.Renderer.html#generateTexture dont forget to destroy the texture after you used it for image() basically, extract does the same thing, it just doesnt have this "options.region" param. You can set that region to "app.screen" , no need to create your own rectangle ) Yes, that's the problem in API because there are already too many params in "image" method Edited June 9, 2022 by ivan.popelyshev munasinghecm 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.