A stunning 3D Tetris game built with Three.js and WebGL, featuring customizable visuals, multiple game modes, and smooth performance.
- True 3D Gameplay: Rotate the camera freely to inspect the 3D grid.
- Three Texture Modes:
- Classic ๐จ: Clean, solid colors.
- Blocky ๐งฑ: Textured, realistic blocks.
- Jelly ๐ฎ: Translucent, glass-like visuals with advanced reflections.
- Three Color Modes:
- Classic: Traditional block colors.
- Gradient ๐: Beautiful level-based gradients (NES style).
- Random ๐ฒ: A continuous rainbow spectrum that changes with every piece.
- Full Undo System: Make a mistake? Press
Ctrl+Zor the Undo button to rewind. - Touch Controls: Optimized for desktop and tablets (iPad mode).
| Action | Key / Mouse |
|---|---|
| Move | W, A, S, D or Arrows |
| Rotate Cube | Q, E, R (X/Y/Z axis) |
| Hard Drop | Space |
| Soft Drop | Shift |
| Camera Orbit | Mouse Drag (Left Click) |
| Reset Camera | C or Right Click |
| Freeze / Think | F or Pause Button |
| Undo Move | Ctrl + Z or Undo Button |
Since this project uses ES modules, you need a local web server (you cannot just open index.html directly).
- Install dependencies (optional, for local dev):
npm install -g serve
- Start the server:
npx serve . - Open
http://localhost:3000
This project is static-site ready!
- Push this repository to GitHub.
- Go to Settings > Pages.
- Select the
mainbranch as source. - Your game is now live!