Sign in to follow this  
ewinter

PIXI.Text caching with resolution

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.

Share this post


Link to post
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 

 

 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.