{"id":"alicesaidhi/videx","name":"videx","scope":"alicesaidhi","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":{"centau/vide":{"version":"^0.2.0","alias":"vide"}},"integrity":"e2ce50c8e7b7cc1327a9e84c8a338ba384ebad3baed55b9e6e90fd5976b56610","likes":0,"downloads":0,"install":"forest install alicesaidhi/videx","url":"https://forest.dev/p/roblox/alicesaidhi/videx","files":"https://api.forest.dev/ai/package/roblox/alicesaidhi/videx/files","readme":"# videx\r\nuseful utilities for vide that may come useful while designing UI.\r\n\r\n## oklab\r\n\r\nPerforms color transformations to allow you to use OKLab and OKLCh for UI\r\ncolors.\r\n\r\n## context\r\n\r\nImplements a form of dependency injection to save the need from passing data\r\nas props through intermediate components.\r\n\r\nUse the `provide` and `consume` api's to consume and process values.\r\n\r\n## store\r\n\r\nImplements a store object that can be used within and outside vide for managing\r\nstate easily. Use `videx.null` to set sources initially to nil\r\n\r\n```\r\nStore.new(\r\n\t{\r\n\t\twaving = false\r\n\t},\r\n\tfunction(self)\r\n\t\treturn {\r\n\r\n\t\t\twave = function()\r\n\t\t\t\tself.waving = true\r\n\t\t\tend\r\n\r\n\t\t}\r\n\tend\r\n)\r\n```\r\n\r\n## tween\r\n\r\nImplements a tween class useful for playing beautiful animations\r\n\r\n```luau\r\n\r\nlocal tween = videx.tween {\r\n\tduration = 2, -- how long a tween takes\r\n\tease = \"quad\", -- the easing style to use\r\n\tredo = 3, -- the amount of times to redo the animation\r\n\tdelay = 2, -- how long until the animation starts playing\r\n\tyoyo = true, -- goes back every second redo if true\r\n\ttimescale = 1.5, -- how fast time passes for the tween\r\n\tredo_delay = 1, -- delay between redo's\r\n\r\n\tstagger = {\r\n\t\tamount = 2, -- how long it takes until all animations start playing. cannot combine with each\r\n\t\teach = 1, -- how long it takes until the next animation starts playing. cannot combine with amount\r\n\t\tease = \"linear\" -- the easing style to use\r\n\t}\r\n}\r\n\r\n--- by default, tweens will play. we can pause it if we dont wnat that.\r\ntween:pause()\r\n\r\ncreate \"Frame\" {\r\n\r\n\tPosition = UDim2.fromScale(0.5, 0)\r\n\tAnchorPoint = Vector2.new(0.5, 0)\r\n\r\n\t-- makes the object tween from the current position to the goal\r\n\ttween:to(UDim2.fromScale(0.5, 0.5)).Position,\r\n\t-- makes the object tween from the current anchorpoint to the goal\r\n\ttween:to(Vector2.new(0.5, 0.5)).AnchorPoint\r\n}\r\n\r\n```\r\n\r\n## timeline\r\n\r\nImplements a timeline class useful for coordinating multiple animations to be\r\nplayed in a given order.\r\n\r\nCreate a timeline through:\r\n```luau\r\n\r\nlocal tl = videx.timeline {\r\n\tredo = 1, -- the amount of times to repeat\r\n\tyoyo = true, -- goes back every second redo\r\n\ttimescale = 1, -- how fast time passes for the timeline\r\n\tdelay = 1 -- the delay until the animation begins\t\r\n}\r\n\r\n-- add a tween\r\nlocal tween1 = tl:tween({\r\n\tduration = 2\r\n})\r\nlocal tween2 = tl:tween({\r\n\tduration = 2\r\n}, \"<\")\r\n--- use a string to tell videx when to start the animation.\r\n--- this is based off of gsap's timeline\r\n--- use tl:add to manually add tweenables to the timeline.\r\n\r\n-- control a timeline through the following function\r\ntl:play()\r\ntl:pause()\r\ntl:resume()\r\ntl:reverse()\r\ntl:restart()\r\n\r\ntl:seek(2) -- move timeline to 2 seconds\r\ntl:progress(0.5) -- set timeline to be 50% completed\r\n```\r\n\r\n","readmeTruncated":false}