mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
elevator lanterns
This commit is contained in:
@@ -7,34 +7,34 @@
|
||||
type EaseFunction = (n: number) -> number
|
||||
type LinearFunction = (a: number, b: number, t: number) -> number
|
||||
|
||||
export type EasingStyles = {
|
||||
export type Math = {
|
||||
Linear: LinearFunction,
|
||||
InOutBack: EaseFunction,
|
||||
OutBounce: EaseFunction,
|
||||
InQuad: EaseFunction
|
||||
InQuad: EaseFunction,
|
||||
}
|
||||
|
||||
local Ease = {} :: EasingStyles
|
||||
local Math = {} :: Math
|
||||
--Google straight up gives wrong/bad math
|
||||
|
||||
function Ease.Linear(a,b,t)
|
||||
function Math.Linear(a,b,t)
|
||||
return a-a*t+b*t
|
||||
end
|
||||
|
||||
local c = 2.59491
|
||||
function Ease.InOutBack(n)
|
||||
function Math.InOutBack(n)
|
||||
return n<.5 and 2*n*n*(-c+2*n+2*c*n) or 3*(-1+n)*(-1+n)*(-2-c+2*n+2*c*n)
|
||||
end
|
||||
|
||||
local n1, d1 = 7.5625, 2.75
|
||||
function Ease.OutBounce(n)
|
||||
function Math.OutBounce(n)
|
||||
return (n<0.363636 and n*n*n1 or
|
||||
n<0.727273 and (.75*(1.*d1-2.*n*n1)) or
|
||||
n<0.909091 and (.9375*(1.*d1-2.4*n*n1)/d1)) or (.984375*(1.*d1-2.66667*n*n1))/d1
|
||||
end
|
||||
|
||||
function Ease.InQuad(n)
|
||||
function Math.InQuad(n)
|
||||
return n*n
|
||||
end
|
||||
|
||||
return Ease
|
||||
return Math
|
||||
@@ -43,7 +43,7 @@ function Tags.constructor()
|
||||
end
|
||||
|
||||
function Tags:Request(Name)
|
||||
return self.__export[Name] or error(`Error requesting tag name, tag name "{Name}" does not exist`, 2)
|
||||
return self.__export[Name] or error(`Error requesting tag name, tag name "{Name}" does not exist.`, 2)
|
||||
end
|
||||
|
||||
function Tags:Nuke()
|
||||
|
||||
Reference in New Issue
Block a user