rks Posted May 17, 2021 Share Posted May 17, 2021 Hi, I am currently trying to convert pixi graphics to sprites for performance improvements. I have the following code. const graphic = new PIXI.Graphics(); graphic .beginFill(0xFFFFFF, 0.5) .lineStyle(1, 0x000000, 1) .drawCircle(0, 0, 10) .endFill(); graphicTexture = app.renderer.generateTexture(graphic); This works with const sprite = new PIXI.Sprite(graphicTexture); and it actually improves the performance significantly. However, it is showing unnecessary white background like below. It is supposed to be a blue circle with the black background but it seems to be writing a blue circle on a white rectangle. Could someone tell me what I might be doing wrong here? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 17, 2021 Share Posted May 17, 2021 looks like one of older versions of pixi-v5 + CanvasRenderer , it had a problem with background. For more information, please provide complete reproduction (jsfiddle, pixi-playground, or zip-file) 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.