I'm quite new to both three.js and JavaScript, so please bear with me if this is a simple question.
I have a JSON file with a list of objects containing data like this:
[
{ "x":x,"y":y,"z":z ,"r":r},
{ "x":x2,"y":y2,"z":z2 ,"r":r2},
{ "x":x3,"y":y3,"z":z 3,"r":r3}
]
And I want to render it on the screen using three.js.
Basically, I want to achieve something similar to the example shown here:
However, instead of hardcoding the sphere values directly in the JavaScript code, I'd like to read them from a file. How can I modify the above example to achieve this?
Your help would be greatly appreciated. Thanks!