{"_id":"tween-component","_rev":"7-6b04a54059c46d9eea7a54b08a3a37f8","name":"tween-component","description":"Motion tween engine using 'ease'","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"tween-component","description":"Motion tween engine using 'ease'","version":"0.1.0","keywords":["tween","tweening","animation"],"dependencies":{"emitter-component":"*","ease-component":"*"},"license":"MIT","component":{"scripts":{"tween/index.js":"index.js"}},"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## License\n\n  MIT\n","readmeFilename":"Readme.md","_id":"tween-component@0.1.0","dist":{"shasum":"d8a71d4038abaf3bdb6039370bf376003b87fd99","tarball":"https://registry.npmjs.org/tween-component/-/tween-component-0.1.0.tgz","integrity":"sha512-esn6cpjufszs2gz9jQe9FmJSqwpygL5kGRgmlgtVydoLuaA2UwlsDcG/Ux2uZnKFDljAXaWiDT49AXHiiko7eQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYShSJ49N/g70AREHaAAbLSpRtjp8/aj4cTTOclZvSWwIgMbOIwaLRbdV+WmAKE9OmhSOVBLVJ8BuH5FEFeejH6qI="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}]},"1.0.0":{"name":"tween-component","description":"Motion tween engine using 'ease'","version":"1.0.0","keywords":["tween","tweening","animation"],"dependencies":{"emitter-component":"1.0.0","ease-component":"1.0.0"},"license":"MIT","component":{"scripts":{"tween/index.js":"index.js"}},"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## License\n\n  MIT\n","readmeFilename":"Readme.md","_id":"tween-component@1.0.0","dist":{"shasum":"816345ce6ae9bbb839ca547e67ed5ea88a1dc868","tarball":"https://registry.npmjs.org/tween-component/-/tween-component-1.0.0.tgz","integrity":"sha512-b8NJ3eY7k7AxGULE3ZPlcSf1ZEfXUB/Va2Yi41Nb4b6O3eb9Ow55hwXyMGZTLsdNs1BZp0nbP47Mimb6B8K8QQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAXwQOLViNWp7X2KGhKs/uj7Mx0Qn9vXeKyWK01tYMuyAiEAvw9ltGkGoVAhtiQgt4PbtXbWVa3bXyIzTnMOwg9twSQ="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}]}},"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## License\n\n  MIT\n","maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2022-06-27T23:55:19.899Z","created":"2013-03-25T19:42:25.868Z","0.1.0":"2013-03-25T19:42:28.219Z","1.0.0":"2013-05-27T18:18:51.546Z"}}