Skip to content

Commit 5601a76

Browse files
authored
Merge pull request phaserjs#3348 from samid737/master
* Fix phaserjs#3345 by adding beginPath and closePath in postUpdate.
2 parents 7adcb66 + 852e747 commit 5601a76

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
* Fixed issue with Render Texture tinting. Fix #3336 (thanks @rexrainbow)
1010
* Fixed Utils.String.Format (thanks @samme)
11+
* The Matter Debug Layer wouldn't clear itself in canvas mode. Fix #3345 (thanks @samid737)
1112

1213
### Updates
1314

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)