Interactive 3D dice rolling application built with React, TypeScript, and CSS 3D transforms. Roll 3D virtual dice with animations and sound effects.
- Realistic 3D dice
- Random number generation using
crypto.getRandomValues() - Sound effects
- Keyboard support (Space to roll)
- Responsive design
- Accessibility features
- Node.js 18.0.0 or higher
- npm 7.0.0 or higher
- Clone the repository
git clone https://github.com/yourusername/3d-dice-roller.git
cd 3d-dice-roller- Install dependencies
npm install- Start the development server
npm run dev- Open your browser and navigate to
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run test- Run testsnpm run lint- Lint code
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Vitest for testing
- ESLint for linting
src/
├── components/
│ └── ErrorBoundary.tsx
├── hooks/
│ └── useSound.ts
├── __tests__/
│ └── App.test.tsx
├── App.tsx
├── main.tsx
└── index.css
- Custom-built 3D animation system using CSS transforms
- Physics-inspired dice rolling animations
- Realistic wall impact effects
- Dynamic shadows and lighting effects
- Cryptographically secure random number generation
- Ensures fair and unpredictable rolls
- Prevents duplicate consecutive rolls
- Roll sound effects with volume control
- Impact sound when dice hit the wall
- Graceful fallback if audio playback fails
- ARIA labels for all interactive elements
- Keyboard navigation support
- High contrast visual elements
- Screen reader friendly
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Ed Bates (TECHBLIP LLC)
- Sound effects from Mixkit
- Icons from Lucide React
- Inspiration from real-world dice physics
Some sections of this code were generated with the assistance of AI tools. These contributions were reviewed and integrated by the project creator(s).
Apache-2.0 License - see the LICENSE file for details
