{"id":"gitethan1/simplespline","name":"simplespline","scope":"gitethan1","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"1174c5d42710e0ddb67d4b48d86f9a7521037b3febef77d11802009b042b619f","likes":0,"downloads":0,"install":"forest install gitethan1/simplespline","url":"https://forest.dev/p/roblox/gitethan1/simplespline","files":"https://api.forest.dev/ai/package/roblox/gitethan1/simplespline/files","readme":"# SimpleSpline\r\n\r\n## How to use\r\n\r\nCreate a new spline:\r\n```lua\r\nlocal Points = {}\r\nlocal Spline = SimpleSpline.new(Points,Alpha,Tension)\r\n```\r\nSet Options\r\n```lua\r\nSpline:SetOptions({\r\n    Uniform = true,\r\n    Offset = CFrame.new(),\r\n    Loop = true,\r\n    Reverse = false\r\n})\r\n```\r\nVisualize the spline:\r\n```lua\r\nSpline:Visualize()\r\n```\r\nDestroy the Visualization:\r\n```lua\r\nSpline:ClearVisualize()\r\n```\r\n\r\nMoving a object along the spline:\r\n```lua\r\nlocal Path = Spline:FollowPath(Obj,Speed)\r\n```\r\n## Documentation:\r\n\r\n### SimpleSpline\r\n\r\n```lua\r\nSimpleSpline.new(Points,Alpha,Tension)\r\n```\r\nDescription: Creates a new Spline Object\r\n<br>Param: Points - table of CFrames\r\n<br>Param: Alpha - number from 0 - 1\r\n<br>Param: Tension - number from 0 - 1\r\n<br>Returns: Spline\r\n\r\n### Spline\r\n\r\n```lua\r\nSpline:GetSpeedFromTime(Time)\r\n```\r\nDescription: Gets the speed from a given time\r\n<br>Param: Time\r\n<br>Returns: Speed\r\n\r\n```lua\r\nSpline:UpdatePoints(Points)\r\n```\r\nDescription: Updates the points of the spline\r\n<br>Param: Points - table of CFrames\r\n\r\n```lua\r\nSpline:SetOptions({\r\n    Uniform : boolean,\r\n    Offset : CFrame,\r\n    Loop : boolean,\r\n    Reverse : boolean\r\n})\r\n```\r\nDescription: Sets the options of the spline\r\n<br>Param: Options - a table of options\r\n\r\n```lua\r\nSpline:FollowPath(Objects,Speed,Distance)\r\n```\r\nDescription: Moves a object or a list of objects along the spline with a given speed\r\n<br>Param: Objects - BasePart or Model or table of BaseParts or Models\r\n<br>Param: Speed - number\r\n<br>Param: Distance - number\r\n<br>Returns: Path\r\n\r\n### Path\r\n\r\n```lua\r\n{\r\n    Completed : RBXScriptSignal,\r\n    PathCompleted : RBXScriptSignal,\r\n    Time : number,\r\n    NodeReached : RBXScriptSignal,\r\n    Stop : Function\r\n    ChangeSpeed : Function,\r\n    GetElapsed : Function,\r\n\r\n}\r\n```\r\nDescription: A object that is returned by Spline:FollowPath\r\n\r\n```lua\r\nPath.Stop()\r\n```\r\nDescription: Stops the path\r\n\r\n```lua\r\nPath.ChangeSpeed(Speed)\r\n```\r\nDescription: Changes the speed of the path\r\n\r\n```lua\r\nPath.GetElapsed()\r\n```\r\nDescription: Gets the elapsed time of the path\r\n\r\n```lua\r\nPath.Completed\r\n```\r\nDescription: A signal that fires when a object finishes the path\r\n\r\n```lua\r\nPath.PathCompleted\r\n```\r\nDescription: A signal that fires when the entire path is completed","readmeTruncated":false}