Currently, I am working on a basic project using next.js and trying to explore three.js. However, I have encountered a simple yet challenging issue that I can't seem to solve.
In the screenshot attached, you can see my project structure. Within Sculpture.jsx, I am attempting to utilize the useGLTF hook, which requires me to specify the path to the GLTF file.
I'm unsure if there is an issue with the path I have provided or if the problem lies elsewhere. You can view the screenshot here.
import React from "react";
import {
Suspense,
useEffect,
useState,
} from "react";
import { Canvas } from "@react-three/fiber";
import {
OrbitControls,
Preload,
useGLTF,
} from "@react-three/drei";
import CanvasLoader from "../CanvasLoader";
const Sculpture = () => {
const model = useGLTF("./sculpture/scene.gltf");
return <div>Sculpture</div>;
};
export default Sculpture;
You can also take a look at another screenshot by following this link here.