Three.js + Vite + TypeScript starter
npx degit pachoclo/vite-threejs-ts-template threejs-project
![screenshot](https://private-user-images.githubusercontent.com/3608140/238800609-4b377045-8be5-4021-8cb8-84346a23f680.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2NDEyNTksIm5iZiI6MTcyMzY0MDk1OSwicGF0aCI6Ii8zNjA4MTQwLzIzODgwMDYwOS00YjM3NzA0NS04YmU1LTQwMjEtOGNiOC04NDM0NmEyM2Y2ODAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTRUMTMwOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTExMzk1YzE0MjBjYzJmMGM3MTgwZWEyZjI4OTk3ZDhiYjYyNzMxOTA3MDFmODBiMTI4ZjlkZDllZTBjOTY3ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.EuEAh1R8jESMUHpKKE0LbJ8lnzhJAsQ_zYAPbxA5pGE)
- Geometry
- Material
- Mesh
- Ambient Light
- Point Light
- Camera
- Scene
- Canvas
- Renderer (WebGL)
- Loading Manager
- Orbit Controls
- Drag Controls
- Grid
- Antialias enabled
- Transparent canvas
- Responsive renderer and camera (to canvas size)
- Animation Loop
- Shadows
- Stats (FPS, ms)
- Full screen (double-click on canvas)
- Debug GUI
- Three.js
- TypeScript
- Vite
Installation
npm i
Run dev mode
npm run dev
Build
npm run build
Run build
npm run preview