A 3D physics-based game built with Three.js, TypeScript, and Rapier physics engine using Vite as the build tool.
- 3D physics simulation with @dimforge/rapier3d
- Game state management system
- Interactive cubes with collision detection
- Particle-based explosion effects
- Sound management
- Multiple game states (marquee, play)
- TypeScript for type safety
- Vite for fast development and bundling
- Responsive design with window resize handling
- Node.js (recommended version 16+)
- npm or yarn
- Clone or download this repository
- Install dependencies:
npm install
# or
yarnStart the development server:
npm run dev
# or
yarn devThis will start a local development server at http://localhost:5173 (or another port if 5173 is in use).
Build the project for production:
npm run build
# or
yarn buildThe built files will be in the dist directory.
src/main.ts- Entry point for the applicationsrc/Cube.ts- Implementation of interactive 3D cubes with physics and explosion effectssrc/physics.ts- Physics world setup and interactions using Rapiersrc/gameStateManager.ts- Game state management systemsrc/gameStates.ts- Base interface for different game statessrc/playState.ts- Main gameplay state implementationsrc/marqueeState.ts- Title screen/marquee statesrc/preMarquee.ts- Pre-marquee state for initializationsrc/soundManager.ts- Audio management systemsrc/types.ts- Type definitionssrc/config.ts- Game configuration
This project is licensed under the ISC License.