{"id":13521962,"url":"https://github.com/jbaicoianu/janusweb","last_synced_at":"2025-04-08T08:18:04.866Z","repository":{"id":44411546,"uuid":"50101698","full_name":"jbaicoianu/janusweb","owner":"jbaicoianu","description":"An in-browser implementation of JanusVR","archived":false,"fork":false,"pushed_at":"2025-03-16T17:04:59.000Z","size":61379,"stargazers_count":186,"open_issues_count":35,"forks_count":52,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-25T02:39:59.442Z","etag":null,"topics":["3d","daydream","game-engine","janusvr","metaverse","mit-license","oculus","oculus-quest","oculus-rift","virtual","virtual-reality","vive","vr"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbaicoianu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-21T10:59:38.000Z","updated_at":"2025-03-20T08:54:57.000Z","dependencies_parsed_at":"2024-06-21T04:17:09.515Z","dependency_job_id":"c7aa696b-575f-4264-bf9f-51d4aeb407eb","html_url":"https://github.com/jbaicoianu/janusweb","commit_stats":{"total_commits":1962,"total_committers":10,"mean_commits":196.2,"dds":"0.025484199796126372","last_synced_commit":"3e502731b03b9a9b59fa354afc6c97dc1fa64fb1"},"previous_names":[],"tags_count":152,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbaicoianu%2Fjanusweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbaicoianu%2Fjanusweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbaicoianu%2Fjanusweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbaicoianu%2Fjanusweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbaicoianu","download_url":"https://codeload.github.com/jbaicoianu/janusweb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604609,"owners_count":20804099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","daydream","game-engine","janusvr","metaverse","mit-license","oculus","oculus-quest","oculus-rift","virtual","virtual-reality","vive","vr"],"created_at":"2024-08-01T06:00:40.340Z","updated_at":"2025-04-01T07:43:02.278Z","avatar_url":"https://github.com/jbaicoianu.png","language":"JavaScript","funding_links":[],"categories":["Packages","Social VR","Development","社交虚拟现实（Social VR）","Frameworks to develop WebXR applications:"],"sub_categories":["Frameworks","Frameworks and Libraries","Open Source Frameworks"],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://web.janusvr.com\" target=\"_blank\"\u003e\u003cimg width=\"480\" alt=\"JanusWeb\" src=\"https://imgur.com/ejvyphR.jpg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003eA web framework for building social virtual reality experiences.\u003c/b\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://janusvr.com\"\u003eSite\u003c/a\u003e\n  \u0026mdash;\n  \u003ca href=\"https://vesta.janusvr.com\"\u003eVesta\u003c/a\u003e\n  \u0026mdash;\n  \u003ca href=\"https://github.com/janusvr/janusvr-examples\"\u003eExamples\u003c/a\u003e\n  \u0026mdash;\n  \u003ca href=\"https://web.janusvr.com\"\u003eDemo\u003c/a\u003e\n  \u0026mdash;\n  \u003ca href=\"https://github.com/madjin/janus-guide\"\u003eDocs\u003c/a\u003e\n\u003c/div\u003e\n\n\n## Examples\n\n\u003ca href=\"https://github.com/janusvr/janusvr-examples/tree/master/360/3\"\u003e\n  \u003cimg alt=\"Crystalball\" target=\"_blank\" src=\"https://i.imgur.com/mw0Um3C.gif\" height=\"190\" width=\"32%\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.augmentedperception.com/\"\u003e\n  \u003cimg alt=\"Augmented Perception\" target=\"_blank\" src=\"https://i.imgur.com/V6fqjVG.gif\" height=\"190\" width=\"32%\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://vesta.janusvr.com/bai/movie-theater-dynamic-lighting\"\u003e\n  \u003cimg alt=\"Cinema\" target=\"_blank\" src=\"https://i.imgur.com/i1nIXI8.gif\" height=\"190\" width=\"32%\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://imgur.com/FX3skXb.gif\"\u003e\n  \u003cimg alt=\"Drag n' Drop\" target=\"_blank\" src=\"https://i.imgur.com/FX3skXb.gif\" height=\"190\" width=\"32%\"\u003e\n\u003c/a\u003e\n\u003ca href=\"http://www.metacade.com\"\u003e\n  \u003cimg alt=\"Metacade\" target=\"_blank\" src=\"https://i.imgur.com/9CqBKV5.gif\" height=\"190\" width=\"32%\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://vesta.janusvr.com/bepis/mansion\"\u003e\n  \u003cimg alt=\"Mansion\" target=\"_blank\" src=\"https://imgur.com/pQAQ4yt.gif\" height=\"190\" width=\"32%\"\u003e\n\u003c/a\u003e\n\n\n## Features\n\n- Build immersive 3D environments for desktop, mobile, and VR devices using HTML and JS\n- Rendering functionality provided by Three.js / WebGL\n- Oculus Rift, Vive, GearVR, Daydream, and Cardboard support via WebVR API\n- Realtime collaboration across all devices via built-in networking\n- Import Collada, OBJ, glTF, and other popular 3d file formats\n- 3D positional audio\n- Gamepad support via the HTML5 Gamepad API\n- Supports hand tracking peripherals like Leap Motion, Oculus Touch, and Vive controllers\n- Support for 2d, sbs3d/ou3d, and 360 degree video textures using HTML5 Video\n- Scriptable client enables many customized uses\n\n## Using\n\nThere are several different ways to use JanusWeb, depending on how much control you want to \nhave over the whole system.\n\n### Use our viewer\nOur default viewer is always available at https://web.janusvr.com/.  You can write an HTML\npage with your [JanusVR Markup](https://janusvr.com/docs/build/introtojml/index.html) and host\nit anywhere you would normally host a static website.  Any regular webhost, AWS S3 static \nsites, CDNs, or even more exotic locations like [IPFS distributed filesystems](https://ipfs.io) will work.\nYou can even put your mark-up onto sites like PasteBin or PiratePad.  Then just load the URL\nin our viewer by entering the URL into the navigation bar, and you can link directly to it, share \non social media, or embed our viewer directly into other webpages, blog posts, or articles.\n\nSee also **Using a specific version of JanusWeb** below.\n\n### Pull our scripts into your page\nUsing the above method, all of your links would go through our servers.  If you'd prefer to \nlink to your own servers, you can pull our JS into your page and use JanusWeb as a scriptable\nclient via its API.  This looks something like this:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eMy JanusVR Room\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"https://web.janusvr.com/janusweb.js\"\u003e\u003c/script\u003e\n    \u003cjanus-viewer\u003e\n      \u003cFireBoxRoom\u003e\n        \u003cRoom use_local_asset=\"room1\"\u003e\n          \u003cObject id=\"cube\" pos=\"0 1 5\" /\u003e\n          \u003cText col=\"1 0 0\" pos=\"0 2 4\"\u003eMy First Room\u003c/Text\u003e\n        \u003c/Room\u003e\n      \u003c/FireBoxRoom\u003e\n    \u003c/janus-viewer\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe `elation.janusweb.init()` function can take a number of arguments, and returns a promise which\nreceives an instance of the client.  This client reference can be controlled via its API.  See the \nsections on **Arguments** and **Scripting** below.\n\nSee also **Using a specific version of JanusWeb** below.\n\n### Install from ZIPs\n(TODO - we will start shipping zip builds of JanusWeb once we release v1.0)\n\n### Install from NPM\n(TODO - we will start shipping official NPM packages of JanusWeb once we release v1.0)\n```bash\nnpm install janusweb\n```\n\n### Build from source\n\nIf you'd like to build JanusWeb from source, you can check it out from Github and build using the \nfollowing steps:\n\n```bash\n$ git clone https://github.com/jbaicoianu/janusweb\n$ cd janusweb\n$ npm install --only=prod\n$ npm run build\n```\n\nThis will give you a full build of the latest verson of JanusWeb in your `build/` directory.  You \ncan then modify `build/index.html` however you see fit, and host it as suggested above.\n\n## Arguments\nJanusWeb supports several arguments at initialization time to control how it behaves.\n\n\u003ctable\u003e\n  \u003ctr\u003e\u003cth\u003e Name           \u003c/th\u003e\u003cth\u003e Description                            \u003c/th\u003e\u003cth\u003e Default                  \u003c/th\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e autoload       \u003c/td\u003e\u003ctd\u003e Load URL by default or wait for script \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e crosshair      \u003c/td\u003e\u003ctd\u003e Show player crosshair                  \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e homepage       \u003c/td\u003e\u003ctd\u003e Default page to go to when user presses \n                                    home button                            \u003c/td\u003e\u003ctd\u003e https://web.janusvr.com/ \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e networking     \u003c/td\u003e\u003ctd\u003e Enable networking                      \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e picking        \u003c/td\u003e\u003ctd\u003e Enable mouse interactions              \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e resolution     \u003c/td\u003e\u003ctd\u003e If specified, restrict the renderer to \n                                    the specified size                     \u003c/td\u003e\u003ctd\u003e (none)                   \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e server         \u003c/td\u003e\u003ctd\u003e Presence server to connect to          \u003c/td\u003e\u003ctd\u003e wss://presence.janusvr.com:5567/\u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e shownavigation \u003c/td\u003e\u003ctd\u003e Control visibility of navigation bar   \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e showchat       \u003c/td\u003e\u003ctd\u003e Control visibility of chat             \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e stats          \u003c/td\u003e\u003ctd\u003e Enable render performance stats        \u003c/td\u003e\u003ctd\u003e false                    \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e url            \u003c/td\u003e\u003ctd\u003e Default page to load                   \u003c/td\u003e\u003ctd\u003e (homepage)               \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e urltemplate    \u003c/td\u003e\u003ctd\u003e Optional template for generating URLs  \u003c/td\u003e\u003ctd\u003e (none)                   \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e useWebVRPolyfill \u003c/td\u003e\u003ctd\u003e Enable WebVR polyfill for mobile \n                                      phone compatibility                  \u003c/td\u003e\u003ctd\u003e true                     \u003c/td\u003e\u003c/tr\u003e\n\n  \u003ctr\u003e\u003ctd\u003e usevoip        \u003c/td\u003e\u003ctd\u003e Enable or disable VOIP functionality\n                                    (NOTE - disabled pending browser support \n                                    for Opus via WebAudio)                 \u003c/td\u003e\u003ctd\u003e false                    \u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n## Scripting\nAfter initializing the client, `elation.janusweb.init()` returns a Promise which provides a reference to the client.\nYou can programatically control this client to do all sorts of things.  For instance, we can make the client load a\nURL, wait for the world and all of its assets to load, and then take a screenshot of the world after a specified delay:\n\n```javascript\nvar pageinfo = elation.utils.parseURL(document.location.href),\n    urlargs = pageinfo.args || {},\n    hashargs = pageinfo.hash || {};\n\nvar url = elation.utils.any(hashargs.url, urlargs.url, 'http://www.janusvr.com/index.html'),\n    delay = elation.utils.any(hashargs.delay, urlargs.delay, 1000);\n\nelation.janusweb.init({\n  url: url,\n  resolution: '1920x1080',\n  showchat: false,\n  shownavigation: false\n}).then(function(client) {\n  elation.events.add(client.janusweb.currentroom, 'room_load_complete', function() {\n    setTimeout(function() {\n      client.hideMenu();\n      client.screenshot().then(function(imagefile) {\n        // upload imagefile somewhere via XHR\n        console.log('Screenshot complete!');\n      });\n    }, delay);\n  });\n});\n\n```\n\nMany other aspects of the JanusWeb client can be controlled this way as well.  Our users are\nalways thinking up new and inventive ways of using the JanusWeb client.  Embed it in your blog\nposts, use it to render 3D content behind your 2d webpage, put a virtual security camera in your\nworld and view a live stream of the virtual world from any web browser.  Control the virtual world\nvia a web interface.  This is your scriptable live portal into the metaverse, to do with whatever\nyou please.  The possibilities are endless!\n\nYou can even run JanusWeb in NodeJS for headless server-side operations.  Use it to write a bot that\nwanders the metaverse, or run your game logic and physics on a server to have one authoritative \nsource of state for your world.  If this sounds interesting to you let us know, we will be more\nthan happy to help you through this (it's all very experimental right now!)\n\n## Using a specific version of JanusWeb\nIf you need to load a specific version of JanusWeb, all previous versions are stores on the same server, and can be accessed by construction a URL of the form ```https://web.janusvr.com/\u003cversion\u003e/```.  This is useful if you have a room which you know works with a specific version, which relies on features which have since been deprecated or changed, or to determine whether bugs have been introduced.  \n\nJanusWeb versions follow the [Semantic Versioning 2.0.0](http://semver.org/) spec, which follows the format ```\u003cmajor\u003e.\u003cminor\u003e.\u003cpatch\u003e``` - for example, at the time of writing (March 2017) the current stable release is **1.0.15**.  So if you want to view this version, you could go to https://web.janusvr.com/1.0.15/ and if you wanted to pull this specific version into your page, you could do so with ```\u003cscript src=\"https://web.janusvr.com/1.0.15/janusweb.js\"\u003e\u003c/script\u003e```.  We also support aliases for the most current version - for instance, https://web.janusvr.com/1.0/ will always refer to the most recent 1.0 release, https://web.janusvr.com/0.9/ the final 0.9 release, etc.\n\n## Contributing\nJanusWeb is open source, and we welcome any contributions!  Please do report bugs using GitHub Issues,\nand all pull requests will be considered.  We could especially use help with documentation!\n\n## Who is responsible for this?\nJanusWeb was created by James Baicoianu, and is now an official open source project of JanusVR, Inc.\nThe JanusWeb software and its API are published under the MIT license, and are free to use for whatever\nuses you can think of.  If you build something cool, let us know!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbaicoianu%2Fjanusweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbaicoianu%2Fjanusweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbaicoianu%2Fjanusweb/lists"}