Three.js project that simulates the orbits of planets around a star, adjusting the mass and distance to see how these variables affect orbital paths, exploring Kepler's laws.
Our term project for 2024 Fall Hacettepe course BBM412 – Computer Graphics.
Play the game on your browser from here.
Watch the trailer from here.
- CD to the project directory (where
package.jsonis located in) - (project dir)$
npm install- A folder named node_modules will appear (if there is not). NPM will scan package.json files, from the project's and recursively all the dependencies', download them and populate that folder with the dependencies. The page and scripts refer to the modules (such as Three.js) that are inside this folder, so gathering the dependencies is essential.
- Same logic as Apache Maven — It also identifies packages of the project as such files (pom.xml) which declares name/version etc. identification stuff and dependencies.
- Do either:
- (project dir)$
npm run dev- This will make the
vite, a tiny server program serving the files, launch and start listening at the port5173(just like Jupyter notebook).
- This will make the
- Open the project in NetBeans and hit start.
- A lightweight file server by NetBeans (which can be configured from
Project Settings>Run) will start listening at the port8383.
- A lightweight file server by NetBeans (which can be configured from
- (project dir)$
- Then:
- Go to http://localhost:XXXX/index.html (depending on the what port the server listens at) in a web browser on the same network.
