I was very impressed by some of the small touches that were added to Microsoft Max, one of my favorites is the slick WrapPanel that glides all the pieces into place. I absolutely love smooth interfaces (as long as they stay out of the way- menu animations in windows? Off.)
So anyways, I just had to implement that slick panel. I hope the Max guys don't get mad.
Introducing SmoothMove (source & sample project)
What I came up with is a decorator object that is the root of the template for the items in the panel of choice. The decorator listens for LayoutUpdated events then changes the RenderTransform to undo the layout change. The RenderTransform is then animated to zero, thus moving the object to it's final location. The sample uses a WrapPanel to do the layout, but if you look at the code it's general for any layouts, though it only handles positioning and not rotations, scales, etc.
I wish I could figure out how to make animated gifs of the app, it really is quite fun to play with. Click on the rectangles to insert some more.
I'm also working on a MatrixAnimation class that can do matrix to matrix interpolation, it should be super useful, I have just a few kinks to work out on it. I snagged some code from Sparkle to do matrix decomposition then interpolate the respective parts and reconstruct the matrix. It's not the speediest thing around though. Hopefully I can get it going and get permission to share the code (I'm not sure about the matrix decomposition part).
So anyways, I just had to implement that slick panel. I hope the Max guys don't get mad.
Introducing SmoothMove (source & sample project)
What I came up with is a decorator object that is the root of the template for the items in the panel of choice. The decorator listens for LayoutUpdated events then changes the RenderTransform to undo the layout change. The RenderTransform is then animated to zero, thus moving the object to it's final location. The sample uses a WrapPanel to do the layout, but if you look at the code it's general for any layouts, though it only handles positioning and not rotations, scales, etc.
I wish I could figure out how to make animated gifs of the app, it really is quite fun to play with. Click on the rectangles to insert some more.
I'm also working on a MatrixAnimation class that can do matrix to matrix interpolation, it should be super useful, I have just a few kinks to work out on it. I snagged some code from Sparkle to do matrix decomposition then interpolate the respective parts and reconstruct the matrix. It's not the speediest thing around though. Hopefully I can get it going and get permission to share the code (I'm not sure about the matrix decomposition part).
0 Comments:
Post a Comment
<< Home