Three JS Tutorial

Install Node.js

The first step in the process is to install "Node.JS". Before installing, check to see if you have it installed.


If it is not already installed, use this link to install the recommended version.

Line

Install NPM

Next, you have to install NPM or "Node Package Manager"


If it is not already installed, simply enter the following command into Windows PowerShell

npm install -g npm

Line

Create an empty directory and install VITE

Start by creating a project directory somewhere you can find it later and naming it something like "ThreeJS-Project"


Next, we will be installing VITE as the project base for our ThreeJS.

Once you are in your directory, enter the following command.

npm init vite

It will then initiate four prompts.

Lastly, we need to do the follow up prompts suggested after the project was created.

Line

Install Three JS

Next we will install Three.js itself.


This will add a few files to your directory. A new folder called node_modules, a package.json, and a package-lock.json.