mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
The Graphics Canvas Renderer will now automatically call beginPath
on the target context before processing the command stack. This has the effect of clearing off any sub-paths that may have persisted on the stack from previous Graphics objects or frames.
This commit is contained in:
parent
4d74b99018
commit
dff9bdef9f
2 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,8 @@
|
|||
|
||||
## Updates
|
||||
|
||||
* The Graphics Canvas Renderer will now automatically call `beginPath` on the target context before processing the command stack. This has the effect of clearing off any sub-paths that may have persisted on the stack from previous Graphics objects or frames. This makes it more in-line with WebGL re: expectations when calling `Graphics.clear`.
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* TileSprite.setTileScale would set the tile position by mistake, instead of the scale. Using the properties directly worked, but the method was incorrect (thanks @alexeymolchan)
|
||||
|
|
|
@ -45,7 +45,10 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c
|
|||
var green = 0;
|
||||
var blue = 0;
|
||||
|
||||
ctx.fillStyle = '#fff';
|
||||
ctx.save();
|
||||
|
||||
// Reset any currently active paths
|
||||
ctx.beginPath();
|
||||
|
||||
for (var index = 0; index < commandBufferLength; ++index)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue