I just try to load/show glb file on web page by Next.js, but, I have 500 error with “ERR_INVALID_URL”.
I already put “diamond1.glb” file into the “public” folder.
"use client";
import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei'
import { useFrame, Canvas} from '@react-three/fiber';
const Home = ()=> {
const { nodes, materials } = useGLTF('/diamond1.glb'); //Remove that code, then 500 disappear
//const diamond=useRef();
return (
<Canvas camera={{position:[0,0,50]}}>
<group dispose={null} >
</group>
</Canvas>
)
}
export default Home
Any idea?