Found myself wanting a plugin that lets me create arbitrary curves(custom EasingStyles basically) for animation transforms.
With this tool you can create any curve you want, and the exported modulescript has a function that lets you get the corresponding Y value for any X value. Much like how TweenService:GetValue(x) works
The exported module returns a function which returns the Y value for any given X, similar to TweenService:GetValue() You can use this as you please, I use it for interpolating procedural animation transforms
For those of you trying to figure out how to use this as a substitute for tweening service, here is how I utilized it:
local ExportedCurve = require(game.ReplicatedStorage.ExportedCurve)
local duration = 5
local startTime = tick()
local connection
connection = game:GetService("RunService").Heartbeat:Connect(function()
local elapsedTime = tick() - startTime
local progress = elapsedTime / duration
if progress >= 1 then
progress = 1
connection:Disconnect()
script.Parent:Destroy()
end
script.Parent.Transparency = ExportedCurve:Get(progress)
end)
local ExportedCurve = require(game.ReplicatedStorage.ExportedCurve)
local duration = 5
local startTime = tick()
local connection
local target = Instance.new("Part")
local start = CFrame.new(0, 0, 0)
local goal = CFrame.new(0, 1, 0)
connection = game:GetService("RunService").Heartbeat:Connect(function()
local elapsedTime = tick() - startTime
local progress = elapsedTime / duration
if progress >= 1 then
progress = 1
connection:Disconnect()
end
target.CFrame = start:Lerp(goal, ExportedCurve:Get(progress))
end)