Skip to content

w1nthinker/path-math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PathMath

do more with Path2D's

Installation

install with wally

get from creator store

edit showcase game

Examples

get both example guis

play showcase game

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/init.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/presets/
    Individual showcase entries for circles, gauges, spinners, arcs, stars, hearts, spirals, polygons, responsive widths, strokes, dynamic endpoints, and more. Each preset keeps its own example logic and uses Utility.luau only for small shared helpers.

  • examples/presets-full/
    Standalone versions of the same presets. Each file fully implements that example without shared preset helper modules.

  • examples/virtualized/
    A stress/demo grid that renders many randomized animated spinners using virtualized-ui.

  • examples/prefabs/
    Roblox model files for trying the demos in Studio.

Getting Started

PathMath is distributed as a Wally package and as a plain Luau module.

To use it in a Roblox project:

  1. Install the package with Wally or copy src/init.luau into your game.
  2. Place it somewhere your UI code can require it, such as ReplicatedStorage.
  3. Create a parent GUI object for the path.
  4. Create a PathMath controller with a path configuration.
  5. Update the controller over time when you want animation.

The examples assume the module is available from ReplicatedStorage as PathMath.

Performance Notes

PathMath is designed around updating existing instances.

For best results:

  • Reuse controllers instead of recreating them during animation.
  • Use Update for grouped changes.
  • Use dynamic path functions only when the path shape itself needs to change.
  • Prefer changing Progress and Offset for 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.

Requirements

PathMath targets Roblox Luau and Roblox UI code that can use Path2D.

The module can be installed through Wally or copied directly into a Roblox project.

The virtualized demo also expects virtualized-ui to be available.

License

This project is licensed under the MIT License. See LICENSE for details.

About

do more with Path2D's

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages