Difference between revisions of "Tweeners"

From Official Kodi Wiki
Jump to: navigation, search
(Added some animating gifs to show differeent tweens.)
Line 44: Line 44:
 
<br style="clear:both" />
 
<br style="clear:both" />
  
 +
==Back Tweener==
 +
[[Image:tween_back_out.png|thumb|400px|left|Back Tweener Easing Out]]
 +
[[Image:anim_back_out.gif|none|frame|Back Easing Out Animation]]
 +
<br style="clear:both" />
 +
[[Image:tween_back_inout.png|400px|thumb|left|Back Tweener Easing InOut]]
 +
[[Image:anim_back_inout.gif|none|frame|Back Easing InOut Animation]]
 +
<br style="clear:both" />
 +
[[Image:tween_back_in.png|400px|thumb|left|Back Tweener Easing In]]
 +
[[Image:anim_back_in.gif|none|frame|Back Easing In Animation]]
 +
<br style="clear:both" />
  
 
==Cubic Tweener==
 
==Cubic Tweener==
Line 54: Line 64:
 
[[Image:tween_cubic_in.png|400px|thumb|left|Cubic Tweener Easing In]]
 
[[Image:tween_cubic_in.png|400px|thumb|left|Cubic Tweener Easing In]]
 
[[Image:anim_cubic_in.gif|none|frame|Cubic Easing In Animation]]
 
[[Image:anim_cubic_in.gif|none|frame|Cubic Easing In Animation]]
<br style="clear:both" />
 
 
==Sine Tweener==
 
[[Image:tween_sine_out.png|thumb|400px|left|Sine Tweener Easing Out]]
 
[[Image:anim_sine_out.gif|none|frame|Sine Easing Out Animation]]
 
<br style="clear:both" />
 
[[Image:tween_sine_inout.png|400px|thumb|left|Sine Tweener Easing InOut]]
 
[[Image:anim_sine_inout.gif|none|frame|Sine Easing InOut Animation]]
 
<br style="clear:both" />
 
[[Image:tween_sine_in.png|400px|thumb|left|Sine Tweener Easing In]]
 
[[Image:anim_sine_in.gif|none|frame|Sine Easing In Animation]]
 
 
<br style="clear:both" />
 
<br style="clear:both" />
  
Line 78: Line 77:
 
<br style="clear:both" />
 
<br style="clear:both" />
  
==Back Tweener==
+
==Sine Tweener==
[[Image:tween_back_out.png|thumb|400px|left|Back Tweener Easing Out]]
+
[[Image:tween_sine_out.png|thumb|400px|left|Sine Tweener Easing Out]]
[[Image:anim_back_out.gif|none|frame|Back Easing Out Animation]]
+
[[Image:anim_sine_out.gif|none|frame|Sine Easing Out Animation]]
 
<br style="clear:both" />
 
<br style="clear:both" />
[[Image:tween_back_inout.png|400px|thumb|left|Back Tweener Easing InOut]]
+
[[Image:tween_sine_inout.png|400px|thumb|left|Sine Tweener Easing InOut]]
[[Image:anim_back_inout.gif|none|frame|Back Easing InOut Animation]]
+
[[Image:anim_sine_inout.gif|none|frame|Sine Easing InOut Animation]]
 
<br style="clear:both" />
 
<br style="clear:both" />
[[Image:tween_back_in.png|400px|thumb|left|Back Tweener Easing In]]
+
[[Image:tween_sine_in.png|400px|thumb|left|Sine Tweener Easing In]]
[[Image:anim_back_in.gif|none|frame|Back Easing In Animation]]
+
[[Image:anim_sine_in.gif|none|frame|Sine Easing In Animation]]
 
<br style="clear:both" />
 
<br style="clear:both" />
  
  
 
[[category:Skin Development]]
 
[[category:Skin Development]]

Revision as of 09:35, 26 July 2007

1 What is a Tween?

A Tween defines how an animation progresses from its initial value to its final value. The simplest way this can be accomplished is to go straight from start to finish in equal steps. This results in a smooth transition, however it starts and stops abruptly and tends to be a bit unnatural. Unnatural in the sense that, in the real world, you never see a linear transition. In the real world, transitions (movements, deformations, etc) are always accompanied by varying degrees of acceleration and deceleration. Some real world examples that come to mind: the movement of a pendulum, a ball bouncing, our breathing pattern, a bungee jump. Tweens basically try to mathematically recreate some of these transitions and can help add naturalism to animations.

1.1 What is Easing?

All tweens (except Linear) support an easing attribute that can be one of "in", "out", or "inout". The Quadratic tweener only supports "in" and "out". The default easing method is "out". Easing is basically the direction of the tween action. Looking at the various graphs below and trying the tweens out will make the concept of easing, easier (hehe, say that ten times in a row) to understand.

2 Supported Tweens

Currently, XBMC's skin engine supports eight different tweens: "linear", "quadratic", "bounce", "elastic", "cubic", "circle", "sine" and "back". They are set in an animation using the tween attribute.

2.1 Linear Tweener

Linear Tweener
Linear Animation


2.2 Quadratic Tweener

Quadratic Tweener Easing Out
Quadratic Easing Out Animation


Quadratic Tweener Easing In
Quadratic Easing In Animation


2.3 Bounce Tweener

Bounce Tweener Easing Out
Bounce Easing Out Animation


Bounce Tweener Easing InOut
Bounce Easing InOut Animation


Bounce Tweener Easing In
Bounce Easing In Animation


2.4 Elastic Tweener

Elastic Tweener Easing Out
Elastic Easing Out Animation


Elastic Tweener Easing InOut
Elastic Easing InOut Animation


Elastic Tweener Easing In
Elastic Easing In Animation


2.5 Back Tweener

Back Tweener Easing Out
Back Easing Out Animation


Back Tweener Easing InOut
Back Easing InOut Animation


Back Tweener Easing In
Back Easing In Animation


2.6 Cubic Tweener

Cubic Tweener Easing Out
Cubic Easing Out Animation


Cubic Tweener Easing InOut
Cubic Easing InOut Animation


Cubic Tweener Easing In
Cubic Easing In Animation


2.7 Circle Tweener

Circle Tweener Easing Out
Circle Easing Out Animation


Circle Tweener Easing InOut
Circle Easing InOut Animation


Circle Tweener Easing In
Circle Easing In Animation


2.8 Sine Tweener

Sine Tweener Easing Out
Sine Easing Out Animation


Sine Tweener Easing InOut
Sine Easing InOut Animation


Sine Tweener Easing In
Sine Easing In Animation