mirror of
https://github.com/photonstorm/phaser
synced 2025-02-25 11:57:19 +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: [
|
Mixins: [
|
||||||
Components.Alpha,
|
Components.Alpha,
|
||||||
|
Components.Mask,
|
||||||
Components.Visible
|
Components.Visible
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -1719,6 +1719,13 @@ var WebGLRenderer = new Class({
|
||||||
{
|
{
|
||||||
this.pushScissor(cx, cy, cw, ch);
|
this.pushScissor(cx, cy, cw, ch);
|
||||||
|
|
||||||
|
var mask = camera.mask;
|
||||||
|
|
||||||
|
if (mask)
|
||||||
|
{
|
||||||
|
mask.preRenderWebGL(this, null, camera);
|
||||||
|
}
|
||||||
|
|
||||||
if (color.alphaGL > 0)
|
if (color.alphaGL > 0)
|
||||||
{
|
{
|
||||||
TextureTintPipeline.drawFillRect(
|
TextureTintPipeline.drawFillRect(
|
||||||
|
@ -1748,6 +1755,13 @@ var WebGLRenderer = new Class({
|
||||||
|
|
||||||
camera.dirty = false;
|
camera.dirty = false;
|
||||||
|
|
||||||
|
var mask = camera.mask;
|
||||||
|
|
||||||
|
if (mask)
|
||||||
|
{
|
||||||
|
mask.postRenderWebGL(this);
|
||||||
|
}
|
||||||
|
|
||||||
this.popScissor();
|
this.popScissor();
|
||||||
|
|
||||||
if (camera.renderToTexture)
|
if (camera.renderToTexture)
|
||||||
|
|
Loading…
Add table
Reference in a new issue