Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged upstream #1

Merged
merged 62 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
792ae2e
optimised Vertices.translate
liabru Apr 26, 2021
6883d0d
optimised Vertices.rotate
liabru Apr 26, 2021
c198878
optimised Vertices.contains
liabru Apr 26, 2021
48673db
optimised Pair.create
liabru Apr 26, 2021
1073dde
optimised Pair.update
liabru Apr 26, 2021
a882a74
optimised Pairs.removeOld
liabru Apr 26, 2021
3cf65e8
optimised Resolver.solvePosition
liabru Apr 26, 2021
49fbfba
optimised Resolver.postSolvePosition
liabru Apr 26, 2021
c7cec16
optimise Detector.collisions
liabru Apr 27, 2021
fceb0ca
optimised Resolver.postSolvePosition
liabru Apr 28, 2021
0b07a31
optimised Resolver.preSolveVelocity
liabru May 1, 2021
e4b35d3
optimised Resolver.solveVelocity
liabru May 1, 2021
efede6e
optimised Detector.collisions
liabru May 1, 2021
0d90a17
optimised SAT._findSupports
liabru May 1, 2021
2096961
optimised SAT._overlapAxes
liabru May 1, 2021
0af144c
optimised SAT.collides
liabru May 1, 2021
5e3c629
optimised Grid._bucketAddBody
liabru May 2, 2021
84136de
optimised Grid._bucketRemoveBody
liabru May 2, 2021
e4b3bcd
optimised Grid._createActivePairsList
liabru May 2, 2021
30b899c
optimised Resolver.solveVelocity
liabru May 2, 2021
cd289ec
improve performance measurement accuracy in tests
liabru Nov 19, 2021
bedf84c
added memory comparison to tests
liabru Nov 20, 2021
8bfaff0
added support for build metadata in Plugin.versionParse
liabru Nov 21, 2021
55feb89
changed tests to use a production build rather than source
liabru Nov 21, 2021
b3a8aa3
added filesize to test comparison report
liabru Nov 21, 2021
caeb07e
optimised Detector.collisions
liabru Nov 21, 2021
ca2fe75
refactor test worker and prevent test cache
liabru Nov 28, 2021
de04c00
improve test comparison report
liabru Nov 28, 2021
ea3c11b
add test capture sort to improve comparison
liabru Nov 28, 2021
bcc3168
prevent test example cache
liabru Nov 28, 2021
81dd2fb
added stable sorting to test worker and refactor
liabru Nov 30, 2021
8125966
added behaviour metric to tests and refactor tests
liabru Dec 1, 2021
d8a6380
optimised Matter.Pair
liabru Dec 5, 2021
52e7977
optimised Matter.Composite
liabru Dec 5, 2021
f847f4c
optimised Resolver.solvePosition
liabru Dec 5, 2021
a30707f
optimised Matter.Pairs
liabru Dec 6, 2021
2581595
use Matter.Runner in test worker
liabru Dec 7, 2021
9037f36
added Matter.Collision
liabru Dec 8, 2021
fd1a70e
optimised collisions
liabru Dec 8, 2021
10afaea
change raycasting example events to enable use in tests
liabru Dec 8, 2021
32fd285
added cache checks to Matter.Composite
liabru Dec 9, 2021
8adf810
use force exit in tests
liabru Dec 10, 2021
b9e7d9d
replaced Matter.SAT with Matter.Collision
liabru Dec 12, 2021
a6b5e7d
added broadphase to Matter.Detector
liabru Dec 12, 2021
e366d0e
deprecated Matter.Grid
liabru Dec 12, 2021
c80ed5c
updated examples
liabru Dec 12, 2021
bc07f56
added example for Composite.remove
liabru Dec 12, 2021
b116f64
add triangles to mixed bodies example
liabru Dec 12, 2021
5c59bef
increase iterations on Example.stress3
liabru Dec 15, 2021
7f34c45
added benchmark test command
liabru Dec 15, 2021
80cf76b
added note about webpack performance to readme
liabru Dec 15, 2021
afa467a
updated test scripts
liabru Dec 15, 2021
f1ba9b5
prevent source map in demo builds
liabru Dec 15, 2021
039212a
release 0.18.0
liabru Dec 15, 2021
9393ecb
improved error messages on tests
liabru Dec 20, 2021
e414464
handle null constraint points in Constraint.pointAWorld and Constrain…
liabru Dec 21, 2021
04d229e
deprecated render.controller property
liabru Dec 21, 2021
459425b
remove render element warning
liabru Dec 21, 2021
7d7bad0
added support for Matter.Runner and Matter.Render in tests
liabru Dec 22, 2021
2d483c1
added ci workflow action
liabru Dec 26, 2021
e553779
remove travis config
liabru Dec 26, 2021
014ef77
increase test timeout
liabru Dec 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run benchmark
- run: npm run test
- run: npm run build
- run: npm run build-demo
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
.idea
*.map
node_modules
npm-debug.log
docs
matter-doc-theme
build/matter-dev.js
build/matter-dev.min.js
build/matter.dev.js
build/matter.dev.min.js
demo/js/lib/matter-dev.js
demo/js/Examples.min.js
examples/build
Expand All @@ -13,4 +16,4 @@ test/browser/refs
test/node/diffs
test/node/refs
__snapshots__
__compare__
__compare__
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
## 0.18.0 (2021-12-15)

