From 158c40425e8b8ae50559b7d1aca88d34dc47054f Mon Sep 17 00:00:00 2001 From: Joshua Heiland Date: Mon, 18 Apr 2016 12:56:50 -0700 Subject: [PATCH] Engine uses provided world; fixes issue #230 --- src/core/Engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Engine.js b/src/core/Engine.js index b549f66..40df471 100644 --- a/src/core/Engine.js +++ b/src/core/Engine.js @@ -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 };