Windows 8 Metro apps not only have to be informative and responsive, they also have to feature animations that are, to use Microsoft's often repeated phrase, "fast and fluid". In the newest post on the official Windows 8 app developer blog, Microsoft offers Metro app makers some tips on how to create the best looking animations they can for their software creations.
The highly technical blog post goes over a number of ways Windows 8 Metro app makers can generate smooth animations with both JavaScript and XAML-based apps. One way is using independent animation, which mean animation that's coded to run "independently from thread running the core UI logic." Microsoft states:
In Windows 8 many of the animated elements are composed by a composition engine that runs on a separate thread. The engine’s work is offloaded from the CPU to the GPU. Moving composition to a non-UI thread means that the animation won’t jitter or be blocked by the app working on the UI thread (such as JavaScript code execution or sync operations). The GPU hardware is optimized for delivering visually rich graphics and makes use of video memory resources. Using the GPU greatly improves performance, allowing animations to run at a smooth and consistent frame rate.
The blog also points out that app developers can go ahead and use Microsoft's own Animation Library if they want to simply use code that's already been made to work with Windows 8. The blog also offers up some example code for developers to use that takes advantage of the Animation Library.
Of course, some app creators might be more ambitious and want to code in some custom Metro-style animations. Windows 8 supports this kind of programming as well and the blog also offers some example code of some custom animation that is not part of the Animation Library, along with a few guidelines for JavaScript and XAML-based apps.
Image via Microsoft
11 Comments - Add comment