1.0.0 • Published 11 months 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 Tween
s, including implementing the same methods and PlaybackState
s.
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
11 months ago