{"id":22342640,"url":"https://github.com/ltmx/vtween","last_synced_at":"2026-01-06T00:47:30.934Z","repository":{"id":237434548,"uuid":"613600448","full_name":"ltmx/VTween","owner":"ltmx","description":"Simple but fully functional tweening library for Unity3D.","archived":false,"fork":false,"pushed_at":"2023-03-13T22:34:05.000Z","size":6566,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-31T11:13:56.428Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ltmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-13T22:26:37.000Z","updated_at":"2023-09-18T10:58:13.000Z","dependencies_parsed_at":"2024-05-01T19:30:22.921Z","dependency_job_id":"ef5efdd2-ebae-4bf6-88fb-da6d4646732f","html_url":"https://github.com/ltmx/VTween","commit_stats":null,"previous_names":["ltmx/vtween"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmx%2FVTween","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmx%2FVTween/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmx%2FVTween/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmx%2FVTween/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltmx","download_url":"https://codeload.github.com/ltmx/VTween/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245630913,"owners_count":20647171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T08:13:17.668Z","updated_at":"2026-01-06T00:47:30.911Z","avatar_url":"https://github.com/ltmx.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# VTween\n A compact tweening library for Unity3D. Inspired by the legendary LeanTween.  \n \n \u003cbr\u003e**Features :** \u003c/br\u003e\nObject Pooling.  \nLow allocation.  \nBlazingly fast.\n\n \u003cbr\u003e**Requirement**\u003c/br\u003e\nUnity3D 2022.2.x and above.  \n \n \u003cbr\u003e**Installation**\u003c/br\u003e\nDownload the .zip and unpack it to your Assets folder in your project.  \nAdd the reference `using Breadnone;`\n\n \u003cbr\u003e**UIToolkit ~Experimental**\u003c/br\u003e\nUIToolkit should work as long as you're using Unity editor 2022.2.x and above due to style translate api.  \n\n\u003cbr\u003e**Optimization**\u003c/br\u003e\nBy default the pooled object is set to 10 instances. For heavy usages we can set this to as much as we want BUT you should be careful, changing it to a bigger pool when not used will allocate tons of memory, so use it wisely.  \n```\n  //Changes the max number of object pooling and. Returns boolean\n  //Note: If pools are in use, it will return false. Make sure all tweens already finished before resizing the pool. \n  \n  VTween.FlushPools(15);\n```\n\n\n \u003cbr\u003eSyntax\u003c/br\u003e\n```\n  //Move\n  VTween.move(obj, target, duration).setOnComplete(()=\u003e\n  {\n     UnityEngine.Debug.Log(\"Was completed!\");\n                    \n  }).setEase(Ease.Linear).setLoop(3).setPingPong(true).setOnCompleteRepeat(true);\n\n  //Rotate\n  VTween.rotate(ThreeDObject, rotationInVec3, Vector3.forward, duration).setEase(Ease.Linear).setLoop(2).setPingPong(true);\n                \n  //Scale\n  VTween.scale(obj, new Vector3(2, 2, 2), duration).setEase(Ease.Linear).setLoop(3);\n\n  //Chaining\n  var queue = VTween.queue.add(VTween.move(gameObject, new Vector3(100, 200, 2), duration).setEase(Ease.Linear))\n    .add(VTween.move(gameObject, new Vector3(200, 300, 200), duration))\n    .add(VTween.move(gameObject, defaultPos, duration));\n\n  //ExecuteLater (Similar to LeanTween.delayedCall)\n  VTween.execLater(5, ()=\u003e {UnityEngine.Debug.Log(\"Done waiting!\");});\n                \n  //Frame-by-frame animation(VTween.animation)\n  Image[] arr = new Image[11];\n  VTween.animation(arr, duration, 60).setDisableOnComplete(true).setLoop(loopCount).setPingPong(true);\n                \n  //Alpha\n  VTween.alpha(canvasGroup, 0f, 1f, 5f); //for legacy UI\n  //OR\n  VTween.alpha(visualElement, 0f, 1f, 5f); //for UIToolkit\n                \n  //Color\n  var legacyImage = gameObject.GetComponent\u003cImage\u003e();\n  VTween.color(legacyImage, new Color(0.2f, 0.1f, 0.2f, 1), 5);\n                \n  //Follow\n  var target = someTarget.GetComponent\u003cTransform\u003e();\n  VTween.follow(gameObject, target, new Vector3(0f, 0f, 0.1f), 5f);\n                \n  //ShaderProperty //Lerps or interpolates values (apis : shaderFloat, shaderVector2, shaderVector3)\n  var myMaterials = gameObject.GetComponent\u003cRenderer\u003e().materials;\n  VTween.shaderFloat(myMaterials[0], \"_myFloatRef\", 0, 2, 5); \n                \n  //Value //Interpolates float value(supported types: float, Vector2, Vector3, Vector4)\n  VTween.value(0f, 5f, 3f, (x)=\u003e {Debug.Log(\"running value : \" + x)});\n\n  //Cancel\n  VTween.Cancel(gameObject);      //GameObjects\n  VTween.Cancel(visualElement);   //UIToolkit\n  VTween.CancelAll();             //Cancels all active/paused tweens\n                \n```\n \n **Struct based tweening class**  \n A fire \u0026 forget struct based tween instance. Use this only when you don't need to cancel/pause the tween (thus FireAndForget).  \n \u003cbr\u003eNote:\u003c/br\u003e  \n - The gameObject/VisualElement tied to this instance can't be destroyed while being active!  \n - MUST use VTween.TryForceCancel(gameObject) to cancel! Not recommended for mass cancelling!  \n - Can't be cached in a collections/arrays/fields (Fire-and-Forget remember :)).  \n \n ```\n   //Fast \u0026 low allocation api. Allocated on the stack\n   var t = VTween.moveFast(obj, target.position, duration, ease:Ease.Linear);\n   \n   //The instance can't be cached on collections/arrays/fields.\n   //This is slow cancelling and as stated this api is for Fire-and-Forget. \n   VTween.TryForceCancel(obj);\n ```\n \n **ToDo:**  \n - CustomYieldInstruction. Currently uses it's own timing.  \n - Port more LeanTween apis.\n - Only 70% UIToolkit implementation completed. \n\nhttps://user-images.githubusercontent.com/64100867/220118744-85f4dee1-a35b-4772-ae41-83688e9b810a.mp4\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltmx%2Fvtween","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltmx%2Fvtween","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltmx%2Fvtween/lists"}