vasturiano / react-globe.gl

React component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/react-globe.gl/example/world-population/
MIT License
866 stars 155 forks source link

TypeError: globe.getGlobeRadius is not a function #104

Closed Fullstack-WEB-Blockchain-Developer closed 1 year ago

Fullstack-WEB-Blockchain-Developer commented 1 year ago

Describe the bug Please check this screenshot I have use only this example with nextjs and typescript https://github.com/vasturiano/react-globe.gl/blob/master/example/clouds/index.html

What's wrong with using this utility in nextjs?

Screenshots image

Desktop (please complete the following information):

vasturiano commented 1 year ago

@Fullstack-WEB-Blockchain-Developer thanks for reaching out.

That looks like a typescript error, but that method is declared: https://github.com/vasturiano/react-globe.gl/blob/3fdfe0c582aaf28d2656035b8e54c3152f888098/src/index.d.ts#L261

Best would be if you could post an online example, if you're still having trouble.

Fullstack-WEB-Blockchain-Developer commented 1 year ago

@vasturiano Thank you for your reply. I fixed it like this but I still get this error. image

I think it is necessary to define a control function to get rid of TypeScript errors. image

vasturiano commented 1 year ago

@Fullstack-WEB-Blockchain-Developer I've just updated the type definitions to include the full object spec from Three's orbit controls.