search/
Start typing to search packages!
package_2
splynx
By @gigahd
Roblox
Mirrored from WallySplynx
Fast splines for Roblox. Linear, Bezier, Hermite, Catmull-Rom, cardinal and B-splines, with constant-speed movement along any of them.
Install
With Wally:
[dependencies]
Splynx = "gigahd/splynx@0.1.0"
Use
local Splynx = require(path.to.Splynx)
local spline = Splynx.catmullRom({
Vector3.new(0, 0, 0),
Vector3.new(10, 5, 0),
Vector3.new(20, 0, 0),
})
-- Move a part along it at 12 studs per second
local distance, hint = 0, nil
RunService.Heartbeat:Connect(function(deltaTime)
distance = (distance + 12 * deltaTime) % spline:getLength()
local position
position, hint = spline:getPosAtDistance(distance, hint)
part.Position = position
end)
Need the fastest lookups and won't edit the spline? Splynx.sampled(spline, 0.5) makes a static copy with constant-time
distance lookups.
Develop
Tools are managed with Rokit: rokit install.
lune run test: correctness checkslune run bench: benchmarksrojo serve test.project.json: the same checks plus live visualizations in Studio (press F8 and drag the points)npx moonwave dev: the documentation site
License
MIT
Package Details
Install command (Click to copy)
Version
0.1.0
License
MIT
Safe for commercial use
Automated license review — not legal advice.
