Introducing the new Animation Plugin

Introducing the new Animation Plugin

Corona Labs is pleased to announce the immediate availability of a new plugin: Animations. This plugin was originally planned to be an extension to the existing transition.* library. During the design, there were sufficient changes that warranted it being a new library. We also decided to make this a plugin instead of a core feature to help keep the core lightweight.

The plugin is broken into two main categories: tweens and timelines. Tweens are your standard transitions like moving an object over time, fading an object in and out, etc. Tweens have new features including scalable speeds and additional events. Timelines allow you to have more control over what happens to a tween over time. You can set timeline markers that you can advance or return to. You can have events fire when the timeline passes a marker.

Since it’s a plugin, you will need to go to the Corona Marketplace and activate it.

Next you will need to include it in your build.settings:

And require the plugin in modules where you will use it:

For normal transitions, the call is now:

Notice there are two tables involved, the first table is for object parameters, the second one for transition parameters.

For timelines, you can now program animations that can contain multiple sequential and/or overlapping tweens, each performing unique tweens on one or multiple objects. Additionally, you can set time markers anywhere across the span of the timeline as jump-to points. For example, you could:

Which will do a transition that moves an object back and forth on the X axis five times over four seconds. Then starting one second in, move the object down the screen over four seconds and setting markers to allow you to go back to the beginning of the timeline or jump to two seconds in.

The animation plugin is free to use. You can learn more about the plugin and its new features by reading the documentation for the plugin. Like many of our other Lua based libraries, we are going to go ahead and make this open source so you can download the source code and make your own changes to the library.

Let us know what you think about this new great addition to Corona in our Community Forums.

Rob Miracle
[email protected]

Rob is the Developer Relations Manager for Corona Labs. Besides being passionate about helping other developers make great games using Corona, he is also enjoys making games in his spare time. Rob has been coding games since 1979 from personal computers to mainframes. He has over 16 years professional experience in the gaming industry.

No Comments

Sorry, the comment form is closed at this time.