ThreeJS — The easiest local development environment setup with Vite

npm init vite
√ Project name: … threejs-vite
√ Select a framework: » vanilla
√ Select a variant: » vanilla
cd ThreeJS-Vite
npm install
touch vite.config.js
mkdir public
export default {
assetsInclude: ["**/*.glb", "**/*.gltf", "**/*.wasm"],
publicDir: ["public"]
}
echo "export default { assetsInclude: ['**/*.glb', '**/*.gltf', '**/*.wasm'], publicDir: ['public'] }" > vite.config.js
npm run dev

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Robe Santoro

Robe Santoro

3 Followers

Motion Designer with over ten years of experience in 3d Animation, Projection-Mapping, AR-VR-XR, electronics, and the makers’ world. Wannabe Creative Coder…