Giter Site home page Giter Site logo

3d-web-experience's Introduction

(MML) 3D Web Experience

This repository contains packages used to run a web-based, multi-user 3D web experience that supports MML (Metaverse Markup Language).

It can be easily deployed to environments that support Node.js and can expose ports to the internet.

Packages

This repository includes the following published packages:

Main features

  • Multiple users can connect to the experience using just a web browser.
  • Users can interact simultaneously with the stateful MML documents.
  • Easy to deploy and extend with interactive MML content.

Auth Flow

  • When the client page is rendered by the server, the server uses a UserAuthenticator implementation to determine if a session should be generated for the incoming http request and if so includes that session token on the client page.
  • The client then sends the session token in the first message to the server when it connects via websocket.
  • The server can use the session token to authenticate the user and determine what identity (username, avatar etc) the user should have.
  • An example implementation of this is provided in the example server, but the interface is extensible enough that a more complex user authenticator can limit which avatar components should be permitted based on external systems.

Running Examples & Iterating Locally

Making sure you have Node.js installed, run the following from the root of the repository:

npm install
npm run iterate

Examples

  • example/multi-user-3d-web-experience
    • Once the server is running (see above), open http://localhost:8080.
    • A client and server pair of packages that uses the @mml-io/3d-web-experience-client and @mml-io/3d-web-experience-server packages to create a multi-user 3d web experience that includes MML hosting and text chat.
  • example/local-only-multi-user-3d-web-experience
    • Once the server is running (see above), open http://localhost:8081.
    • A client that uses the various packages to create a 3d web experience that only works locally. No server is needed, but there is a server to serve the client.
  • example/web-avatar-editor
    • Once the server is running (see above), open http://localhost:8082.
    • An avatar editor that uses the @mml-io/3d-web-standalone-avatar-editor to create and edit MML avatars and a simple Express server that hosts the editor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.