{"_id":"rebound","_rev":"260336","name":"rebound","description":"A simple library for modeling spring dynamics","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"time":{"modified":"2021-06-03T16:43:18.000Z","created":"2013-11-21T18:16:23.698Z","0.1.0":"2018-02-28T03:52:39.114Z","0.0.15":"2017-05-09T14:16:44.445Z","0.0.14":"2017-05-09T02:29:46.079Z","0.0.13":"2015-05-11T15:21:21.946Z","0.0.12":"2015-03-11T06:23:32.298Z","0.0.11":"2015-03-11T06:21:36.055Z","0.0.10":"2014-10-06T11:46:28.462Z","0.0.9":"2014-10-06T11:38:55.622Z","0.0.8":"2014-09-07T16:42:47.922Z","0.0.7":"2014-08-03T00:41:07.057Z","0.0.6":"2014-08-03T00:24:32.074Z","0.0.5":"2014-08-03T00:19:01.103Z","0.0.4":"2014-08-01T23:42:47.214Z","0.0.3":"2014-07-24T00:52:05.880Z","0.0.2":"2014-04-30T18:09:23.186Z","0.0.1":"2013-11-21T18:16:23.698Z"},"users":{"chinawolf_wyp":true},"author":{"name":"Facebook"},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"versions":{"0.1.0":{"name":"rebound","version":"0.1.0","description":"A simple library for modeling spring dynamics","main":"dist/rebound.js","types":"rebound.d.ts","author":{"name":"Facebook"},"license":"BSD-3-Clause","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"build":"rollup -c ./rollup.config.js","dist":"yarn build && NODE_ENV=production yarn build","flow":"flow","lint":"eslint src/**/*.js","prettier":"prettier --write {src,spec}/**/*.js package.json rollup.config.js","jest":"jest","watch":"yarn build -- --watch","test":"yarn prettier --list-different && yarn lint && yarn flow && yarn jest"},"devDependencies":{"babel-core":"^6.22.0","babel-jest":"^22.2.2","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","eslint":"^4.13.1","eslint-config-fbjs-opensource":"^1.0.0","eslint-plugin-prettier":"^2.4.0","flow-bin":"0.66.0","jest":"^22.2.2","prettier":"^1.9.2","rollup":"^0.55.4","rollup-plugin-babel":"^3.0.3","rollup-plugin-strip-banner":"^0.2.0","rollup-plugin-uglify":"^3.0.0"},"prettier":{"bracketSpacing":false,"proseWrap":"always","singleQuote":true,"trailingComma":"all"},"licenseText":"BSD License\n\nFor the rebound-js software\n\nCopyright (c) 2014, Facebook, Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n * Neither the name Facebook nor the names of its contributors may be used to\n   endorse or promote products derived from this software without specific\n   prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"rebound@0.1.0","dist":{"shasum":"0638c61a93666bb515a58a03e1cfb34021e88b72","size":29018,"noattachment":false,"key":"/rebound/-/rebound-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.1.0.tgz"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"_npmUser":{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rebound_0.1.0_1519789959054_0.37031980059349867"},"_hasShrinkwrap":false,"publish_time":1519789959114,"_cnpm_publish_time":1519789959114},"0.0.15":{"name":"rebound","version":"0.0.15","description":"A simple library for modeling spring dynamics","main":"rebound.js","types":"rebound.d.ts","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git+ssh://git@github.com/facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"gitHead":"f1468a687caa8d5d436d73a6fc09f5dc3227cae4","homepage":"https://github.com/facebook/rebound-js#readme","_id":"rebound@0.0.15","_shasum":"b7796972cd3e6eca37fd1477217e64c77bb122de","_from":".","_npmVersion":"2.14.15","_nodeVersion":"5.3.0","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"dist":{"shasum":"b7796972cd3e6eca37fd1477217e64c77bb122de","size":461290,"noattachment":false,"key":"/rebound/-/rebound-0.0.15.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.15.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/rebound-0.0.15.tgz_1494339401762_0.6580989439971745"},"directories":{},"publish_time":1494339404445,"_hasShrinkwrap":false,"_cnpm_publish_time":1494339404445},"0.0.14":{"name":"rebound","version":"0.0.14","description":"A simple library for modeling spring dynamics","main":"rebound.js","types":"rebound.d.ts","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git+ssh://git@github.com/facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"gitHead":"f04a33649671dcb4dffef44f6476c8046889600d","homepage":"https://github.com/facebook/rebound-js#readme","_id":"rebound@0.0.14","_shasum":"1fe2c57803d2df2387e17656a0868786275f5cfe","_from":".","_npmVersion":"2.14.15","_nodeVersion":"5.3.0","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"dist":{"shasum":"1fe2c57803d2df2387e17656a0868786275f5cfe","size":461293,"noattachment":false,"key":"/rebound/-/rebound-0.0.14.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.14.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/rebound-0.0.14.tgz_1494296983377_0.9819113938137889"},"directories":{},"publish_time":1494296986079,"_cnpm_publish_time":1494296986079,"_hasShrinkwrap":false},"0.0.13":{"name":"rebound","version":"0.0.13","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.13","dist":{"shasum":"4a225254caf7da756797b19c5817bf7a7941fac1","size":459541,"noattachment":false,"key":"/rebound/-/rebound-0.0.13.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.13.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1431357681946,"_cnpm_publish_time":1431357681946,"_hasShrinkwrap":false},"0.0.12":{"name":"rebound","version":"0.0.12","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.12","dist":{"shasum":"5be306419222dc04815763f474c3b15a46c9751e","size":459156,"noattachment":false,"key":"/rebound/-/rebound-0.0.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.12.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1426055012298,"_cnpm_publish_time":1426055012298,"_hasShrinkwrap":false},"0.0.11":{"name":"rebound","version":"0.0.11","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.11","dist":{"shasum":"7e73899858eb53900a7772333d3c51fc2200c6fc","size":459180,"noattachment":false,"key":"/rebound/-/rebound-0.0.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.11.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1426054896055,"_cnpm_publish_time":1426054896055,"_hasShrinkwrap":false},"0.0.10":{"name":"rebound","version":"0.0.10","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.10","dist":{"shasum":"6050a9371569fe6b0bc14e78092fe6a70460fa8e","size":447846,"noattachment":false,"key":"/rebound/-/rebound-0.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.10.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1412595988462,"_cnpm_publish_time":1412595988462,"_hasShrinkwrap":false},"0.0.9":{"name":"rebound","version":"0.0.9","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.9","dist":{"shasum":"91c6e7a0a8be6d719851d9122f11f14f29d69dbc","size":447767,"noattachment":false,"key":"/rebound/-/rebound-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.9.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1412595535622,"_cnpm_publish_time":1412595535622,"_hasShrinkwrap":false},"0.0.8":{"name":"rebound","version":"0.0.8","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.8","dist":{"shasum":"e6df9793bcab9c4246348dce4ec6abdc3e650ff5","size":422610,"noattachment":false,"key":"/rebound/-/rebound-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.8.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1410108167922,"_cnpm_publish_time":1410108167922,"_hasShrinkwrap":false},"0.0.7":{"name":"rebound","version":"0.0.7","description":"A simple library for modeling spring dynamics","main":"rebound.min.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.7","dist":{"shasum":"41ebc3d0fa5405ec030ca7a4315f10e6eb02c911","size":289765,"noattachment":false,"key":"/rebound/-/rebound-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.7.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1407026467057,"_cnpm_publish_time":1407026467057,"_hasShrinkwrap":false},"0.0.6":{"name":"rebound","version":"0.0.6","description":"A simple library for modeling spring dynamics","main":"rebound.min.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.6","dist":{"shasum":"b5d6f7077eb12bff7e0e4590fb33cd7f9373ef5a","size":291180,"noattachment":false,"key":"/rebound/-/rebound-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.6.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1407025472074,"_cnpm_publish_time":1407025472074,"_hasShrinkwrap":false},"0.0.5":{"name":"rebound","version":"0.0.5","description":"A simple library for modeling spring dynamics","main":"rebound.min.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"scripts":{"test":"jasmine-node spec"},"devDependencies":{"jasmine-node":"^1.14.5"},"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.5","dist":{"shasum":"5b8ac36f5057b137d597fd376e0244086ba7f79d","size":291100,"noattachment":false,"key":"/rebound/-/rebound-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.5.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1407025141103,"_cnpm_publish_time":1407025141103,"_hasShrinkwrap":false},"0.0.4":{"name":"rebound","version":"0.0.4","description":"A simple library for modeling spring dynamics","main":"rebound.min.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git@github.com:facebook/rebound-js.git"},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"keywords":["facebook","animation"],"homepage":"https://github.com/facebook/rebound-js","_id":"rebound@0.0.4","dist":{"shasum":"27534f232436301dff1648e4b3d03b8608dfa917","size":287076,"noattachment":false,"key":"/rebound/-/rebound-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.4.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1406936567214,"_cnpm_publish_time":1406936567214,"_hasShrinkwrap":false},"0.0.3":{"name":"rebound","version":"0.0.3","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git://github.com/facebook/rebound.git"},"bugs":{"url":"https://github.com/facebook/rebound/issues"},"keywords":["facebook","animation"],"homepage":"https://github.com/facebook/rebound","_id":"rebound@0.0.3","dist":{"shasum":"e888677204ad3f942157fe40bd8b32308fec5a28","size":285739,"noattachment":false,"key":"/rebound/-/rebound-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1406163125880,"_cnpm_publish_time":1406163125880,"_hasShrinkwrap":false},"0.0.2":{"name":"rebound","version":"0.0.2","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git://github.com/facebook/rebound.git"},"bugs":{"url":"https://github.com/facebook/rebound/issues"},"keywords":["facebook","animation"],"homepage":"https://github.com/facebook/rebound","_id":"rebound@0.0.2","dist":{"shasum":"081f6314e3c994d054069b78f54c5cea561cf0f9","size":4069,"noattachment":false,"key":"/rebound/-/rebound-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1398881363186,"_cnpm_publish_time":1398881363186,"_hasShrinkwrap":false},"0.0.1":{"name":"rebound","version":"0.0.1","description":"A simple library for modeling spring dynamics","main":"rebound.js","author":{"name":"Facebook"},"license":"BSD","dependencies":{},"repository":{"type":"git","url":"git://github.com/facebook/rebound.git"},"bugs":{"url":"https://github.com/facebook/rebound/issues"},"keywords":["facebook","animation"],"_id":"rebound@0.0.1","dist":{"shasum":"7b1cc8cfd760db3f96807940b154c77f548431df","size":4075,"noattachment":false,"key":"/rebound/-/rebound-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rebound/download/rebound-0.0.1.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"wbailey","email":"will.bailey@gmail.com"},"maintainers":[{"name":"wbailey","email":"will.bailey@gmail.com"},{"name":"wbinnssmith","email":"wbinnssmith@gmail.com"}],"directories":{},"publish_time":1385057783698,"_cnpm_publish_time":1385057783698,"_hasShrinkwrap":false}},"readme":"[![Build\nStatus](https://travis-ci.org/facebook/rebound-js.svg?branch=master)](https://travis-ci.org/facebook/rebound-js)\n\n# Rebound\n**Rebound** is a simple library that models Spring dynamics for the\npurpose of driving physical animations.\n\n## Origin\n[Rebound](http://facebook.github.io/rebound) was originally written\nin Java to provide a lightweight physics system for\n[Home](https://play.google.com/store/apps/details?id=com.facebook.home) and\n[Chat Heads](https://play.google.com/store/apps/details?id=com.facebook.orca)\non Android. It's now been adopted by several other Android\napplications. This JavaScript port was written to provide a quick\nway to demonstrate Rebound animations on the web for a\n[conference talk](https://www.youtube.com/watch?v=s5kNm-DgyjY). Since then\nthe JavaScript version has been used to build some really nice interfaces.\nCheck out [brandonwalkin.com](http://brandonwalkin.com) for an\nexample.\n\n## Overview\nThe Library provides a SpringSystem for maintaining a set of Spring\nobjects and iterating those Springs through a physics solver loop\nuntil equilibrium is achieved. The Spring class is the basic\nanimation driver provided by Rebound. By attaching a listener to\na Spring, you can observe its motion. The observer function is\nnotified of position changes on the spring as it solves for\nequilibrium. These position updates can be mapped to an animation\nrange to drive animated property updates on your user interface\nelements (translation, rotation, scale, etc).\n\nCheck out the\n[tests](http://facebook.github.io/rebound-js/browser_test/index.html), and\n[examples](http://facebook.github.io/rebound-js/examples) for more details.\n\n## Example\nHere's a simple example. Pressing and releasing on the logo below\nwill cause it to scale up and down with a springy animation.\n\n```html\n<div style=\"text-align:center; margin-bottom:50px; margin-top:50px\">\n  <img\n    src=\"http://facebook.github.io/rebound/images/rebound.png\"\n    id=\"logo\"\n  />\n</div>\n<script src=\"../rebound.min.js\"></script>\n<script>\n  function scale(el, val) {\n    el.style.mozTransform =\n    el.style.msTransform =\n    el.style.webkitTransform =\n    el.style.transform = 'scale3d(' + val + ', ' + val + ', 1)';\n  }\n  var el = document.getElementById('logo');\n\n  var springSystem = new rebound.SpringSystem();\n  var spring = springSystem.createSpring(50, 3);\n  spring.addListener({\n    onSpringUpdate: function(spring) {\n      var val = spring.getCurrentValue();\n      val = rebound.MathUtil.mapValueInRange(val, 0, 1, 1, 0.5);\n      scale(el, val);\n    }\n  });\n\n  el.addEventListener('mousedown', function() {\n    spring.setEndValue(1);\n  });\n\n  el.addEventListener('mouseout', function() {\n    spring.setEndValue(0);\n  });\n\n  el.addEventListener('mouseup', function() {\n    spring.setEndValue(0);\n  });\n</script>\n```\n\n### Here's how it works.\n\n```js\n// Get a reference to the logo element.\nvar el = document.getElementById('logo');\n\n// create a SpringSystem and a Spring with a bouncy config.\nvar springSystem = new rebound.SpringSystem();\nvar spring = springSystem.createSpring(50, 3);\n\n// Add a listener to the spring. Every time the physics\n// solver updates the Spring's value onSpringUpdate will\n// be called.\nspring.addListener({\n  onSpringUpdate: function(spring) {\n    var val = spring.getCurrentValue();\n    val = rebound.MathUtil\n                 .mapValueInRange(val, 0, 1, 1, 0.5);\n    scale(el, val);\n  }\n});\n\n// Listen for mouse down/up/out and toggle the\n//springs endValue from 0 to 1.\nel.addEventListener('mousedown', function() {\n  spring.setEndValue(1);\n});\n\nel.addEventListener('mouseout', function() {\n  spring.setEndValue(0);\n});\n\nel.addEventListener('mouseup', function() {\n  spring.setEndValue(0);\n});\n\n// Helper for scaling an element with css transforms.\nfunction scale(el, val) {\n  el.style.mozTransform =\n  el.style.msTransform =\n  el.style.webkitTransform =\n  el.style.transform = 'scale3d(' +\n    val + ', ' + val + ', 1)';\n}\n```\n\n### [Code of Conduct](https://code.facebook.com/codeofconduct)\n\nFacebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.\n\n","_attachments":{},"bugs":{"url":"https://github.com/facebook/rebound-js/issues"},"license":"BSD-3-Clause"}