From 15a749d8ea7ac41341c0aad8d4bcd77ad229044b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Aug 2017 23:14:30 +0100 Subject: [PATCH] Added showBody and showVelocity as config options --- v3/src/physics/impact/Body.js | 4 ++-- v3/src/physics/impact/World.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/v3/src/physics/impact/Body.js b/v3/src/physics/impact/Body.js index e74a36198..fff8599ca 100644 --- a/v3/src/physics/impact/Body.js +++ b/v3/src/physics/impact/Body.js @@ -55,8 +55,8 @@ var Body = new Class({ this.checkAgainst = TYPE.NONE; this.collides = COLLIDES.NEVER; - this.debugShowBody = true; - this.debugShowVelocity = true; + this.debugShowBody = world.defaults.debugShowBody; + this.debugShowVelocity = world.defaults.debugShowVelocity; this.debugBodyColor = world.defaults.bodyDebugColor; // min 44 deg, max 136 deg diff --git a/v3/src/physics/impact/World.js b/v3/src/physics/impact/World.js index 86b4c3660..e067c49db 100644 --- a/v3/src/physics/impact/World.js +++ b/v3/src/physics/impact/World.js @@ -40,6 +40,8 @@ var World = new Class({ this.debugGraphic; this.defaults = { + debugShowBody: GetFastValue(config, 'debugShowBody', true), + debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true), bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff), velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00), maxVelocityX: GetFastValue(config, 'maxVelocityX', 100),