do more with Path2D's
get both example guis
virtualized grid with different random presets using virtualized-ui
2026-04-26.10-15-35.mov
different examples from presets
2026-04-26.10-16-06.mov
both in parallel
2026-04-26.10-11-55.mov
-
src/PathMath.luau
The library module. This is the file you use in your Roblox project. -
examples/ExamplesClient.local.luau
Demo runner for the standard showcase UI. -
examples/Shared.luau
Shared demo helpers and generated path shapes used by the examples. -
examples/presets/
Individual showcase entries for circles, gauges, spinners, arcs, stars, hearts, spirals, polygons, responsive widths, strokes, dynamic endpoints, and more. -
examples/virtualized/
A stress/demo grid that renders many randomized animated spinners usingvirtualized-ui. -
examples/prefabs/
Roblox model files for trying the demos in Studio.
PathMath is currently distributed as a plain Luau module.
To use it in a Roblox project:
- Copy
src/PathMath.luauinto your game. - Place it somewhere your UI code can require it, such as
ReplicatedStorage. - Create a parent GUI object for the path.
- Create a PathMath controller with a path configuration.
- Update the controller over time when you want animation.
The examples assume the module is available from ReplicatedStorage as PathMath.
PathMath is designed around updating existing instances.
For best results:
- Reuse controllers instead of recreating them during animation.
- Use
Updatefor grouped changes. - Use dynamic path functions only when the path shape itself needs to change.
- Prefer changing
ProgressandOffsetfor common animations. - Keep sample counts reasonable unless a curve needs more precision.
- Pass current viewport size when using viewport-based responsive widths.
For very large lists of animated paths, use virtualization so only visible UI items are actively rendered.
PathMath targets Roblox Luau and Roblox UI code that can use Path2D.
No external package manager setup is included in this repository. The module can be copied directly into a Roblox project.
The virtualized demo also expects virtualized-ui to be available.
This project is licensed under the MIT License. See LICENSE for details.