{"id":"stratiz/UISpringSet","name":"UISpringSet","scope":"stratiz","platform":"roblox","description":"Object for animating the visibility a frame and its selected children with springs","version":"1.3.0","latest":"1.3.0","versions":["1.0.0","1.1.0","1.2.0","1.2.1","1.3.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"chiefwildin/Spring":{"version":"^1.14.0"},"stratiz/Cleaner":{"version":"^1.0.0"},"stratiz/Signal":{"version":"^1.0.0"},"stratiz/Transparency":{"version":"^1.0.0"}},"integrity":"01b6dbd1cdc0a721cc6c139fd03f8b8d4e832886f4f486d7002b16bbda65d561","likes":0,"downloads":6,"install":"forest install stratiz/UISpringSet","url":"https://forest.dev/p/roblox/stratiz/UISpringSet","files":"https://api.forest.dev/ai/package/roblox/stratiz/UISpringSet/files","readme":"# UISpringSet\n\nAnimates the visibility of one or more GuiObjects with springs. Each object slides in from a direction and fades at the same time, and the whole set can be shown or hidden as a group.\n\n## Usage\n\n```lua\nlocal UISpringSet = require(Packages.UISpringSet)\n\nlocal menu = UISpringSet.new({\n    frame.Title,\n    { UI = frame.Body, Direction = Vector2.new(1, 0) }\n})\n\nmenu:Show()\nmenu:Hide()\n\nmenu:Destroy()\n```\n\nEach entry is either a GuiObject or a table with a `UI` field and an optional `Direction`. `Direction` is the slide offset per axis, scaled by the object's absolute size, and defaults to `Vector2.new(0, 1)` which slides up into place from below. Objects start hidden.\n\n## API\n\n### UISpringSet.new(objects)\n\nCreates a set from an array of GuiObjects or `{ UI = GuiObject, Direction = Vector2? }` entries.\n\n### UISpringSet:Show(noAnimate)\n\nAnimates every object into view. Pass `true` for `noAnimate` to snap into view instantly.\n\n### UISpringSet:Hide(noAnimate)\n\nAnimates every object out of view. Pass `true` for `noAnimate` to snap out of view instantly.\n\n### UISpringSet:AddUIObject(object)\n\nAdds a GuiObject or entry table to the set. Returns its transparency object and its spring.\n\n### UISpringSet:RemoveChild(uiObject)\n\nRemoves the object from the set and restores its transparency.\n\n### UISpringSet:SetStartPosition(uiObject, position)\n\nMoves the object's resting position; the set animates relative to it. Use this instead of writing `Position` directly on a managed object. The set snapshots `Position` when the object is added and overwrites it while animating, so direct writes get discarded. Applies immediately, even while the set is settled.\n\n### UISpringSet:SetSpringProps(speed, damper)\n\nSets the spring speed and damper for the whole set. Later objects run slightly slower so they trail the first one.\n\n### UISpringSet:GetSpringObject(uiObject)\n\nReturns the spring driving the given object.\n\n### UISpringSet:GetTransparencyObject(uiObject)\n\nReturns the transparency object for the given object.\n\n### UISpringSet:OnSettled(callback)\n\nCalls the callback whenever the set finishes animating. Fires immediately if the set is already settled. Returns a connection.\n\n### UISpringSet:Settle()\n\nSnaps every spring to its target instantly and fires the settled signal.\n\n### UISpringSet:IsShowing()\n\nReturns true if the set is currently targeting the shown state.\n\n### UISpringSet:Destroy()\n\nStops the update loop.\n","readmeTruncated":false}