Jump to content

Export after resize...


mRax
 Share

Recommended Posts

So, my code:

// create app like

new PIXI.Application({
                width: 1024,
                height: 540,

// ...
// to do something
// ...

renderer.resize(4096,2056)

// then replace textures to hi-res , etc
// and try to get png file from canvas

var data = renderer.extract.base64()

and... data is 1024 x 540 ...

How to get data with new (resized) resolutions? Tnx

Link to comment
Share on other sites

I used 

renderer.width = 4096;
renderer.height = 2056;

its seems works but i`ve another problem... its work just if i use some delay before extract like

setTimeout(function(){

//....
var data = renderer.extract.base64()
///
}, 3000)

have any best practices for this situation?

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...