0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-20 17:10:11 -05:00

release 0.20.0

This commit is contained in:
liabru 2024-06-23 22:10:10 +01:00
parent bcab6e3982
commit 8a67787735
15 changed files with 988 additions and 481 deletions

View file

@ -1,3 +1,51 @@
## 0.20.0 (2024-06-23)
* added event passive options to Matter.Mouse, closes #930, closes #976 ([e888f3c](https://github.com/liabru/matter-js/commit/e888f3c)), closes [#930](https://github.com/liabru/matter-js/issues/930) [#976](https://github.com/liabru/matter-js/issues/976)
* added arrow key navigation of examples in development demo ([45cad77](https://github.com/liabru/matter-js/commit/45cad77))
* added body removal to Example.remove ([1209e88](https://github.com/liabru/matter-js/commit/1209e88))
* added Constraint.currentLength, closes #1184 ([812f8af](https://github.com/liabru/matter-js/commit/812f8af)), closes [#1184](https://github.com/liabru/matter-js/issues/1184)
* added doc and warning for `Bodies.trapezioid` slope parameter range, closes #1075 ([7ea5bc1](https://github.com/liabru/matter-js/commit/7ea5bc1)), closes [#1075](https://github.com/liabru/matter-js/issues/1075)
* added docs for `body.chamfer` property, closes #1059 ([5ed985d](https://github.com/liabru/matter-js/commit/5ed985d)), closes [#1059](https://github.com/liabru/matter-js/issues/1059)
* added engine beforeSolve event, closes #1173 ([8dd0e99](https://github.com/liabru/matter-js/commit/8dd0e99)), closes [#1173](https://github.com/liabru/matter-js/issues/1173)
* added event.timestamp and event.delta to collision events, closes #368 ([2af54d5](https://github.com/liabru/matter-js/commit/2af54d5)), closes [#368](https://github.com/liabru/matter-js/issues/368)
* added Example.renderResize ([b88c82f](https://github.com/liabru/matter-js/commit/b88c82f))
* added Example.stress4 ([0f0ac93](https://github.com/liabru/matter-js/commit/0f0ac93))
* added Example.substep ([205aaa5](https://github.com/liabru/matter-js/commit/205aaa5))
* added high delta warning to Matter.Engine ([72e6e89](https://github.com/liabru/matter-js/commit/72e6e89))
* added local pairs functions in Pairs.update ([e9da32c](https://github.com/liabru/matter-js/commit/e9da32c))
* added new Matter.Runner with default fixed timestep ([3e61951](https://github.com/liabru/matter-js/commit/3e61951))
* added pixel ratio scaling to render debug stats ([7ec38a1](https://github.com/liabru/matter-js/commit/7ec38a1))
* added render.options.wireframeStrokeStyle, closes #406 ([401553d](https://github.com/liabru/matter-js/commit/401553d)), closes [#406](https://github.com/liabru/matter-js/issues/406)
* added Render.setSize, closes #955, closes #595 ([fc05839](https://github.com/liabru/matter-js/commit/fc05839)), closes [#955](https://github.com/liabru/matter-js/issues/955) [#595](https://github.com/liabru/matter-js/issues/595)
* added repeats and updates options to test tools ([6142991](https://github.com/liabru/matter-js/commit/6142991))
* added updates per frame to Matter.Render debug ([a5b5767](https://github.com/liabru/matter-js/commit/a5b5767))
* changed Composte.removeComposite and Composte.removeBody to reset body.sleepCounter ([6d10c3d](https://github.com/liabru/matter-js/commit/6d10c3d))
* changed Pair.id format to use shorter ids ([5b6f30b](https://github.com/liabru/matter-js/commit/5b6f30b))
* fixed collision events for sleeping pairs, closes #1077 ([51f49ce](https://github.com/liabru/matter-js/commit/51f49ce)), closes [#1077](https://github.com/liabru/matter-js/issues/1077)
* fixed missing `mouse.sourceEvents.mousewheel`, closes #1146 ([272049a](https://github.com/liabru/matter-js/commit/272049a)), closes [#1146](https://github.com/liabru/matter-js/issues/1146)
* fixed Body.setStatic when applied multiple times, closes #641 ([9655785](https://github.com/liabru/matter-js/commit/9655785)), closes [#641](https://github.com/liabru/matter-js/issues/641)
* fixed compare tool layer order in demo testbed ([a3e801a](https://github.com/liabru/matter-js/commit/a3e801a)) ([0cc4d96](https://github.com/liabru/matter-js/commit/0cc4d96))
* fixed Runner.stop docs re. runner.enabled, closes #586, closes #1054 ([2ecc563](https://github.com/liabru/matter-js/commit/2ecc563)), closes [#586](https://github.com/liabru/matter-js/issues/586) [#1054](https://github.com/liabru/matter-js/issues/1054)
* improved Example.substep comments ([8046341](https://github.com/liabru/matter-js/commit/8046341))
* improved Matter.Runner ([b8a1563](https://github.com/liabru/matter-js/commit/b8a1563)) ([7206600](https://github.com/liabru/matter-js/commit/7206600))
* improved Matter.Runner docs ([283cd96](https://github.com/liabru/matter-js/commit/283cd96)) ([dc693e7](https://github.com/liabru/matter-js/commit/dc693e7)) ([6e302a8](https://github.com/liabru/matter-js/commit/6e302a8))
* improved test comparison report ([962fba5](https://github.com/liabru/matter-js/commit/962fba5)) ([2cc1c1c](https://github.com/liabru/matter-js/commit/2cc1c1c))
* improved `body.parts` docs ([013698b](https://github.com/liabru/matter-js/commit/013698b)) ([411af06](https://github.com/liabru/matter-js/commit/411af06)), closes #600 ([c1f9584](https://github.com/liabru/matter-js/commit/c1f9584)), closes [#600](https://github.com/liabru/matter-js/issues/600)
* optimised Collision._findSupports ([653a110](https://github.com/liabru/matter-js/commit/653a110))
* optimised Collision.collides ([6f8a54b](https://github.com/liabru/matter-js/commit/6f8a54b))
* optimised contacts and supports memory and gc use ([97d502e](https://github.com/liabru/matter-js/commit/97d502e))
* optimised pairs and collisions memory and gc use ([f9208df](https://github.com/liabru/matter-js/commit/f9208df))
* optimised Resolver.solvePosition ([89963f7](https://github.com/liabru/matter-js/commit/89963f7))
* optimised Resolver.solveVelocity ([182ba90](https://github.com/liabru/matter-js/commit/182ba90))
* preserve pair.contacts order ([e891d37](https://github.com/liabru/matter-js/commit/e891d37))
* reduced canvas hit testing in demo when using matter-tools ([da99acb](https://github.com/liabru/matter-js/commit/da99acb))
* removed redundant runner.isFixed from examples ([aba0e9e](https://github.com/liabru/matter-js/commit/aba0e9e))
* removed Collision._projectToAxis ([4c56e5b](https://github.com/liabru/matter-js/commit/4c56e5b))
* removed pair.confirmedActive ([72bc203](https://github.com/liabru/matter-js/commit/72bc203))
* renamed Composites function xx and yy params, closes #1095 ([6bda7e8](https://github.com/liabru/matter-js/commit/6bda7e8)), closes [#1095](https://github.com/liabru/matter-js/issues/1095)
* updated development demo render options ([0b131a4](https://github.com/liabru/matter-js/commit/0b131a4))
* updated benchmark tests ([e668c02](https://github.com/liabru/matter-js/commit/e668c02))
## 0.19.0 (2023-02-16) ## 0.19.0 (2023-02-16)
See the release [readme](https://github.com/liabru/matter-js/blob/0.19.0/README.md) for further information. See the release [readme](https://github.com/liabru/matter-js/blob/0.19.0/README.md) for further information.

View file

@ -1,3 +1,66 @@
## ▲.●matter.js`0.20.0`
Release notes for `0.20.0`. See the release [readme](https://github.com/liabru/matter-js/blob/0.20.0/README.md) for further information.
### Highlights
- added support for high refresh rate displays with fixed timestep in `Matter.Runner`
- added support for sub-stepping for higher quality simulations in `Matter.Runner`
- changed to a fixed timestep by default in `Matter.Runner`
- improved frame pacing and average performance up to ~6% (see [#1238](https://github.com/liabru/matter-js/pull/1238))
- reduced average memory usage up to ~30% (see [#1238](https://github.com/liabru/matter-js/pull/1238))
- reduced memory garbage collection
- bug fixes and improvements see [changelog](https://github.com/liabru/matter-js/blob/0.20.0/CHANGELOG.md)
### Changes
See the release [compare page](https://github.com/liabru/matter-js/compare/0.19.0...0.20.0) and the [changelog](https://github.com/liabru/matter-js/blob/0.20.0/CHANGELOG.md) for a detailed list of changes.
### Migration ⌲
`Matter.Runner` related changes [#1254](https://github.com/liabru/matter-js/pull/1254):
- `Matter.Runner` now defaults to a fixed deterministic timestep and support for non-fixed timestep is removed
- optionally set your performance budgets `runner.maxFrameTime` (see docs)
- note that `Matter.Runner` can now call zero, one, or multiple engine updates and events per display frame (see docs)
- if needed set up your polyfill for `window.requestAnimationFrame`
- see `Matter.Runner` updated docs throughout
Performance related changes [#1238](https://github.com/liabru/matter-js/pull/1238):
- `Matter.Collision` use `collision.supportCount` instead of `collision.supports.length` for active support count
- `Matter.Pair` use `pair.contacts` instead of `pair.activeContacts`
- `Matter.Pair` use `pair.contactCount` instead of `pair.contacts.length` for active contact count
- `Pair.id` format has changed
### Comparison
For more information see [comparison method](https://github.com/liabru/matter-js/pull/794).
```ocaml
Output sample comparison estimates of 44 examples against previous release matter-js@0.19.0:
Similarity 99.80% Overlap -1.92% Filesize +3.38% 81.58 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 ● · stress4 ● ·
timescale ● · views ● · wreckingBall ● ·
where for the sample · no change detected ● extrinsics changed ◆ intrinsics changed
```
### Contributors
Many thanks to the [contributors](https://github.com/liabru/matter-js/compare/0.19.0...0.20.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.19.0` ## ▲.●matter.js`0.19.0`
Release notes for `0.19.0`. See the release [readme](https://github.com/liabru/matter-js/blob/0.19.0/README.md) for further information. Release notes for `0.19.0`. See the release [readme](https://github.com/liabru/matter-js/blob/0.19.0/README.md) for further information.

File diff suppressed because it is too large Load diff

4
build/matter.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -35,7 +35,6 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
border: 0; border: 0;
z-index: 1;
pointer-events: none; pointer-events: none;
} }
@ -43,19 +42,37 @@
display: none; display: none;
} }
.matter-js.dev.comparing.matter-demo canvas {
background: transparent !important;
z-index: 20;
}
.matter-js-compare-build.matter-demo canvas { .matter-js-compare-build.matter-demo canvas {
opacity: 0.5; opacity: 0.5;
background: transparent !important; background: transparent !important;
z-index: 25 !important; z-index: 15 !important;
}
@media only screen and (min-width: 1300px) {
/* reduce hit testing when using matter-tools */
.matter-demo canvas {
position: relative;
z-index: 20;
}
.matter-js-compare-build.matter-demo canvas {
position: relative;
z-index: 15;
}
} }
</style> </style>
</head> </head>
<body> <body>
<script src="./js/matter-demo.main.5754e1.min.js"></script> <script src="./js/matter-demo.main.cf6d09.min.js"></script>
<script src="./js/matter-demo.matter-tools.97f38a.min.js"></script> <script src="./js/matter-demo.matter-tools.0f82d2.min.js"></script>
<script src="./js/matter-demo.matter-wrap.dbda1f.min.js"></script> <script src="./js/matter-demo.matter-wrap.f14474.min.js"></script>
<script src="./js/matter-demo.pathseg.cf21c2.min.js"></script> <script src="./js/matter-demo.pathseg.f137cc.min.js"></script>
<script src="./js/matter-demo.poly-decomp.c3d015.min.js"></script> <script src="./js/matter-demo.poly-decomp.6b3373.min.js"></script>
<script src="./js/matter-demo.6283b1.min.js"></script> <script src="./js/matter-demo.01bd65.min.js"></script>
</body> </body>
</html> </html>

6
demo/js/matter-demo.01bd65.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! /*!
* matter-demo bundle 0.19.0 by @liabru * matter-demo bundle 0.20.0 by @liabru
* http://brm.io/matter-js/ * http://brm.io/matter-js/
* License MIT * License MIT
*/!function(e){function t(t){for(var n,l,a=t[0],f=t[1],i=t[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,i||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var f=r[a];0!==o[f]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="./js";var a=this.webpackJsonpMatterDemo=this.webpackJsonpMatterDemo||[],f=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var p=f;r()}([]); */!function(e){function t(t){for(var n,l,a=t[0],f=t[1],i=t[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,i||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var f=r[a];0!==o[f]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="./js";var a=this.webpackJsonpMatterDemo=this.webpackJsonpMatterDemo||[],f=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var p=f;r()}([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! /*!
* matter-demo bundle 0.19.0 by @liabru * matter-demo bundle 0.20.0 by @liabru
* http://brm.io/matter-js/ * http://brm.io/matter-js/
* License MIT * License MIT
*/ */

View file

@ -1,5 +1,5 @@
/*! /*!
* matter-demo bundle 0.19.0 by @liabru * matter-demo bundle 0.20.0 by @liabru
* http://brm.io/matter-js/ * http://brm.io/matter-js/
* License MIT * License MIT
*/ */

View file

@ -1,5 +1,5 @@
/*! /*!
* matter-demo bundle 0.19.0 by @liabru * matter-demo bundle 0.20.0 by @liabru
* http://brm.io/matter-js/ * http://brm.io/matter-js/
* License MIT * License MIT
*/ */

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "matter-js", "name": "matter-js",
"version": "0.19.0", "version": "0.20.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "matter-js", "name": "matter-js",
"version": "0.19.0", "version": "0.20.0",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"conventional-changelog-cli": "^2.1.1", "conventional-changelog-cli": "^2.1.1",

View file

@ -1,6 +1,6 @@
{ {
"name": "matter-js", "name": "matter-js",
"version": "0.19.0", "version": "0.20.0",
"license": "MIT", "license": "MIT",
"homepage": "http://brm.io/matter-js/", "homepage": "http://brm.io/matter-js/",
"author": "Liam Brummitt <liam@brm.io> (http://brm.io/)", "author": "Liam Brummitt <liam@brm.io> (http://brm.io/)",