From bca21d496b657f943c1f9758194b6b1c4e615e5d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 9 May 2014 02:24:10 +0200 Subject: [PATCH] Linear easing function --- compiled/radium.js | 5 +++++ radium/engine.ease.coffee | 3 +++ 2 files changed, 8 insertions(+) diff --git a/compiled/radium.js b/compiled/radium.js index 722971b..078030d 100644 --- a/compiled/radium.js +++ b/compiled/radium.js @@ -690,6 +690,7 @@ this.invert_repeat = invert_repeat; this.next = next; this.params = params; + this.linearNone = __bind(this.linearNone, this); this.expoInOut = __bind(this.expoInOut, this); this.expoOut = __bind(this.expoOut, this); this.expoIn = __bind(this.expoIn, this); @@ -911,6 +912,10 @@ } }; + Ease.prototype.linearNone = function(time) { + return this.change * time / this.duration + this.start; + }; + return Ease; })(); diff --git a/radium/engine.ease.coffee b/radium/engine.ease.coffee index e95224f..fb882eb 100644 --- a/radium/engine.ease.coffee +++ b/radium/engine.ease.coffee @@ -254,3 +254,6 @@ class Ease else return @change / 2 * (-Math.pow(2, -10 * (time - 1)) + 2) + @start + linearNone: (time) => + return @change * time / @duration + @start +