Skip to content

Web "game engine" on top of three.js for personal website

Notifications You must be signed in to change notification settings

mutmedia/web-game

Repository files navigation

Engine and sample JavaScript networking game with THREE.js and Firebase

Setup

Make sure to have both firebase and webpack installed globally

# Install firebase tools and webpack globally if not yet already
npm install -g firebase-tools webpack

The engine runs with a configuration as the example given is js/engine-config-example

module.exports =
{
  INIT_SPECS: {
    SCREEN_WIDTH: 800,
    SCREEN_HEIGHT: 600,
    SHOW_STATS: true, // If you want to show the FPS on the top of the screen
    CONTAINER_ID: "WebGLContainer" // The id of the html element containing the game
  },
  FIREBASE: {
    apiKey: "<API_KEY>",
    authDomain: "<PROJECT_ID>.firebaseapp.com",
    databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
    storageBucket: "<BUCKET>.appspot.com",
  },
};

To run the app run:

# Install firebase tools and webpack globally if not yet already
npm run dev-server

About

Web "game engine" on top of three.js for personal website

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published