From 507ddf8d49e56d62896c9d28e2ce026b95dc566d Mon Sep 17 00:00:00 2001 From: Brian Beck Date: Fri, 14 Nov 2025 19:09:07 -0800 Subject: [PATCH] fix missing key --- src/components/Item.tsx | 2 +- src/components/StaticShape.tsx | 2 +- src/components/TSStatic.tsx | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/components/Item.tsx b/src/components/Item.tsx index 1b26287e..19413399 100644 --- a/src/components/Item.tsx +++ b/src/components/Item.tsx @@ -33,7 +33,7 @@ function ShapeModel({ shapeName }: { shapeName: string }) { !node.material || !node.material.name.match(/\.\d+$/) ) .map(([name, node]: [string, any]) => ( - + ))} diff --git a/src/components/StaticShape.tsx b/src/components/StaticShape.tsx index 01895097..22c8b345 100644 --- a/src/components/StaticShape.tsx +++ b/src/components/StaticShape.tsx @@ -34,7 +34,7 @@ function ShapeModel({ shapeName }: { shapeName: string }) { !node.material || !node.material.name.match(/\.\d+$/) ) .map(([name, node]: [string, any]) => ( - + ))} diff --git a/src/components/TSStatic.tsx b/src/components/TSStatic.tsx index f85b1f74..6fbc1c7d 100644 --- a/src/components/TSStatic.tsx +++ b/src/components/TSStatic.tsx @@ -19,9 +19,22 @@ function useStaticShape(shapeName: string) { } function ShapeModel({ shapeName }: { shapeName: string }) { - const { scene } = useStaticShape(shapeName); + const { nodes } = useStaticShape(shapeName); - return ; + return ( + <> + {Object.entries(nodes) + .filter( + ([name, node]: [string, any]) => + !node.material || !node.material.name.match(/\.\d+$/) + ) + .map(([name, node]: [string, any]) => ( + + + + ))} + + ); } function ShapePlaceholder({ color }: { color: string }) {