Skip to content

Commit 84481da

Browse files
committed
* Fix phaserjs#3345 by adding beginPath and closePath when done drawing in postUpdate.
1 parent 9a21b4c commit 84481da

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
### Bug Fixes
88

9-
### Updates
10-
9+
* Fix #3345 debug draws are not cleared in CANVAS mode using Matter physics.(thanks @msamid737)
1110

11+
### Updates
1212

1313
## Version 3.2.0 - Kaori - 5th March 2018
1414

src/physics/matter-js/World.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ var World = new Class({
619619

620620
graphics.clear();
621621
graphics.lineStyle(1, this.defaults.bodyDebugColor);
622+
graphics.beginPath();
622623

623624
for (var i = 0; i < bodies.length; i++)
624625
{
@@ -647,6 +648,7 @@ var World = new Class({
647648
graphics.strokePath();
648649
}
649650
}
651+
graphics.closePath();
650652
},
651653

652654
/**

0 commit comments

Comments
 (0)