- Node.js
- Vite
- React.js
- Three.js
- React Three Fiber
- React Three Drei
This repository contains the code for how to use and implement three.js models into our code. I have created three different folders with Each folder containig code for - importing Three.js models through CDN links, using three.js in [ npm + vite ] project and using three.js in [ npm + vite + React ] project. Follow to Following Quick Start guide to run this code on your local machine to see how it works.
Follow these steps to set up the project locally on your machine.
Prerequisites
Make sure you have the following installed on your machine:
Cloning the Repository
Open command prompt -> type 'cd desktop' ->
git clone https://github.com/Rukh-Khan/3js-models-starter.git
close command prompt -> open the created folder in vs code
Go to basic folder -> Simply, Run the index.html file ( Right click -> Open with live server )
AND file is running into your browser, have a look !
Open terminal -> Go to vite directory by running : -
cd vite
AND run just 2 commands :-
install the project dependencies using npm
npm install
Running the project
npm run dev
AND, have a look into your browser !
open terminal -> Go to vite+react directory by running :- ( Assuming you are in 'vite' directory )
cd ..
cd vite-react
AND run just 2 commands :-
install the project dependencies using npm
npm install
Running the project
npm run dev
Voila ! have a look into your browser !