diff --git a/components/canvascomponent.js b/components/canvascomponent.js index 1ee8568..a7bf181 100644 --- a/components/canvascomponent.js +++ b/components/canvascomponent.js @@ -7,68 +7,8 @@ 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}) { - - -// return ( -// <> -// -// -// -// - -// -// ) -// } - -// function Scene({setCanvasRef}) { -// const gl = useThree((state) => state.gl) -// setCanvasRef(gl.domElement); - - -// return ( -// <> -// -// - -// -// -// ) -// } - - - -// function Model(props) { -// const { nodes, materials } = useGLTF("/sneaker.glb"); -// return ( -// -// -// -// -// -// -// -// -// -// ); -// } - -// useGLTF.preload("/sneaker.glb"); - - export function CanvasComponent({setCanvasRef, gltfModel}) { - - return ( <> state.gl) -// setCanvasRef(gl.domElement); - -// return ( -// <> - -// -// -// ) -// } - - function Scene({ setCanvasRef, gltfModel }) { const { gl, camera } = useThree(); @@ -117,9 +44,6 @@ function Scene({ setCanvasRef, gltfModel }) { function Model({ gltfModel, ...props }) { - console.log(gltfModel) - - const { nodes, materials } = gltfModel; console.log("model loaded") @@ -147,4 +71,3 @@ function Light({ brightness, color }) { /> ); } -// useGLTF.preload("/sneaker.glb"); \ No newline at end of file