1 /** tween easings */ 2 3 module re.util.tweens.ease; 4 5 static import easings; 6 7 public alias EaseFunction = float function(float, float, float, float); 8 9 /// ease functions 10 struct Ease { 11 pragma(inline, true) { 12 13 // Linear Easing functions 14 static float LinearNone(float t, float b, float c, float d) { 15 return easings.EaseLinearNone(t, b, c, d); 16 } 17 18 static float LinearIn(float t, float b, float c, float d) { 19 return easings.EaseLinearIn(t, b, c, d); 20 } 21 22 static float LinearOut(float t, float b, float c, float d) { 23 return easings.EaseLinearOut(t, b, c, d); 24 } 25 26 static float LinearInOut(float t, float b, float c, float d) { 27 return easings.EaseLinearInOut(t, b, c, d); 28 } 29 30 // Sine Easing functions 31 static float SineIn(float t, float b, float c, float d) { 32 return easings.EaseSineIn(t, b, c, d); 33 } 34 35 static float SineOut(float t, float b, float c, float d) { 36 return easings.EaseSineOut(t, b, c, d); 37 } 38 39 static float SineInOut(float t, float b, float c, float d) { 40 return easings.EaseSineInOut(t, b, c, d); 41 } 42 43 // Circular Easing functions 44 static float CircIn(float t, float b, float c, float d) { 45 return easings.EaseCircIn(t, b, c, d); 46 } 47 48 static float CircOut(float t, float b, float c, float d) { 49 return easings.EaseCircOut(t, b, c, d); 50 } 51 52 static float CircInOut(float t, float b, float c, float d) { 53 return easings.EaseCircInOut(t, b, c, d); 54 } 55 56 // Cubic Easing functions 57 static float CubicIn(float t, float b, float c, float d) { 58 return easings.EaseCubicIn(t, b, c, d); 59 } 60 61 static float CubicOut(float t, float b, float c, float d) { 62 return easings.EaseCubicOut(t, b, c, d); 63 } 64 65 static float CubicInOut(float t, float b, float c, float d) { 66 return easings.EaseCubicInOut(t, b, c, d); 67 } 68 69 // Quadratic Easing functions 70 static float QuadIn(float t, float b, float c, float d) { 71 return easings.EaseQuadIn(t, b, c, d); 72 } 73 74 static float QuadOut(float t, float b, float c, float d) { 75 return easings.EaseQuadOut(t, b, c, d); 76 } 77 78 static float QuadInOut(float t, float b, float c, float d) { 79 return easings.EaseQuadInOut(t, b, c, d); 80 } 81 82 // Exponential Easing functions 83 static float ExpoIn(float t, float b, float c, float d) { 84 return easings.EaseExpoIn(t, b, c, d); 85 } 86 87 static float ExpoOut(float t, float b, float c, float d) { 88 return easings.EaseExpoOut(t, b, c, d); 89 } 90 91 static float ExpoInOut(float t, float b, float c, float d) { 92 return easings.EaseExpoInOut(t, b, c, d); 93 } 94 95 // Back Easing functions 96 static float BackIn(float t, float b, float c, float d) { 97 return easings.EaseBackIn(t, b, c, d); 98 } 99 100 static float BackOut(float t, float b, float c, float d) { 101 return easings.EaseBackOut(t, b, c, d); 102 } 103 104 static float BackInOut(float t, float b, float c, float d) { 105 return easings.EaseBackInOut(t, b, c, d); 106 } 107 108 // Bounce Easing functions 109 static float BounceOut(float t, float b, float c, float d) { 110 return easings.EaseBounceOut(t, b, c, d); 111 } 112 113 static float BounceIn(float t, float b, float c, float d) { 114 return easings.EaseBounceIn(t, b, c, d); 115 } 116 117 static float BounceInOut(float t, float b, float c, float d) { 118 return easings.EaseBounceInOut(t, b, c, d); 119 } 120 121 // Elastic Easing functions 122 static float ElasticIn(float t, float b, float c, float d) { 123 return easings.EaseElasticIn(t, b, c, d); 124 } 125 126 static float ElasticOut(float t, float b, float c, float d) { 127 return easings.EaseElasticOut(t, b, c, d); 128 } 129 130 static float ElasticInOut(float t, float b, float c, float d) { 131 return easings.EaseElasticInOut(t, b, c, d); 132 } 133 } 134 }