Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Animation of Font Size ? Resolution problem


dazzafact
 Share

Recommended Posts

Hello, i would like to animate  a text like "fly in". But the Problem is the Resolution of the animated Container(with Text). 
I also tried it with Font-Size direct, but this snipped is also really weak, because of the smoothness Resolution (Text antialiasing):

   		text = new PIXI.Text('Flying Text', style);

 requestAnimationFrame(animate);

 function animate() {

        renderer.render(stage);
        count += 0.4;
        text.style.fontSize = count;


        requestAnimationFrame(animate);
    }

I also would lilke to have a expo.ease to simulate a "Fly in"
I tried this with GSAP, but its not possible to animate the Fontsize with the PixiJs Plugin. 😕
Any Ideas?


 

tl.to(text, 2, {pixi:{fontSize:525},ease:Expo.easeIn});

 

Link to comment
Share on other sites

you dont update text that way. There's `text.updateText(false)` or something like that, please look in the source code how it works:  https://github.com/pixijs/pixi.js/blob/dev/packages/text/src/Text.js

You can also update dirty marker so pixi will call updateText when its needed: "text.style.styleID++". 

I'm afraid that you will have to look at sources of ALL PIXI OBJECTS you try to use not like in examples. Its inevitable.

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