Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By : Michelle M Fernandez
Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By: Michelle M Fernandez

Overview of this book

Table of Contents (19 chapters)
Corona SDK Mobile Game Development Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Transitions


In this chapter, we'll be touching base with transition.to() and transition.from():

  • transition.to(): This animates a display object's properties over time using the easing transitions.

    The syntax is handle = transition.to( target, params ).

  • transition.from(): This is similar to transition.to() except that the starting property values are specified in the function's parameter table, and the final values are the corresponding property values in the target prior to the call. The syntax is handle = transition.from( target, params ).

    The parameters used are as follows:

    • target: This is a display object that will be the target of the transition.

    • params: This is a table that specifies the properties of the display object, which will be animated, and one or more of the following optional non-animated properties:

      • params.time: This specifies the duration of the transition in milliseconds. By default, the duration is 500 ms (0.5 seconds).

      • params.transition: This is by default easing.linear...