Working through three.js tutorials to become fluent in programming in ℝ³. :)
Good tutorial: https://www.youtube.com/playlist?list=PLjcjAqAnHd1EIxV4FSZIiJZvsdrBc1Xho
- Check if three.js and parcel are installed:
npm list
We use parcel as a almost zero config build tool. Install parcel in your working directory:
npm install --save-dev parcel
Install three with
npm install three
-
Ensure to add "source": "index.html" in the package.json file of your project.
-
Now run the server through with a simple parcel command in your project directory:
npx parcel index.html
Parcel will announce "Server running at http://localhost:1234" and will hotload all your changes immediately.
dat.gui - A lightweight graphical user interface for changing variables in JavaScript.
npm install dat.gui
See: https://parceljs.org/getting-started/webapp/ for details concerning installation and https://parceljs.org/features/cli for CLI commands.
- Objects do not appear to be correctly illuminated?
Try change their materials from/to MeshBasicMaterial or MeshStandardMaterial or vice versa.
- Killing Node
If you killed node but it seems to still run somehow, you might search it:
ps aux | grep node
and kill it:
kill -9 PROCESS_ID