mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-24 13:29:01 -05:00
updated readme and changelog for new release
This commit is contained in:
parent
7dda3749a6
commit
f28c22970f
2 changed files with 160 additions and 50 deletions
100
CHANGELOG.md
Normal file
100
CHANGELOG.md
Normal file
|
@ -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
|
110
README.md
110
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Matter.js
|
# 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)
|
[brm.io/matter-js](http://brm.io/matter-js)
|
||||||
|
|
||||||
|
@ -12,51 +12,53 @@
|
||||||
|
|
||||||
- [Mixed Shapes](http://brm.io/matter-js-demo#mixed)
|
- [Mixed Shapes](http://brm.io/matter-js-demo#mixed)
|
||||||
- [Solid Shapes](http://brm.io/matter-js-demo#mixedSolid)
|
- [Solid Shapes](http://brm.io/matter-js-demo#mixedSolid)
|
||||||
- [Stack](http://brm.io/matter-js-demo#stack)
|
- [Newton's Cradle](http://brm.io/matter-js-demo#newtonsCradle)
|
||||||
- [Circle Stack](http://brm.io/matter-js-demo#circleStack)
|
- [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)
|
- [Pyramid](http://brm.io/matter-js-demo#pyramid)
|
||||||
- [Car](http://brm.io/matter-js-demo#car)
|
- [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)
|
- [Restitution](http://brm.io/matter-js-demo#restitution)
|
||||||
- [Friction](http://brm.io/matter-js-demo#friction)
|
- [Friction](http://brm.io/matter-js-demo#friction)
|
||||||
- [Air Friction](http://brm.io/matter-js-demo#airFriction)
|
- [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)
|
- [Sleeping](http://brm.io/matter-js-demo#sleeping)
|
||||||
- [Grid Broadphase](http://brm.io/matter-js-demo#broadphase)
|
- [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)
|
- [Beach Balls](http://brm.io/matter-js-demo#beachBalls)
|
||||||
- [Stress 1](http://brm.io/matter-js-demo#stress)
|
- [Stress 1](http://brm.io/matter-js-demo#stress)
|
||||||
- [Stress 2](http://brm.io/matter-js-demo#stress2)
|
- [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
|
### Features
|
||||||
|
|
||||||
- Physical properties (mass, area, density etc.)
|
- Physical properties (mass, area, density etc.)
|
||||||
- Rigid bodies of any convex polygon
|
- Rigid bodies of any convex polygon
|
||||||
- Stable stacking and resting
|
- Stable stacking and resting
|
||||||
- Restitution (elastic and inelastic collisions)
|
- Collisions (broad-phase, mid-phase and narrow-phase)
|
||||||
- Conservation of momentum
|
- Restitution (elastic and inelastic collisions)
|
||||||
- Friction and resistance
|
- Conservation of momentum
|
||||||
- Constraints
|
- Friction and resistance
|
||||||
- Gravity
|
- Constraints
|
||||||
- Composite bodies
|
- Gravity
|
||||||
- Sleeping and static bodies
|
- Composite bodies
|
||||||
- Original JavaScript physics implementation (not a port)
|
- Sleeping and static bodies
|
||||||
- HTML5 canvas renderer (optional)
|
- Events
|
||||||
- Mobile-compatible (touch, scaleable)
|
- Time scaling (slow-mo, speed-up)
|
||||||
- Cross-browser (chrome, firefox, IE8+)
|
- Canvas renderer (supports vectors and textures)
|
||||||
- World state serialisation (requires
|
- WebGL renderer (requires [pixi.js](https://github.com/GoodBoyDigital/pixi.js/))
|
||||||
[resurrect.js](https://github.com/skeeto/resurrect-js))
|
- World state serialisation (requires [resurrect.js](https://github.com/skeeto/resurrect-js))
|
||||||
- Built in GUI for testing (requires
|
- Built in GUI for testing (requires [dat.gui.js](http://workshop.chromeexperiments.com/examples/gui/))
|
||||||
[dat.gui.js](http://workshop.chromeexperiments.com/examples/gui/))
|
- Cross-browser (Chrome, Firefox, Safari, IE8+)
|
||||||
- Time scaling (slow-mo, speed-up)
|
- Mobile-compatible (touch, responsive)
|
||||||
- Broad-phase, mid-phase and narrow-phase collisions
|
- An original JavaScript physics implementation, not a port!
|
||||||
- Events (_edge_)
|
|
||||||
- Sprite texture rendering (_edge_)
|
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
|
@ -71,42 +73,50 @@ Though if I get time and people are interested, I may continue working on it.
|
||||||
|
|
||||||
### Install
|
### 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:
|
||||||
|
|
||||||
<script src="matter-0.5.0.js" type="text/javascript"></script>
|
<script src="matter-0.7.0.js" type="text/javascript"></script>
|
||||||
|
|
||||||
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.
|
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
|
### 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.
|
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.
|
||||||
<br>When loaded, all functions are under the global <code>Matter.*</code> namespace.
|
<br>When loaded, all modules and functions are under the global <code>Matter.*</code> namespace.
|
||||||
|
|
||||||
### Documentation
|
### 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/).
|
||||||
<br>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/).
|
<br>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
|
### Implementation
|
||||||
|
|
||||||
The technical details for physics nerds and game devs.
|
The technical details for physics nerds and game devs.
|
||||||
<br>This engine is using the following techniques:
|
<br>This engine is using the following techniques:
|
||||||
|
|
||||||
- Time-corrected position Verlet integrator
|
- Time-corrected position Verlet integrator
|
||||||
- Adaptive grid broad-phase detection
|
- Adaptive grid broad-phase detection
|
||||||
- AABB mid-phase detection
|
- AABB mid-phase detection
|
||||||
- SAT narrow-phase detection
|
- SAT narrow-phase detection
|
||||||
- Iterative sequential impulse solver and position solver
|
- Iterative sequential impulse solver and position solver
|
||||||
- Resting collisions with resting constraints ala Erin Catto's method
|
- Resting collisions with resting constraints ala Erin Catto's method
|
||||||
(GDC08)
|
(GDC08)
|
||||||
- Temporal coherence impulse caching and warming
|
- Temporal coherence impulse caching and warming
|
||||||
- Collision pairs, contacts and impulses maintained with a pair
|
- Collision pairs, contacts and impulses maintained with a pair
|
||||||
manager
|
manager
|
||||||
- Approximate Coulomb friction model using friction constraints
|
- Approximate Coulomb friction model using friction constraints
|
||||||
- Constraints solved with the Gauss-Siedel method
|
- Constraints solved with the Gauss-Siedel method
|
||||||
- Semi-variable time step, synced with rendering
|
- Semi-variable time step, synced with rendering
|
||||||
- A basic sleeping strategy
|
- A basic sleeping strategy
|
||||||
- HTML5 canvas renderer
|
- HTML5 Canvas / WebGL renderer
|
||||||
|
|
||||||
### References
|
### References
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue