0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00

release 0.11.0

This commit is contained in:
liabru 2016-11-04 00:34:17 +00:00
parent 0cb1d8375f
commit 5a12f56067
5 changed files with 64 additions and 7 deletions

View file

@ -1,3 +1,56 @@
<a name="0.11.0"></a>
# 0.11.0 (2016-11-04)
* add logo to readme ([d54dec3](https://github.com/liabru/matter-js/commit/d54dec3))
* added docs for Matter.Plugin with tweaks ([3883981](https://github.com/liabru/matter-js/commit/3883981))
* added Example.attractors ([758bbe8](https://github.com/liabru/matter-js/commit/758bbe8))
* added Matter.before, Matter.after, Common.chainPathBefore, Common.chainPathAfter, Common.get, Common ([50ad7ca](https://github.com/liabru/matter-js/commit/50ad7ca))
* added Matter.Plugin initial implementation ([e84c537](https://github.com/liabru/matter-js/commit/e84c537))
* added note in docs about vertices order ([ad033f5](https://github.com/liabru/matter-js/commit/ad033f5))
* added plugin status logging ([51b7b1d](https://github.com/liabru/matter-js/commit/51b7b1d))
* added plugins matter-attractors, matter-gravity, matter-world-wrap, removed test plugins ([59bfa0b](https://github.com/liabru/matter-js/commit/59bfa0b))
* change plugins to use best practices ([37d4258](https://github.com/liabru/matter-js/commit/37d4258))
* change travis node version to latest stable ([ee33686](https://github.com/liabru/matter-js/commit/ee33686))
* changed naming approach for prerelease versions ([83ae546](https://github.com/liabru/matter-js/commit/83ae546))
* fix build flags ([29d182c](https://github.com/liabru/matter-js/commit/29d182c))
* fix build task for travis ([6aa3661](https://github.com/liabru/matter-js/commit/6aa3661))
* fix gravity reset in demo ([c00df81](https://github.com/liabru/matter-js/commit/c00df81))
* fix gulp build version replacement ([faf6bec](https://github.com/liabru/matter-js/commit/faf6bec))
* fix Matter.Mouse when element does not have fixed dimensions, closes #73 ([1340159](https://github.com/liabru/matter-js/commit/1340159)), closes [#73](https://github.com/liabru/matter-js/issues/73)
* fix release tasks ([549983d](https://github.com/liabru/matter-js/commit/549983d))
* fix requestAnimationFrame polyfill for Matter.Runner, closes #252 ([7c8f6ce](https://github.com/liabru/matter-js/commit/7c8f6ce)), closes [#252](https://github.com/liabru/matter-js/issues/252)
* fix tests ([54e7d9c](https://github.com/liabru/matter-js/commit/54e7d9c))
* fixed Body.create with no options ([0e5a457](https://github.com/liabru/matter-js/commit/0e5a457))
* fixed issue with Matter.RenderPixi not being cleared when bodies removed, closes #218 ([4972af8](https://github.com/liabru/matter-js/commit/4972af8)), closes [#218](https://github.com/liabru/matter-js/issues/218)
* fixed various Matter.Plugin issues ([05d0961](https://github.com/liabru/matter-js/commit/05d0961))
* improve docs ([9856e3c](https://github.com/liabru/matter-js/commit/9856e3c))
* improved logging ([d4d64ed](https://github.com/liabru/matter-js/commit/d4d64ed))
* Limit packaging extraneous files ([3accec6](https://github.com/liabru/matter-js/commit/3accec6))
* Merge branch 'jackismissing-master' ([3452465](https://github.com/liabru/matter-js/commit/3452465))
* Merge branch 'master' of https://github.com/jackismissing/matter-js into jackismissing-master ([ba19130](https://github.com/liabru/matter-js/commit/ba19130))
* Merge branch 'plugins' ([60d0839](https://github.com/liabru/matter-js/commit/60d0839))
* Merge pull request #1 from jackismissing/jackismissing-patch-1 ([46a2bf6](https://github.com/liabru/matter-js/commit/46a2bf6))
* Merge pull request #244 from MarkHerhold/master ([3449ca5](https://github.com/liabru/matter-js/commit/3449ca5))
* refactor plugin system ([8da170f](https://github.com/liabru/matter-js/commit/8da170f))
* refactored plugins ([b4a3453](https://github.com/liabru/matter-js/commit/b4a3453))
* remove and ignore all test refs ([7a7187a](https://github.com/liabru/matter-js/commit/7a7187a))
* RenderPixi.js - added missing dependencies ([aec19ae](https://github.com/liabru/matter-js/commit/aec19ae))
* update Matter.Plugin docs ([6f8b705](https://github.com/liabru/matter-js/commit/6f8b705))
* updated edge build ([1d05499](https://github.com/liabru/matter-js/commit/1d05499))
* updated edge build ([0bdaece](https://github.com/liabru/matter-js/commit/0bdaece))
* updated readme ([a408854](https://github.com/liabru/matter-js/commit/a408854))
* updated readme ([4da2e25](https://github.com/liabru/matter-js/commit/4da2e25))
* updated readme ([9ccc028](https://github.com/liabru/matter-js/commit/9ccc028))
* updated readme ([faf534a](https://github.com/liabru/matter-js/commit/faf534a))
* updated readme ([5ca9aca](https://github.com/liabru/matter-js/commit/5ca9aca))
* updated readme ([e3e9080](https://github.com/liabru/matter-js/commit/e3e9080))
* updated readme ([c4cce9e](https://github.com/liabru/matter-js/commit/c4cce9e))
* updated readme ([4b5837e](https://github.com/liabru/matter-js/commit/4b5837e))
* updated readme ([098f224](https://github.com/liabru/matter-js/commit/098f224))
<a name="0.10.0"></a>
# 0.10.0 (2016-05-01)

View file

@ -1,6 +1,6 @@
{
"name": "Matter",
"version": "0.10.0",
"version": "0.11.0",
"homepage": "https://github.com/liabru/matter-js",
"authors": [
"Liam Brummitt <liam@brm.io> (http://brm.io/)"

View file

@ -1,5 +1,5 @@
/**
* matter-js 0.10.0-alpha by @liabru 2016-11-03
* matter-js 0.11.0 by @liabru 2016-11-04
* http://brm.io/matter-js/
* License MIT
*/
@ -4213,7 +4213,7 @@ module.exports = Common;
* @param {} val The value to set
* @param {number} [begin] Path slice begin
* @param {number} [end] Path slice end
* @return {} The object passed for `val` (for chaining)
* @return {} Pass through `val` for chaining
*/
Common.set = function(obj, path, val, begin, end) {
var parts = path.split('.').slice(begin, end);
@ -4606,6 +4606,7 @@ module.exports = Common;
/**
* Chains a function to excute before the original function on the given `path` relative to `base`.
* See also docs for `Common.chain`.
* @method chainPathBefore
* @param {} base The base object
* @param {string} path The path relative to `base`
@ -4621,6 +4622,7 @@ module.exports = Common;
/**
* Chains a function to excute after the original function on the given `path` relative to `base`.
* See also docs for `Common.chain`.
* @method chainPathAfter
* @param {} base The base object
* @param {string} path The path relative to `base`
@ -5263,7 +5265,7 @@ var Common = require('./Common');
* @readOnly
* @type {String}
*/
Matter.version = '0.10.0-alpha';
Matter.version = '0.11.0';
/**
* A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.
@ -5295,6 +5297,7 @@ var Common = require('./Common');
/**
* Chains a function to excute before the original function on the given `path` relative to `Matter`.
* See also docs for `Common.chain`.
* @method before
* @param {string} path The path relative to `Matter`
* @param {function} func The function to chain before the original
@ -5307,6 +5310,7 @@ var Common = require('./Common');
/**
* Chains a function to excute after the original function on the given `path` relative to `Matter`.
* See also docs for `Common.chain`.
* @method after
* @param {string} path The path relative to `Matter`
* @param {function} func The function to chain after the original

4
build/matter.min.js vendored
View file

@ -1,5 +1,5 @@
/**
* matter-js 0.10.0-alpha by @liabru 2016-11-03
* matter-js 0.11.0 by @liabru 2016-11-04
* http://brm.io/matter-js/
* License MIT
*/
@ -40,7 +40,7 @@ var n=e[o];n._chained?t.push.apply(t,n._chained):t.push(n)}var i=function(){for(
if(e||n.render){var r={element:e,controller:a};n.render=f.extend(r,n.render)}return n.render&&n.render.controller&&(n.render=n.render.controller.create(n.render)),n.render&&(n.render.engine=n),n.world=t.world||i.create(n.world),n.pairs=l.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n},n.update=function(n,i,a){i=i||1e3/60,a=a||1;var c,f=n.world,v=n.timing,m=n.broadphase,y=[];v.timestamp+=i*v.timeScale;var g={timestamp:v.timestamp};u.trigger(n,"beforeUpdate",g);var x=d.allBodies(f),h=d.allConstraints(f);for(n.enableSleeping&&r.update(x,v.timeScale),t(x,f.gravity),o(x,i,v.timeScale,a,f.bounds),c=0;c<n.constraintIterations;c++)p.solveAll(h,v.timeScale);p.postSolveAll(x),m.controller?(f.isModified&&m.controller.clear(m),m.controller.update(m,x,n,f.isModified),y=m.pairsList):y=x,f.isModified&&d.setModified(f,!1,!1,!0);var b=m.detector(y,n),w=n.pairs,S=v.timestamp;for(l.update(w,b,S),l.removeOld(w,S),n.enableSleeping&&r.afterCollisions(w.list,v.timeScale),
w.collisionStart.length>0&&u.trigger(n,"collisionStart",{pairs:w.collisionStart}),s.preSolvePosition(w.list),c=0;c<n.positionIterations;c++)s.solvePosition(w.list,v.timeScale);for(s.postSolvePosition(x),s.preSolveVelocity(w.list),c=0;c<n.velocityIterations;c++)s.solveVelocity(w.list,v.timeScale);return w.collisionActive.length>0&&u.trigger(n,"collisionActive",{pairs:w.collisionActive}),w.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:w.collisionEnd}),e(x),u.trigger(n,"afterUpdate",g),n},n.merge=function(e,t){if(f.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var o=d.allBodies(e.world),i=0;i<o.length;i++){var s=o[i];r.set(s,!1),s.id=f.nextId()}}},n.clear=function(e){var t=e.world;l.clear(e.pairs);var o=e.broadphase;if(o.controller){var n=d.allBodies(t);o.controller.clear(o),o.controller.update(o,n,e,!0)}};var e=function(e){for(var t=0;t<e.length;t++){var o=e[t];o.force.x=0,o.force.y=0,o.torque=0}},t=function(e,t){var o="undefined"!=typeof t.scale?t.scale:.001;if((0!==t.x||0!==t.y)&&0!==o)for(var n=0;n<e.length;n++){
var i=e[n];i.isStatic||i.isSleeping||(i.force.y+=i.mass*t.y*o,i.force.x+=i.mass*t.x*o)}},o=function(e,t,o,n,i){for(var r=0;r<e.length;r++){var s=e[r];s.isStatic||s.isSleeping||v.update(s,t,o,n)}}}()},{"../body/Body":1,"../body/Composite":2,"../body/World":3,"../collision/Grid":6,"../collision/Pairs":8,"../collision/Resolver":10,"../constraint/Constraint":12,"../render/Render":31,"./Common":14,"./Events":16,"./Metrics":18,"./Sleeping":22}],16:[function(e,t,o){var n={};t.exports=n;var i=e("./Common");!function(){n.on=function(e,t,o){for(var n,i=t.split(" "),r=0;r<i.length;r++)n=i[r],e.events=e.events||{},e.events[n]=e.events[n]||[],e.events[n].push(o);return o},n.off=function(e,t,o){if(!t)return void(e.events={});"function"==typeof t&&(o=t,t=i.keys(e.events).join(" "));for(var n=t.split(" "),r=0;r<n.length;r++){var s=e.events[n[r]],a=[];if(o&&s)for(var l=0;l<s.length;l++)s[l]!==o&&a.push(s[l]);e.events[n[r]]=a}},n.trigger=function(e,t,o){var n,r,s,a;if(e.events){o||(o={}),n=t.split(" ");for(var l=0;l<n.length;l++)if(r=n[l],
s=e.events[r]){a=i.clone(o,!1),a.name=r,a.source=e;for(var c=0;c<s.length;c++)s[c].apply(e,[a])}}}}()},{"./Common":14}],17:[function(e,t,o){var n={};t.exports=n;var i=e("./Plugin"),r=e("./Common");!function(){n.name="matter-js",n.version="0.10.0-alpha",n.uses=[],n.used=[],n.use=function(){i.use(n,Array.prototype.slice.call(arguments))},n.before=function(e,t){return e=e.replace(/^Matter./,""),r.chainPathBefore(n,e,t)},n.after=function(e,t){return e=e.replace(/^Matter./,""),r.chainPathAfter(n,e,t)}}()},{"./Common":14,"./Plugin":20}],18:[function(e,t,o){},{"../body/Composite":2,"./Common":14}],19:[function(e,t,o){var n={};t.exports=n;var i=e("../core/Common");!function(){n.create=function(t){var o={};return t||i.log("Mouse.create: element was undefined, defaulting to document.body","warn"),o.element=t||document.body,o.absolute={x:0,y:0},o.position={x:0,y:0},o.mousedownPosition={x:0,y:0},o.mouseupPosition={x:0,y:0},o.offset={x:0,y:0},o.scale={x:1,y:1},o.wheelDelta=0,o.button=-1,o.pixelRatio=o.element.getAttribute("data-pixel-ratio")||1,
s=e.events[r]){a=i.clone(o,!1),a.name=r,a.source=e;for(var c=0;c<s.length;c++)s[c].apply(e,[a])}}}}()},{"./Common":14}],17:[function(e,t,o){var n={};t.exports=n;var i=e("./Plugin"),r=e("./Common");!function(){n.name="matter-js",n.version="0.11.0",n.uses=[],n.used=[],n.use=function(){i.use(n,Array.prototype.slice.call(arguments))},n.before=function(e,t){return e=e.replace(/^Matter./,""),r.chainPathBefore(n,e,t)},n.after=function(e,t){return e=e.replace(/^Matter./,""),r.chainPathAfter(n,e,t)}}()},{"./Common":14,"./Plugin":20}],18:[function(e,t,o){},{"../body/Composite":2,"./Common":14}],19:[function(e,t,o){var n={};t.exports=n;var i=e("../core/Common");!function(){n.create=function(t){var o={};return t||i.log("Mouse.create: element was undefined, defaulting to document.body","warn"),o.element=t||document.body,o.absolute={x:0,y:0},o.position={x:0,y:0},o.mousedownPosition={x:0,y:0},o.mouseupPosition={x:0,y:0},o.offset={x:0,y:0},o.scale={x:1,y:1},o.wheelDelta=0,o.button=-1,o.pixelRatio=o.element.getAttribute("data-pixel-ratio")||1,
o.sourceEvents={mousemove:null,mousedown:null,mouseup:null,mousewheel:null},o.mousemove=function(t){var n=e(t,o.element,o.pixelRatio),i=t.changedTouches;i&&(o.button=0,t.preventDefault()),o.absolute.x=n.x,o.absolute.y=n.y,o.position.x=o.absolute.x*o.scale.x+o.offset.x,o.position.y=o.absolute.y*o.scale.y+o.offset.y,o.sourceEvents.mousemove=t},o.mousedown=function(t){var n=e(t,o.element,o.pixelRatio),i=t.changedTouches;i?(o.button=0,t.preventDefault()):o.button=t.button,o.absolute.x=n.x,o.absolute.y=n.y,o.position.x=o.absolute.x*o.scale.x+o.offset.x,o.position.y=o.absolute.y*o.scale.y+o.offset.y,o.mousedownPosition.x=o.position.x,o.mousedownPosition.y=o.position.y,o.sourceEvents.mousedown=t},o.mouseup=function(t){var n=e(t,o.element,o.pixelRatio),i=t.changedTouches;i&&t.preventDefault(),o.button=-1,o.absolute.x=n.x,o.absolute.y=n.y,o.position.x=o.absolute.x*o.scale.x+o.offset.x,o.position.y=o.absolute.y*o.scale.y+o.offset.y,o.mouseupPosition.x=o.position.x,o.mouseupPosition.y=o.position.y,
o.sourceEvents.mouseup=t},o.mousewheel=function(e){o.wheelDelta=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail)),e.preventDefault()},n.setElement(o,o.element),o},n.setElement=function(e,t){e.element=t,t.addEventListener("mousemove",e.mousemove),t.addEventListener("mousedown",e.mousedown),t.addEventListener("mouseup",e.mouseup),t.addEventListener("mousewheel",e.mousewheel),t.addEventListener("DOMMouseScroll",e.mousewheel),t.addEventListener("touchmove",e.mousemove),t.addEventListener("touchstart",e.mousedown),t.addEventListener("touchend",e.mouseup)},n.clearSourceEvents=function(e){e.sourceEvents.mousemove=null,e.sourceEvents.mousedown=null,e.sourceEvents.mouseup=null,e.sourceEvents.mousewheel=null,e.wheelDelta=0},n.setOffset=function(e,t){e.offset.x=t.x,e.offset.y=t.y,e.position.x=e.absolute.x*e.scale.x+e.offset.x,e.position.y=e.absolute.y*e.scale.y+e.offset.y},n.setScale=function(e,t){e.scale.x=t.x,e.scale.y=t.y,e.position.x=e.absolute.x*e.scale.x+e.offset.x,e.position.y=e.absolute.y*e.scale.y+e.offset.y;
};var e=function(e,t,o){var n,i,r=t.getBoundingClientRect(),s=document.documentElement||document.body.parentNode||document.body,a=void 0!==window.pageXOffset?window.pageXOffset:s.scrollLeft,l=void 0!==window.pageYOffset?window.pageYOffset:s.scrollTop,c=e.changedTouches;return c?(n=c[0].pageX-r.left-a,i=c[0].pageY-r.top-l):(n=e.pageX-r.left-a,i=e.pageY-r.top-l),{x:n/(t.clientWidth/(t.width||t.clientWidth)*o),y:i/(t.clientHeight/(t.height||t.clientHeight)*o)}}}()},{"../core/Common":14}],20:[function(e,t,o){var n={};t.exports=n;var i=e("./Common");!function(){n._registry={},n.register=function(e){if(n.isPlugin(e)||i.warn("Plugin.register:",n.toString(e),"does not implement all required fields."),e.name in n._registry){var t=n._registry[e.name],o=n.versionParse(e.version).number,r=n.versionParse(t.version).number;o>r?(i.warn("Plugin.register:",n.toString(t),"was upgraded to",n.toString(e)),n._registry[e.name]=e):r>o?i.warn("Plugin.register:",n.toString(t),"can not be downgraded to",n.toString(e)):e!==t&&i.warn("Plugin.register:",n.toString(e),"is already registered to different plugin object");

View file

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