This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import haxe.ds.Vector; | |
/** | |
* BezierEasing - use 2d bezier curve to describe easing function. Follows specification of CSS3 `cubic-bezier` | |
* You can easily get desired values in the cubic-bezier editor: http://cubic-bezier.com/ | |
* Implementation article - http://greweb.me/2012/02/bezier-curve-based-easing-functions-from-concept-to-implementation/ | |
* The algorithm uses combination of newton and bisection methods (http://en.wikipedia.org/wiki/Brent%27s_method#Dekker.27s_method) | |
* to approximate bezier function. Please note that this method is much more slower than direct easing functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
class Easings | |
{ | |
//Standard easing functions | |
public static inline function easeInQuad(t:Float):Float { return t*t } | |
public static inline function easeOutQuad(t:Float):Float { return t*(2-t) } | |
public static inline function easeInOutQuad(t:Float):Float { return t<.5 ? 2*t*t : -1+(4-2*t)*t } | |
public static inline function easeInCubic(t:Float):Float { return t*t*t } | |
public static inline function easeOutCubic(t:Float):Float { return (--t)*t*t+1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ; | |
import List; | |
import tink.core.Noise; | |
import tink.core.Signal; | |
import tink.core.SignalTrigger; | |
using Lambda; | |
typedef Flow = Void -> Void; |
NewerOlder