Begin Creating the Three.js Project
Tip
This course was updated in 2024. For the newer content, please visit Create Course Boilerplate
Video Lecture
Description
Initialize the New Project
Open a command prompt and create a new folder on your system somewhere.
mkdir Three.js-TypeScript-Tutorial
CD into the new folder.
cd Three.js-TypeScript-Tutorial
Initialize a new project with NPM
npm init
Press Enter several times to accept all defaults.
Install Three.js Library
Install the Three.js library.
npm install three --save-dev
Create Extra Project Files and Folders
-
Open the project using VSCode.
code .
-
Create a new folder in the project called
dist
-
Inside the
dist
folder create 2 more folders calledclient
andserver
-
In the new
dist/client
folder add thisindex.html
file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
-
Create a new folder in the project called
src
-
Inside the
src
folder create 2 more folders calledclient
andserver
Your folder structure and files should now resemble,
|-- Three.js-TypeScript-Tutorial
|-- dist
|-- client
|-- index.html
|-- server
|-- node_modules
|-- three
|-- (Several extra files and folders containing the Three.js source code)
|-- src
|-- client
|-- server
|-- package.json
|-- package-lock.json