mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
If you had a sprite on the display list using the LightPipeline, followed by a Mesh using the LightPipeline, and you invalidated the mesh (i.e. by rotating it), it would cause a runtime error in the current batch. Fix #6822
This commit is contained in:
parent
c5d8c7e04c
commit
13035a6718
1 changed files with 14 additions and 0 deletions
|
@ -292,6 +292,13 @@ var LightPipeline = new Class({
|
|||
rotation = gameObject.rotation;
|
||||
}
|
||||
|
||||
if (this.currentBatch === null)
|
||||
{
|
||||
this.createBatch(texture);
|
||||
|
||||
this.addTextureToBatch(normalMap);
|
||||
}
|
||||
|
||||
this.setNormalMapRotation(rotation);
|
||||
|
||||
return 0;
|
||||
|
@ -339,6 +346,13 @@ var LightPipeline = new Class({
|
|||
this.setNormalMapRotation(gameObject.rotation);
|
||||
}
|
||||
|
||||
if (this.currentBatch === null)
|
||||
{
|
||||
this.createBatch(texture);
|
||||
|
||||
this.addTextureToBatch(normalMap);
|
||||
}
|
||||
|
||||
return 0;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue