tomph Posted August 13, 2015 Share Posted August 13, 2015 Hi guys, sorry if this has been covered, but I've been going around in circles on Google today. I'm trying to render a selection of objects (screenshot) and resize said render/texture so that I can create a thumbnail. I have successfully been using renderTexture.render(), but I run into problems when calling 'resize' - basically, my texture is cleared. Excuse me if I'm being dumb. See code below.this works... var texture: PIXI.RenderTexture = this.game.add.renderTexture(1024, 768, "key", true);texture.render(container, new PIXI.Point(0, 0), true);//text.resize(width, height, true);this.game.add.sprite(0,0,texture);this does not work... var texture: PIXI.RenderTexture = this.game.add.renderTexture(1024, 768, "key", true);texture.render(container, new PIXI.Point(0, 0), true);text.resize(width, height, true);this.game.add.sprite(0,0,texture); Quote Link to comment Share on other sites More sharing options...
xerver Posted August 13, 2015 Share Posted August 13, 2015 The third parameter of render texture is whether or not to clear it: http://pixijs.github.io/docs/PIXI.RenderTexture.html#resize You are passing true... Quote Link to comment Share on other sites More sharing options...
tomph Posted August 14, 2015 Author Share Posted August 14, 2015 Yeah, I have the same result for clear true/false unfortunately... Sorry, should have mentioned that Quote Link to comment Share on other sites More sharing options...
xerver Posted August 14, 2015 Share Posted August 14, 2015 Please provide a reproduction case 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.