{"id":23053384,"url":"https://github.com/component/tween","last_synced_at":"2025-10-12T19:44:21.307Z","repository":{"id":5248487,"uuid":"6426099","full_name":"component/tween","owner":"component","description":"Motion tween engine using \"ease\"","archived":false,"fork":false,"pushed_at":"2015-03-16T21:27:43.000Z","size":268,"stargazers_count":36,"open_issues_count":2,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T21:32:44.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-28T09:35:32.000Z","updated_at":"2023-08-21T10:24:46.000Z","dependencies_parsed_at":"2022-07-04T16:08:59.125Z","dependency_job_id":null,"html_url":"https://github.com/component/tween","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ftween","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ftween/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ftween/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ftween/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/tween/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246935225,"owners_count":20857364,"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-16T00:17:54.914Z","updated_at":"2025-10-12T19:44:16.287Z","avatar_url":"https://github.com/component.png","language":"HTML","readme":"\n# tween\n\n  Motion tween component using [ease](https://github.com/component/ease).\n\n## Installation\n\n    $ component install component/tween\n\n## Example\n\n```js\nvar Tween = require('tween');\nvar raf = require('raf');\nvar button = document.querySelector('button');\n\nvar tween = Tween({ rotate: 0, opacity: 0 })\n  .ease('out-bounce')\n  .to({ rotate: 360, opacity: 1  })\n  .duration(800);\n\ntween.update(function(o){\n  button.style.opacity = o.opacity;\n  button.style.webkitTransform = 'rotate(' + (o.rotate | 0) + 'deg)';\n});\n\ntween.on('end', function(){\n  animate = function(){};\n});\n\nfunction animate() {\n  raf(animate);\n  tween.update();\n}\n\nanimate();\n```\n\n## API\n\n### Tween(obj:Object|Array)\n\n  Initialize a new `Tween` with `obj`.\n\n### Tween#reset()\n\n  Reset the tween.\n\n### Tween#to(obj:Object|Array)\n\n  Tween to `obj` and reset internal state.\n\n     tween.to({ x: 50, y: 100 })\n\n### Tween#duration(ms:Number)\n\n  Set duration to `ms` [500].\n\n### Tween#ease(fn:String|Function)\n\n  Set easing function to `fn`.\n\n     tween.ease('in-out-sine')\n\n### Tween#update(fn:Function)\n\n  Set update function to `fn` or\n  when no argument is given this performs\n  a \"step\".\n\n### Tween#stop()\n\n  Immediately stop the tween and emit \"stop\" and end\" events. `tween.stopped`\n  is then marked as `true`.\n\n## License\n\n  MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Ftween","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Ftween","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Ftween/lists"}