{"id":13408878,"url":"https://github.com/CreateJS/TweenJS","last_synced_at":"2025-03-14T13:32:12.536Z","repository":{"id":38375116,"uuid":"1501185","full_name":"CreateJS/TweenJS","owner":"CreateJS","description":"A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.","archived":false,"fork":false,"pushed_at":"2023-12-18T07:44:25.000Z","size":25241,"stargazers_count":3557,"open_issues_count":11,"forks_count":960,"subscribers_count":168,"default_branch":"master","last_synced_at":"2025-03-12T08:09:23.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://createjs.com/","language":"JavaScript","has_issues":true,"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/CreateJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2011-03-19T21:00:37.000Z","updated_at":"2025-03-12T00:55:45.000Z","dependencies_parsed_at":"2024-01-22T04:49:47.225Z","dependency_job_id":null,"html_url":"https://github.com/CreateJS/TweenJS","commit_stats":{"total_commits":440,"total_committers":17,"mean_commits":25.88235294117647,"dds":0.5340909090909092,"last_synced_commit":"6df2b9ce7e68d3d824cc490b67cab2bc3204810a"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FTweenJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FTweenJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FTweenJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FTweenJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CreateJS","download_url":"https://codeload.github.com/CreateJS/TweenJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243205247,"owners_count":20253425,"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-07-30T20:00:56.069Z","updated_at":"2025-03-14T13:32:12.512Z","avatar_url":"https://github.com/CreateJS.png","language":"JavaScript","readme":"# TweenJS\n\nTweenJS is a simple tweening library for use in Javascript. It was developed to integrate well with the EaselJS library,\nbut is not dependent on or specific to it (though it uses the same Ticker and Event classes by default). It supports\ntweening of both numeric object properties \u0026 CSS style properties.\n\n## Example\nThe API is simple but very powerful, making it easy to create complex tweens by chaining commands.\n\n```javascript\nvar tween = createjs.Tween.get(myTarget)\n    .to({x:300},400)\n    .set({label:\"hello!\"})\n    .wait(500).to({alpha:0,visible:false},1000)\n    .call(onComplete);\n```\n\nThe example above will create a new tween instance that:\n\n* tweens the target to an x value of 300 over 400ms and sets its label to \"hello!\"\n* waits 500 ms\n* tweens the target's alpha to 0 over 1s \u0026 sets its visible to false\n* calls the onComplete function\n\nTweens are composed of two elements: steps and actions.\n\nSteps define the tweened properties and always have a duration associated with them (even if that duration is 0). Steps\nare defined with the \"to\" and \"wait\" methods. Steps are entirely deterministic. You can arbitrarily set a tween's\nposition, and it will always set the same properties for that position.\n\nActions do not have a duration, and are executed between steps. They are defined with the \"call\", \"set\", \"play\", and\n\"pause\" methods. They are guaranteed to execute in the correct order, but not at the precise moment in time that is\nindicated in the sequence. This can lead to indeterminate results, especially when tweens are interacting via the play\nand pause actions.\n\nTweens support a number of configuration properties, which are specified as the second param when creating a new tween:\n\n```javascript\ncreatejs.Tween.get(target, {loop:true, useTicks:true, css:true, ignoreGlobalPause:true}).to(etc...);\n```\n\nAll configuration properties default to false. The properties are:\n\n* **loop** - indicates whether the tween should loop when it reaches the end\n* **useTicks** - the tween will use ticks for duration instead of milliseconds\n* **css** - enables css mapping for some css properties\n* **ignoreGlobalPause** - the tween will continue ticking even when Ticker is paused.\n\nWhen using Tween.get, you can also specify true as the third parameter to override any active tweens on the target.\n\n```javascript\ncreatejs.Tween.get(target,null,true); // this will remove any existing tweens on the target.\n```\n\n## Support and Resources\n* Find examples and more information at the [TweenJS web site](http://tweenjs.com/)\n* Read the [documentation](http://createjs.com/docs/tweenjs/)\n* Discuss, share projects, and interact with other users on [reddit](http://www.reddit.com/r/createjs/).\n* Ask technical questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/tweenjs).\n* File verified bugs or formal feature requests using Issues on [GitHub](https://github.com/createjs/TweenJS/issues).\n* Have a look at the included [examples](https://github.com/CreateJS/TweenJS/tree/master/examples) and \n[API documentation](http://createjs.com/docs/tweenjs/) for more in-depth information.\n\nIt was built by [gskinner.com](http://www.gskinner.com), and is released for free under the MIT license, which means you \ncan use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a \nrequirement.\n\n## Classes\n\n**Tween**\nReturns a new Tween instance.\n\n**Timeline**\nThe Timeline class synchronizes multiple tweens and allows them to be controlled as a group.\n\n**Ease**\nThe Ease class provides a collection of easing functions for use with TweenJS. It does not use the standard 4 param \neasing signature. Instead it uses a single param which indicates the current linear ratio (0 to 1) of the tween.\n\n## Thanks\nSpecial thanks to [Robert Penner](http://flashblog.robertpenner.com/) for his easing equations, which form the basis for \nthe Ease class.\n","funding_links":[],"categories":["JavaScript","目录","Repository","Common","Libraries"],"sub_categories":["动画","Animation","JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCreateJS%2FTweenJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCreateJS%2FTweenJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCreateJS%2FTweenJS/lists"}