mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Testing mask component on Camera
This commit is contained in:
parent
1a9f6130bf
commit
c188dfde12
2 changed files with 15 additions and 0 deletions
|
@ -62,6 +62,7 @@ var BaseCamera = new Class({
|
|||
|
||||
Mixins: [
|
||||
Components.Alpha,
|
||||
Components.Mask,
|
||||
Components.Visible
|
||||
],
|
||||
|
||||
|
|
|
@ -1719,6 +1719,13 @@ var WebGLRenderer = new Class({
|
|||
{
|
||||
this.pushScissor(cx, cy, cw, ch);
|
||||
|
||||
var mask = camera.mask;
|
||||
|
||||
if (mask)
|
||||
{
|
||||
mask.preRenderWebGL(this, null, camera);
|
||||
}
|
||||
|
||||
if (color.alphaGL > 0)
|
||||
{
|
||||
TextureTintPipeline.drawFillRect(
|
||||
|
@ -1748,6 +1755,13 @@ var WebGLRenderer = new Class({
|
|||
|
||||
camera.dirty = false;
|
||||
|
||||
var mask = camera.mask;
|
||||
|
||||
if (mask)
|
||||
{
|
||||
mask.postRenderWebGL(this);
|
||||
}
|
||||
|
||||
this.popScissor();
|
||||
|
||||
if (camera.renderToTexture)
|
||||
|
|
Loading…
Reference in a new issue