As a newcomer to three.js, I'm still figuring things out and may be treading familiar ground with this query. Here's the situation: I've got an external .txt file that lays out the x, y, z positions for 256 atoms. The opening lines of said .txt file look something like this:
256
1 0.702825 2.71217 2.71612
1 16.9592 2.64886 6.79019
1 0.681418 2.68359 10.8911
...
The initial row reveals the atom count in the compound and the first column signifies atomic size, while the remaining figures represent the x, y, z values for each individual atom. As of now, I've manually inputted the position of the first atom as follows:
...
scene.add(sphere);
sphere.position.set(0.702825, 2.71217, 2.71612);
My goal is to read through the .txt file line by line and extract subsequent x, y, z positions into variables. How can I leverage the details stored in the external file?