* added test capture sort to improve comparison ([ea3c11b](https://github.com/liabru/matter-js/commit/ea3c11b))
* added triangles to mixed bodies example ([b116f64](https://github.com/liabru/matter-js/commit/b116f64))
* added behaviour metric to tests and refactor tests ([8125966](https://github.com/liabru/matter-js/commit/8125966))
* added benchmark test command ([7f34c45](https://github.com/liabru/matter-js/commit/7f34c45))
* added broadphase to Matter.Detector ([a6b5e7d](https://github.com/liabru/matter-js/commit/a6b5e7d))
* added cache checks to Matter.Composite ([32fd285](https://github.com/liabru/matter-js/commit/32fd285))
* added example for Composite.remove ([bc07f56](https://github.com/liabru/matter-js/commit/bc07f56))
* added example stress 3 ([d0ee246](https://github.com/liabru/matter-js/commit/d0ee246))
* added filesize to test comparison report ([b3a8aa3](https://github.com/liabru/matter-js/commit/b3a8aa3))
* added Matter.Collision ([9037f36](https://github.com/liabru/matter-js/commit/9037f36))
* added memory comparison to tests ([bedf84c](https://github.com/liabru/matter-js/commit/bedf84c))
* added note about webpack performance to readme ([80cf76b](https://github.com/liabru/matter-js/commit/80cf76b))
* added stable sorting to test worker and refactor ([81dd2fb](https://github.com/liabru/matter-js/commit/81dd2fb))
* added support for build metadata in Plugin.versionParse ([8bfaff0](https://github.com/liabru/matter-js/commit/8bfaff0))
* changed raycasting example events to enable use in tests ([10afaea](https://github.com/liabru/matter-js/commit/10afaea))
* changed build config to 'source-map' devtool ([e909b04](https://github.com/liabru/matter-js/commit/e909b04))
* changed tests to use a production build rather than source ([55feb89](https://github.com/liabru/matter-js/commit/55feb89))
* deprecated Matter.Grid ([e366d0e](https://github.com/liabru/matter-js/commit/e366d0e))
* fixed sync issues on demo compare tool ([826ed46](https://github.com/liabru/matter-js/commit/826ed46))
* improved performance measurement accuracy in tests ([cd289ec](https://github.com/liabru/matter-js/commit/cd289ec))
* improved test comparison report ([de04c00](https://github.com/liabru/matter-js/commit/de04c00))
* optimised Matter.Detector ([c7cec16](https://github.com/liabru/matter-js/commit/c7cec16)), ([fd1a70e](https://github.com/liabru/matter-js/commit/fd1a70e)), ([caeb07e](https://github.com/liabru/matter-js/commit/caeb07e)), ([efede6e](https://github.com/liabru/matter-js/commit/efede6e))
* optimised Matter.Composite ([52e7977](https://github.com/liabru/matter-js/commit/52e7977))
* optimised Matter.Pair ([d8a6380](https://github.com/liabru/matter-js/commit/d8a6380)), ([48673db](https://github.com/liabru/matter-js/commit/48673db)), ([1073dde](https://github.com/liabru/matter-js/commit/1073dde))
* optimised Matter.Pairs ([a30707f](https://github.com/liabru/matter-js/commit/a30707f)), ([a882a74](https://github.com/liabru/matter-js/commit/a882a74))
* optimised Matter.Resolver ([fceb0ca](https://github.com/liabru/matter-js/commit/fceb0ca)), ([49fbfba](https://github.com/liabru/matter-js/commit/49fbfba)), ([0b07a31](https://github.com/liabru/matter-js/commit/0b07a31)), ([f847f4c](https://github.com/liabru/matter-js/commit/f847f4c)), ([3cf65e8](https://github.com/liabru/matter-js/commit/3cf65e8)), ([30b899c](https://github.com/liabru/matter-js/commit/30b899c)), ([e4b35d3](https://github.com/liabru/matter-js/commit/e4b35d3))
* optimised Matter.SAT ([0d90a17](https://github.com/liabru/matter-js/commit/0d90a17)), ([2096961](https://github.com/liabru/matter-js/commit/2096961)), ([0af144c](https://github.com/liabru/matter-js/commit/0af144c))
* optimised Matter.Vertices ([c198878](https://github.com/liabru/matter-js/commit/c198878)), ([6883d0d](https://github.com/liabru/matter-js/commit/6883d0d)), ([792ae2e](https://github.com/liabru/matter-js/commit/792ae2e))
* refactor test worker and prevent test cache ([ca2fe75](https://github.com/liabru/matter-js/commit/ca2fe75)), ([bcc3168](https://github.com/liabru/matter-js/commit/bcc3168))
* replaced Matter.SAT with Matter.Collision ([b9e7d9d](https://github.com/liabru/matter-js/commit/b9e7d9d))
* show debug stats in dev demo ([2f14ec5](https://github.com/liabru/matter-js/commit/2f14ec5))
* updated dev dependencies ([c5028d5](https://github.com/liabru/matter-js/commit/c5028d5))
* updated examples ([c80ed5c](https://github.com/liabru/matter-js/commit/c80ed5c))
* updated test scripts ([afa467a](https://github.com/liabru/matter-js/commit/afa467a))
* use force exit in tests ([8adf810](https://github.com/liabru/matter-js/commit/8adf810))
* use Matter.Runner in test worker ([2581595](https://github.com/liabru/matter-js/commit/2581595))



## <small>0.17.1 (2021-04-14)</small>

* deprecate Engine.run alias replaced by Runner.run ([5817046](https://github.com/liabru/matter-js/commit/5817046))
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<li><a href="https://brm.io/matter-js/demo/#airFriction">Air Friction</a></li>
<li><a href="https://brm.io/matter-js/demo/#staticFriction">Static Friction</a></li>
<li><a href="https://brm.io/matter-js/demo/#sleeping">Sleeping</a></li>
<li><a href="https://brm.io/matter-js/demo/#broadphase">Grid Broadphase</a></li>
<li><a href="https://brm.io/matter-js/demo/#beachBalls">Beach Balls</a></li>
<li><a href="https://brm.io/matter-js/demo/#stress">Stress 1</a></li>
<li><a href="https://brm.io/matter-js/demo/#stress2">Stress 2</a></li>
Expand Down Expand Up @@ -125,6 +124,10 @@ Alternatively you can download a [stable release](https://github.com/liabru/matt

<script src="matter.js" type="text/javascript"></script>

### Webpack

Some [webpack](https://webpack.js.org/) configs including the default may impact your project's performance during development, for a solution see [issue](https://github.com/liabru/matter-js/issues/1001).

### Usage

Visit 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.
Expand Down
58 changes: 58 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
## ▲.● matter.js `0.18.0`

Release notes for `0.18.0`. See the release [readme](https://github.com/liabru/matter-js/blob/0.18.0/README.md) for further information.

### Highlights ✺

- **Up to ~40% performance improvement (on average measured over all examples, in Node on a Mac Air M1)**
- Replaces `Matter.Grid` with a faster and more efficient broadphase in `Matter.Detector`
- Reduced memory usage and garbage collection
- Resolves issues in `Matter.SAT` related to collision reuse
- Removes performance issues from `Matter.Grid`
- Improved collision accuracy
- Improved API and docs for collision modules
- Improved [documentation](https://brm.io/matter-js/docs/) pages
- Added note about avoiding Webpack [performance problems](https://github.com/liabru/matter-js/blob/master/README.md#install)

### Changes ✲

See the release [compare page](https://github.com/liabru/matter-js/compare/0.17.1...0.18.0) and the [changelog](https://github.com/liabru/matter-js/blob/0.18.0/CHANGELOG.md) for a detailed list of changes.

### Migration ⌲

- Behaviour and similarity is in practice the same (a fractional difference from improved accuracy)
- API is the same other than:
- [Matter.Detector](https://brm.io/matter-js/docs/classes/Detector.html) replaces [Matter.Grid](https://brm.io/matter-js/docs/classes/Grid.html) (which is now deprecated but will remain for a short term)
- [render.options.showBroadphase](https://brm.io/matter-js/docs/classes/Render.html#property_options.showBroadphase) is deprecated (no longer implemented)
- [Matter.SAT](https://brm.io/matter-js/docs/classes/SAT.html) is renamed [Matter.Collision](https://brm.io/matter-js/docs/classes/Collision.html)
- [Matter.SAT.collides](https://brm.io/matter-js/docs/classes/SAT.html#method_collides) is now [Matter.Collision.collides](https://brm.io/matter-js/docs/classes/Collision.html#method_collides) with a slightly different set of arguments

### Comparison ⎄

Differences in behaviour, quality and performance against the previous release `0.17.1`. For more information see [comparison method](https://github.com/liabru/matter-js/pull/794).

```ocaml
Output comparison of 43 examples against previous release matter-js@0.17.1

Behaviour 99.99% Similarity 99.98% Overlap -0.00%
Performance +40.62% Memory -6.18% Filesize -0.16% 77.73 KB

airFriction · · avalanche ● · ballPool · · bridge · · car · · catapult · ·
chains · · circleStack · · cloth · · collisionFiltering · · compositeManipulation ● ·
compound · · compoundStack · · concave · · constraints ● · doublePendulum · ·
events · · friction · · gravity · · gyro · · manipulation · ◆
mixed · · newtonsCradle · · pyramid · · ragdoll · · raycasting · ·
remove · · restitution · · rounded · · sensors · · sleeping · ◆
slingshot · · softBody · · sprites · · stack · · staticFriction · ·
stats · · stress · · stress2 · · stress3 · · timescale · ·
views · · wreckingBall · ·

where · no change ● extrinsics changed ◆ intrinsics changed
```

### Contributors ♥︎

Many thanks to the [contributors](https://github.com/liabru/matter-js/compare/0.17.1...0.18.0) of this release, [past contributors](https://github.com/liabru/matter-js/graphs/contributors) as well those involved in the [community](https://github.com/liabru/matter-js/issues) for your input and support.

---

## ▲.● matter.js `0.17.0`

Release notes for `0.17.0`. See the release [readme](https://github.com/liabru/matter-js/blob/0.17.0/README.md) for further information.
Expand Down
Loading