mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
There was an issue when loading Normal Maps with Sprite Sheets. Often, if the normal map image completed loading before the sprite sheet, it would cause it to be incorrectly added to the Texture Manager, resulting in broken frames. Now, regardless of the load order, the sprite sheet is added with its normal map correctly together. Fix #6491
This commit is contained in:
parent
b730d185c3
commit
cda0c04afd
1 changed files with 5 additions and 2 deletions
|
@ -209,8 +209,11 @@ var ImageFile = new Class({
|
|||
// We do, but has it loaded?
|
||||
if (linkFile.state >= CONST.FILE_COMPLETE)
|
||||
{
|
||||
// Both files have loaded
|
||||
if (this.type === 'normalMap')
|
||||
if (linkFile.type === 'spritesheet')
|
||||
{
|
||||
linkFile.addToCache();
|
||||
}
|
||||
else if (this.type === 'normalMap')
|
||||
{
|
||||
// linkFile.data = Image
|
||||
// this.data = Normal Map
|
||||
|
|
Loading…
Add table
Reference in a new issue