i'm new to three.js so i apologize if this question has been asked before. i have this external .txt file that contains the x, y, z positions of 256 atoms. the first lines of the .txt file goes as follows:
256
1 0.702825 2.71217 2.71612
1 16.9592 2.64886 6.79019
1 0.681418 2.68359 10.8911
...
the first row contains the number of atoms in the compound and the first column, the size of the atom. the remaining values are the x, y, z values for every respective atom. so far i added the first atom by manually inputting the position:
...
scene.add(sphere);
sphere.position.set(0.702825, 2.71217, 2.71612);
can i open and read the .txt file line by line to store the next position in x, y and z variables? what can i do to use the external file's information?