you can't just click an html file, that would only work if you don't have assets (textures, models, environments, fonts, ...), the browsers security protocols won't allow the html file to just access the hard drive. minimum requirement is a HTTP server. if you want to distribute a javascript based application on the desktop a common pick would be electron.
#HOW DO I SHARE HOST A THREE.JS PAGE SITE
10 messages · Page 1 of 1 (latest)
GitHub Pages
Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.
i take it you want to put the site/app onto a cd as you said and share it, not host it in the traditional sense, then you'd normally use this https://www.electronjs.org
Build cross-platform desktop apps with JavaScript, HTML, and CSS.
it allows you to wrap the project into a desktop app, but it's still all just html, css and javascript
if you just want to host it on some public url well there are a million ways
You could try a system like tauri, which is similar to electron, however it has some differences.
The most important one for what you want to do is that it uses the operating system’s “web view” api, that means it’s going to use whatever browser is on the computer.
Electron ships a version of chrome with the exe file, meaning it is more likely you’ll see the same behavior across operating systems.
Both do require some work to get going, but tauri may be an easier way to get started.
well, it's still not entirely clear to me what you mean. you said you want to put the website "on a CD". that already sounds strange because i haven't seen a CD drive in over 10 years? if you could quickly clarify that, if HOSTING the project online is a possibility everything will become easy.
Maby you could add .bash that intalls and runs the HTTPS server for your professor.
this issue is not a three.js issue