The ZAZ Animation Kit Version 3
Animation Kit is a powerful animation framework for Xojo projects. All animations are asynchronous and driven by time, rather than by a number of iterations or changes.
Animation Kit includes task subclasses to power window and control movements and resizes, change scroll positions, and sequence sprites. Developer classes can implement an interface to allow their own light animations, or create custom task subclasses to provide any form of animation necessary.
The framework is simple enough to execute animations with a single line of code, while being powerful enough to handle any animation the developer requires.
Animation Kit utilizes the new Xojo Framework made available in 2015 Release 1. All projects can compile and use the framework, but not every feature is supported in all projects.
Download the Animation Kit project, open the
Animation Kit.xojo_binary_project file, then copy the
AnimationKit module into your project.
Animation can be started with a simple
Animate shorthand method.
PushButton1.Animate(New Xojo.Core.Rect(PushButton1.Left, PushButton1.Top, 100, PushButton1.Height), 0.2)
This will cause the button PushButton1 to adjust to 100 points wide. Since the Left, Top, and Height values do not change, those values will not be animated.
The same job can be done more explicitly, which is also more flexible.
Dim Task As New AnimationKit.MoveTask(PushButton1)
Task.DurationInSeconds = 0.25
Task.Width = 100
Both variants will behave exactly the same.
Explore the AnimationKit.MoveTask, AnimationKit.ScrollTask, and AnimationKit.Curve classes for more customizable animations.
Custom control developers should explore the AnimationKit.ValueAnimator and AnimationKit.Scrollable interfaces.
Developers interested in sprite-based animations should explore the AnimationKit.Frame, AnimationKit.FrameSet, and AnimationKit.FrameTask classes.
If you are upgrading from a previous version of Animation Kit, see this migration guide.