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

updated edge build

This commit is contained in:
liabru 2015-07-05 15:57:31 +01:00
parent c46e9155e2
commit 2ab20b0656
2 changed files with 18 additions and 10 deletions

View file

@ -1,5 +1,5 @@
/**
* matter.js edge-master 2015-07-02
* matter.js edge-master 2015-07-05
* http://brm.io/matter-js/
* License: MIT
*/
@ -4367,14 +4367,16 @@ var Engine = {};
controller: Grid
}
};
var engine = Common.extend(defaults, options);
if (element && !engine.render) {
engine.render = {
if (element || engine.render) {
var renderDefaults = {
element: element,
controller: Render
};
engine.render = Common.extend(renderDefaults, engine.render);
}
if (engine.render && engine.render.controller) {
@ -5310,14 +5312,20 @@ var Runner = {};
Events.trigger(engine, 'tick', event);
// if world has been modified, clear the render scene graph
if (engine.world.isModified && engine.render.controller.clear)
if (engine.world.isModified
&& engine.render
&& engine.render.controller
&& engine.render.controller.clear) {
engine.render.controller.clear(engine.render);
}
// update
Engine.update(engine, delta, correction);
// render
Engine.render(engine);
if (engine.render) {
Engine.render(engine);
}
Events.trigger(engine, 'afterTick', event);
})();

8
build/matter.min.js vendored

File diff suppressed because one or more lines are too long