diff --git a/src/lib/services/swf/index.ts b/src/lib/services/swf/index.ts index 9b29d433..b772a1c3 100644 --- a/src/lib/services/swf/index.ts +++ b/src/lib/services/swf/index.ts @@ -203,12 +203,7 @@ export function convertSwfToNitro( : findChild(assetsRoot, "assets") || assetsRoot; for (const asset of findChildren(assetsNode, "asset")) { const assetName = asset.attrs.name || ""; - if ( - !assetName || - assetName.startsWith("sh_") || - assetName.includes("_32_") - ) - continue; + if (!assetName || assetName.startsWith("sh_")) continue; if (!asset.attrs.source) { neededSprites.add(assetName); } else { @@ -225,7 +220,7 @@ export function convertSwfToNitro( if (!rawName) continue; const name = stripPrefix(rawName); - if (name.startsWith("sh_") || name.includes("_32_")) continue; + if (name.startsWith("sh_")) continue; if (neededSprites.size > 0 && !neededSprites.has(name)) continue; namedImages.push({ @@ -290,7 +285,7 @@ export function convertSwfToNitro( for (const asset of findChildren(assetsNode, "asset")) { const assetName = asset.attrs.name || ""; if (!assetName) continue; - if (assetName.startsWith("sh_") || assetName.includes("_32_")) continue; + if (assetName.startsWith("sh_")) continue; const x = parseInt(asset.attrs.x || "0", 10); const y = parseInt(asset.attrs.y || "0", 10); diff --git a/src/lib/services/swf/xml-processor.ts b/src/lib/services/swf/xml-processor.ts index ee16c1d3..2de32257 100644 --- a/src/lib/services/swf/xml-processor.ts +++ b/src/lib/services/swf/xml-processor.ts @@ -426,8 +426,9 @@ export function processVisualization(xml: string): NitroVisualization[] { for (const viz of findChildren(graphics, "visualization")) { const size = parseInt(viz.attrs.size || "64", 10); - // Skip size 32 (small catalog icons) – only keep size 1 (special) and 64 (standard) - if (size === 32) continue; + // Keep size 1 (special), 32 (small catalog icons) and 64 (standard) so the + // bundle renders correctly at every scale the client requests. + if (size <= 0) continue; const layerCount = parseInt(viz.attrs.layerCount || "1", 10); const angle = parseInt(viz.attrs.angle || "45", 10);