fireship-io / threejs-scroll-animation-demo

3D Scrolling Portfolio Website with Three.js
1.51k stars 654 forks source link

How to make a deploy? #4

Open SerGio1414 opened 3 years ago

jacobhq commented 3 years ago

Deploy to vercel, or use npm run build to generate a static build. Make sure to set your build commands to npm run build and your output directory to dist. You may need to change the paths of your texture images.

akuliakuli commented 2 years ago

you can deploy this project using surge,if you are using vite js with three.js then first u need to run npm build,and after installing surge(its very easy to deploy webpage using it,tutorial is 2 minute video) you deploy the dist folder,so everything works fine https://surge.sh/

young-oct commented 7 months ago

@jacobhq I loaded a stl file instead of creating one. It's loading correctly with localhost 'npx vite' but after building it with 'npx vite build' and 'npx vite preview'. The loaded stl file doesn't display. Do I need to update the path? I used the relative path in loading already. Any advice is appreciated.