Sign in to follow this  
tomph

Thumbnail screenshot issues

Recommended Posts

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);

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.