Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Added project permissions and GitHub push integration #6380

Merged
merged 20 commits into from
Jul 1, 2022

Conversation

barankyle
Copy link
Member

@barankyle barankyle commented Jun 9, 2022

Summary

project-permission is a structure that gives a user 'owner' or 'user' access to a project.
Regular project-users will not be able to grant or remove project-permissions to/from other
users, and might not be able to delete the project.

People with access to a project will be able to edit its files, but will be prevented from
editing files in projects they do not have access to.

References

#5613

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

@barankyle barankyle linked an issue Jun 9, 2022 that may be closed by this pull request
@barankyle barankyle force-pushed the project-permissions branch 4 times, most recently from e31c532 to f343619 Compare June 17, 2022 00:36
@barankyle barankyle force-pushed the project-permissions branch 2 times, most recently from 2c4ceff to 0bed7ad Compare June 25, 2022 19:19
@barankyle barankyle changed the title Created base structure of project permissions. Added project permissions and GitHub push integration Jun 25, 2022
@barankyle barankyle marked this pull request as ready for review June 25, 2022 19:20
@barankyle
Copy link
Member Author

barankyle commented Jun 25, 2022

Instructions for testing:

A DB reinit will be needed to add some new tables and columns.

Make sure that the local GH app credentials are installed. I will send the environment variables and .pem via DM. To install the .pem, go to /admin/settings, select Server, then copy/paste the entirety of the .pem contents into the field "Github Private Key". Make sure to save.

On /editor, opening the project menu via the gear will have more options. You can view the permissions from 'Project Permissions'; if you are an owner of a project, you can add other users via invite code, change their permissions from 'user' to 'owner' (and vice-versa), and delete project permissions. Any project that you have access to, you should be able to link it to a GH repo if it does not have a repositoryPath, or change/delete the link if it does. You can also trigger a download from GH. If you have a project-permission for a project, or if you are logged in with GH credentials and have write access to the repo that the project is linked to, you should be able to commit + push it to the GH repo.

On /admin/projects, all of the above functionality should be basically identical, just accessed via new columns in the table that open drawers.

In the editor itself, you should only have access to project files that you are authorized for.

@barankyle barankyle force-pushed the project-permissions branch 3 times, most recently from 472376f to 18650eb Compare June 28, 2022 23:58
@hanzlamateen
Copy link
Member

Also the push button is disabled on my end. How can I enable it?

@barankyle barankyle force-pushed the project-permissions branch 2 times, most recently from 6079839 to c310a05 Compare June 29, 2022 17:49
@barankyle
Copy link
Member Author

I made a few updates to address your issues.

Admins can now make permissions on a project even if they are not an owner - you should see a field to grant permission to a user by inviteCode. You can grant it to yourself, though you'll need an inviteCode (i.e. be a non-guest, or not the initial guest user who's made an admin). You might have to manually add an inviteCode to the initial guest/admin.

The push button only becomes active if a) there's a value for repositoryPath and b) the user has a project-permission for the project, or has a GitHub identity-provider and has write access to the repo for that project. Since you can now make project-permissions, you should be able to see it light up now.

If you want to test pushing to something other than the actual repo where a project is located (which I'd recommend so we don't litter our main repos with unnecessary commits), you'll need to install this app into the org/your personal account where you're testing it: https://github.com/apps/theoverlay-local

barankyle and others added 6 commits June 29, 2022 10:59
Project permissions can now be made to authorize a non-admin access to a project.
Project owners and users can access a project and its files in the editor. Owners
can give users new permissions, edit the owner/user status of existing users, and
remove users' permissions. Users can just access the project.

Users' GitHub OAuth token is now saved when they log in. When projects are being
fetched, it checks which repos that the GH app has been installed in they have
write access to. Those that match are considered permitted at the user level.

Users with permissions on a project can push that project to GitHub. This will
attempt to use their personal GH token to make the new commit and push, but if
they do not have GH credentials, then it will push it via the app's credentials.

Users with project-permissions can update the repositoryPath of the project. This
must be to a repo that the user has access to.
Renamed props on new Dialogs to match recent pattern change.
…le drawer, misc changes for add project drawer
…a project.

Fixed population of hasWriteAccess to project.

If no permissions on a project when one is being added, that person is automatically an owner.
@hanzlamateen
Copy link
Member

hanzlamateen commented Jun 30, 2022

I made a few updates to address your issues.

Admins can now make permissions on a project even if they are not an owner - you should see a field to grant permission to a user by inviteCode. You can grant it to yourself, though you'll need an inviteCode (i.e. be a non-guest, or not the initial guest user who's made an admin). You might have to manually add an inviteCode to the initial guest/admin.

The push button only becomes active if a) there's a value for repositoryPath and b) the user has a project-permission for the project, or has a GitHub identity-provider and has write access to the repo for that project. Since you can now make project-permissions, you should be able to see it light up now.

If you want to test pushing to something other than the actual repo where a project is located (which I'd recommend so we don't litter our main repos with unnecessary commits), you'll need to install this app into the org/your personal account where you're testing it: https://github.com/apps/theoverlay-local

