Skip to content

Commit

Permalink
Fix for reloaded cubemaps assets (#6397)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck committed May 20, 2024
1 parent e3217c4 commit 56d4ded
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/framework/handlers/cubemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class CubemapHandler extends ResourceHandler {
onLoad(i, null);
} else if (self.compareAssetIds(assetId, loadedAssetIds[i])) {
// asset id hasn't changed from what is currently set
onLoad(i, loadedAssets[i]);
processTexAsset(i, loadedAssets[i]);
} else if (parseInt(assetId, 10) === assetId) {
// assetId is an asset id
texAsset = registry.get(assetId);
Expand Down Expand Up @@ -319,9 +319,7 @@ class CubemapHandler extends ResourceHandler {
} : assetId;
texAsset = new Asset(cubemapAsset.name + '_part_' + i, 'texture', file);
registry.add(texAsset);
registry.once('load:' + texAsset.id, onLoad.bind(self, i));
registry.once('error:' + texAsset.id, onError.bind(self, i));
registry.load(texAsset);
processTexAsset(i, texAsset);
}
}
}
Expand Down

0 comments on commit 56d4ded

Please sign in to comment.