I recently built an interactive 3D model on my website using ThreeJS, but I'm facing an issue with getting the shadows to work properly. As a beginner in ThreeJS, I might be missing out on some crucial steps.
Below is the JavaScript code I've used:
import * as THREE from "https://cdn.skypack.dev/three@0.132.2/build/three.module.js";
import { OrbitControls } from "https://cdn.skypack.dev/three@0.132.2/examples/jsm/controls/OrbitControls.js";
import { GLTFLoader } from "https://cdn.skypack.dev/three@0.132.2/examples/jsm/loaders/GLTFLoader.js";
// Code snippet continues...
You can view the image of the model on my website here: enter image description here
I attempted seeking assistance from ChatGPT for resolving this issue, but unfortunately, their suggested fixes did not resolve the problem.