Can transition.to be used to increase the size of text over time? I haven´t be able to do this… as a poor alternative I have using three delayed timers to ease the transition between font sizes. Is there a better way?
A quick thought is that you could start with the larger version of the text, scale it down using xScale, yScale and then scale it up using a transition.to - but it’s kinda dirty.
Hi @Atrag,
Yes, you can transition the text size. It’s just a matter of pointing to the “size” property of the text object in the transition, like this:
[lua]
local myText = display.newText( “TEST”, 100, 200, native.systemFont, 16 )
transition.to( myText, { size=50 } ) – Transition the ‘size’ property of the text object
[/lua]
Best regards,
Brent
Thank you very much that works perfectly. Maybe that should be added to the transition.to documentation page?
Oh… I would of gone with xScale… didn’t realise this was possible.
Yes Brent the docs need updating for sure!
A quick thought is that you could start with the larger version of the text, scale it down using xScale, yScale and then scale it up using a transition.to - but it’s kinda dirty.
Hi @Atrag,
Yes, you can transition the text size. It’s just a matter of pointing to the “size” property of the text object in the transition, like this:
[lua]
local myText = display.newText( “TEST”, 100, 200, native.systemFont, 16 )
transition.to( myText, { size=50 } ) – Transition the ‘size’ property of the text object
[/lua]
Best regards,
Brent
Thank you very much that works perfectly. Maybe that should be added to the transition.to documentation page?
Oh… I would of gone with xScale… didn’t realise this was possible.
Yes Brent the docs need updating for sure!
