diff --git a/CHANGELOG.MD b/CHANGELOG.MD index d5bcc90ce..e68802dce 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,12 @@ # Change Log + +## Version 3.8.1 - Nov 1, 2020 + +### Fixed + +* Fixes atlas thumbnail generation when atlas URL is pointing to a missing file. + ## Version 3.8.0 - Oct 30, 2020 ### Added diff --git a/source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts b/source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts index 4fd25bec4..c46c18bb1 100644 --- a/source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts +++ b/source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts @@ -289,7 +289,7 @@ namespace phasereditor2d.ide { /* program entry point */ - export const VER = "3.8.0"; + export const VER = "3.8.1"; async function main() { diff --git a/source/editor/plugins/phasereditor2d.pack/src/core/AssetPackItem.ts b/source/editor/plugins/phasereditor2d.pack/src/core/AssetPackItem.ts index 15b537081..b7345b603 100644 --- a/source/editor/plugins/phasereditor2d.pack/src/core/AssetPackItem.ts +++ b/source/editor/plugins/phasereditor2d.pack/src/core/AssetPackItem.ts @@ -46,8 +46,13 @@ namespace phasereditor2d.pack.core { protected addFilesFromUrls(files: Set, urls: string[]) { for (const url of urls) { + const file = AssetPackUtils.getFileFromPackUrl(url); - files.add(file); + + if (file) { + + files.add(file); + } } } diff --git a/source/editor/plugins/phasereditor2d.pack/src/core/ImageFrameContainerAssetPackItem.ts b/source/editor/plugins/phasereditor2d.pack/src/core/ImageFrameContainerAssetPackItem.ts index 96a5f1df0..d907af48f 100644 --- a/source/editor/plugins/phasereditor2d.pack/src/core/ImageFrameContainerAssetPackItem.ts +++ b/source/editor/plugins/phasereditor2d.pack/src/core/ImageFrameContainerAssetPackItem.ts @@ -65,7 +65,11 @@ namespace phasereditor2d.pack.core { this.computeUsedFiles(files); - const key = [...files].map(file => file.getFullName() + "@" + file.getModTime()).join(","); + const key = [...files] + + .filter(file => file !== null && file !== undefined) + + .map(file => file.getFullName() + "@" + file.getModTime()).join(","); return key; } diff --git a/source/editor/plugins/phasereditor2d.pack/src/core/MultiAtlasAssetPackItem.ts b/source/editor/plugins/phasereditor2d.pack/src/core/MultiAtlasAssetPackItem.ts index ded2dbb1d..96ff5599d 100644 --- a/source/editor/plugins/phasereditor2d.pack/src/core/MultiAtlasAssetPackItem.ts +++ b/source/editor/plugins/phasereditor2d.pack/src/core/MultiAtlasAssetPackItem.ts @@ -2,7 +2,6 @@ namespace phasereditor2d.pack.core { import io = colibri.core.io; import ide = colibri.ui.ide; - import controls = colibri.ui.controls; export class MultiatlasAssetPackItem extends BaseAtlasAssetPackItem {