Li : Dev Actionscript Development Blog

2Sep/09Off

Warping text in Away3D [UPDATED]

[UPDATE] You can find a couple of demos for this in THIS post in the Away3D site.

One of the things I've been wanting for Away3D for a while is the ability to warp a textfield onto a bezier path and animate the text along the path. The proper way of doing this is not just to position and rotate the characters to fit the path, but to actually deform them to adapt to the path. To do this, the x dimension of the text is transformed into an arc-length parameterized value along the path's length and the other 2 dimensions are then recalculated in this new space.

When it comes to a feature like this its usually much harder for me to develop, but this time I must admit it was pretty simple thanks to THIS amazing almost cheat-like resource from Jay Clegg.

Click on the image to see the demo (use the keyboard and mouse to move around). I plan to refine this and upload a full demo/example soon. For now, If you wish to play with it, take a look at the new "AlignToPath.as" class in the geom package of Away3D for fp10.

Filed under: 3D, Tutorials Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

No trackbacks yet.