{"_id":"raf-loop","_rev":"812883","name":"raf-loop","description":"a minimal requestAnimationFrame render loop","dist-tags":{"latest":"1.1.3"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2024-07-02T14:02:29.000Z","created":"2014-12-05T03:16:10.372Z","1.1.3":"2015-05-29T20:22:40.997Z","1.1.2":"2015-05-24T19:41:24.815Z","1.1.1":"2015-05-20T21:16:02.829Z","1.1.0":"2015-05-09T17:26:45.143Z","1.0.1":"2014-12-05T03:22:38.087Z","1.0.0":"2014-12-05T03:16:10.372Z"},"users":{"ryanmack":true,"nichoth":true,"dazld":true},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"versions":{"1.1.3":{"name":"raf-loop","version":"1.1.3","description":"a minimal requestAnimationFrame render loop","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"events":"^1.0.2","inherits":"^2.0.1","raf":"^3.0.0","right-now":"^1.0.0"},"devDependencies":{"tape":"^3.0.3"},"scripts":{"test":"node test.js"},"keywords":["raf","request","animation","frame","requestAnimationFrame","loop","game","render","2d"],"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"gitHead":"e2809c91d2344d09e3abbf4687fcf07cc5bf5591","_id":"raf-loop@1.1.3","_shasum":"8747a69a29615197206954bce477d3e65e659299","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"8747a69a29615197206954bce477d3e65e659299","tarball":"http://registry-npm.ywwl.com/raf-loop/download/raf-loop-1.1.3.tgz","integrity":"sha512-fcIuuIdjbD6OB0IFw4d+cjqdrzDorKkIpwOiSnfU4Tht5PTFiJutR8hnCOGslYqZDyIzwpF5WnwbnTTuo9uUUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELDzheVHb4Qml9uYDnC71s1zzoC0JGzwaRu+sbeGvDBAiAM2ZHgTelzHNAKJVfxTJNJwwkQmnrsT8LpVQV6FgK/8Q=="}],"size":2024,"noattachment":false,"key":"/raf-loop/-/raf-loop-1.1.3.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"publish_time":1432930960997,"_cnpm_publish_time":1432930960997},"1.1.2":{"name":"raf-loop","version":"1.1.2","description":"a minimal requestAnimationFrame render loop","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"@mattdesl/raf":"^3.0.0","events":"^1.0.2","inherits":"^2.0.1","raf":"^3.0.0","right-now":"^1.0.0"},"devDependencies":{"tape":"^3.0.3"},"scripts":{"test":"node test.js"},"keywords":["raf","request","animation","frame","requestAnimationFrame","loop","game","render","2d"],"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"gitHead":"9691d6a4227bf0d12e61209a4aea53c2878b3314","_id":"raf-loop@1.1.2","_shasum":"2c7b320203132a7a4e66c4120ed6deed1820674b","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"2c7b320203132a7a4e66c4120ed6deed1820674b","tarball":"http://registry-npm.ywwl.com/raf-loop/download/raf-loop-1.1.2.tgz","integrity":"sha512-osGI0M7kP2ysAJWUdObDV8wD+PNjR5Ftq+xVskSVkt17LqxYFDxcDFQyj9Jw2Klki6WMCfrZ0GTjVM+NvRXC0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCd/VoOqYbM+RzRTkNpxZ2scCzUs8xeZ6JMt61omCaW0AIgGBSXSKIETaBcpqdSEnVFbr3elPgS5hIjdZjbLJB7t/I="}],"size":2024,"noattachment":false,"key":"/raf-loop/-/raf-loop-1.1.2.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"publish_time":1432496484815,"_cnpm_publish_time":1432496484815},"1.1.1":{"name":"raf-loop","version":"1.1.1","description":"a minimal requestAnimationFrame render loop","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"@mattdesl/raf":"^3.0.0","events":"^1.0.2","inherits":"^2.0.1","right-now":"^1.0.0"},"devDependencies":{"tape":"^3.0.3"},"scripts":{"test":"node test.js"},"keywords":["raf","request","animation","frame","requestAnimationFrame","loop","game","render","2d"],"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"gitHead":"ef9352f67c742b29983631b84dc194b411c96c04","_id":"raf-loop@1.1.1","_shasum":"32ffb921b442ec5cbe95f28274db6b8c9b7237b2","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"32ffb921b442ec5cbe95f28274db6b8c9b7237b2","tarball":"http://registry-npm.ywwl.com/raf-loop/download/raf-loop-1.1.1.tgz","integrity":"sha512-0gcS25JbE5F8WB6YwrUuO69Wtq2mMlELA4unD3VrFwzR7AptQk2H3REbmSf3cq5x4nRDOmKP4mfA0SBJWwJYbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDd9cqFsDKviCvV+S9DZH35Yj1kCDmTd/VIiFk2J5JYkgIgfsiQEzCArSOXePk01VmT4bmZXBmCEWPwTm3AWYgNCDY="}],"size":2106,"noattachment":false,"key":"/raf-loop/-/raf-loop-1.1.1.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"publish_time":1432156562829,"_cnpm_publish_time":1432156562829},"1.1.0":{"name":"raf-loop","version":"1.1.0","description":"a minimal requestAnimationFrame render loop","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"@mattdesl/raf":"^3.0.0","events":"^1.0.2","inherits":"^2.0.1","right-now":"^1.0.0"},"devDependencies":{"tape":"^3.0.3"},"scripts":{"test":"node test.js"},"keywords":["raf","request","animation","frame","requestAnimationFrame","loop","game","render","2d"],"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"gitHead":"58254d81e7cb4c3bfc71e51fccaf9b4f530f001c","_id":"raf-loop@1.1.0","_shasum":"1f40e6ea5e54228db66c8003ed736906a5e64d5c","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"1f40e6ea5e54228db66c8003ed736906a5e64d5c","tarball":"http://registry-npm.ywwl.com/raf-loop/download/raf-loop-1.1.0.tgz","integrity":"sha512-JD4hYY/n4rbtnGX5stPZgruwgN5YQqMC5jn8wrSpQRd/IwDyH8nhWvxOsMp4rYwV0iOZMEB4wfeRq40CUfTVNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwWe8yqujgPfQupLbmzIGrZMJJTP2DNl1IIX4Fr9cgcgIgGncUOhOP1vpXkF34hGFBrZjWix6mdYaJ/PrsJJ0rtT0="}],"size":2063,"noattachment":false,"key":"/raf-loop/-/raf-loop-1.1.0.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"publish_time":1431192405143,"_cnpm_publish_time":1431192405143},"1.0.1":{"name":"raf-loop","version":"1.0.1","description":"a minimal requestAnimationFrame render loop","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"events":"^1.0.2","inherits":"^2.0.1","raf":"^2.0.4","right-now":"^1.0.0"},"devDependencies":{"tape":"^3.0.3"},"scripts":{"test":"node test.js"},"keywords":["raf","request","animation","frame","requestAnimationFrame","loop","game","render","2d"],"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"gitHead":"bf5dd42ed0ddc6458b23782a662341d1673c0402","_id":"raf-loop@1.0.1","_shasum":"c823588b36980598b47d1f55a0d02a95219c4196","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"c823588b36980598b47d1f55a0d02a95219c4196","tarball":"http://registry-npm.ywwl.com/raf-loop/download/raf-loop-1.0.1.tgz","integrity":"sha512-ge16u53E110rdsUKqblqsZrk+EhW0KXmYatH9MsuOnGdHSQM43xfgPSgt0jCBxLsD4QufrlLvo4esOC3str2xw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0RwiwTYiMdEeFk8fSnvLPlMWaUvASbCEAWfhA6Xpc0AIgfOu/bqb3acrxT2Uom1UDiZCHFQxCreoe23zpWyWAE6U="}],"size":2019,"noattachment":false,"key":"/raf-loop/-/raf-loop-1.0.1.tgz"},"directories":{},"publish_time":1417749758087,"_cnpm_publish_time":1417749758087},"1.0.0":{"name":"raf-loop","version":"1.0.0","description":"a minimal requestAnimationFrame render loop","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"events":"^1.0.2","inherits":"^2.0.1","raf":"^2.0.4","right-now":"^1.0.0"},"devDependencies":{"tape":"^3.0.3"},"scripts":{"test":"node test.js"},"keywords":["raf","request","animation","frame","requestAnimationFrame","loop","game","render","2d"],"repository":{"type":"git","url":"git://github.com/mattdesl/raf-loop.git"},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"gitHead":"542eb24a8c9ecc1f16ae9ad545ed6071e3eb27b4","_id":"raf-loop@1.0.0","_shasum":"e0a13db20d3c2dbf17c3fd2d133014f54632f889","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"e0a13db20d3c2dbf17c3fd2d133014f54632f889","tarball":"http://registry-npm.ywwl.com/raf-loop/download/raf-loop-1.0.0.tgz","integrity":"sha512-fTn9IVe+D6PYaT3XtE9zkuTdrthOW/B5cMkDQm9oliHW5ncdWEDOG7ES8ABPCBdkFN5/edCu1+rWUdelM4CaeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkRBmY9n9Pw7Pu+HiHO/b8epZeYdJ95q2XZM86dkK2cAiAHJU6m2ejTvxFuJEDL/SB2XrC3hZjYlc/7wEw6YaX92g=="}],"size":2019,"noattachment":false,"key":"/raf-loop/-/raf-loop-1.0.0.tgz"},"directories":{},"publish_time":1417749370372,"_cnpm_publish_time":1417749370372}},"readme":"# raf-loop\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nA minimal requestAnimationFrame render loop for node and the browser, using high-performance timing where possible.\n\n```js\nvar loop = require('raf-loop')\n\nvar engine = loop(function(dt) {\n    // delta time in milliseconds \n}).start()\n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/raf-loop.png)](https://nodei.co/npm/raf-loop/)\n\n#### `engine = loop([fn])`\n\nCreates a new loop with an optional function to receive tick events. The function will be called with delta time as the first parameter, in milliseconds.\n\n#### `engine.start()`\n\nStarts the render loop and returns this engine, for chaining.\n\n#### `engine.stop()`\n\nStops the render loop and cancels the currently requested animation frame.\n\n#### `engine.on('tick', fn)`\n\nAttaches another function to the render loop.\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/raf-loop/blob/master/LICENSE.md) for details.\n","_attachments":{},"homepage":"https://github.com/mattdesl/raf-loop","bugs":{"url":"https://github.com/mattdesl/raf-loop/issues"},"license":"MIT"}