From 5d5cca23a98004b0f15c83ea43dc1943cac05452 Mon Sep 17 00:00:00 2001 From: agustin-littlehat Date: Fri, 22 May 2026 19:58:49 -0300 Subject: [PATCH] fix: keep gallery primitives on exact mesh path --- website/src/components/GalleryWorkbench/GalleryWorkbench.tsx | 2 +- .../src/components/GalleryWorkbench/hooks/useScenePolygons.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/website/src/components/GalleryWorkbench/GalleryWorkbench.tsx b/website/src/components/GalleryWorkbench/GalleryWorkbench.tsx index dc3fb10..ce42f30 100644 --- a/website/src/components/GalleryWorkbench/GalleryWorkbench.tsx +++ b/website/src/components/GalleryWorkbench/GalleryWorkbench.tsx @@ -753,7 +753,7 @@ export default function GalleryWorkbench() { showGround={sceneOptions.showGround} helperScale={helperScale} helperTarget={helperTarget} - mergePolygonsForMesh={!hasActiveAnimation} + mergePolygonsForMesh={!hasActiveAnimation && renderLoaded?.kind !== "primitive"} stableDomForMesh={hasActiveAnimation} animationKey={activeAnimation ? `${selectedAnimation}:${renderLoaded?.label ?? ""}` : undefined} animationDurationSeconds={activeAnimation?.duration} diff --git a/website/src/components/GalleryWorkbench/hooks/useScenePolygons.ts b/website/src/components/GalleryWorkbench/hooks/useScenePolygons.ts index c3a3d8e..2a39e5c 100644 --- a/website/src/components/GalleryWorkbench/hooks/useScenePolygons.ts +++ b/website/src/components/GalleryWorkbench/hooks/useScenePolygons.ts @@ -40,6 +40,9 @@ export function useScenePolygons({ : loaded.rawPolygons; } if (loaded.parseResult.voxelSource) return loaded.rawPolygons; + if (loaded.kind === "primitive") { + return optimizeMeshPolygons(loaded.rawPolygons, { meshResolution: "lossless" }); + } return optimizeMeshPolygons(loaded.rawPolygons, { meshResolution: effectiveMeshResolution, });