mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Render the Camera masks
This commit is contained in:
parent
79409f0479
commit
186970bd69
2 changed files with 13 additions and 1 deletions
|
@ -426,6 +426,13 @@ var CanvasRenderer = new Class({
|
|||
|
||||
this.currentContext = ctx;
|
||||
|
||||
var mask = camera.mask;
|
||||
|
||||
if (mask)
|
||||
{
|
||||
mask.preRenderCanvas(this, null, camera._maskCamera);
|
||||
}
|
||||
|
||||
if (!camera.transparent)
|
||||
{
|
||||
ctx.fillStyle = camera.backgroundColor.rgba;
|
||||
|
@ -476,6 +483,11 @@ var CanvasRenderer = new Class({
|
|||
|
||||
camera.dirty = false;
|
||||
|
||||
if (mask)
|
||||
{
|
||||
mask.postRenderCanvas(this);
|
||||
}
|
||||
|
||||
// Restore pre-clip context
|
||||
ctx.restore();
|
||||
|
||||
|
|
|
@ -1723,7 +1723,7 @@ var WebGLRenderer = new Class({
|
|||
|
||||
if (mask)
|
||||
{
|
||||
mask.preRenderWebGL(this, null, camera);
|
||||
mask.preRenderWebGL(this, null, camera._maskCamera);
|
||||
}
|
||||
|
||||
if (color.alphaGL > 0)
|
||||
|
|
Loading…
Reference in a new issue