Basic Motion and Transitions
基本運動和轉換
One of the most powerful things about the Corona SDK is that any display object can be animated. This is a testament to the flexible graphics model that Corona offers.
其中最強大的東西有關Corona SDK的是,任何顯示對象可以是動畫。這是一個證明了靈活的圖形模型,Corona 優惠。
Animations allow you to create visually-rich and engaging user experiences. Animations are accomplished by generating a sequence of frames that evolve smoothly from frame to frame. The term tween (short for inbetween) is a term describing the process in which such intermediate frames are generated. It is often used as shorthand to indicate that a property of an object will change during the animation, as in tweening the position.
動畫讓你創建視覺效果豐富,引人入勝的用戶體驗。動畫過程是通過產生一個序列平滑演進的幀幀與幀。這個詞之間(簡稱插圖中)是一個術語描述的過程中產生這些中間幀。它經常被用來作為縮寫,表示一個對象的屬性將改變在動畫,如在補間的立場。
Transitions 轉換
The transition library allows you to easily create animations with only a single line of code by allowing you to tween one or more properties of a display object. For example, you can fadeout a display object by tweening its alpha property (the alpha property transitions from 1.0 to 0).
轉換庫允許您輕鬆地創建動畫,只有一行的代碼,讓您一個或多個屬性之間的顯示對象。例如,您可以淡出顯示其α補間對象屬性(從 1.0 alpha屬性轉換為 0)。
The simplest way to do this is to use the transition.to method which takes a display object as its first argument and a table containing the control parameters as its second. The control parameters specify the duration of the animation, an optional delay for when to start the animation, and the final values of properties for the display object. The intermediate values for a property are determined by an easing function that is also specified as a control parameter. By default this is a linear function.
最簡單的方式做,這是使用方法,需要一個 transition.to顯示對象作為它的第一個參數,一個包含了控制參數作為其第二個。控制參數指定的期限動畫,可選延遲何時開始動畫,最終值屬性的顯示對象。中間值的屬性是由一個緩和功能,也被指定為控制參數。默認情況下這是一個線性函數。
Below are some examples of how to animate a square (see Transition2 in the sample code):
下面是一些例子如何動畫一個正方形(見 Transition2在示例代碼):
基本運動和轉換
One of the most powerful things about the Corona SDK is that any display object can be animated. This is a testament to the flexible graphics model that Corona offers.
其中最強大的東西有關Corona SDK的是,任何顯示對象可以是動畫。這是一個證明了靈活的圖形模型,Corona 優惠。
Animations allow you to create visually-rich and engaging user experiences. Animations are accomplished by generating a sequence of frames that evolve smoothly from frame to frame. The term tween (short for inbetween) is a term describing the process in which such intermediate frames are generated. It is often used as shorthand to indicate that a property of an object will change during the animation, as in tweening the position.
動畫讓你創建視覺效果豐富,引人入勝的用戶體驗。動畫過程是通過產生一個序列平滑演進的幀幀與幀。這個詞之間(簡稱插圖中)是一個術語描述的過程中產生這些中間幀。它經常被用來作為縮寫,表示一個對象的屬性將改變在動畫,如在補間的立場。
Transitions 轉換
The transition library allows you to easily create animations with only a single line of code by allowing you to tween one or more properties of a display object. For example, you can fadeout a display object by tweening its alpha property (the alpha property transitions from 1.0 to 0).
轉換庫允許您輕鬆地創建動畫,只有一行的代碼,讓您一個或多個屬性之間的顯示對象。例如,您可以淡出顯示其α補間對象屬性(從 1.0 alpha屬性轉換為 0)。
The simplest way to do this is to use the transition.to method which takes a display object as its first argument and a table containing the control parameters as its second. The control parameters specify the duration of the animation, an optional delay for when to start the animation, and the final values of properties for the display object. The intermediate values for a property are determined by an easing function that is also specified as a control parameter. By default this is a linear function.
最簡單的方式做,這是使用方法,需要一個 transition.to顯示對象作為它的第一個參數,一個包含了控制參數作為其第二個。控制參數指定的期限動畫,可選延遲何時開始動畫,最終值屬性的顯示對象。中間值的屬性是由一個緩和功能,也被指定為控制參數。默認情況下這是一個線性函數。
Below are some examples of how to animate a square (see Transition2 in the sample code):
下面是一些例子如何動畫一個正方形(見 Transition2在示例代碼):

