|
|
@ -93,7 +93,6 @@ class Ease
|
|
|
|
@value = @start
|
|
|
|
@value = @start
|
|
|
|
@last_updated = @start_frame
|
|
|
|
@last_updated = @start_frame
|
|
|
|
@finished = false
|
|
|
|
@finished = false
|
|
|
|
console.log(this)
|
|
|
|
|
|
|
|
# TODO: Investigate whether JS engines cache deterministic outcomes by themselves. If not,
|
|
|
|
# TODO: Investigate whether JS engines cache deterministic outcomes by themselves. If not,
|
|
|
|
# the below could provide some performance gain.
|
|
|
|
# the below could provide some performance gain.
|
|
|
|
#@bounce_constant_1 = 1 / 2.75
|
|
|
|
#@bounce_constant_1 = 1 / 2.75
|
|
|
@ -101,7 +100,6 @@ class Ease
|
|
|
|
#@bounce_constant_3 = 2.5 / 2.75
|
|
|
|
#@bounce_constant_3 = 2.5 / 2.75
|
|
|
|
|
|
|
|
|
|
|
|
goToNext: =>
|
|
|
|
goToNext: =>
|
|
|
|
console.log("next", @next)
|
|
|
|
|
|
|
|
@func = this[@next.type]
|
|
|
|
@func = this[@next.type]
|
|
|
|
@change = @next.change
|
|
|
|
@change = @next.change
|
|
|
|
@value = @next.value
|
|
|
|
@value = @next.value
|
|
|
@ -111,6 +109,7 @@ class Ease
|
|
|
|
@change = @next.change
|
|
|
|
@change = @next.change
|
|
|
|
@invert_repeat = @next.invert_repeat
|
|
|
|
@invert_repeat = @next.invert_repeat
|
|
|
|
@params = @next.params
|
|
|
|
@params = @next.params
|
|
|
|
|
|
|
|
@duration = @next.duration
|
|
|
|
@finished = false
|
|
|
|
@finished = false
|
|
|
|
@next = @next.next
|
|
|
|
@next = @next.next
|
|
|
|
|
|
|
|
|
|
|
@ -195,4 +194,3 @@ class Ease
|
|
|
|
else
|
|
|
|
else
|
|
|
|
time = time - 2
|
|
|
|
time = time - 2
|
|
|
|
return @change / 2 * (Math.sqrt(1 - time * time) + 1) + @begin
|
|
|
|
return @change / 2 * (Math.sqrt(1 - time * time) + 1) + @begin
|
|
|
|
|
|
|
|
|