firtoz / react-three-renderer

Render into a three.js canvas using React.
https://toxicfork.github.com/react-three-renderer-example/
MIT License
1.49k stars 155 forks source link

Fixing (hopefully) all three.js documentation links #177

Closed AndrewRayCode closed 7 years ago

AndrewRayCode commented 7 years ago

Addresses issue #175

Here's how this was done:

First I extracted all links using Ack and Vim, and removed duplicates using :sort u in Vim.

Through sheer luck I found all three.js doc pages load https://threejs.org/docs/list.js, which lists all relative doc paths, excluding method links.

Then I wrote a node script to compare all links found in the R3R project to the links from the above mentioned list.js. That script is found here

If you run this script with node test-r3r-links.js, it will not error. The assert on the last line is what verifies all links in R3R source exist in three.js's list.js index.

NOTE: I DID NOT HAND VERIFY THE METHOD SPECIFIC LINKS. As in, I know https://threejs.org/docs/#api/extras/core/Path is correct, but I did not hand verify all the method links like https://threejs.org/docs/#api/extras/core/Path.absarc

The actual change to the codebase took several search and replace sweeps in Visual Studio Code. It was made easier by the fact that the original doc links in R3R link to http, while the updated three docs all redirect to https.

Fun facts:

toxicFork commented 7 years ago

Sweet! Thanks!! I'll verify and merge ASAP!

Stop linking to things :D

😅

ashl1 commented 7 years ago

Any updates on this? Merging the PR will improve docs expirience for the react-three-render novices.

toxicFork commented 7 years ago

Thanks a lot again for the PR :)