Development

Development Server

This guide explains how to run and work with the Viber3D development server.

Starting the Development Server

To start the development server with hot reload:

npm run dev

This will:

  • Start a local development server (by default at http://localhost:5173)
  • Enable hot module replacement (HMR)
  • Provide real-time error feedback

Accessing Your Game

Once the server is running:

  • Open your browser to http://localhost:5173
  • You should see your 3D scene
  • Any code changes automatically refresh (HMR)

Development Features

  • Hot Module Replacement (HMR)
    Changes to React components update in real-time.
  • Error Overlay
    Compilation and runtime errors are shown in the browser.
  • Dev Tools
    Source maps, React Developer Tools, performance profiling.

Troubleshooting

If you encounter issues:

  1. Check terminal for error messages
  2. Verify port availability
  3. Ensure all dependencies are installed
  4. Clear browser cache if needed