diff --git a/easelib.lua b/easelib.lua index 35aee15..f7b8b61 100644 --- a/easelib.lua +++ b/easelib.lua @@ -172,4 +172,27 @@ table.insert(self, {'inOutBack', function(t, a) or 0.5 + 0.5 * self.outBack(t * 2 - 1, a) end, {0, 3, 1.70158, 'a'}, overridemin = true, type = 'inout'}) +-- custom stuff + +local function exposin(x, e) + if ((x - 1) % 4) < 2 then + return math.pow(math.abs(x % 4 - 2), e) - 1 + else + return -math.pow(math.abs((x + 2) % 4 - 2), e) + 1 + end +end +local function expocos(x, e) + return exposin(x + 1, e) +end + +table.insert(self, {'inExponent*', function(x, e) + return 1 - -expocos(1 - x, e) +end, {0, 10, 2, 'e'}, type = 'in'}) +table.insert(self, {'outExponent*', function(x, e) + return -expocos(x, e) +end, {0, 10, 2, 'e'}, type = 'out'}) +table.insert(self, {'inOutExponent*', function(x, e) + return 0.5 - 0.5 * exposin(x * 2, e) +end, {0, 10, 2, 'e'}, type = 'inout'}) + return self diff --git a/screenshot1.png b/screenshot1.png index 5a3faac..51d49f1 100644 Binary files a/screenshot1.png and b/screenshot1.png differ diff --git a/screenshot2.png b/screenshot2.png index 0d49b4f..b0dc23e 100644 Binary files a/screenshot2.png and b/screenshot2.png differ