Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

BitmapText Pivot & Kerning

$
0
0

Hi, I was just wondering if anyone knew of an easy solution to this...

I have a text display using bitmap font I was looking at animating per character, I can get a target to animate via gsap for each character fine through the characters array..
However if I want to set the pivot for each character to the center (for a scale/rotation tween), it will through the kerning off.

Any ideas greatly appreciated.

 

for(let i = 0; i < this.bitmapText.children.length; i++){
            let target = this.bitmapText.children[i];
            target.pivot.set(target.width/2, target.height/2);
            TweenMax.to(target, 0.3, {pixi:{scale:1.2}, repeat:-1, delay:i*0.15, yoyo:true, ease:Sine.easeInOut});
}

 

kerningIssue.png


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>