Sign in to follow this  
Ninjadoodle

Scale Text?

Recommended Posts

Hi @enpu

I've been going through the docs and I know that you can 'tween' the scale of text.

I can't seem to find however how to set the scale of text when setting it up.

The only property I can see is maxWidth.

Is there a way to do this?

Share this post


Link to post
Share on other sites

You can scale Text object just like any other Container.

var text = new game.Text('Hello');
text.scale.set(2);

Is that what you were looking for?

You can also set properties as parameter:

var text = new game.Text('Hello', {
    scale: { x: 2, y: 2 },
    alpha: 0.5
});

 

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.