import React, { useRef, useState } from 'react' import { Canvas, useFrame, useThree } from '@react-three/fiber' import styles from "../styles/studio.module.css"; import { OrbitControls } from '@react-three/drei' import { useLoader } from '@react-three/fiber' import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader' import { useGLTF, useGLB } from "@react-three/drei"; export function CanvasComponent({setCanvasRef, gltfModel}) { return ( <> ) } function Scene({ setCanvasRef, gltfModel }) { const { gl, camera } = useThree(); // Set camera position closer to the object // camera.position.set(0, 0, 5); // x, y, z setCanvasRef(gl.domElement); return ( <> // highlight-line ); } function Model({ gltfModel, ...props }) { const { nodes, materials } = gltfModel; console.log("model loaded") return ( ); } function Light({ brightness, color }) { return ( ); }