0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-26 13:49:01 -05:00

Engine uses provided world; fixes issue #230

This commit is contained in:
Joshua Heiland 2016-04-18 12:56:50 -07:00
parent 7eb9ac7fea
commit 158c40425e

View file

@ -72,7 +72,7 @@ var Body = require('../body/Body');
engine.render = engine.render.controller.create(engine.render);
}
engine.world = World.create(engine.world);
engine.world = options.world || World.create(engine.world);
engine.pairs = Pairs.create();
engine.broadphase = engine.broadphase.controller.create(engine.broadphase);
engine.metrics = engine.metrics || { extended: false };