Hello - I am trying to use an AssetContainer with a HDRCubeTexture that’s been set using createDefaultSkybox. This consistently fails with:
assetContainer.js?18ef:523 Uncaught (in promise) TypeError: sourceAssets is not iterable
at AssetContainer._moveAssets (assetContainer.js?18ef:523:1)
at AssetContainer.moveAllFromScene (assetContainer.js?18ef:551:1)
…from what I see, assetContainer.js does:
for (const key in this) {
if (Object.prototype.hasOwnProperty.call(this, key)) {
(<any>this)[key] = (<any>this)[key] || (key === "environmentTexture" ? null : []);
this._moveAssets((<any>this.scene)[key], (<any>this)[key], (<any>keepAssets)[key]);
}
}
…which at some point calls _moveAssets with they key '_environmentTexture' (NOT 'environmentTexture'). At that point, this.scene['_environmentTexture'] is an instance of HDRCubeTexture, which is not a valid argument for _moveAssets.
I cannot repro this in the Playground, but I cannot see how this could work given the code. If the AssetCointainer instance hay a _environmentTexture key (looks like it does) then this line here will pass in this.scene['_environmentTexture']with a wrong type into _moveAssets.
Am I missing something? Thanks for your help!