adrianhajdin / project_3D_developer_portfolio

The most impressive websites in the world use 3D graphics and animations to bring their content to life. Learn how to build your own ThreeJS 3D Developer Portfolio today!
https://jsmastery.pro
5.71k stars 1.26k forks source link

#123 THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN #123

Open ManomayBisht opened 9 months ago

ManomayBisht commented 9 months ago

After spending 4 days I made a fully functional top class portfolio website, I fixed majority of the errors but there is 1 error that I am unable to fix (because I am unable to understand it)

image

After expanding it I got even more confused, I don't understand where is the problem in the code, and if there is, then in what way is it affecting the project

p1

p2

I understand that there is an issue with the "position" attribute of the BufferGeometry object, possibly containing NaN (Not a Number) values which it should not but then whats the fix.... I updated the three.js too by "npm update three" still nothing changed, its like I am stuck with this

Please help

LevinsonEli commented 8 months ago

Good job so far.

Each point should have (x, y, z) coordinates which are 3 values in total. And I assume that "positions={}" inside your "Points" element expect to receive an array for point positions. And that should be dividable by 3. 3 values for each point. And 5000 is not dividable by 3. 5001 worked for me.