import { MeshProps } from '@react-three/fiber'; import { Mesh, Object3D } from 'three'; export function jsxTree(node: Object3D, mesh?: MeshProps, key?: string) { if (node instanceof Mesh) { return ( ); } else if (node instanceof Object3D) { return ( {node.children.map((child) => jsxTree(child, mesh, child.uuid))} ); } return null; }