mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Use new cam mask object
This commit is contained in:
parent
6f639ddec2
commit
ac1cc1762d
1 changed files with 7 additions and 10 deletions
|
@ -133,7 +133,7 @@ var GeometryMask = new Class({
|
|||
renderer.maskCount = 0;
|
||||
}
|
||||
|
||||
if (renderer.currentCameraMask !== this)
|
||||
if (renderer.currentCameraMask.mask !== this)
|
||||
{
|
||||
renderer.currentMask = this;
|
||||
}
|
||||
|
@ -183,16 +183,13 @@ var GeometryMask = new Class({
|
|||
gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);
|
||||
}
|
||||
}
|
||||
else if (this.invertAlpha)
|
||||
{
|
||||
gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.invertAlpha)
|
||||
{
|
||||
gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.stencilFunc(gl.EQUAL, level, 0xFF);
|
||||
}
|
||||
gl.stencilFunc(gl.EQUAL, level, 0xFF);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -230,7 +227,7 @@ var GeometryMask = new Class({
|
|||
|
||||
prev.mask.applyStencil(renderer, prev.camera, false);
|
||||
|
||||
if (renderer.currentCameraMask !== prev.mask)
|
||||
if (renderer.currentCameraMask.mask !== prev.mask)
|
||||
{
|
||||
renderer.currentMask = prev.mask;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue