{"_id":"@dreamlab.gg/matter-js","_rev":"1-0a2a2382c136e7f46fdbd66e05a07483","name":"@dreamlab.gg/matter-js","dist-tags":{"latest":"0.19.1"},"versions":{"0.19.1":{"name":"@dreamlab.gg/matter-js","version":"0.19.1","license":"MIT","homepage":"http://brm.io/matter-js/","author":{"name":"Liam Brummitt","email":"liam@brm.io","url":"http://brm.io/"},"description":"a 2D rigid body physics engine for the web","main":"build/matter.js","repository":{"type":"git","url":"git+https://github.com/WorldQL/matter-js.git"},"keywords":["javascript","canvas","html5","physics","physics engine","game engine","rigid body physics"],"devDependencies":{"conventional-changelog-cli":"^2.1.1","eslint":"^6.8.0","html-webpack-plugin":"^4.5.1","jest":"^25.1.0","jest-worker":"^24.9.0","json-stringify-pretty-compact":"^2.0.0","matter-tools":"^0.14.0","matter-wrap":"^0.2.0","mock-require":"^3.0.3","pathseg":"^1.2.0","poly-decomp":"^0.3.0","puppeteer-core":"^5.5.0","terser-webpack-plugin":"^4.2.3","webpack":"^4.46.0","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.11.1"},"scripts":{"start":"npm run dev","dev":"npm run serve -- --open","serve":"webpack-dev-server --no-cache --mode development --config webpack.demo.config.js","watch":"nodemon --watch webpack.demo.config.js --exec \"npm run serve\"","build":"webpack --mode=production --no-hot --no-watch & webpack --mode=production --no-hot --no-watch --env.MINIMIZE","build-alpha":"webpack --mode=production --no-hot --no-watch --env.KIND=alpha & webpack --mode=production --no-hot --no-watch --env.MINIMIZE --env.KIND=alpha","build-dev":"webpack --mode=production --no-hot --no-watch --env.KIND=dev & webpack --mode=production --no-hot --no-watch --env.MINIMIZE --env.KIND=dev","build-demo":"rm -rf ./demo/js && webpack --no-hot --no-watch --config webpack.demo.config.js --mode=production && webpack --no-hot --no-watch --config webpack.demo.config.js --mode=production --env.MINIMIZE","lint":"eslint 'src/**/*.js' 'demo/src/**/*.js' 'examples/*.js' 'webpack.*.js'","doc":"yuidoc --config yuidoc.json --project-version $npm_package_version","doc-watch":"nodemon --delay 3 --watch 'matter-doc-theme' --watch src -e 'js,html,css,handlebars' --exec 'npm run doc'","benchmark":"npm run test-node -- --examples=stress3,stress4 --updates=300 --repeats=3","test":"npm run test-node","test-node":"npm run build-dev && node --expose-gc node_modules/.bin/jest --force-exit --no-cache --runInBand ./test/Examples.spec.js","test-browser":"node --expose-gc node_modules/.bin/jest --force-exit --no-cache --runInBand ./test/Browser.spec.js","test-all":"npm run test-node && npm run test-browser","test-save":"npm run test-node -- --save=true","test-watch":"npm run test-node -- --watch","changelog":"conventional-changelog -i CHANGELOG.md -s -r","postversion":"git push --follow-tags","prepack":"npm run build"},"volta":{"node":"16.20.2"},"_id":"@dreamlab.gg/matter-js@0.19.1","gitHead":"f9c66f7045fc5dc4084d8e7c8c5fe69d3314db3e","bugs":{"url":"https://github.com/WorldQL/matter-js/issues"},"_nodeVersion":"16.20.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-pJu6K4rBKFh5DMn29kFlZuXXRJ5LMGTey2dOM2eGw5XqdgNIY4S4t08QRtw0S3ykCGNJraXQnQAd8v/r/uR7Dw==","shasum":"fb19634922958428b6c1c35bb5d6fca6b8f3d4ec","tarball":"https://registry.npmjs.org/@dreamlab.gg/matter-js/-/matter-js-0.19.1.tgz","fileCount":38,"unpackedSize":896713,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dreamlab.gg%2fmatter-js@0.19.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaS8YmauqXyMl+wdsQbmlYrXK+UF3zsjQX367AXx95fgIgIWVdhNiyhXw0tBjL083FPsc4+99cIjthBwK6GmH+c7M="}]},"_npmUser":{"name":"jacksonroberts","email":"jackson@worldql.com"},"directories":{},"maintainers":[{"name":"lolpants","email":"jack.m.baron@gmail.com"},{"name":"jacksonroberts","email":"jackson@worldql.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matter-js_0.19.1_1693469606057_0.47660331503048536"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2023-08-31T08:13:25.935Z","0.19.1":"2023-08-31T08:13:26.291Z","modified":"2023-12-14T20:42:17.002Z"},"maintainers":[{"name":"jacksonroberts","email":"jackson@worldql.com"},{"name":"lolpants","email":"jack.m.baron@gmail.com"}],"description":"a 2D rigid body physics engine for the web","homepage":"http://brm.io/matter-js/","keywords":["javascript","canvas","html5","physics","physics engine","game engine","rigid body physics"],"repository":{"type":"git","url":"git+https://github.com/WorldQL/matter-js.git"},"author":{"name":"Liam Brummitt","email":"liam@brm.io","url":"http://brm.io/"},"bugs":{"url":"https://github.com/WorldQL/matter-js/issues"},"license":"MIT","readme":"<img alt=\"Matter.js\" src=\"https://brm.io/matter-js/img/matter-js.svg\" width=\"300\">\n\n> *Matter.js* is a JavaScript 2D rigid body physics engine for the web\n\n[brm.io/matter-js](https://brm.io/matter-js/)\n\n[Demos](#demos) ・ [Gallery](#gallery) ・ [Features](#features) ・ [Plugins](#plugins) ・ [Install](#install) ・ [Usage](#usage) ・ [Examples](#examples) ・ [Docs](#documentation) ・ [Wiki](https://github.com/liabru/matter-js/wiki) ・ [References](#references) ・ [License](#license)\n\n[![Build Status](https://travis-ci.org/liabru/matter-js.png?branch=master)](https://travis-ci.org/liabru/matter-js)\n\n### Demos\n\n<table>\n  <tr>\n    <td>\n      <ul>\n        <li><a href=\"https://brm.io/matter-js/demo/#mixed\">Mixed Shapes</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#mixedSolid\">Solid Shapes</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#svg\">Concave SVG Paths</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#terrain\">Concave Terrain</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#concave\">Concave Bodies</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#compound\">Compound Bodies</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#newtonsCradle\">Newton's Cradle</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#wreckingBall\">Wrecking Ball</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#slingshot\">Slingshot Game</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#rounded\">Rounded Corners</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#views\">Views</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#timescale\">Time Scaling</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#manipulation\">Body Manipulation</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#compositeManipulation\">Composite Manipulation</a></li>\n      </ul>\n    </td>\n    <td>\n      <ul>\n        <li><a href=\"https://brm.io/matter-js/demo/#raycasting\">Raycasting</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#sprites\">Sprites</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#pyramid\">Pyramid</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#car\">Car</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#catapult\">Catapult</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#gravity\">Reverse Gravity</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#bridge\">Bridge</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#avalanche\">Avalanche</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#softBody\">Basic Soft Bodies</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#cloth\">Cloth</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#events\">Events</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#collisionFiltering\">Collision Filtering</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#chains\">Chains</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#ballPool\">Ball Pool</a></li>\n      </ul>\n    </td>\n    <td>\n      <ul>\n        <li><a href=\"https://brm.io/matter-js/demo/#stack\">Stack</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#circleStack\">Circle Stack</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#compoundStack\">Compound Stack</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#restitution\">Restitution</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#friction\">Friction</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#airFriction\">Air Friction</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#staticFriction\">Static Friction</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#sleeping\">Sleeping</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#beachBalls\">Beach Balls</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#stress\">Stress 1</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#stress2\">Stress 2</a></li>\n        <li><a href=\"https://brm.io/matter-js/demo/#sensors\">Sensors</a></li>\n      </ul>\n      <br>\n    </td>\n  </tr>\n</table>\n\n### Gallery\n\nSee how others are using matter.js physics\n\n- [Patrick Heng](https://patrickheng.com/) by Patrick Heng\n- [USELESS](https://useless.london/) by Nice and Serious\n- [Secret 7](https://secret-7.com/) by Goodness\n- [New Company](https://www.new.company/) by New Company\n- [Game of The Year](https://gameoftheyear.withgoogle.com/) by Google\n- [Pablo The Flamingo](https://pablotheflamingo.com/) by Nathan Gordon\n- [Les métamorphoses de Mr. Kalia](https://lab212.org/oeuvres/2:art/18/Les-metamorphoses-de-Mr-Kalia) by Lab212\n- [Phaser](https://phaser.io/) by Photon Storm\n- [Sorry I Have No Filter](https://sorryihavenofilter.com/pages/about/) by Jessica Walsh\n- [Fuse](https://fuse.blog/) by Fuse\n- [Glyphfinder](https://www.glyphfinder.com/) by überdosis\n- [Isolation](https://isolation.is/postcards/my-week) by sabato studio\n- [more...](https://github.com/liabru/matter-js/wiki/Gallery)\n\n### Features\n\n- Rigid bodies\n- Compound bodies\n- Composite bodies\n- Concave and convex hulls\n- Physical properties (mass, area, density etc.)\n- Restitution (elastic and inelastic collisions)\n- Collisions (broad-phase, mid-phase and narrow-phase)\n- Stable stacking and resting\n- Conservation of momentum\n- Friction and resistance\n- Events\n- Constraints\n- Gravity\n- Sleeping and static bodies\n- Plugins\n- Rounded corners (chamfering)\n- Views (translate, zoom)\n- Collision queries (raycasting, region tests)\n- Time scaling (slow-mo, speed-up)\n- Canvas renderer (supports vectors and textures)\n- [MatterTools](https://github.com/liabru/matter-tools) for creating, testing and debugging worlds\n- World state serialisation (requires [resurrect.js](https://github.com/skeeto/resurrect-js))\n- Cross-browser and Node.js support (Chrome, Firefox, Safari, IE8+)\n- Mobile-compatible (touch, responsive)\n- An original JavaScript physics implementation (not a port)\n\n### Install\n\nYou can install using package managers [npm](https://www.npmjs.org/package/matter-js) and [Yarn](https://yarnpkg.com/) using:\n\n    npm install matter-js\n\nAlternatively you can download a [stable release](https://github.com/liabru/matter-js/tags) or try the latest experimental [alpha build](https://github.com/liabru/matter-js/tree/master/build) (master) and include the script in your web page:\n\n    <script src=\"matter.js\" type=\"text/javascript\"></script>\n\n### Performance with other tools (e.g. Webpack, Vue etc.)\n\nBundlers and frameworks may reduce real-time performance when using their default configs, especially in development modes.\n\nWhen using [Webpack](https://webpack.js.org/), the default sourcemap config can have a large impact, for a solution see [issue](https://github.com/liabru/matter-js/issues/1001).\n\nWhen using [Vue.js](https://vuejs.org/), watchers can have a large impact, for a solution see [issue](https://github.com/liabru/matter-js/issues/1001#issuecomment-998911435). \n\n### Usage\n\nVisit the [Getting started](https://github.com/liabru/matter-js/wiki/Getting-started) wiki page for a minimal usage example which should work in both browsers and Node.js.  \nAlso see the [Running](https://github.com/liabru/matter-js/wiki/Running) and [Rendering](https://github.com/liabru/matter-js/wiki/Rendering) wiki pages, which show how to use your own game and rendering loops.\n\n### Tutorials\n\nSee the list of [tutorials](https://github.com/liabru/matter-js/wiki/Tutorials).\n\n### Examples\n\nSee the [examples](https://github.com/liabru/matter-js/tree/master/examples) directory which contains the source for all [demos](#demos).  \nThere are even more examples on [codepen](https://codepen.io/collection/Fuagy/).\n\n### Plugins\n\nThe engine can be extended through plugins, see these resources:\n\n- [Using plugins](https://github.com/liabru/matter-js/wiki/Using-plugins)\n- [Creating plugins](https://github.com/liabru/matter-js/wiki/Creating-plugins)\n- [List of plugins](https://github.com/liabru/matter-js/wiki/List-of-plugins)\n- [matter-plugin-boilerplate](https://github.com/liabru/matter-plugin-boilerplate)\n\n### Documentation\n\nSee the [API Documentation](https://brm.io/matter-js/docs/) and the [wiki](https://github.com/liabru/matter-js/wiki)\n\n### Building and Contributing\n\nTo build you must first install [node.js](https://nodejs.org/), then run\n\n\tnpm install\n\nThis will install the required build dependencies, then run\n\n\tnpm run dev\n\nto spawn a development server. For information on contributing see [CONTRIBUTING.md](https://github.com/liabru/matter-js/blob/master/CONTRIBUTING.md).\n\n### Changelog\n\nTo see what's new or changed in the latest version, see the [changelog](https://github.com/liabru/matter-js/blob/master/CHANGELOG.md).\n\n### References\n\nSee the wiki page on [References](https://github.com/liabru/matter-js/wiki/References).\n\n### License\n\nMatter.js is licensed under [The MIT License (MIT)](https://opensource.org/licenses/MIT)  \nCopyright (c) 2014 Liam Brummitt\n\nThis license is also supplied with the release and source code.  \nAs stated in the license, absolutely no warranty is provided.\n","readmeFilename":"README.md"}