{"id":"w1nthinker/path-math","name":"path-math","scope":"w1nthinker","platform":"roblox","description":"do more with Path2D's","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"ff34aa6f27829c03ec2ad7caf0084b027db68833bf7e821081336cb4521af355","likes":0,"downloads":0,"install":"forest install w1nthinker/path-math","url":"https://forest.dev/p/roblox/w1nthinker/path-math","files":"https://api.forest.dev/ai/package/roblox/w1nthinker/path-math/files","readme":"# PathMath\ndo more with Path2D's\n\n## Examples\nget both example [guis](/examples/prefabs)\n\n[play the showcase game](https://www.roblox.com/games/85879577952024/PathMath-Showcase)\n\n[get the Creator Store model](https://create.roblox.com/store/asset/79483342482432/PathMath)\n\n[virtualized](/examples/virtualized) grid with different random presets using [virtualized-ui](https://github.com/w1nthinker/virtualized-ui)\n\nhttps://github.com/user-attachments/assets/a4f2ee69-2dac-4f6e-8987-d5539fbd33aa\n\ndifferent examples from [presets](/examples/presets)\n\nhttps://github.com/user-attachments/assets/9b9ed90d-3146-47c7-9ed5-98432c574e28\n\nboth in parallel\n\nhttps://github.com/user-attachments/assets/5e4f6ad1-1d51-4b3e-ab86-7fac63e8c52a\n\n- `src/init.luau`  \n  The library module. This is the file you use in your Roblox project.\n\n- `examples/ExamplesClient.local.luau`  \n  Demo runner for the standard showcase UI.\n\n- `examples/Shared.luau`  \n  Shared demo helpers and generated path shapes used by the examples.\n\n- `examples/presets/`  \n  Individual showcase entries for circles, gauges, spinners, arcs, stars, hearts, spirals, polygons, responsive widths, strokes, dynamic endpoints, and more.\n\n- `examples/virtualized/`  \n  A stress/demo grid that renders many randomized animated spinners using `virtualized-ui`.\n\n- `examples/prefabs/`  \n  Roblox model files for trying the demos in Studio.\n\n## Getting Started\n\nPathMath is distributed as a Wally package and as a plain Luau module.\n\nTo use it in a Roblox project:\n\n1. Install the package with Wally or copy `src/init.luau` into your game.\n2. Place it somewhere your UI code can require it, such as `ReplicatedStorage`.\n3. Create a parent GUI object for the path.\n4. Create a PathMath controller with a path configuration.\n5. Update the controller over time when you want animation.\n\nThe examples assume the module is available from `ReplicatedStorage` as `PathMath`.\n\n## Performance Notes\n\nPathMath is designed around updating existing instances.\n\nFor best results:\n\n- Reuse controllers instead of recreating them during animation.\n- Use `Update` for grouped changes.\n- Use dynamic path functions only when the path shape itself needs to change.\n- Prefer changing `Progress` and `Offset` for common animations.\n- Keep sample counts reasonable unless a curve needs more precision.\n- Pass current viewport size when using viewport-based responsive widths.\n\nFor very large lists of animated paths, use virtualization so only visible UI items are actively rendered.\n\n## Requirements\n\nPathMath targets Roblox Luau and Roblox UI code that can use `Path2D`.\n\nThe module can be installed through Wally or copied directly into a Roblox project.\n\nThe virtualized demo also expects [`virtualized-ui`](https://github.com/w1nthinker/virtualized-ui) to be available.\n\n## License\n\nThis project is licensed under the MIT License. See `LICENSE` for details.\n","readmeTruncated":false}