consistent formatting

This commit is contained in:
jill 2021-09-18 01:38:04 +03:00
parent 83d23d8d72
commit 63b1a08df8
4 changed files with 102 additions and 105 deletions

View file

@ -33,100 +33,100 @@ table.insert(self, {'spike', function(t) return exp(-10 * abs(2 * t - 1)) end})
table.insert(self, {'inverse', function(t) return t * t * (1 - t) * (1 - t) / (0.5 - t) end})
table.insert(self, {'inSine', function(x)
return 1 - cos(x * (pi * 0.5))
return 1 - cos(x * (pi * 0.5))
end})
table.insert(self, {'outSine', function(x)
return sin(x * (pi * 0.5))
return sin(x * (pi * 0.5))
end})
table.insert(self, {'inOutSine', function(x)
return 0.5 - 0.5 * cos(x * pi)
return 0.5 - 0.5 * cos(x * pi)
end})
table.insert(self, {'inQuad', function(t) return t * t end})
table.insert(self, {'outQuad', function(t) return -t * (t - 2) end})
table.insert(self, {'inOutQuad', function(t)
t = t * 2
if t < 1 then
return 0.5 * t ^ 2
else
return 1 - 0.5 * (2 - t) ^ 2
end
t = t * 2
if t < 1 then
return 0.5 * t ^ 2
else
return 1 - 0.5 * (2 - t) ^ 2
end
end})
table.insert(self, {'inCubic', function(t) return t * t * t end})
table.insert(self, {'outCubic', function(t) return 1 - (1 - t) ^ 3 end})
table.insert(self, {'inOutCubic', function(t)
t = t * 2
if t < 1 then
return 0.5 * t ^ 3
else
return 1 - 0.5 * (2 - t) ^ 3
end
t = t * 2
if t < 1 then
return 0.5 * t ^ 3
else
return 1 - 0.5 * (2 - t) ^ 3
end
end})
table.insert(self, {'inQuart', function(t) return t * t * t * t end})
table.insert(self, {'outQuart', function(t) return 1 - (1 - t) ^ 4 end})
table.insert(self, {'inOutQuart', function(t)
t = t * 2
if t < 1 then
return 0.5 * t ^ 4
else
return 1 - 0.5 * (2 - t) ^ 4
end
t = t * 2
if t < 1 then
return 0.5 * t ^ 4
else
return 1 - 0.5 * (2 - t) ^ 4
end
end})
table.insert(self, {'inQuint', function(t) return t ^ 5 end})
table.insert(self, {'outQuint', function(t) return 1 - (1 - t) ^ 5 end})
table.insert(self, {'inOutQuint', function(t)
t = t * 2
if t < 1 then
return 0.5 * t ^ 5
else
return 1 - 0.5 * (2 - t) ^ 5
end
t = t * 2
if t < 1 then
return 0.5 * t ^ 5
else
return 1 - 0.5 * (2 - t) ^ 5
end
end})
table.insert(self, {'inExpo', function(t) return 1000 ^ (t - 1) - 0.001 end})
table.insert(self, {'outExpo', function(t) return 1.001 - 1000 ^ -t end})
table.insert(self, {'inOutExpo', function(t)
t = t * 2
if t < 1 then
return 0.5 * 1000 ^ (t - 1) - 0.0005
else
return 1.0005 - 0.5 * 1000 ^ (1 - t)
end
t = t * 2
if t < 1 then
return 0.5 * 1000 ^ (t - 1) - 0.0005
else
return 1.0005 - 0.5 * 1000 ^ (1 - t)
end
end})
table.insert(self, {'inCirc', function(t) return 1 - sqrt(1 - t * t) end})
table.insert(self, {'outCirc', function(t) return sqrt(-t * t + 2 * t) end})
table.insert(self, {'inOutCirc', function(t)
t = t * 2
if t < 1 then
return 0.5 - 0.5 * sqrt(1 - t * t)
else
t = t - 2
return 0.5 + 0.5 * sqrt(1 - t * t)
end
t = t * 2
if t < 1 then
return 0.5 - 0.5 * sqrt(1 - t * t)
else
t = t - 2
return 0.5 + 0.5 * sqrt(1 - t * t)
end
end})
table.insert(self, {'outBounce', function(t)
if t < 1 / 2.75 then
return 7.5625 * t * t
elseif t < 2 / 2.75 then
t = t - 1.5 / 2.75
return 7.5625 * t * t + 0.75
elseif t < 2.5 / 2.75 then
t = t - 2.25 / 2.75
return 7.5625 * t * t + 0.9375
else
t = t - 2.625 / 2.75
return 7.5625 * t * t + 0.984375
end
if t < 1 / 2.75 then
return 7.5625 * t * t
elseif t < 2 / 2.75 then
t = t - 1.5 / 2.75
return 7.5625 * t * t + 0.75
elseif t < 2.5 / 2.75 then
t = t - 2.25 / 2.75
return 7.5625 * t * t + 0.9375
else
t = t - 2.625 / 2.75
return 7.5625 * t * t + 0.984375
end
end})
table.insert(self, {'inBounce', function(t) return 1 - self.outBounce(1 - t) end})
table.insert(self, {'inOutBounce', function(t)
if t < 0.5 then
return self.inBounce(t * 2) * 0.5
else
return self.outBounce(t * 2 - 1) * 0.5 + 0.5
end
if t < 0.5 then
return self.inBounce(t * 2) * 0.5
else
return self.outBounce(t * 2 - 1) * 0.5 + 0.5
end
end})
return self

View file

@ -54,16 +54,13 @@ minEase = false
padding = 6
margin = 4
-- slider
mixpoint = 0.5
oldmixpoint = 0.5
local mixpointtimer = 0 -- easter egg thing
local mixpointspin = 0
-- graph
-- dropdown bullshit
-- rendering
function love.load()