import * as React from 'react' import { FBXLoader } from 'three-stdlib' import { useLoader } from '@react-three/fiber' import { Group } from 'three' import { Clone } from './Clone' export function useFBX(path: string): Group { return useLoader(FBXLoader, path) } useFBX.preload = (path: string) => useLoader.preload(FBXLoader, path) useFBX.clear = (input: string | string[]) => useLoader.clear(FBXLoader, input) export function Fbx({ path, ...props }: { path: Parameters[0] } & Omit, 'object'>) { const fbx = useFBX(path) const object = fbx.children[0] return }