1.0.0 • Published 1 year ago
@firere/custom-tween v1.0.0
CustomTween
A typed module which allows you to use tweens in Roblox with any easing function. It tries to behave as closely as possible to the behaviour of regular Tweens, including implementing the same methods and PlaybackStates.
Example usage
import CustomTween from "@firere/custom-tween";
const gui = new Instance("ScreenGui");
const box = new Instance("Frame");
box.Size = UDim2.fromOffset(100, 100);
box.Parent = gui;
gui.Parent = Players.LocalPlayer.FindFirstChild("PlayerGui") as PlayerGui;
const tween = new CustomTween(box, { time: 5, easing: (x) => 1 - math.pow(1 - x, 5) }, { Position: UDim2.fromScale(1, 0) });
tween.Play();
task.wait(2.5);
tween.Cancel();1.0.0
1 year ago