Three.js for Visual Mathematics - Advice and Best Practices

Dear Three.js community,

I’m using the Three.js library to make interactive applets on mathematics for an educational website. The website, http://tungsteno.io/, takes the scripts located in https://github.com/TungstenHub/tngt-threejs/tree/master/scripts (for instance, …/post/app-conic_cone_plane/ loads …/scripts/conics.html - I’m cutting the links because no more that two are allowed for me at this moment). The number of applets may grow bigger and I would appreciate advice on the following aspects:

-Right way to attribute three.js, both in the main page (an ‘about’ section is to appear soon) and in the GitHub repo
-Best practices for the code located in the GitHub repo (a proper README and a style guide are to be added)
-Best way to load the scripts from GitHub (currently with iframes)
-Any other feedback you consider profitable for both projects

May you need further details, please feel free to ask. Thank you very much for your support!

Since three.js is published under the MIT License, there is no obligation to provide attribution.

You are currently including your files via rawgit. That’s okay but you should at least use the cdn subdomain which is intended for production use. E.g.:

https://cdn.rawgit.com/TungstenHub/tngt-threejs/master/scripts/tetrahedron.html

Besides, you should also include three.min.js from a CDN and not the currrent unminified dev build from the repo.

1 Like

@Mugen87 Thank you very much!!

Regarding additional libraries (e.g. https://threejs.org/examples/js/libs/dat.gui.min.js) is there also a CDN way?

https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.2/dat.gui.min.js

2 Likes