From f28c22970fd59909361a78db7cdd9e10370fb229 Mon Sep 17 00:00:00 2001 From: liabru Date: Tue, 1 Apr 2014 13:48:42 +0100 Subject: [PATCH] updated readme and changelog for new release --- CHANGELOG.md | 100 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 110 ++++++++++++++++++++++++++++----------------------- 2 files changed, 160 insertions(+), 50 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..17ca230 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,100 @@ +# Matter.js Changelog + +[brm.io/matter-js](http://brm.io/matter-js) + +---------- + +## 0.7.0-alpha - 2014-04-01 + +#### Release Highlights + +- added six new demos + - all demos are now mobile friendly +- added new event system + - engine, mouse and collision events +- added sprite texture rendering support +- added WebGL renderer (pixi.js) +- improved `Composite` (and `World`) + - batch adding + - type agnostic adding + - body removal +- major performance increases all round + - collision detection caching + - batched rendering + - improved pair management + - memory leaks fixed +- stability improvements + - bodies rest better due to collision caching + - bodies sleep better + - constraints are much less volatile +- fixes for a number of issues (see fixes) + +#### Added + +- added demos + - sprites + - events + - catapult + - cloth + - soft body + - bridge +- added collision caching and reuse for improved performance + - added metrics for collision reuse +- added `Events` module ([Issue #8](https://github.com/liabru/matter-js/issues/8)) + - engine events + - mouse events + - collision events +- added composite functions, including + - batch adding (`Composite.add` / `World.add`) + - type agnostic adding (`Composite.add` / `World.add`) + - body removal (`Composite.remove` / `World.remove`) +- added factory functions + - constraint meshing (`Composites.mesh`) + - soft body factory (`Composites.softBody`) +- added `RenderPixi`, a pixi.js WebGL renderer + - added `Gui` option to switch renderer + - added `Mouse.setElement` +- added `render.visible` flag to `Body` and `Constraint` ([Issue #10](https://github.com/liabru/matter-js/issues/10)) +- added `id` to `Constraint` and `Composite` +- added `type` names to `Body`, `Constraint`, `Composite` +- added `Common` functions + - `Common.colorToNumber` + - `Common.log` + - `Common.clone` +- added jsdoc annotations +- added travis-ci integration +- added yuidoc build tasks +- added multiple build modes to `Gruntfile` (dev, release, edge) +- added repository to `package.json`, so Browserify may be used +- added `CHANGELOG.md` + +#### Changed + +- renamed module `Manager` to `Pairs` +- changed `Composite` to be tree-based +- changed timestep to be smoothed over 1s for stability +- changed default `constraintIterations` to 2 for stability +- changed demo to use the new composite functions +- changed right click to now remove bodies in the demos +- changed `Common.now` to use high-resolution timing +- changed `MouseConstraint` to reference a single constraint rather than a list +- changed `Constraint` to now use a `render` property +- changed `Metrics` to only track FPS by default, use the `extended` flag for full metrics + +#### Removed + +- removed the default in `MouseConstraint`, you must now instantiate one manually + +#### Fixed + +- fixed a memory leak in `Grid` +- fixed a memory leak in `Manager` +- fixed debug text now uses `Metrics` correctly +- fixed issues regarding passing custom `Render` modules ([Issue #7](https://github.com/liabru/matter-js/issues/7)) +- fixed issue in `Common.extend` with `null` properties +- fixed issue with sleeping, now ignores inactive pairs +- fixed issues with `Body.applyForce` ([Issue #7](https://github.com/liabru/matter-js/issues/7)) + +## 0.5.0-alpha - 2014-02-28 + +- initial release \ No newline at end of file diff --git a/README.md b/README.md index 5f581f5..e797f8e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Matter.js -*Matter.js* is a 2D rigid body physics engine for the web written in JavaScript (yes, another) +*Matter.js* is a JavaScript 2D rigid body physics engine for the web [brm.io/matter-js](http://brm.io/matter-js) @@ -12,51 +12,53 @@ - [Mixed Shapes](http://brm.io/matter-js-demo#mixed) - [Solid Shapes](http://brm.io/matter-js-demo#mixedSolid) -- [Stack](http://brm.io/matter-js-demo#stack) -- [Circle Stack](http://brm.io/matter-js-demo#circleStack) +- [Newton's Cradle](http://brm.io/matter-js-demo#newtonsCradle) +- [Wrecking Ball](http://brm.io/matter-js-demo#wreckingBall) +- [Sprites](http://brm.io/matter-js-demo/#sprites) - [Pyramid](http://brm.io/matter-js-demo#pyramid) - [Car](http://brm.io/matter-js-demo#car) -- [Newton's Cradle](http://brm.io/matter-js-demo#newtonsCradle) +- [Catapult](http://brm.io/matter-js-demo#catapult) +- [Reverse Gravity](http://brm.io/matter-js-demo#gravity) +- [Bridge](http://brm.io/matter-js-demo#bridge) +- [Avalanche](http://brm.io/matter-js-demo#avalanche) +- [Basic Soft Bodies](http://brm.io/matter-js-demo#softBody) +- [Cloth](http://brm.io/matter-js-demo#cloth) +- [Events](http://brm.io/matter-js-demo/#events) +- [Chains](http://brm.io/matter-js-demo#chains) +- [Ball Pool](http://brm.io/matter-js-demo#ballPool) +- [Stack](http://brm.io/matter-js-demo#stack) +- [Circle Stack](http://brm.io/matter-js-demo#circleStack) - [Restitution](http://brm.io/matter-js-demo#restitution) - [Friction](http://brm.io/matter-js-demo#friction) - [Air Friction](http://brm.io/matter-js-demo#airFriction) -- [Reverse Gravity](http://brm.io/matter-js-demo#gravity) - [Sleeping](http://brm.io/matter-js-demo#sleeping) - [Grid Broadphase](http://brm.io/matter-js-demo#broadphase) -- [Chains](http://brm.io/matter-js-demo#chains) -- [Ball Pool](http://brm.io/matter-js-demo#ballPool) -- [Wrecking Ball](http://brm.io/matter-js-demo#wreckingBall) -- [Avalanche](http://brm.io/matter-js-demo#avalanche) - [Beach Balls](http://brm.io/matter-js-demo#beachBalls) - [Stress 1](http://brm.io/matter-js-demo#stress) - [Stress 2](http://brm.io/matter-js-demo#stress2) -- [Sprites (_edge_)](http://brm.io/matter-js-demo-master/#sprites) -- [Events (_edge_)](http://brm.io/matter-js-demo-master/#events) ### Features -- Physical properties (mass, area, density etc.) -- Rigid bodies of any convex polygon -- Stable stacking and resting -- Restitution (elastic and inelastic collisions) -- Conservation of momentum -- Friction and resistance -- Constraints -- Gravity -- Composite bodies -- Sleeping and static bodies -- Original JavaScript physics implementation (not a port) -- HTML5 canvas renderer (optional) -- Mobile-compatible (touch, scaleable) -- Cross-browser (chrome, firefox, IE8+) -- World state serialisation (requires - [resurrect.js](https://github.com/skeeto/resurrect-js)) -- Built in GUI for testing (requires - [dat.gui.js](http://workshop.chromeexperiments.com/examples/gui/)) -- Time scaling (slow-mo, speed-up) -- Broad-phase, mid-phase and narrow-phase collisions -- Events (_edge_) -- Sprite texture rendering (_edge_) +- Physical properties (mass, area, density etc.) +- Rigid bodies of any convex polygon +- Stable stacking and resting +- Collisions (broad-phase, mid-phase and narrow-phase) +- Restitution (elastic and inelastic collisions) +- Conservation of momentum +- Friction and resistance +- Constraints +- Gravity +- Composite bodies +- Sleeping and static bodies +- Events +- Time scaling (slow-mo, speed-up) +- Canvas renderer (supports vectors and textures) +- WebGL renderer (requires [pixi.js](https://github.com/GoodBoyDigital/pixi.js/)) +- World state serialisation (requires [resurrect.js](https://github.com/skeeto/resurrect-js)) +- Built in GUI for testing (requires [dat.gui.js](http://workshop.chromeexperiments.com/examples/gui/)) +- Cross-browser (Chrome, Firefox, Safari, IE8+) +- Mobile-compatible (touch, responsive) +- An original JavaScript physics implementation, not a port! ### Status @@ -71,42 +73,50 @@ Though if I get time and people are interested, I may continue working on it. ### Install -Download [matter-0.5.0.js](https://github.com/liabru/matter-js/releases/download/0.5.0-alpha/matter-0.5.0.js) or [matter-0.5.0.min.js](https://github.com/liabru/matter-js/releases/download/0.5.0-alpha/matter-0.5.0.min.js) and include the script in your HTML file: +Download [matter-0.7.0.js](https://github.com/liabru/matter-js/releases/download/0.7.0-alpha/matter-0.7.0.js) or [matter-0.7.0.min.js](https://github.com/liabru/matter-js/releases/download/0.7.0-alpha/matter-0.7.0.min.js) and include the script in your HTML file: - + For the latest features try the [edge version (master)](https://raw.github.com/liabru/matter-js/master/build/matter.js), but it may not be fully stable. +#### Or install using [Bower](http://bower.io/) + + bower install matter-js + ### Usage See [Demo.js](https://github.com/liabru/matter-js/blob/master/demo/js/Demo.js) and [DemoMobile.js](https://github.com/liabru/matter-js/blob/master/demo/js/DemoMobile.js) for many usage examples. -
When loaded, all functions are under the global Matter.* namespace. +
When loaded, all modules and functions are under the global Matter.* namespace. ### Documentation -See the [Matter.js API Docs (v0.5.0)](http://brm.io/matter-js-docs/). +See the [Matter.js API Docs (v0.7.0)](http://brm.io/matter-js-docs/).
If you're using the [edge version (master)](https://raw2.github.com/liabru/matter-js/master/build/matter.js) then see the [API Docs (master)](http://brm.io/matter-js-docs-master/). +### Changelog + +To see what's new or changed in the latest version, see the [changelog](https://github.com/liabru/matter-js/blob/master/CHANGELOG.md) + ### Implementation The technical details for physics nerds and game devs.
This engine is using the following techniques: -- Time-corrected position Verlet integrator -- Adaptive grid broad-phase detection -- AABB mid-phase detection -- SAT narrow-phase detection -- Iterative sequential impulse solver and position solver -- Resting collisions with resting constraints ala Erin Catto's method +- Time-corrected position Verlet integrator +- Adaptive grid broad-phase detection +- AABB mid-phase detection +- SAT narrow-phase detection +- Iterative sequential impulse solver and position solver +- Resting collisions with resting constraints ala Erin Catto's method (GDC08) -- Temporal coherence impulse caching and warming -- Collision pairs, contacts and impulses maintained with a pair +- Temporal coherence impulse caching and warming +- Collision pairs, contacts and impulses maintained with a pair manager -- Approximate Coulomb friction model using friction constraints -- Constraints solved with the Gauss-Siedel method -- Semi-variable time step, synced with rendering -- A basic sleeping strategy -- HTML5 canvas renderer +- Approximate Coulomb friction model using friction constraints +- Constraints solved with the Gauss-Siedel method +- Semi-variable time step, synced with rendering +- A basic sleeping strategy +- HTML5 Canvas / WebGL renderer ### References