I installed the app on my personal repo and then forked project (https://github.com/hanzlamateen/XREngine-development-test-suite). Added this project from admin panel.

Made some changes in Readme and xrengine config of that project and tried to use push button from admin panel. No commit is pushed to repo and the page is automatically refreshed when I confirm from dialog.

@hanzlamateen
Copy link
Member

It seems like service exposes property project_permission whereas client is using project_permissions there is an additional 's' being used in client. Is it desired?

@hanzlamateen
Copy link
Member

hanzlamateen commented Jun 30, 2022

simplescreenrecorder-2022-06-30_08.35.00.mp4

Inconsistency in user permission. Please watch and listen above video

@hanzlamateen
Copy link
Member

image

Nothing happens when I click on project permissions item in the menu

@barankyle
Copy link
Member Author

barankyle commented Jun 30, 2022

It seems like service exposes property project_permission whereas client is using project_permissions there is an additional 's' being used in client. Is it desired?

sequelize automatically pluralizes related fields when they're populated like this, so each project will have a field "project_permissions" on it when it's sent to the client. Nothing we can do about this until we transition away from sequelize (or manually rename populated fields, but that's more trouble than it's worth).

Permissions modal in admin page had some issues with state of active project pointing to another
project after update. Now tracking projectId separately and using that to ensure correct project
is active.

Fixed bugs with non-installed project showing clickables that they should not.

Deleted files were not being deleted in GH tree. They now are.

Fixed bugs with project-permissions not cascade-deleting on project deletion.
@barankyle
Copy link
Member Author

barankyle commented Jul 1, 2022

Made some changes in Readme and xrengine config of that project and tried to use push button from admin panel. No commit is pushed to repo and the page is automatically refreshed when I confirm from dialog.

The refresh comes from vite in dev mode watching the projects, among other things, and restarting when it detects changes there. The same thing will happen when you add a project locally.

As for that commit not being pushed, I think it's one of two things: Either you didn't set the .pem file in admin/settings -> Server -> GitHub Private Key, or this project has files that are too large. GitHub has a soft cap of 50MB on files, and while it seems to accept files between 50-100MB when pushed via the cli, the API is throwing an error when our backend tries to create a blob of a file that large. Try again without any files > 50MB and it should work.

@barankyle
Copy link
Member Author

Nothing happens when I click on project permissions item in the menu

This was a mistake, those options are no longer shown on non-installed projects.

export interface ProjectInterface {
id: string
name: string
thumbnail: string
repositoryPath: string
description?: string
settings?: string
hasWriteAccess?: boolean
project_permissions?: ProjectPermissionInterface[]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are following camel case notation across the code. project_permissions should be projectPermissions?

@@ -0,0 +1,111 @@
import React, { useEffect, useState } from 'react'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, then LinkGithubRepoDialog & EditGithubRepoDialog can be unified like I have done in the admin panel by having a single component GithubRepoDrawer

@hanzlamateen hanzlamateen merged commit 4468c13 into dev Jul 1, 2022
@hanzlamateen hanzlamateen deleted the project-permissions branch July 1, 2022 03:20
barankyle added a commit that referenced this pull request Aug 10, 2022
* Refactor MediaStreams to separate client and server (#6507)

* separate media streams into client and server concerns, move consumers and producers to network, webcam to client

* add key to party participant jsx element map

* Network client user refactor (#6508)

* separate media streams into client and server concerns, move consumers and producers to network, webcam to client

* add key to party participant jsx element map

* split world clients to world users and network clients

* cleanup

* rename things

* tests

* fix offline and portals

* fix instance server init bug

* Spectator View (#6491)

* Adds spectate params

* Added basic follow camera to target entity
Fixes an issue in spectateUser action dispatch

* Adds first person camera to the spectator mode

* Adds camera entity network sync

* Adds invalid active camera reference check

* Fixed a number of potential security holes in API services. (#6506)

Removed rtc-ports service since it didn't appear to be used anywhere, not even in any projects.

* Fog prefab (#6343)

* Fog node added and added Material callback for onBeforeCompile function chaining

* Implemented Onbefore Compile Plugin

* Updated the scene with fog node

* Fog node will be removed from the scene and created as a separeted node

Co-authored-by: dinomut1 <94419856+dinomut1@users.noreply.github.com>

* tooltips over entire input (#6515)

* CameraSystem refactor (#6472)

* CameraSystem refactor

* Finish decoupling camera system

* Update moveAvatar.ts

* Fix character movement

* Update SceneService.ts

* cleanup

* Fix test

* Fix camera rotation when exiting immersive mode

* Update constants

* Fix tests

* Fix w/ spectator mode

* Fix more tests

* Fix localClientEntity

* Cleanup spectate mode

* Fix walking rotation

* Changes for avatar drawer (#6516)

* Added avatar drawer

* Removed unused code

* Renamed load methods

* Fixed write permission key for avatar drawer

* Video textures (#6503)

* added exclusion from CSM processing for shader materials, raw shader materials, and basic materials

* *expanded material argument system
*added generic material argument presets

* removed bad material, fixed editor ui

* fixed hookstate error with loading default instancing values in engine"

* new materials, added csm ignore usedata property

* fix envmaps being assigned to matcaps and breaking them

* added video handling to AssetLoader. Added video texture assignment to material override system

* envmap wip

* removed video texture option for envmaps

* add video formats to asset import accepted extensions

* material library fixes

* fixed asset system test failure

* same-frame user input event listener for videos

* added touch event listener to videos

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* combine spectate and join world, clean up various connection things (#6521)

* Added project permissions and GitHub push integration (#6380)

* Added project permissions and GitHub push integration.

Project permissions can now be made to authorize a non-admin access to a project.
Project owners and users can access a project and its files in the editor. Owners
can give users new permissions, edit the owner/user status of existing users, and
remove users' permissions. Users can just access the project.

Users' GitHub OAuth token is now saved when they log in. When projects are being
fetched, it checks which repos that the GH app has been installed in they have
write access to. Those that match are considered permitted at the user level.

Users with permissions on a project can push that project to GitHub. This will
attempt to use their personal GH token to make the new commit and push, but if
they do not have GH credentials, then it will push it via the app's credentials.

Users with project-permissions can update the repositoryPath of the project. This
must be to a repo that the user has access to.

* fix project page crash

* Moved Project feathers listener into useApiListeners, added calls to it.

Renamed props on new Dialogs to match recent pattern change.

* Renamed modal to drawer, unified set and update github link into single drawer, misc changes for add project drawer

* Changed column name for repo link

* Allow admins to create project permissions even if there are none on a project.

Fixed population of hasWriteAccess to project.

If no permissions on a project when one is being added, that person is automatically an owner.

* Misc fixes

* Fixed icon color

* Repositioned cancel button to make ui consistent

* Updated styles to match admin changes

* Fixed bugs.

Permissions modal in admin page had some issues with state of active project pointing to another
project after update. Now tracking projectId separately and using that to ensure correct project
is active.

Fixed bugs with non-installed project showing clickables that they should not.

Deleted files were not being deleted in GH tree. They now are.

Fixed bugs with project-permissions not cascade-deleting on project deletion.

* fixup

* Fixed format issue

* Fixed icon button color

* Fixed build errors

* Fixed build error

* Fixed more errors

Co-authored-by: HexaField <joshfield999@gmail.com>
Co-authored-by: Hanzla Mateen <hanzlamateen@live.com>

* Fixed crash issue on project settings page (#6523)

* Fixed crash issue on project settings page

* Fixed lint issues

* Update Project.tsx

* Update README.md

* Update README.md

* Update README.md

Fix dark/light mode logos

* Add Profile related XRUI components (#6475)

* refactor widget menu styling

* rename files and components related to widgets

* add back mic on off widget button

* fix checkbox in settings menu

* add basic UI for profile menu and its widget icon
add basic ui components for ready player menu
add basic ui component for select avatar menu
add basic ui component for upload avatar menu

* fix username input field styling in profile menu

* fix details area and input field to show userid and api key

* fix connect input field and ready player me styling

* fix styling of theme button in profile menu

* add system for select avatar widget

* add system for upload avatar and ready player widget

* fix styling for avatar select menu

* fix auth setting fetch

* show basic upload and ready player menu

* fix vs typescript glitch

* fix styling of upload avatar view

* add comments

* fix media streams import

* add functions to link profile related views

* Fix object fitting

Co-authored-by: HexaField <joshfield999@gmail.com>
Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Spectator View Update (#6510)

* Adds followed player disconnect handling

* Adds head decap to networked avatar

* Head decap refactor
Adds joinWorld data types

* joinWorld refactor

* Fixes a bug in new handleJoinWorld function

* Adds spectator avatar entity check

* Adds spectator exit button
Fixes head decap when target avatar re-joins

* Update index.tsx

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Combined Link and Edit GH editor dialogs into one dialog. (#6524)

Fixed some styling issues with that dialog.

* Updated Dockerfiles to control npm install production mode. (#6514)

Removed '--production=false' from most calls to npm install. Whether or not
devDependencies are installed now depends on npm's check of NODE_ENV, which
is now passed as an ARG to all Dockerfiles.

Moved around some dependencies.

Updated dev/prod templates to have NODE_ENV set to 'production' by default.

* Fixed coil-settings find/get handlers, pruned some client-settings fetches. (#6512)

Updates to coil-settings were preventing non-admins from getting them at all, but some information in
them is needed. Removed admin restriction on FIND & GET, made custom handlers that strip out clientId
and clientSecret for non-admins before returning.

Added custom client-setting GET handler that performs the same alterations to the result that the FIND
handler does.

Removed several extraneous calls to ClientSettingService.fetchClientSettings(). Only one is needed, and
the one in _app.tsx on udpateNeeded being true should cover every page.

* Remove obsolete serverMode mechanism. (#6527)

* Remove obsolete serverMode mechanism.

Co-authored-by: Kyle Baran <kbaran@bitscoop.com>

* Revert "Remove obsolete serverMode mechanism. (#6527)" (#6531)

This reverts commit 2af72fdc41af56102ef0eff6f964e727c27d9abe.

* widgets improvements

* fix instance server unnecessary shutdown

* Fix Loading UI (#6533)

* update vite config to typescript

* VR Tests (#6420)

* Adds some tests for WebXRFunctions

* Adds endXR tests

* Adds input copy tests for XRSystem

* Adds AvatarSystem tests

* Adds some AvatarSystem tests
AvatarControllerSystem refactor
Adds a AvatarControllerSystem test

* update

* update

* fix going in and out of vr

* improve vr input axis handling

Co-authored-by: Josh Field <joshfield999@gmail.com>

* Typescript upgrade and misc cleanup (#6526)

Update Typescript
Update Prettier
Cleanup Engine state & EngineRenderer state

* Network object owned tag component (#6513)

* Network object owned tag component

We only have ownership and ownership transfer implemented as a concept, not authority.

* Update CameraSystem.ts

* Fix alignment and spacing in world chart textarea (#6541)

* fix alignement of the world chat button

* fix spacing of textarea

* Improve server spin-up speeds (#6534)

* Improve server spin-up speeds

Update ts-node
Remove ts-node-dev
Switch to SWC transpiler

* Commit package-lock.json

* Use SWC in all ts-node commands

* Update readme.md

* Update package-lock.json

* replace head decap shader with scaling the head bone (#6542)

* This change fixes the theme button which is currently broken. (#6544)

* Move projects into separate workspace

* update package-lock

* revert adding package lock

* XRUI Controller Events (#6543)

* xrui improvements

* add click events from controller trigger

* cleanup logs

* Update mediasoup

* Fixed multiple login/logout/account deletion issues. (#6530)

A bug was noticed in production where identity-providers were lacking userIds. This appears to have been caused by
the relationship in that database being set to onDelete: setNull instead of onDelete: cascade. This has been fixed
in that DB schema, and onDelete: cascade has been added to identity-provider association to reinforce it.

Added some bug-handling to oauth provider code to deal with this should it arise again. If the existing identity-provider
is missing a userId, it makes a new user and associates it to the identity-provider before continuing.

Users were confused by being able to remove all of their oauth connections and thus their account. The client will no
longer let the user remove their last OAuth connection if it's their last identity-provider, and notifies the user of this.

Added a deletion flow to the user ProfileMenu.

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Fix mediasoup type errors

* discarded pixels outside of UV for Screenshare (#6538)

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* improve xr rotation (#6547)

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Fix widget menu clicking

* Added @swc/core as dependency to all server types. (#6549)

* Added @swc/core as dependency to all server types.

install-projects was failing with an error saying @swc/core or @swc/wasm needed to be installed.

* debug logging

* debug logging

* debug logging

* debug logging

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Remove swc option from dev-reinit-db

* Admin Panel Misc Fixes (#6520)

* Repositioned cancel button to make ui consistent

* Fix cancel button style in drawers.

* Code cleanup

* Fixed strings being used

* Fixed colors of avatar drawer buttons

* Fix disabled cancel button color

* Renamed submitButton with gradientButton

* Replaced cancelButton with outlinedButton

* Removed create user role functionality

* Removed unused component

* Updated InputText style

* Updated disabled style for InputSelect

* Fixed disabled style of input text, select and autocomplete.

* Fixed style selector

* Updated confirm dialog and its consumptions

* Fixed background issue on autocomplete of input text

* Renamed AddProject to project drawer

* Refractored project files drawer

* Removed unused strings in admin.json

* Removed unused code from admin.module.scss

* Fixed undefined being show for a moment before confirm dialog closes

* Update 1_minikube.md (#6548)

* Removes some sequelize debugging that accidentally got merged into dev. (#6552)

* Improvements in theme system (#6545)

* Added support for multiple themes dark, light, vaporwave, etc

* Added default themes selection for admin, studio, client

* Updated heading style

* Changes for user settings themeModes

* Added change theme functionality in user menu

* Added check to ensure json formatting of themeModes

* Fixed json parse issue in user patch

* Updated default dark theme

* Fixed issue with modal closing on theme dropdown selection.

* Fixed text color of some editor buttons.

Co-authored-by: Kyle Baran <kbaran@bitscoop.com>

* Network Topic Type Abstraction (#6551)

* network topics working for world

* refactor topic onto network

* avatar spawn on scene load

* update peers separate from actions

* mostly working

* further simplify connection logic, editor and spectate work

* portals work

* tsc errors

* hyperflux fix

* cleanup logs

* fix types for location instance connection service

* Update README.md

* Update LICENSE

* Changes for default colors still suck in most places (#6556)

* Updated data-theme definitions

* Updated docker background color in dark mode

Co-authored-by: dinomut1 <94419856+dinomut1@users.noreply.github.com>

* Fix incoming action history (#6562)

* Color issues (#6563)

* Updated data-theme definitions

* Updated docker background color in dark mode

* Updated dark theme dock color

Co-authored-by: dinomut1 <94419856+dinomut1@users.noreply.github.com>

* Fix avatar despawn (#6564)

* fix avatar despawn

* connect to world only if scene is loaded

* visible query

* VR Tests (#6539)

* Adds more tests

* fix quat rounding error

* fix bitecs store error

Co-authored-by: Josh Field <joshfield999@gmail.com>

* Fixed a couple of bugs. (#6569)

group-user pre-patch hook had been mistakenly changed to disallow(). A couple of backend
services use it, and future front-end services will certainly need it available. It has
been changed to do groupUserPermissionAuthenticate on external requests.

Added some better handling of createWebRtcTransport(). A bug was reported that seems to have
been caused by that function returning null due to no routers being available to create on.
It now throws an error if there are no routers.

handleWebRtcTransportCreate has been updated to have a try/catch to prevent crashes. It also
has a check for no transport being returned from createWebRtcTransport.

* Added pagination to file browser backend service and client (#6568)

* Added pagination to file browser backend service and client

* Fixed failing tests

* Fix sending actions (#6570)

* Fix caching and peer updates (#6571)

* Fix caching

* Fix network peer updates and user indexes

* Update StoreFunctions.ts

* Fix tests

* Update SocketWebRTCClientFunctions.ts

* Feathers hooks idempotent, typescript cleanup (#6567)

* refactor bot hook

* static resources and invite type

* start location services

* user interface streamline

* tsc fixes

* fix association hook

* fix association hook

* fix user remove

* Clean up

Co-authored-by: Hanzla Mateen <hanzlamateen@live.com>

* Fixed some bugs in admin project page related to selected project state. (#6574)

Admin project table was referencing project state in isolated handler functions.
If a function is declared, it can't reference a useState() state directly, since the value
gets set when the function is declared and won't change when the state changes. Changed
to add a Ref to the state that the functions can use, as <ref>.current does change.

Restored a useEffect to update selected project state if its store value changes.

* Redesign location share UI (#6509)

* implemented updated location share design

* fixes dependency issue

* fixed feedback and improved interactable component ui

* little fixes

* added price ui

* added fixes feedback

* put view in AR button to work

* fixed bug

* added view product in AR

* removed model-viewer from index.html

* Update NetworkFunctions.ts

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Fix spawning edge cases (#6572)

* Cleanup nearby users actions

* Cleanup spawning

* Fix caching

* Normalize some user state data

* Fix tests

* Update WorldNetworkActionReceptor.test.ts

* Update

* Update ActionFunctions.ts

* Fix tests

* Fix tests

* Update _app.tsx

* Update WebGLRendererSystem.ts

* Update WorldNetworkServerActionSystem.ts

* Update index.tsx

* Fixed bugs in deployed CORS and party user state update. (#6578)

Most avatar <img>'s did not have the crossOrigin tag, and were intermittently requesting
files from S3/Cloudfront without the Origin header, leading to no CORS headers being sent
back, with resultant CORS errors from the client. Added crossOrigin to all <img> elements
for avatars.

Update of party user state was incompatible with lodash and was throwing harmless but annoying
errors. Updated the affected handlers to not use lodash and instead call updates on state directly.

* fix merge error

* Fix missing bone error

* update roadmap

* Always use simple materials on mobile

* Refactor auth-related duplicate code. (#6576)

* Move AuthStrategies declaration to its own file.

* Extract initial auth state to common file.

* Add warning about duplicate lines.

* Convert loadUserData to await/async. (#6587)

* move all ecommerce interactables to project (#6580)

* move all ecommerce interactables to project

* fix

* update share menu

* update video handling

* revert video functions

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Fixes duplicate roles assignment (#6579)

* Fix for duplicate roles assignment.

* Fixed issue with scope assignment on update

* Added null check

* Updated check

* Updated check

* XRUI Generic Components (#6550)

* xr input generic component

* remove extra scss and fix forward ref issue

* text button and upload button for XRUI components

* icon button for XRUI and use generic components in menus

* fix hover styling of icon button xrui generic component

* remove unnecassary styling

* cleanup styling

* use material icon instead of direct svgs

* toggle button xrui generic component

* xrui generic checkbox button component

* add slider and select dropdown generic XRUI component

* add missing stuff from latest profile view

* fix merge error

Co-authored-by: HexaField <joshfield999@gmail.com>

* Lazily create XRUI widgets (#6590)

* Fix AuthService loadUserData bug

* Fix updateNearbyAvatars

* Fix spectator checkbox

* Fixed bug in scope update. (#6593)

User patches were always deleting all scopes, when that should be done only if being patched
with scopes.

Changed group scope data name to 'scopes' from 'scopeTypes' and corrected same bug as above.

* Fix media server connections

* Adds hands rotation offsets (#6582)

* Screen Share update (#6522)

* update screenshare ui

* fix resizeable

* fix issues

* fix non-screenshare panel issue

* prototype full screen

* hide when mouse stop

* fix some issues

* clean up

Co-authored-by: Josh Field <joshfield999@gmail.com>

* Moved docs to separate repo (#6589)

* Fix socket listener setup (#6597)

Socket listeners were potentially being setup multiple times while authorization operations were still processing.

Also, reduced the logging noise from long frame executions as these were being too noisy to be useful.

* Update AvatarControllerSystem.ts (#6596)

* Replaced fflate with its npm package (#6598)

* Replaced fflate with its npm package

* Removed submodule

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* VR Polish (#6599)

* Aligns initial camera direction with avatar
Fixes avatar teleporting when entering VR

* Update CameraSystem.ts

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Invite system upgrades (#6575)

* Expanded invite system, added location authorized users.

Consolidated admin invite page to a single table. Having separate tables for sent and received
does not make sense for admins - they just see all invites.

Added admin invite service for retrieving all invites and patching them. Admin invite page now
allows for creating new-user, location, and instance invites, which are all new inviteTypes.
new-user just makes a user if they don't exist and can optionally make them an admin immediately.
Location and instance invites have a dropdown to select the location/instance. They can optionally
allow for the user being spawned at another user's location (via that user's invite code) or at a
selected spawn point. Admin invite page also allows for patching a single invite, and for bulk
deleting invites. Invites can now be set to not be deleted on use.

Fixed some backend bugs with teleporting in the process of adding spawning invites. Also added
function to find spawn point by ID and teleport to that.

Doing a FIND on invites without specifying sent or received has new logic that is only available
to admins.

Added location-authorized-user service for private locations. If a user is not authorized to
be at a location, the client will not render it nor attempt to connect to any instanceservers.
Currently, the only way to become an authorized user is to get an invite to that location
(or an instance of it).

* Made location share modal work with invite changes.

Without spectate on, location share modal will generate link with user's inviteCode.
With spectate on, it will generate a link without an inviteCode but with spectate=userId.

Invite is now an 'instance' invite. Added spawnType: 'spectate', spawnDetails for it are
{ spectate: <userId> }. Updated invite flow to handle spectate invites.

Fixed issue with new way of handling invite finds. It was incorrectly restricted to admins,
but it's needed for checking if an invite already exists. Added a new query param 'existenceCheck'
that will leave the userId on the query if true, so that admins can get all invites in the admin page
but regular users can still check if an invite exists.

Co-authored-by: Kyle Baran <kbaran@hyperconstruct.io>

* Fixed issue with client creating engine twice. (#6601)

* Made PartyParticipantWindows flow vertically on mobile. (#6603)

Co-authored-by: Kyle Baran <kbaran@hyperconstruct.io>

* Feathers project upgrades (#6604)

* expose rest to feathers and change project settings db type

* fix webapp injection

* fix modules being loaded multiple times in editor

* update threejs

* Fixed issues with email invite subject. (#6602)

Didn't have entries for new invite types. Added them, and changed subject to
be config.client.title plus the now-pared-down type verbiage.

Co-authored-by: Kyle Baran <kbaran@hyperconstruct.io>

* fix server connection sometimes not going through

* fix screenshare not always working

* Update README.md

* Commented out setting req to req.feathers.req because of circular reference. (#6613)

* Reorganize UI layout into 4 widgets (#6588)

* reduce widget buttons

* fix select xrui component and profile menu spacing and placement of mic and exit vr button

* add respawn button and remove exit vr session button since a controller have a button to implement that functionality already

* remove extra code

* add admin controls, location, socials and media session menu basic UI

* improve profile ui and outlined text generic xrui button styling

* allow generic xrui text button to accept children rather than content prop, add icons with the buttons in the menu

* update button label

* add service to change visiblity of widget to avoid duplication and add constant for widget names for ease of use

* add media session click and open menus at appropriate location

* remove extra imports

* prevent useless dispatch calls

* add audio disable

* disable widgets for deployment on non vr devices

* widget menu orients on hand properly

* add spectator checkbox and QR code in XRUI component of share menu

Co-authored-by: Josh Field <joshfield999@gmail.com>

* Fixed auto-scrolling of instance chat. (#6605)

* Fixed auto-scrolling of instance chat.

* Fixed chat being briefly visible at top before resetting to bottom on open.

Co-authored-by: Josh Field <joshfield999@gmail.com>

* added others audio setting sliders (#6517)

* added others audio setting sliders

* added XRUI version of the audio setting

* improve ui

Co-authored-by: HexaField <joshfield999@gmail.com>

* Added timing to invites. (#6606)

Invites can now be set to start and/or end at specific times. If a user tries to accept them before
the start time or after the end time, it will not go through and they'll be informed of that fact.

Consolidated some duplicated code in accept-invite.class.ts and invite create/update modals.

* Interactables XRUI Refactor (#6610)

* implemented mvp gltf optimizer

* added meshoptimizer engine dependency

* *fix model transform failing on quantized meshes
*fix model transform failing on ktx2 textures
*AssetLoader adds transformed model to cache

* update

* improvements to gltf inspector

* fix material override ui crash

* made model transform properties collapsible block

* adding parameters to model transform operation

* checkpoint

* implementing quantization and draco comrpession

* model optimization

* change

* begin implementing mount points and interactable refactor

* refactor & cleanup interactables, fix media controls

* checkpoint

* small fixes

* remove interactables functions test

* remove interactables group editor

* fix mount point editor node

* remove interactables group editor

Co-authored-by: dinomut1 <heximhotep@gmail.com>

* Refactor XRUI code (#6618)

* add label spacing in XRUI generic components, use XRSLider component in settings menu

* remove extra styling from settings menu XRUI component

* remove extra styling from profile menu related xrui components

* fix buttons in update bot model and create bot server error

* fix translation in bot commands component

* fix field labels interferring with drawer open in bots admin page

* fix table height when search bar or buttons are available above them in admin panel pages

* fix styling in theme playground

* update comment

* Removed author tags from header contact (#6620)

* Fetching avatars before scene is loaded to avoid timing issues. (#6621)

Avatars are currently only being fetched in a few modals, but they are needed to render
the scene. Added avatar fetch to LoadEngineWithScene to try to ensure they are available.

* Fix JSON viewer for state in Debug view

* Reverted author tags for off the self code (#6626)

* Reverted author tags for off the self code

* Removed docs

* Updated createActionQueue to run existing actions on startup. (#6623)

Initialization of ActionQueues now gets all actions dispatched before the queue was
set up, so that they will be properly processed by their respective services.

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* fixed ui issues in dark mode (#6628)

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Gltf optimization (#6625)

* implemented mvp gltf optimizer

* added meshoptimizer engine dependency

* *fix model transform failing on quantized meshes
*fix model transform failing on ktx2 textures
*AssetLoader adds transformed model to cache

* update

* improvements to gltf inspector

* fix material override ui crash

* made model transform properties collapsible block

* adding parameters to model transform operation

* checkpoint

* implementing quantization and draco comrpession

* model optimization

* change

* checkpoint

* fixed undo

* update fbx loader, gltf loader modules

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Fix GLTFLoader in node

* Update min movement distance to reduce wall sliding

* Fixed incorrect magiclink login link. (#6630)

* XR Controller Mapping Update (#6631)

* Updates XR controller setup to work with Three.js v142

* Adds a null reference check

* fix screenshare target aspect ratio calc

* Mute Volumetric Field (#6634)

* add mute field to volumetric component

* Disable tab-select

Disable tab-select because it interferes with user input for the avatar controller (space-bar to toggle button vs space-bar to jump)

* switch ModelTransformLoader base loader from NodeIO to WebIO

* fix missing import in transform loader

* revert volumetric mute field

* Added typedoc for server-core (#6627)

* Added docs for storage provider interface

* Added comments for storage interfaces

* Added more comments for storage provider

* Added doc comments for ipfs storage provider.

* Repositioned private members

* Added docs for s3 storage provider

* Added doc comments in local storage provider

* Fixed breaking changes

* remove giving scopes to guests by default

* remove unncessary todo

* fix ground plane being slightly offset

* Improve Debug View

Make ECS data update live in Debug View

* Fix media icons "on" styling

* Prevent default tab/space/enter behaviors

These events have default behaviors in a web page that conflict with avatar controls.

* Remove extra parameters from dispatchAction

The default parameter in dispatchAction breaks type safety.
The topic parameter is unnecessary since topics can be defined in the $topic field.

* Convert Input Enums into strings

Strings are more debuggable and human-readable than arbitrary integers.

* Updated nginx ingress template to install NLB. (#6608)

Updated dev/prod templates to not force SSL on ingresses, since NLB setup needs that
to be false.

* Added files and services necessary to enable PWA with TWA. (#6615)

Switched icons and favicons to Ethereal Engine ones from TheOverlay icons.

* Add client logging API endpoint. (#6633)

* Add client logging API endpoint.

* Add support for clarifying error context message.

* Fixed some issues with admin page access and scope restrictions. (#6642)

Access to projects and settings pages was not being controlled by scopes.
Standardized allowedRoutes in both adminRoutes and DashboardMenuItem.

Actual use of scopes to determine ability to access an admin service page
was not being used - admins without scopes could access /admin/users, for example.

Added settings scope-types, made them checked when hitting all settings methods
that aren't publicly available.

verify-scope hook now does not let admins through automatically, they must also
have the appropriate scope.

On an admin patching their own user, triggers a re-fetch of their user object
so that updated scopes can be applied to page render immediately.

* Party menu (#6600)

* parties

* Refactored API

* Added Kick, and create Functionality

* Fixed get party user issue

* Refactored Party User APIs

* Party API refactor

* Small fixes

* Invite , channel and bug fixes

* party admin service update

* Bug Fix

* few tweaks

* Party invites to email/sms will redirect user to the location/instance that the party owner is at,
add their invite code to the redirect so that users spawn at the party user.

Fixed bug in party user remove with appending user to returned value.

When joining an instance, the client will get a user's party channel if they're in a party.
It will then provision and connect to the instance server handling that party's channel.

When leaving a party, either because the party was deleted, or the party-user was deleted,
the user will leave the party instanceserver and (re)connect with the instance channel's instanceserver.

When leaving the instanceserver that a party channel is hosted on, the user will be removed from the party.

* Fixed a number of bugs with leaving instances.

Renamed PartyParticipantWindow(s) to UserMediaWindow(s).

Fixed channel user media windows appearing when connected to a party instanceserver.

Moved PartyService actions to be handled by new PartySystem.

Fixed camera light staying on when video turned off, which required stopping video tracks
and creating a new MediaStream from the user's video device, then replacing the producer's
media track.

(Gheric) Fixed a bug in ActionFunctions.ts that will apply actions already dispatched before
a queue is created.

* Bugfixes

* Started implementing in-screen invite toast.

* Invite accept/decline toast works, kicking user from party removes them from media server.

* Parties are mostly working, just need to work out some network timing
with leaving parties for either the instance chat or for another party.

Rewrote party services that were mostly using sequelize models directly,
as in most cases we want feathers events to trigger by using feathers
services instead.

* format

* tsc errors

* tsc errors

* Fixed issues with timing and occurrence of provisioning instances from changing parties.

* Restored party and party-user permission hooks, this time much cleaner and
separated so they don't require tons of logic

Made tests for parties and party-users, need to fix some things the last couple
are catching.

* Finished party tests

* Linted, removed extraneous logging, fixed typings.

* Fixed party-user removal when leaving party media server.

* Type fixes

Co-authored-by: NPatel10 <nayanpatel.np@yahoo.com>
Co-authored-by: Kyle Baran <kbaran@bitscoop.com>

* fix tsc errors

* Convert additional console logs to logger events. (#6641)

* Add client logging API endpoint.

* Add support for clarifying error context message.

* Convert additional console logs to logger events.

* Physx to rapier (#6382)

* Add rapier and write test to load a rapier world.

* Add rigidbody to world.

* make new physics implementation functional

* Add helper function & test for creating collider.

* rename addBody function to createRigidBody so that naming conventin matches with rapier.

* Add helpers and tests for removing rigidbody & changing type of rigidbody.

* Add dynamic rigid body & its collider to physics world & ECS.

* Merge createCollider into createRigidBody function.

* Add Components for each type of rigid body type. And add those components to related entities.

* Change component type on rigid body type change.

* Add RigidBodyComponent to mark an entity as physics object.

* simplify components

* improve tag component types

* Add helper function for ray casting.

* Tests for ray casting.

* Helper function for creating collision groups and masks according to Rapier format.
And tests for the helper function.

* Add helper function for drainnig collision event queue.
Add tests for collision events.

* Hyperflux actions and CollisionComponent logic for rapier collision events.

* Remove Physics Actions.

* Add test for trigger event.

* Add RapierPhysicsSystem.
Add helper functions for Rapier physics.
Update physics debug object generator to use rapier physics.
Update Ground to support both rapier and physx.

After all of this, physics debug simulation is working correctly using rapier phsyics.

* Add support for rapier in DebugRenderer.ts

* Create rigidbody by parsing object3d userdata.
Use this for ground plane creation.

* Ground plane working with physics data parsing.

* Fix bug in debug renderer.

* Scene collider component working with rapier physics.

* Add tests for createColliderDesc function.

* Test for createRigidBodyForObject.

* Use cuboid for ground to fix objects falling through the ground issue.

* Avatar controller now uses rapier physics.

* Process collisions.
Handle avatar resize.

* Fix avatar collider being created at wrong offset on changing avatar model.

* Avatar collider now covers the model accurately.

* Add separate sensor collider for avatar feet.

* Fix bug in remove rigidBody function.

* Avatar controller finally in a good working state.

* Remove extra code.

* Keep track of avatar colliders in avatar controller component.

* Fix bugs in avatar controller resizing.

* Remove RayCast stuff from avatar.
    Add ShapeCast to move avatar. And only apply move velocity to avatar rigid body when shape cast hit is null.

* Fix bugs in avatar movement after dev merge.

* added conversion of old gltf collider format

* Use ray casting for on ground check because collision data is not registered accurately for some dynamic object collisions.

* Enable gravity for avatar so that avatar lands perfectly without any gaps.

* Tune avatar movement params.

* update sky station, fix debug, improve metadata

* start working on box collider

* backwards compatibility for old gltf colliders

* fixed errors RE collider shape checks

* Remove old collider conversion logic.

* Fix box collider collision layer and mask. Box collider now working.

* Add fallback case when bodyType not specified. Equippables now showing up in scene.

* Start working on portals.

* Avatar movement should not be blocked when near a trigger collider.

* Portals now working.

* fix debug in editor

* fix box collider and avatar movement

* update test equippable and improve collider and rigidbody creation

* test physics object

* ground normal check, jump height, avatar capsule height

* fix trimesh loading

* Set restitution of test physics obj to 0.

* Remove physx code from  checkPositionIsValid.

* Complete implementation of RapierPhysicsSystem.

* Remove physx from DebugHelpersSystem.

* Remove physx from equippables. Equippales physics revamp pending.

* Completely remove Physx code.

* Remove ColliderComponent from ColliderFunctions.ts

* fix bounding box

* fix scene load bug, clean up debug

* refactor physics system

* rename physics module, add collider for remote avatars

* avatars load properly

* improve avatar body creation and clean up physics netcode

* improve query

* decouple avatars from physics module entirely

* update almost all tests

* fix tsc problems

* logs

* Set bodyType for trigger volume objects to Fixed since the default bodytype is now set to dynamic.
Trigger Volumes are back to working now.
Also fix scale of portal in sky station.

* Update moveAvatar tests. Updated velocity checks to greater than 0 instead of strictly 1 since avatar is now a dynamic body and exact velocity may not be known beforehand.

* fix and improve portals

* deprecate 'realitypack' scene loader prefix, fix metadata loaders

Co-authored-by: HexaField <joshfield999@gmail.com>
Co-authored-by: dinomut1 <heximhotep@gmail.com>
Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* fix populate-assetlinks.ts tsc error

* Fix spaces in text input

* Chairs (#6638)

* refactor interactable, transition state and mount point

* fix box collider and audio notification entity

* udpate scene

* Refactored the mount point component and editor

* Play mount animations

* Mount point work properly

* refactor sitting transitions

* animation

* cleanup

Co-authored-by: HexaField <joshfield999@gmail.com>

* portal bug fixes (#6651)

* make createXRUI synchronous (#6655)

* make createXRUI synchronous

* remove async check

* Fixed a bug where the builder would run deployment after a build failed. (#6646)

Wait command after running build_and_publish_package would "succeed" regardless
of the return code. Now each run of build_and_publish_package will touch a file
if it fails, and wait for all job PIDs. If the file has been touched, then it
will exit without deploying.

* PR to fix css issues (#6637)

* Updated icon colors from yellow to iconButtonColor property.

* Fixed support for multiline chat messages

* Name, thumbnail being unified in single bubble, Bubble spacings and paddings decreased

* Fixed spacing issue in chats

* Changed close chat icon and decreased its size

* Replaced joined left check based on isNotification

* Fixed duplicate joined messaged being shown

* Checked the check to look for avatar

* Fixed joined and left message dispatched to socket.

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Update README.md

* Conference UI and Participant Window Styling fixes (#6639)

* remove extra code

* open user control menu on hover for the participant window which is hovered only

* show grid conference button on hovering participant windows

* conference mode basic layout

* add styling and dev changes in conference mode component

* add tooltips on conference open close buttons

* fix mute controls position

* fix mute controls buttons tooltips hiding behind issue

* refactor code

* Hookstate update (#6665)

* Update hookstate

* Disable general Express request logging for the API server. (#6666)

* VR Hands Twist Correction (#6640)

* Aligns initial camera direction with avatar
Fixes avatar teleporting when entering VR

* Update CameraSystem.ts

* Adds twist correction to hands IK in VR

* Removed debug code

* Adds bug fixes

* Update

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Wallet login re-enable. (#6412)

* update input enums

* fix editor hierarchy not updating

* Misc css fixes (#6673)

* Fixed margin of chat input and messages (#6676)

* Fixed bugs in screen sharing. (#6674)

* Fixed bugs in screen sharing.

Consumer cycling of screenshare video was due to very low framerate.
This was caused by not setting dtx: true on screenshare producer encodings.

Fixed some issues in order of screenshareVideoPaused being set.

Fixed bug where UserMediaWindow screenshare pause being clicked was
pausing camVideo.

* fixup

* Fixed several bugs in party logic. (#6669)

Refactored MediaInstanceState.acceptingPartyInvite to joiningNonInstanceMediaChannel.
This serves a similar purpose of recording when a user is leaving one party to join
another, so that leaving the first party's media server won't provision the instance
channel's media server. acceptingPartyInvite was being set to false too early in some
situations - this doesn't get cleared until the media server has been connected to.

Updated UserMediaWindows to use userState.channelLayerUsers when connected to a party.
This was always using layerUsers before, which wouldn't render windows for party
members in other location instances. Added useEffect to fetch channelLayerUsers when
its updateNeeded is true. Fixed getLayerUsers so it will make proper request for
channel users when fetching channelLayerUsers.

Added a crown icon next to the party owner.

Updated party user patch handler to recalculate whether the receiving user is now
the party owner, and patch party state accordingly.

Updated partyUser.remove and party.remove to remove duplicated messages. Previously,
party.remove would emit a party-user remove for each party-user but would rely on
party/party-user foreign key association to delete party users. Now, party.remove
will call party-user.remove on each party-user unless told not to, and party-user.remove
will call party.remove unless told not to; each handler, if the first to be called,
will tell the other to not remove anything else to prevent recursion.

Added toast notifications for other party users leaving, and self/other users joining
a party.

Updated partyUser.remove to delete all invitations to that party.

* Fixed a bug with restarting user video. (#6677)

useEffect watching videoStream.track.id in UserMediaWindow is not firing when a new track
replaces a paused producer's ended video track. For now, made pauseProducer in instanceserver
be emitted to all clients so that self user's handler can act on that to pause videoStream,
which will make resuming it trigger needed updates.

* Scene Media Refactor (#6675)

* audio refactor

* reafactor media, audio, vid and vol loaders and updaters

* audio, video, uvol works

* fix problems with editor, add loading effect option to vol

* playlist functionality

* cleanup media component

* update sky station

* update sky station

* update sky station

* disable tests

* overhaul ui sound effects

* fix addMediaNode

* replace onMouseEnter with onPointerEnter

* Refactor transform system and system updates (#6679)

* Refactor transform system and system updates

* Fix tests

* Fix more tests

* Update ecs.test.ts

* More cleanup and fix documentation

* Only sort transform offsets when necessary

* Update PhysicsSystem.ts

* Fix missing topics

* Fetching instance via instance-provision before dispatching disconnected (#6678)

action. If the instance is still available, don't set network.reconnecting.

Fixed some bugs in reconnect logic.

Attempt to re-provision instance server on disconnect is actually useless since
the old API connection gets destroyed before the API call can finish. The listener
removal never happens, and causes multiple listeners to be present in some situations.

Added visibility listener to UserMediaWindow. On mobile, it will pause running audio and
video so that suspending the tab doesn't result in consumers getting nothing.

Added a check for replacing video tracks to make sure producer isn't closed.

Co-authored-by: Kyle Baran <kbaran@hyperconstruct.io>
Co-authored-by: Liam Broza <mrhegemon@users.noreply.github.com>

* fix offline location

* Fixed bugs in consumer resumption and pausing producers. (#6685)

Fetching producers when one was paused was still attempting to start
the consumer(s) on the receiving client end. Reworked logic for handling
reception of pauseProducer/resumeProducer and pauseConsumer/resumeConsumer
messages. producer pause/resume now sent to every client, and is used to
set producerPaused state in UserMediaWindow. pause/resume consumer messages
now just handle videoStreamPaused state. producerPaused state tracked on
client-side consumers. New consumers have producerPaused set from
consumerParameters used to create them.

Added state for tracking when a consumer has been paused client-side. This
will prevent a source producer that is paused and resumed from resuming it;
it will stay paused regardless of the producer's state unless that person
leaves and rejoins the instanceserver.

* Positional Audio (#6680)

* clean up user engage actions, fix ui menu

* almost finished implementing positional audio

* positional audio all working

* fix audio settings test

* disable avatar spatial audio in non xr

* clean up imports

* clean up imports

* update audio settings scene editor node

* remove unnecessary chrome bug workaround

* reenabled media control interactables

* add issue note to vol player

* fix audio settings state

* add mixbuses. fix mic and individual user sound levels

* Projects service injection fix (#6684)

* projects api serveice for world injection

* change when injection happens until after authenticated

* Misc Fixes for Css (#6682)

* Made menus smaller on mobile

* Fixed avatar menu height. Removed unused css.

* Reverted popup mobile size for new ui

* Reverted popup mobile size for new ui

* Fixed settings hamburger icon

* Fixed touchmove issue on mobile.

* Reverted removed css

* Reverted style file

* fix post processing

* Positional audio setting (#6686)

* positional audio setting

* xrui settings menu

* update naming i18n

* update default volume

* Fix createBoxComponent scale

* fix project bug

* remove unused files

* various editor fixes

* fix scene not properly unloading when changing scenes in the editor

* move media dom element into separate component

* fix vol sound

* fix tsc errors

* fix simpligfied materials exit query

* Fixed volume slider css (#6687)

* fix gltf metadata loader not populating some data, scale bug (#6692)

* Fixed a bug in UserMediaWindow with pausing producers. (#6693)

Pausing self producer was causing all consumers to be paused. pauseProducer listener
needed to check if consumers' producerId matched the ID of the producer being paused.

Added color to paused/active icons in UserMediaWindow. Gray-on-gray was hard to make out.

Attempted to fix a bug where client gets a bad instance provision. ID was getting updated
in URL when user's instanceId was patched, but Engine.instance.currentWorld._worldHostId
was staying on the invalid one. This led to infinite failed attempts to get the channel
since the world instanceId was incorrect. Made patchUser handler update currentWorld's
hostIds when this changes.

* Fixed bugs in instance connections. (#6709)

If a user disconnected right after connecting to a fresh instanceserver, the disconnect logic would
not work properly. Since app.instance had not been set, it would not call handleUserDisconnect.
Added a one-second timeout to wait for possible server startup to resolve with app.instance populated.

Updated check to call shutdownServer on peers.size <= 1. On near-simultaneous connection/disconnection,
the server peer may not have been created, leaving the number of peers 0. Prior check was if it was
exactly 1, which would not be true.

Fixed a bug in instance-provision where calling get(channelId) or get(locationId) wasn't being
try/caught, so if there was no channel, it was throwing an uncaught error.

* rename a var

* Misc fixes for mobile view (#6715)

* Fixed chat icon not appearing properly on mobile.

* Fixed labels appearing above header on scroll.

* Fixed settings cancel button indentation issue on mobile view.

* Changed lander default verbiage and logo (#6718)

* Fixed a bug with instance provisioning and unreachable instanceservers. (#6720)

* Fixed a bug with instance provisioning and unreachable instanceservers.

On a couple of occasions, instanceservers were not externally reachable -
they could be kubectl exec'd into and responded to internal requests, but
any request from outside was hanging. Updated instance-provision to make
a request to the server it's about to return. If there's an error, or it
does not receive any response within two seconds, it removes the instance
record, deletes the pod in a K8s environment, and then tries to get another
free instanceserver.

* Made unreachable timeout a configurable serverSetting

* Changes for Ready Player Me Avatar (#6716)

* - Moved 'Log in with ready player me' button to avatar upload screen, just under "<- Upload Avatar" at the top
- Added 'back' button to avatar select menu to go back to profile menu

* Fixed ready me avatar loading failed.

* - Show spinner on ready player me avatar uploading for thumbnail selection
- Show title in thumbnail selection dialog
- Fix ready player me avatar generated

* Fixed preview margins

* Fixed border being shown on loading time.

* Portal improvements (#6721)

* same location portal implementation, editor helper fix, general refactor

* refactor portal effects, type, loading screen and trigger system

* loading screen, simple material fixes etc

* fix collision test and xrui

* fix portal test

* xrui fix

* finalise, polish and update scenes

* add cubemap bakes

* Implement example issue and verify functions. (#6455)

* Implement example issue and verify functions.

* Undo disable social.

* Remove readyplayer conditional.

* Remove chai

* Fix casting

* Fix crypto-ld version.

* screenshare small refactor (#6690)

* add wallet login to non location modal

* add music option to audio component

* Replace Old Particle Emitter with three-nebula (#6719)

* replace old particle emitter with three-nebula

* implemented fromJSON. Added default emitter json

* add particle library. Expand particle system editor

* improved dust

* handle json parse for new particle system input

* debug switching between library and json mode

* initial tests

* moved nebula package to engine

* add options for different emitter shapes

* Converted userRole: admin to an admin scope. (#6727)

* Converted userRole: admin to an admin scope.

Admin status was defined by user.userRole being 'admin'. This has been changed so that
admin status is a scope 'admin:admin'.

Made a script to convert all existing `userRole: admin`s to `userRole: user` and add an
admin scope for them.

* Replaced userRole with isGuest.

Instead of userRole table related to user table, with potential for several roles,
now the only thing tracked on the user is whether they're a guest.

Changed convert-admin-to-scope.js to convert-user-roles.js, which will make guests
to isGuest: true and non-guests to isGuest: false.

* video source instancing (#6734)

* video source instancing

* revert aspect ratio option

* revert reverting aspect ratio option

* fix tests

* update scenes

* fix sitting causing error

* Prep AR Mode  (#6643)

* WIP

* Cleanup component helpers

* WIP

* WIP

* WIP

* Clean up XR settings

* WIP

* Update World.ts

* Update index.tsx

* Update PhysicsSystem.ts

* Update common.json

* WIP

* Fix camera layers

* Cleanup move avatar

* More fixes

* More avatar controller / physics fixes

* Update AnimationSystem.ts

* WIP

* WIP

* WIP

* WIP

* Update tests

* Update tests

* Remove removeAvatarControllerRigidBody

* Update AvatarControllerSystem.test.ts

* Fix more tests

* Fix more tests

* Update moveAvatar.test.ts

* Update moveAvatar.test.ts

* Update moveAvatar.test.ts

* Update Physics.test.ts

* Update BoxColliderFunctions.ts

* Update XRFunctions.test.ts

* Update XRSystem.test.ts

* Update XRSystem.test.ts

* More fixes

* update readers/writers

* Update DefaultLocationSystems.ts

* Re-enable CSM

* Fix moveAvatar isGround

* Fix offline mode

* Revert react-router-dom udpate

* Update XRUISystem.ts

Add missing getRemoved parameter

* add ambience to sky station, population UI sound everywhere

* add drone effect to sky station

* update sky station audio

* cleanup log

* Update mediaControlsUI.ts

Fix transform

* Update TransformSystem.ts

Fix computed transform when referenceEntity missing

* Reduce excessive logging

* Fix avatar rotation

* Style browser chrome to match theme

* Remove `git add` from lint-staged

* Cleanup CSS

* Set body background-color to --mainBackground

* Update EditorCameraSystem.ts

* Update index.module.scss

* Eliminate avatar spawning race condition

* Reduce num workers

* Uploaded files in editor will have lower case extension. (#6732)

* Uploaded files in editor will have lower case extension.

* Added file extension lower case check on server-core aswell

* media fixes (#6740)

* media fixes

* fix animations

* update sfx

* audio fixes

* log

* Video & screenshare fixes (#6741)

* Changes for camera video avatars

* Changes for screenshare

* Updated user media popup icons

* Fixed icon button on mobile view

* Fixed user avatar location changing on mobile view when voice and camera buttons are on.

Co-authored-by: Josh Field <joshfield999@gmail.com>

* Fixed editor tooltips issue (#6743)

Co-authored-by: Josh Field <joshfield999@gmail.com>

* Fixed issues with self video element and audio consumer pausing (#6738)

When a client is alone in a media channel, trying to pause and then resume cam video
was resulting in a blank video for themself. The useEffect listening for videoStream.track.id
changing is, for some reason, not triggering, despite re-render logging showing that the value
does change. If there's at least one other UserMediaWindow, though, it resumes normally.

This might be due to tracking an object that isn't fully in React state (though the producer
is set in a state object). Added new state to explicitly track video/audio track ID, and made
useEffects dependent on that, which seems to work better.

Added a state object to track when a video is ready for viewing to avoid flickering when
video is resumed. Before, the ended track was briefly seen before being replaced; now nothing
is shown until the new track has replaced it.

Fixed bug where a consumer pause could be overridden by the producer pausing and resuming.
This was due to the instanceserver emitting consumer pauses/resumes on producer pause/resume.
Deleted those since all connected clients get producer pauses/resumes and can make their own
decisions about whether to pause/resume consumers.

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Discard geometry and texture after gpu upload

* Revert "Discard geometry and texture after gpu upload"

This reverts commit cd422a3abc5def98f8d96a48ba4932c45bb368d6.

Unfortunately, this breaks bvh generation and camera follow obstacle avoidance; we need to ensure buffers are discards after they are no longer needed.

* Replace lodash upperFirst with existing capitalizeFirstLetter. (#6733)

* Replace lodash upperFirst with existing capitalizeFirstLetter.

* Move guessContentType test to tests suite.

* Add controls tutorial and windows help to Settings.

* Fix for patching a non-guest user making them a guest. (#6748)

Co-authored-by: Kyle Baran <kbaran@hyperconstruct.io>

* interactive frustum (#6749)

* Fixed select dropdown theme in Editor (#6750)

Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>

* Update createAvatar.ts

* Persist frustumCameraEntity for portals

* Fix min deltaSeconds

* fix: specify python version (#6744)

Co-authored-by: Josh Field <joshfield999@gmail.com>
Co-authored-by: Mohsen Heydari <mohsenheydari@live.com>
Co-authored-by: Nayan Patel <nayanpatel.np@yahoo.com>
Co-authored-by: dinomut1 <94419856+dinomut1@users.noreply.github.com>
Co-authored-by: Gheric Speiginer <gheric.speiginer@gmail.com>
Co-authored-by: Hanzla Mateen <hanzlamateen@live.com>
Co-authored-by: Zulqarnain Hanif <30355034+zulqarnainhanif@users.noreply.github.com>
Co-authored-by: Dmitri Zagidulin <dzagidulin@gmail.com>
Co-authored-by: Jimmy <easelify@gmail.com>
Co-authored-by: Liam Broza <mrhegemon@users.noreply.github.com>
Co-authored-by: IRANKUNDA Fabrice <58092199+FabriceIRANKUNDA@users.noreply.github.com>
Co-authored-by: Ron <rondoor124@gmail.com>
Co-authored-by: Kyle Baran <kbaran@hyperconstruct.io>
Co-authored-by: dinomut1 <heximhotep@gmail.com>
Co-authored-by: Hamza Mushtaq <hamzamushtaq34@hotmail.com>
Co-authored-by: Patrick Canfield <578371+patreeceeo@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Github sync, project specific write & read scopes
3 participants