Closed sourabpramanik closed 3 years ago
@drcmda
I was watching a video https://www.youtube.com/watch?v=2pUzJOfekVE&t=1025s by Yuri Artyukh and in place of using a simple sphere I wanted to use a gltf model of earth like you can see in my repo https://github.com/sourabpramanik/fff, but I don't know how to setup the line from Three like Yuri did to connect the coordinates in my gltfjsx can you help me.
Here is the javascript https://github.com/sourabpramanik/fff/blob/main/src/component/Planet.js also if you have any model to demonstrate it will be easy.
gltfjsx is good when you need to make changes to the models contents, you can have that planet in two lines otherwise:
function Planet(props) {
const { scene } = useGLTF(url)
return <primitive object={scene} {...props} />
}
<Planet position={[1, 2, 3]} />
it would best best to study r3f at least a little https://docs.pmnd.rs/ that would make things easier. also has lots of examples there.
Actually I am new to this three.js so can you please take some time out and show that to me how it will happen.