1////////////////////////////////////////////////////////////////////////////////
2//
3//  ADOBE SYSTEMS INCORPORATED
4//  Copyright 2008 Adobe Systems Incorporated
5//  All Rights Reserved.
6//
7//  NOTICE: Adobe permits you to use, modify, and distribute this file
8//  in accordance with the terms of the license agreement accompanying it.
9//
10////////////////////////////////////////////////////////////////////////////////
11package spark.effects.easing
12{
13/**
14 *  The IEaser interface is implemented by classes that provide time-easing
15 *  functionality for the Animation class.
16 *  Implementors are responsible for the single
17 *  function, <code>ease()</code>, which takes and returns a fraction according
18 *  to the easing behavior desired. As a simple example, LinearEase simply
19 *  returns the same input fraction, since there is no easing performed by
20 *  that easer. As another example, a reversing easer could be written which
21 *  returned the inverse fraction, (1 - <code>fraction</code>).
22 *
23 *  <p>By easing the fractional values of the time elapsed in an animation,
24 *  these classes are easing the resulting values of the animation, but they
25 *  only have to deal with the fractional value of time instead of any
26 *  specific object types.</p>
27 *
28 *  @see spark.effects.animation.Animation
29 *
30 *  @langversion 3.0
31 *  @playerversion Flash 10
32 *  @playerversion AIR 1.5
33 *  @productversion Flex 4
34 */
35public interface IEaser
36{
37    /**
38     *  Takes the fraction representing the elapsed duration of an animation
39     *  (a value between 0.0 to 1.0) and returns a new elapsed value.
40     *  This  value is used to calculate animated property values.
41     *  By changing the value of the elapsed fraction, you effectively change
42     *  the animation of the property.
43     *
44     *  @param fraction The elapsed fraction of an animation, from 0.0 to 1.0.
45     *
46     *  @return The eased value for the elapsed time. Typically, this value
47     *  should be constrained to lie between 0.0 and 1.0, although it is possible
48     *  to return values outside of this range. Note that the results of
49     *  returning such values are undefined, and depend on what kind of
50     *  effects are using this eased value. For example, an object moving
51     *  in a linear fashion can have positions calculated outside of its start
52     *  and end point without a problem, but other value types (such as color)
53     *  may not result in desired effects if they use time values that cause
54     *  them to surpass their endpoint values.
55     *
56     *  @langversion 3.0
57     *  @playerversion Flash 10
58     *  @playerversion AIR 1.5
59     *  @productversion Flex 4
60     */
61    function ease(fraction:Number):Number;
62}
63}
64