toowren Posted October 11, 2022 Share Posted October 11, 2022 Hello, is it possible somehow to 'bake' a PixiJS container to texture. let container = new PIXI.Container(); container.x = 256; container.y = 256; let graphics = new PIXI.Graphics(); graphics.beginFill(0xFF00FF); graphics.drawRoundedRect(0, 0, 128, 128, 16); graphics.endFill(); container.addChild(graphics); let arrow = PIXI.Sprite.from(resources.arrowOut.texture); arrow.x = 64 - arrow.width / 2; arrow.y = 64 - arrow.height / 2; container.addChild(arrow); container.cacheAsBitmap = true; app.stage.addChild(container); Since if there is .cacheAsBitmap option, it has to be cached somewhere and I want to use it further as PIXI.Texture. Quote Link to comment Share on other sites More sharing options...
Exca Posted November 9, 2022 Share Posted November 9, 2022 You can render your container into a renderTexture. https://pixijs.download/dev/docs/PIXI.RenderTexture.html 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.