pocket-physics
TypeScript icon, indicating that this package has built-in type declarations

11.0.0 • Public • Published

pocket-physics

Demos at https://kirbysayshi.github.io/pocket-physics.

Fully typed, as it's written in Typescript!

npm install pocket-physics
var { accelerate, inertia } = require("pocket-physics");

var point = {
  cpos: { x: 0, y: 0 },
  ppos: { x: 0, y: 0 },
  acel: { x: 10, y: 0 },
};

// 16 is the delta time between steps in milliseconds
accelerate(point1, 16);
inertia(point);

console.log(point.cpos);
// { x: 5.12, y: 0 }

Maintenance

Demos to gh-pages:

yarn demos:deploy

Publishing:

npm version [...]
git push origin HEAD --tags
npm publish

LICENSE

MIT

Package Sidebar

Install

npm i pocket-physics

Weekly Downloads

570

Version

11.0.0

License

MIT

Unpacked Size

255 kB

Total Files

146

Last publish

Collaborators

  • kirbysayshi