From 7eb9ac7fead21c248c7a58ac1822741fa186365f Mon Sep 17 00:00:00 2001 From: liabru Date: Sat, 9 Apr 2016 20:12:34 +0100 Subject: [PATCH] updated edge build --- build/matter.js | 11 ++++++----- build/matter.min.js | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build/matter.js b/build/matter.js index 1a0ae73..d84d7d7 100644 --- a/build/matter.js +++ b/build/matter.js @@ -1,5 +1,5 @@ /** -* matter-js 0.9.2 by @liabru 2016-04-07 +* matter-js master by @liabru 2016-04-09 * http://brm.io/matter-js/ * License MIT */ @@ -4546,6 +4546,11 @@ var Body = require('../body/Body'); broadphasePairs = allBodies; } + // clear all composite modified flags + if (world.isModified) { + Composite.setModified(world, false, false, true); + } + // narrowphase pass: find actual collisions, then create or update collision pairs var collisions = broadphase.detector(broadphasePairs, engine); @@ -4587,10 +4592,6 @@ var Body = require('../body/Body'); // clear force buffers _bodiesClearForces(allBodies); - // clear all composite modified flags - if (world.isModified) - Composite.setModified(world, false, false, true); - Events.trigger(engine, 'afterUpdate', event); return engine; diff --git a/build/matter.min.js b/build/matter.min.js index 0f8915e..0ec7793 100644 --- a/build/matter.min.js +++ b/build/matter.min.js @@ -1,5 +1,5 @@ /** -* matter-js 0.9.2 by @liabru 2016-04-07 +* matter-js master by @liabru 2016-04-09 * http://brm.io/matter-js/ * License MIT */ @@ -36,7 +36,7 @@ n.pointA=o.position,n.bodyB=e.body=s,n.pointB={x:o.position.x-s.position.x,y:o.p n.extend(e[l],r,a[l])):e[l]=a[l]}return e},n.clone=function(e,t){return n.extend({},t,e)},n.keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var o in e)t.push(o);return t},n.values=function(e){var t=[];if(Object.keys){for(var o=Object.keys(e),n=0;n>16)+n,r=(o>>8&255)+n,s=(255&o)+n;return"#"+(16777216+65536*(255>i?1>i?0:i:255)+256*(255>r?1>r?0:r:255)+(255>s?1>s?0:s:255)).toString(16).slice(1)},n.shuffle=function(e){for(var t=e.length-1;t>0;t--){var o=Math.floor(n.random()*(t+1)),i=e[t];e[t]=e[o],e[o]=i}return e},n.choose=function(e){return e[Math.floor(n.random()*e.length)]},n.isElement=function(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}},n.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e); },n.clamp=function(e,t,o){return t>e?t:e>o?o:e},n.sign=function(e){return 0>e?-1:1},n.now=function(){var e=window.performance||{};return e.now=function(){return e.now||e.webkitNow||e.msNow||e.oNow||e.mozNow||function(){return+new Date}}(),e.now()},n.random=function(t,o){return t="undefined"!=typeof t?t:0,o="undefined"!=typeof o?o:1,t+e()*(o-t)},n.colorToNumber=function(e){return e=e.replace("#",""),3==e.length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},n.log=function(e,t){if(console&&console.log&&console.warn)switch(t){case"warn":console.warn("Matter.js:",e);break;case"error":console.log("Matter.js:",e)}},n.nextId=function(){return n._nextId++},n.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var o=0;o0&&d.trigger(n,"collisionStart",{pairs:S.collisionStart}),s.preSolvePosition(S.list),c=0;c0&&d.trigger(n,"collisionActive",{pairs:S.collisionActive}),S.collisionEnd.length>0&&d.trigger(n,"collisionEnd",{pairs:S.collisionEnd}),e(x),v.isModified&&u.setModified(v,!1,!1,!0),d.trigger(n,"afterUpdate",g),n},n.merge=function(e,t){if(v.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var o=u.allBodies(e.world),i=0;i0&&d.trigger(n,"collisionStart",{pairs:S.collisionStart}),s.preSolvePosition(S.list),c=0;c0&&d.trigger(n,"collisionActive",{pairs:S.collisionActive}),S.collisionEnd.length>0&&d.trigger(n,"collisionEnd",{pairs:S.collisionEnd}),e(x),d.trigger(n,"afterUpdate",g),n},n.merge=function(e,t){if(v.extend(e,t),t.world){e.world=t.world,n.clear(e);for(var o=u.allBodies(e.world),i=0;i