mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Add skipBatch in config parameter of stamp method
This commit is contained in:
parent
afe5401a25
commit
9c439671cc
2 changed files with 11 additions and 1 deletions
|
@ -450,6 +450,7 @@ var DynamicTexture = new Class({
|
|||
var originY = GetFastValue(config, 'originY', 0.5);
|
||||
var blendMode = GetFastValue(config, 'blendMode', 0);
|
||||
var erase = GetFastValue(config, 'erase', false);
|
||||
var skipBatch = GetFastValue(config, 'skipBatch', false);
|
||||
|
||||
var stamp = this.manager.resetStamp(alpha, tint);
|
||||
|
||||
|
@ -474,7 +475,15 @@ var DynamicTexture = new Class({
|
|||
this._eraseMode = true;
|
||||
}
|
||||
|
||||
if (!skipBatch)
|
||||
{
|
||||
this.draw(stamp, x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.batchDraw(stamp, x, y)
|
||||
}
|
||||
|
||||
|
||||
if (erase)
|
||||
{
|
||||
|
|
|
@ -15,4 +15,5 @@
|
|||
* @property {number} [originY=0.5] - The vertical origin of the stamp. 0 is the top, 0.5 is the center and 1 is the bottom.
|
||||
* @property {(string|Phaser.BlendModes|number)} [blendMode=0] - The blend mode used when drawing the stamp. Defaults to 0 (normal).
|
||||
* @property {boolean} [erase=false] - Erase this stamp from the texture?
|
||||
* @property {boolean} [skipBatch=false] - Skip beginning and ending a batch with this call. Use if this is part of a bigger batched draw.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue