A basic template project to create three.js projects using vanilla javascript
- Clone this repository using
git clone
command.- Add your three.js script in the
main.js
file.- Add your assets i.e., models, images.. etc to the public folder.
- Refer to your assets in the
main.js
as if it were present in the root directory, without thepublic/
prefix.
npm i
npm start
npm run build
Drag and drop the
build/
folder into netlify. It will do the rest. After the deployment, change the domain of the project in netlify site settings if needed.
The build folder won't be pushed into to the github repo. So, generate a new build everytime before deployment. To push the
build/
folder into the repo remove thebuild/
from the.gitignore
file.
To change the tab title edit the content inside the
<title>
inindex.html
. Change description of the page by editing the relevant<meta>
tags inindex.html
.