Skip to content

mml-io/3d-web-experience

Repository files navigation

(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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages