From 5eedc4c2c5fc7107ff3beb6ae5b0b15e67ed139b Mon Sep 17 00:00:00 2001 From: photonstorm Date: Tue, 9 Sep 2014 12:49:31 +0100 Subject: [PATCH] The physics config object is now stored locally in World.config. --- src/physics/p2/World.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/physics/p2/World.js b/src/physics/p2/World.js index 88ea6a715..2c2e1125a 100644 --- a/src/physics/p2/World.js +++ b/src/physics/p2/World.js @@ -27,11 +27,17 @@ Phaser.Physics.P2 = function (game, config) { config = { gravity: [0, 0], broadphase: new p2.SAPBroadphase() }; } + /** + * @property {object} config - The p2 World configuration object. + * @protected + */ + this.config = config; + /** * @property {p2.World} world - The p2 World in which the simulation is run. * @protected */ - this.world = new p2.World(config); + this.world = new p2.World(this.config); /** * @property {number} frameRate - The frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.