{"id":13662919,"url":"https://github.com/ismslv/Unity_Tween","last_synced_at":"2025-04-25T13:30:29.781Z","repository":{"id":196017722,"uuid":"179951334","full_name":"ismslv/Unity_Tween","owner":"ismslv","description":"Unity tweening system","archived":false,"fork":false,"pushed_at":"2019-04-16T20:43:15.000Z","size":2793,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-10T19:32:50.148Z","etag":null,"topics":["action","csharp","easing","fmlht","movement","rotation","scaling","task","timer","tween","unity","unity3d"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ismslv.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}},"created_at":"2019-04-07T10:42:07.000Z","updated_at":"2021-01-13T15:26:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbefdefc-77a8-43ab-846a-d588c573597e","html_url":"https://github.com/ismslv/Unity_Tween","commit_stats":null,"previous_names":["ismslv/unity_tween"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismslv%2FUnity_Tween","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismslv%2FUnity_Tween/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismslv%2FUnity_Tween/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismslv%2FUnity_Tween/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismslv","download_url":"https://codeload.github.com/ismslv/Unity_Tween/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250824808,"owners_count":21493347,"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":["action","csharp","easing","fmlht","movement","rotation","scaling","task","timer","tween","unity","unity3d"],"created_at":"2024-08-02T05:02:12.092Z","updated_at":"2025-04-25T13:30:29.202Z","avatar_url":"https://github.com/ismslv.png","language":"C#","readme":"# Unity_Tween\n![Screenshot](Screenshot.gif)\nVersion 0.22\n\nSimple tweening system with easing.\n\n```\npublic enum TaskType {\n    move,\n    moveLocal,\n    moveArc,\n    moveArcLocal,\n    rotate,\n    rotateLocal,\n    scale,\n    colorMaterial,\n    colorSprite,\n    actionFloat,\n    timerSimple,\n    moveUI,\n    tweenMesh\n};\n\nTween.a.MoveTo(what, where, time, ease, callback);\n```\n\n## Adding to a project\n1. Add Tween.cs to a GameObject\n\n## Usage examples\n\n```csharp\nusing FMLHT;\n```\n\nMoving:\n\n```csharp\nTween.MoveTo(objTransform, new Vector3(0, 100, 0), 3f, Easing.Ease.Linear, () =\u003e {\n    //I've been moved!\n});\n```\n\nRotating locally:\n\n```csharp\nTween.RotateToLocal(objTransform, Quaternion.Euler(rotationTo), 3f, Easing.Ease.EaseOutElastic, () =\u003e {\n    //I've been rotated!\n});\n```\n\nComplex tween:\n\n```csharp\nAction\u003cfloat\u003e order66 = f =\u003e {\n    jediCount = Mathf.Lerp(jediCountTotal, 0, f);\n    empireStregth = 1 - f;\n    saberLight = Color.Lerp(Color.blue, Color.red, f);\n};\nTween.ActionFloat(order66, 0f, 1f, 10f, Easing.Ease.EaseInExpo);\n```\n\nAction is returned as `Task`, so that you can refer to it later:\n\n```csharp\nTween.Task tomJob;\nvoid BeginJob() {\n    //Catch Jerry!\n    tomCheck = Tween.DoAfter(10f, () =\u003e {\n        if (!Jerry.isCaught) {\n            Tom.BeginJob();\n        }\n    });\n}\n\n///\n\nvoid Update() {\n    if (Jerry.isCaught) {\n        Tween.DeleteTask(tomCheck);\n    }\n}\n```\n\n## Tween mesh\n\n1. Add component ```MeshTween``` to an empty mesh.   \n2. Assign meshes with equal vertex count to new states\n3. Ajust tween value in inspector or in script:\n\n```csharp\n//Directly with method\ntweenMesh.SetState(0, 1f);\ntweenMesh.SetState(1, 0f);\ntweenMesh.UpdateCurrentState();\n\n//Tween with method\n//Updates automatically\ntweenMesh.Between(0, 1, 0f);\n\n//Directly to objects\ntweenMesh.states[0].Weight = 1f;\ntweenMesh.states[1].Weight = 0f;\ntweenMesh.UpdateCurrentState();\n\n//Animated\nTween.TweenMesh(\n    tweenMesh, //MeshTween\n    0,         //state from\n    1,         //state to\n    0f,        //value from\n    1f,        //value to\n    0.5f,      //time\n    Easing.Ease.Linear\n    );\n```","funding_links":[],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismslv%2FUnity_Tween","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismslv%2FUnity_Tween","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismslv%2FUnity_Tween/lists"}