{"_id":"raf-component","_rev":"2840272","name":"raf-component","description":"request animation frame","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2022-09-06T15:51:09.000Z","created":"2013-02-12T18:46:28.951Z","1.1.2":"2013-11-30T19:17:32.551Z","1.1.1":"2013-07-12T21:59:26.410Z","1.1.0":"2013-07-12T21:53:53.934Z","1.0.0":"2013-05-28T15:23:22.763Z","0.0.1":"2013-02-12T18:46:28.951Z"},"users":{},"repository":{"type":"git","url":"https://github.com/component/raf.git"},"versions":{"1.1.2":{"name":"raf-component","description":"request animation frame","version":"1.1.2","keywords":["animate","requestAnimationFrame","performance"],"dependencies":{},"development":{},"component":{"scripts":{"raf/index.js":"index.js"}},"repository":{"type":"git","url":"https://github.com/component/raf.git"},"readmeFilename":"Readme.md","bugs":{"url":"https://github.com/component/raf/issues"},"homepage":"https://github.com/component/raf","_id":"raf-component@1.1.2","dist":{"shasum":"06fcdd026e4dea8532c1b64390defaa04950664d","size":1515,"noattachment":false,"key":"/raf-component/-/raf-component-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-component/download/raf-component-1.1.2.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1385839052551,"_hasShrinkwrap":false,"_cnpm_publish_time":1385839052551,"_cnpmcore_publish_time":"2021-12-16T11:29:07.764Z"},"1.1.1":{"name":"raf-component","description":"request animation frame","version":"1.1.1","keywords":["animate","requestAnimationFrame","performance"],"dependencies":{},"development":{},"component":{"scripts":{"raf/index.js":"index.js"}},"readmeFilename":"Readme.md","_id":"raf-component@1.1.1","dist":{"shasum":"8e2e1ab2aafeaae959474d0aad3cdd6a08d806d8","size":1422,"noattachment":false,"key":"/raf-component/-/raf-component-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-component/download/raf-component-1.1.1.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1373666366410,"_hasShrinkwrap":false,"_cnpm_publish_time":1373666366410,"_cnpmcore_publish_time":"2021-12-16T11:29:07.986Z"},"1.1.0":{"name":"raf-component","description":"request animation frame","version":"1.1.0","keywords":["animate","requestAnimationFrame","performance"],"dependencies":{},"development":{},"component":{"scripts":{"raf/index.js":"index.js"}},"readmeFilename":"Readme.md","_id":"raf-component@1.1.0","dist":{"shasum":"d95a381a7ec1c2cc9ee262b203feea5a812e559a","size":1364,"noattachment":false,"key":"/raf-component/-/raf-component-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-component/download/raf-component-1.1.0.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1373666033934,"_hasShrinkwrap":false,"_cnpm_publish_time":1373666033934,"_cnpmcore_publish_time":"2021-12-16T11:29:08.204Z"},"1.0.0":{"name":"raf-component","description":"request animation frame","version":"1.0.0","keywords":["animate","requestAnimationFrame","performance"],"dependencies":{},"development":{},"component":{"scripts":{"raf/index.js":"index.js"}},"readmeFilename":"Readme.md","_id":"raf-component@1.0.0","dist":{"shasum":"8681da3c1f9965f6e43774c05f61b09b2c05bcd0","size":1193,"noattachment":false,"key":"/raf-component/-/raf-component-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-component/download/raf-component-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1369754602763,"_hasShrinkwrap":false,"_cnpm_publish_time":1369754602763,"_cnpmcore_publish_time":"2021-12-16T11:29:08.424Z"},"0.0.1":{"name":"raf-component","description":"request animation frame","version":"0.0.1","keywords":["animate","requestAnimationFrame","performance"],"dependencies":{},"development":{},"component":{"scripts":{"raf/index.js":"index.js"}},"readmeFilename":"Readme.md","_id":"raf-component@0.0.1","dist":{"shasum":"ac73c6a0aa7d7d37055239b32cf9d19d67bc427e","size":1183,"noattachment":false,"key":"/raf-component/-/raf-component-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-component/download/raf-component-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1360694788951,"_hasShrinkwrap":false,"_cnpm_publish_time":1360694788951,"_cnpmcore_publish_time":"2021-12-16T11:29:08.636Z"}},"readme":"\n# raf\n\n  request animation frame\n\n## Installation\n\n    $ component install component/raf\n\n## Example\n\n```js\nvar x = 0;\nvar y = 50;\nvar canvas = document.querySelector('canvas');\nvar ctx = canvas.getContext('2d');\nvar raf = require('raf');\n\nfunction animate() {\n  raf(animate);\n  draw();\n}\n\nvar prev = Date.now();\nfunction draw() {\n  var curr = Date.now();\n  var diff = curr - prev;\n  var p = diff / 16;\n  ctx.clearRect(0, 0, 900, 300);\n  ctx.beginPath();\n  ctx.globalAlpha = .5;\n  ctx.arc(x, y, 10, 0, Math.PI * 2, false);\n  ctx.fill();\n  x += 2;\n  y += Math.sin(x/20) * 5;\n  prev = curr;\n}\n\nanimate();\n```\n\n## License\n\n  MIT\n","_attachments":{},"readmeFilename":"Readme.md","homepage":"https://github.com/component/raf","bugs":{"url":"https://github.com/component/raf/issues"}}