Places app: Portal Spawner and Copy URL #1296
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds 2 new functionalities to the Places app. - Place details panel:
Copy URL:
We can now, from the Place details panel, click on a button "Copy URL" to copy the place url into the clipboard.
This will allow the user to paste the hifiurl anywhere else, including to the chat app. for sharing the link.
When the "Copy URL" button is click, a notification is trigger to confirm the copy.
Portal Spawner:
We can now, from the Place details panel, click on a button "Portal" to spawn in-world a 3D portal leading to that place.
The portal is rendered to everyone in a range of 100m from the requester.
The portal get automatically deleted after 45 sec.
The portal is render in the same scale as the avatar's user to be functional for himself.
(yes, users will not see a same size portal but it will be at the same position)
The portal is built with local Entities (since avatar entity are not allowed everywhere). When the Portal is requested to be spawn, this send by message to everyone and each user will render its own local version from their own Places app.
There is a limit of N (currently 15) portals that can be spawn. This is to limit the risk to see this used negatively by overwhelming people with tonnes of portal ruining the performance.
Each places has a persistent portal color, the color is computed based on the placeID.