/threejs-webrtc

Template for multiplayer three.js scenes with integrated WebRTC capabilities.

Primary LanguageJavaScriptMIT LicenseMIT

This three.js template allows multiplayer three.js scenes with integrated audio/video capabilities. It uses a node server running socket.io to provide multiplayer functionality as well as WebRTC signaling.

image of multiplayer 3D scene

Quickstart:

  1. Download the repository to your computer:
    $ git clone https://github.com/AidanNelson/threejs-webrtc.git
  2. Navigate into the local folder and install Node dependencies:
    $ cd ~/Desktop/threejs-webrtc
    $ npm install
  3. Start the server:
    $ npm start
  4. Navigate to http://localhost:1989 on your browser.

Technology:

This space is built using a number of technologies, including:

  • three.js provides rendering / 3D environment interaction
  • socket.io provides the three.js multiplayer functionality, and acts as a WebRTC signaling server
  • WebRTC provides video / audio chat functionality

Credits:

This template uses code from a number of sources, including: