From df8c577fc3e0049e42cbd3af6d02f8ffcf6c3a08 Mon Sep 17 00:00:00 2001 From: shinyobjectz Date: Tue, 17 Nov 2026 18:02:22 -0800 Subject: [PATCH] LT21: shapeFromChildren reads a Text3D's and a BufferMesh's props as their own types again, one if per type, so tools/sdk-props sees BufferMesh's seven props read (positions, normals, uvs, colors, indices, attributes, copies: 0 unread). The fragment-aware loop is kept: a shape inside a fragment is still the mesh's shape (conformance/detail.test.tsx). --- sdk/render/src/3d/shapes.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sdk/render/src/3d/shapes.tsx b/sdk/render/src/3d/shapes.tsx index f7dcd524..8235ece8 100644 --- a/sdk/render/src/3d/shapes.tsx +++ b/sdk/render/src/3d/shapes.tsx @@ -448,8 +448,13 @@ const flat = (kids: ReactNode): ReactElement[] => Children.toArray(kids).flatMap export function shapeFromChildren(children: ReactNode): string | undefined { for (const child of flat(children)) { - const props = child.props as Record; - const s = child.type === Text3D ? text3dShape(props as unknown as Text3DProps) : child.type === BufferMesh ? bufferShape(props as unknown as BufferMeshProps) : GEOMETRY_SHAPES.get(child.type)?.(props); + if (child.type === Text3D) { + return text3dShape((child as ReactElement).props); + } + if (child.type === BufferMesh) { + return bufferShape((child as ReactElement).props); + } + const s = GEOMETRY_SHAPES.get(child.type)?.((child as ReactElement>).props); if (s !== undefined) return s; } return undefined;