Thursday, May 21, 2009

Path animations in Silverlight

I attended the most-excellent NxtGenUG Manchester Launch event last night, where Richard Costall (@costall) gave a great overview of some of the new features in Silverlight 3.0.

One of the questions that came up was whether visuals could be animated on a non-circular path using the new Perspective 3D features. The answer was “No”, because the projection features just give rotation and offset in 2.5D space. I piped up that it MIGHT be possible to take a visual moving along a 2D animation path that is itself projected to give the required effect. Richard pointed out that Silverlight doesn’t have any PathAnimation support. 

A quick Google this morning, however, came up with an intriguing CodeProject post from  “Ineir” where he presents a PathAnimation framework for Silverlight that flattens the path into a set of line-segments suitable for use as Storyboard keyframes. With this, I think it WOULD be possible to have a complex path for visuals in 2.5D space. I’ll just have to try it at some point - this post is really just a “note-to-self”.

Moving in circles along curves: http://www.codeproject.com/KB/silverlight/PathAnimation.aspx

 

No comments: