{"id":18779132,"url":"https://github.com/zakaton/collaborative-quest-pro","last_synced_at":"2025-10-18T22:29:23.730Z","repository":{"id":128208483,"uuid":"563878399","full_name":"zakaton/collaborative-quest-pro","owner":"zakaton","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-27T18:58:56.000Z","size":543,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-24T15:54:25.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zakaton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-11-09T14:27:38.000Z","updated_at":"2022-12-07T03:35:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"36a59b84-ee5e-44b6-b917-329dd4c84b7a","html_url":"https://github.com/zakaton/collaborative-quest-pro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zakaton/collaborative-quest-pro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakaton%2Fcollaborative-quest-pro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakaton%2Fcollaborative-quest-pro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakaton%2Fcollaborative-quest-pro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakaton%2Fcollaborative-quest-pro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zakaton","download_url":"https://codeload.github.com/zakaton/collaborative-quest-pro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakaton%2Fcollaborative-quest-pro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265016995,"owners_count":23698411,"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":[],"created_at":"2024-11-07T20:18:52.954Z","updated_at":"2025-10-18T22:29:18.692Z","avatar_url":"https://github.com/zakaton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning WebVR with Croquet and A-Frame\n\n## Try it Out!\n\nClick on \"Show\" and pick \"In a new Window\" or \"Next to the Code\". Either way a new session will be created for you to play around.\n\nIf you open it in a new window you'll see \"?q=YOUR_UNIQUE_NAME\" is automatically added to the end of the url (e.g. https://croquet-hello-webvr.glitch.me/?q=abc123).\nYou can invite others to your session by sharing the url.\nYou can also set the name to whatever you want, e.g. \"?q=croquetisawesome.\n\nOn desktop you can move around using the WASD keys and mouse.\nOn mobile you can look around by rotating the device, and move around by using the joystick that appears on the bottom right _(courtesy of [aframe-joystick](https://github.com/mrturck/aframe-joystick))_.\n\nYou can open up the [A-FRAME Inspector](https://aframe.io/docs/1.2.0/introduction/visual-inspector-and-dev-tools.html) on desktop by pressing `\u003cctrl\u003e + \u003calt\u003e + i`.\nThere you can add/modify/remove entities, as well as move around the scene.\n_Note: you cannot move/rotate entities that have physics enabled. You must disable physics first._\n\nIn the browser console you can also add/modify/remove entities by manually creating entities, e.g.\n\n```javascript\n// grab the AFRAME scene\nconst scene = AFRAME.scenes[0];\n\n// create an A-FRAME box\nconst myBox = document.createElement(\"a-box\");\n\n// set attributes (color, position, rotation, scale, etc)\nmyBox.setAttribute(\"color\", \"green\");\nmyBox.setAttribute(\"position\", \"3 1 0\");\n\n// add the \"croquet\" attribute so it'll be added to the session\nmyBox.setAttribute(\"croquet\", \"\");\n\n// you can even add a \"name: myName\" to the attribute value if you want to give it a unique name (an entity cannot exist in the model with the same name).\n// Otherwise a random name will be generated\nmyBox.setAttribute(\"croquet\", \"name: myBox\");\n\n// add our box to the scene\nscene.appendChild(myEntity);\n```\n\nYou can also open the browser console and check out the logged events to see what's going on under the hood.\n\n## How it Works\n\n**Loading Libraries**\n\n_index.html_ loads the [A-FRAME SDK](), the [Croquet SDK](), [CANNON.js SDK](), and [a-frame joystick]()\n\n**Constants**\n\n_/script/constants.js_ contains a bunch of constants that Croquet uses for the session (physics engine config, flags to determine which events should be logged to the console, etc).\nCroquet provides a global ([Croquet Constants Docs](https://croquet.studio/sdk/docs/global.html#Constants)).\n\n**Joystick**\n\n_/script/joystick.js_ checks if the page was loaded from a mobile device, and if so it'll add a virtual joystick that allows the user to move around.\n(On mobile you're limited to just looking around using the device's orientation).\n_Courtesy of [aframe-joystick](https://github.com/mrturck/aframe-joystick)_.\n\n**System/Component**\n\n_/script/system.js_ \n\n_/script/component.js_\n\n**Session Start**\n\n_/script.index.js_\n\n**Waiting to Join**\n\n_/script.View.js_\n\n**Create User Entities**\n\n_/script.View.js_\n\n_/script.Model.js_\n\n_/script.UserModel.js_\n\n_/script.UserView.js_\n\n**Create Entities**\n\n_/script.View.js_\n\n_/script.Model.js_\n\n_/script.EntityModel.js_\n\n_/script.EntityView.js_\n\n**Modify Entities**\n\n_/script.EntityView.js_\n\n_/script.EntityModel.js_\n\n## Forking and Remixing\n\n**Glitch**\n\nClick on \"croquet-hello-webvr\" at the top right and select Remix Project to create a new Glitch Project that copies this project.\nYou can modify this remix however you wish.\n\n**GitHub**\n\nYou can also click \"Tools\" on the bottom left, select \"import and export\", and select \"Export to GitHub\".\n\n**WARNING! Make sure to change the `appId` key in /script/system.js on line 17!\nThis is to make sure users using your application don't accidentally join users on this version if they use the same name!**\n\n## Toggling Event Logging\n\nIn /script/constants.js you can can modify Q.LOGGING to change which events are logged in the console.\nThis will determine whether those models/views will use `this.log` defined in each module\n\n## Documentation\n\n[Croquet Docs](https://croquet.studio/sdk/docs/index.html)\n\n[A-FRAME Docs](https://aframe.io/docs/)\n\n[cannon.js Docs](https://github.com/schteppe/cannon.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakaton%2Fcollaborative-quest-pro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakaton%2Fcollaborative-quest-pro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakaton%2Fcollaborative-quest-pro/lists"}