This project uses Vite for fast development and optimized production builds.
- Node.js (v14 or higher recommended)
- npm
npm installStart the development server with hot module replacement:
npm run devThis will start a local development server, typically at http://localhost:5173. The page will automatically reload when you make changes.
Create an optimized production build:
npm run buildThis compiles and bundles the application into the docs directory, which is used for GitHub Pages deployment.
Preview the production build locally:
npm run previewThis serves the built files from the docs directory to test the production build before deployment.
src/- Source codeindex.js- Main entry pointstyle.css- Global stylesobjects/- 3D objects (snake, plane)assets/- Static assets (fonts, icons)
docs/- Production build output (GitHub Pages)index.html- Entry HTML filevite.config.js- Vite configuration
- Vite - Build tool and dev server
- Three.js - 3D graphics library
- Cannon-es - Physics engine