A Hubs add-on that implements a simple portal system using the Hubs Add-On API. If the room has spawn permissions, any user will be able to spawn portals. The last 2 spawned portals will be linked together. You can travel between two linked portals. Every time a portal is crossed it will print a message with the number of times that it has been crossed.
As of now add-ons are not yet part of the main Hubs branch, so you'll need to use the Hubs client add-ons branch and install this add-on on it.
Screen.Recording.2024-02-12.at.16.16.54.mov
- Install the node-module:
> npm i https://github.com/Hubs-Foundation/hubs-portals-addon.git
- Add the add-on to your Hubs client add-ons configuration file.
addons.json
{
"addons": [
...
"hubs-portals-addon",
...
]
}
- Create room in your Hubs instance.
- Enable the add-on in the room configuration.
-
To spawn a new portal you can:
- Use the
portal
chat command. optionally you can pass a Hex color argument to set the portal color upon spawn. - Use the
n
key.
- Use the
-
To change the portal color to a random color:
- Use the
control + n
key combination while pointing to a portal.
- Use the
-
Press
x
while pointing to a portal to delete that portal and it's linked portal.