Skip to content

Commit 15a749d

Browse files
committed
Added showBody and showVelocity as config options
1 parent 67cba93 commit 15a749d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

v3/src/physics/impact/Body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ var Body = new Class({
5555
this.checkAgainst = TYPE.NONE;
5656
this.collides = COLLIDES.NEVER;
5757

58-
this.debugShowBody = true;
59-
this.debugShowVelocity = true;
58+
this.debugShowBody = world.defaults.debugShowBody;
59+
this.debugShowVelocity = world.defaults.debugShowVelocity;
6060
this.debugBodyColor = world.defaults.bodyDebugColor;
6161

6262
// min 44 deg, max 136 deg

v3/src/physics/impact/World.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ var World = new Class({
4040
this.debugGraphic;
4141

4242
this.defaults = {
43+
debugShowBody: GetFastValue(config, 'debugShowBody', true),
44+
debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),
4345
bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),
4446
velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),
4547
maxVelocityX: GetFastValue(config, 'maxVelocityX', 100),

0 commit comments

Comments
 (0)