feat: KiCad board + STEP components combined (248 meshes, 2.7MB, with PCB traces)

This commit is contained in:
Clément SAILLANT
2026-03-30 17:27:50 +00:00
parent 4d7a2580af
commit b01b8dc5cb
2 changed files with 12 additions and 1 deletions
+12 -1
View File
@@ -34,9 +34,20 @@ function RealPCB() {
if (!glb?.scene) return null;
// Deep clone with materials preserved
const cloned = useMemo(() => {
const clone = glb.scene.clone(true);
clone.traverse((child: any) => {
if (child.isMesh && child.material) {
child.material = child.material.clone();
}
});
return clone;
}, [glb.scene]);
return (
<primitive
object={glb.scene.clone()}
object={cloned}
scale={1}
rotation={[-Math.PI / 2, 0, 0]}
position={[0, 0, 0]}