Jump to content

PIXI.Text caching with resolution


canvasman
 Share

Recommended Posts

Is it possible to create PIXI.Text with resolution 2 and cache its texture to use with sprites later?

My problem is that when I scale stage (zoom out), texts jitter and become blurry. That doesnt happen when I set renderer resolution to 2 but it slows down older computers.

Solution which would work for both canvas and webgl renderer would be perfect.

Link to comment
Share on other sites

Yep, just updateText() it and store the texture somewhere, use it for a sprite later, or use that text later. You can also set text resolution if you unset "autoResolution"

https://github.com/pixijs/pixi.js/blob/dev/packages/text/src/Text.js#L331

https://github.com/pixijs/pixi.js/blob/dev/packages/text/src/Text.js#L128 

 

 

Link to comment
Share on other sites

10 minutes ago, ivan.popelyshev said:

Yep, just updateText() it and store the texture somewhere, use it for a sprite later, or use that text later. You can also set text resolution if you unset "autoResolution"

https://github.com/pixijs/pixi.js/blob/dev/packages/text/src/Text.js#L331

https://github.com/pixijs/pixi.js/blob/dev/packages/text/src/Text.js#L128 

 

 

I am using PIXI v4.8.2, I couldn't find that autoResolution there : \

Is the dev branch stable?

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...