From 81cdeea761d2ab487353bb97ddb54846ec9aacf7 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Tue, 10 Aug 2021 06:40:27 +1000 Subject: [PATCH] Fix split edge issue --- .../src/components/IdeViewer/IdeViewer.tsx | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/app/web/src/components/IdeViewer/IdeViewer.tsx b/app/web/src/components/IdeViewer/IdeViewer.tsx index 368ef82..86c73ff 100644 --- a/app/web/src/components/IdeViewer/IdeViewer.tsx +++ b/app/web/src/components/IdeViewer/IdeViewer.tsx @@ -16,13 +16,7 @@ const colorMap = loader.load(texture) extend({ OrbitControls }) function Asset({ geometry: incomingGeo }) { - const mesh = useEdgeSplit(12*Math.PI/180, true) - const ref = useRef({}) - useLayoutEffect(() => { - if (incomingGeo?.attributes) { - ref.current.attributes = incomingGeo.attributes - } - }, [incomingGeo]) + const mesh = useEdgeSplit((12 * Math.PI) / 180, true) if (!incomingGeo) return null if (incomingGeo.length) @@ -31,8 +25,7 @@ function Asset({ geometry: incomingGeo }) { )) return ( - - + ) @@ -229,11 +222,9 @@ const IdeViewer = ({ Loading }) => { )} - + {state.objectData?.type === 'geometry' && state.objectData?.data && ( + + )}