From 3d35f95c15606d9fb7e1ed07b687d72fd02d716d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 8 May 2014 23:36:35 +0200 Subject: [PATCH] Add inverse repeats --- compiled/radium.js | 4 ++++ radium/engine.ease.coffee | 3 +++ 2 files changed, 7 insertions(+) diff --git a/compiled/radium.js b/compiled/radium.js index 0615e88..d7ccf42 100644 --- a/compiled/radium.js +++ b/compiled/radium.js @@ -729,6 +729,10 @@ if (current_frame >= this.start_frame + this.duration) { if (this.infinite) { this.start_frame = current_frame; + if (this.invert_repeat) { + this.start = this.start + this.change; + this.change = -this.change; + } return this.value = this.start; } else if (this.next != null) { return this.goToNext(); diff --git a/radium/engine.ease.coffee b/radium/engine.ease.coffee index 6a3764b..71ada8a 100644 --- a/radium/engine.ease.coffee +++ b/radium/engine.ease.coffee @@ -117,6 +117,9 @@ class Ease if current_frame >= @start_frame + @duration if @infinite @start_frame = current_frame + if @invert_repeat + @start = @start + @change + @change = -@change @value = @start else if @next? @goToNext()