{"_id":"raf-component","_rev":"875341","name":"raf-component","description":"request animation frame","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2024-07-12T06:43:35.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":{"nichoth":true},"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","tarball":"http://registry-npm.ywwl.com/raf-component/download/raf-component-1.1.2.tgz","integrity":"sha512-f+SJc+rSo1WxixvLBdpmfNkLcy9cOcNWkEXUfgE8tlMr0sjbaq1ck53PO1mXr+82gsrm3bYoMNuLqymlzUjNTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBqp+3d8FoGQnwu4Oj8aqoeB+c5Kwq71SjQGrJMVhriwIgbyklUW7wjRHrUKryCbgj/clEpfAZy+D1lR7Y8eoJfrI="}],"size":1515,"noattachment":false,"key":"/raf-component/-/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,"_cnpm_publish_time":1385839052551},"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","tarball":"http://registry-npm.ywwl.com/raf-component/download/raf-component-1.1.1.tgz","integrity":"sha512-JcKCJDUyGCIWn98Wxs11kb/qiY+YFWqJ7VuGus8AODBtgydnqivUtUjOpYVUckf5o4l/HtLJyFUWycGoWuGe2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtAPoeZVPCx9OK0+AknGPhpsis1oVihunWtoWx9W1S+gIhAKyW62jUmrG6ZdnCtm9kjxl8nA5BeLekoYjT/xmH5Bu2"}],"size":1422,"noattachment":false,"key":"/raf-component/-/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,"_cnpm_publish_time":1373666366410},"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","tarball":"http://registry-npm.ywwl.com/raf-component/download/raf-component-1.1.0.tgz","integrity":"sha512-ECJ5DBYmLXi/tN0wRx0PLxaFU2MQ9/umF2bCevbaMh3cCOXbNDoowEFTSik9VMsCmN3OAFNtlEDBSJTQ92DCiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCHwMN3PaLgZ8jNEeTTqKMgSG5r7L7ULnnSDUur70szcICIQDPoTMClxCSj9EJhL7wVpOhPJMWVUD8RxTP8RcA12Dyfg=="}],"size":1364,"noattachment":false,"key":"/raf-component/-/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,"_cnpm_publish_time":1373666033934},"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","tarball":"http://registry-npm.ywwl.com/raf-component/download/raf-component-1.0.0.tgz","integrity":"sha512-VudXD9Nxs1aSeFuvx7+HxgOmlDxdjZtjPnLjrWjX42Tf54wkFGKxoTOvdFQuBkZHpJMAoFrqW2ICNgkebyvM4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQ8Hy5aknzeDm8R4jPmWThotcaK/7nTByHb0qiF2caQwIgcxeEAqp7V+1XN+eQkATc5wFT2IA4hGli0l4G8BFcTiI="}],"size":1193,"noattachment":false,"key":"/raf-component/-/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,"_cnpm_publish_time":1369754602763},"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","tarball":"http://registry-npm.ywwl.com/raf-component/download/raf-component-0.0.1.tgz","integrity":"sha512-92RfBCnvcRVwyol6jlUwwr/u95v5DZ7fD54TdZ44DVheuCu9eCN1q5BILkO90nV4BgqHR4i881fw/EgkfQ3nFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+LXORAQGMfqXFtbVBDw0CrRoAWOsbpBwHCVMcVRqe8AiBhy1j6tJ0uXEpTLbZAxfI2/f2yS46qRA4cFTqpJya3rg=="}],"size":1183,"noattachment":false,"key":"/raf-component/-/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,"_cnpm_publish_time":1360694788951}},"readme":"\n# raf\n\n  request animation frame\n\n## Installation\n\n    $ component install component/raf\n\n## Example\n\n  Request the animation frame with `raf(fn)`, cancel with `raf.cancel(id)`.\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"}}