drfrankius 0 Report post Posted October 20, 2020 I am trying to create multiple PIXI.Texture instances using a Phaser.RenderTexture as the base. This does not seem to work though. When I set the texture on a sprite it just appears blank. Doing the same with a baseTexture from the cache seems to work. const texture = new PIXI.Texture(renderTextureInstance, new PIXI.Rectangle(0, 0, 200, 200), new PIXI.Rectangle(0, 0, 200, 200)); // DOES NOT WORK const texture = new PIXI.Texture(game.cache.getBaseTexture('buttons'), new PIXI.Rectangle(0, 0, 200, 200), new PIXI.Rectangle(0, 0, 200, 200)) // WORKS I also tried using the renderTextureInstance.baseTexture reference and neither seem to work. When I create a sprite using the renderTexture it works just fine. Is this Some limitation of RenderTextures in the Phaser 2/CE code? Is there a workaround? thanks Quote Share this post Link to post Share on other sites
drfrankius 0 Report post Posted October 22, 2020 Well, found something that works now. Just thought I would post an update for anyone stumbling over similar issues. When creating a Phaser.Sprite instance with a RenderTexture instance as its texture the only way i could get it to respect the frameData was to call .setFrame() on the sprite and pass in the Phaser.Frame instance manually. The framing rects passed in to the texture instances seem to be ignored. Quote Share this post Link to post Share on other sites