mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Particle Emitters can now be masked
This commit is contained in:
parent
9dd3e7cd15
commit
754ae7caa2
1 changed files with 11 additions and 0 deletions
|
@ -77,6 +77,12 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola
|
|||
pipeline.setTexture2D(texture, 0);
|
||||
}
|
||||
|
||||
if (emitter.mask)
|
||||
{
|
||||
emitter.mask.preRenderWebGL(renderer, emitter, camera);
|
||||
pipeline.setTexture2D(texture, 0);
|
||||
}
|
||||
|
||||
var tintEffect = 0;
|
||||
|
||||
for (var i = 0; i < particleCount; i++)
|
||||
|
@ -135,6 +141,11 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola
|
|||
|
||||
pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, 0);
|
||||
}
|
||||
|
||||
if (emitter.mask)
|
||||
{
|
||||
emitter.mask.postRenderWebGL(renderer);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue