Creating an animated 3D realistic rain storm with Three.js
Back to top
Install Vite, a development server with live reload capability.
To install:
npm create vite@latestTo run (from your local directory):
npm run dev
Back to top
Prerequisite:
- Make sure Node and NPM are installed on your computer. You can download both at nodejs.org (NPM is included in your Node installation).
- Please see
.nvmrcfile at the root ofthreejs-rain-stormrepo. - Using nvm, a Node Version Manager is recommended as it helps you manage and switch between different Node versions with ease. It provides a command-line interface where you can install different versions with a single command, set a default, switch between them, etc.
In GitHub click on the repository nammed threejs-rain-storm
Clone the repository locally. Run
git clone https://github.com/sctlcd/threejs-rain-storm.gitInstall all modules listed as dependencies in package.json
cd threejs-rain-storm npm inote: in this app
Install Vite, a development server with live reload capability.
To install:
npm create vite@latestTo run (from your local directory):
npm run dev
Back to top
threejs-rain-storm live website is currently deployed on Firebase using the main branch on GitHub. Once you have the project setup locally, you can proceed to deploy it remotely.
Install Firebase CLI Tools, firebase-tools
npm install -g firebase-toolsCreate firebase.json and .firebaserc at the root of your project with the following content:
firebase.json:{ "hosting": { "public": "dist", "ignore": [], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } }.firebaserc:{ "projects": { "default": "<YOUR_FIREBASE_ID>" } }After running
npm run build, deploy using the commandfirebase deploy.
=> live link: https://threejs-rain-storm.web.app/
Back to top
- favicon.ico - Flaticon | copyright Konkapp
- colored-smoke-png-43277-min.png - Freeiconspng | copyright Ahkâm
- smoke-texture-free-download-min.jpg - textures4photoshop | copyright unknown
Back to top
