Add-ons support
This PR adds support for Add-ons in Hubs. For some background, see here: https://github.com/mozilla/hubs/issues/6099
-
You can find the Hubs TS typings here (WIP): https://github.com/MozillaReality/hubs-ts-types
-
A template to simplify add-on development: https://github.com/MozillaReality/hubs-template-addon
There are also a couple demo add-on:
-
Duck add-on. This was previously part of the client code but in this branch has been converted to an add-on: https://github.com/MozillaReality/hubs-duck-addon
-
Portals add-on. A simple portals implementation as an add-on to illustrate a more complex Hubs add-on: https://github.com/MozillaReality/hubs-portals-addon
To add add-ons to a client:
- Install the add-on node module.
- Add your add-on module to the
addons.jsonfile.
{
"addons": [
"hubs-duck-addon",
"hubs-portals-addon"
]
}
- Create a hubs room
- Enable the add-on in the room settings
- The add-on would run in the Hubs client after the client reloads.
@keianhzo hello, may i know is addon ready to use in production please?
@keianhzo hello, may i know is addon ready to use in production please?
@dirkarnez It is my opinion that the add-ons branch/PR is not yet ready for production use. A list of the current issues can be found in this Discord comment: https://discord.com/channels/498741086295031808/535606666708910101/1255627984400941236
- Images, videos, objects cannot be scaled or rotated with the spacebar menu once they have been dragged into a scene
- Images, videos, objects do not scale to the size of the media frames when they are pulled into a media frame
- Some materials turn black (including avatar materials) in the VR headset. This also happens when you turn down the skybox setting lights, whether or not you are using a headset. (This is only happening in the add-on branch.)
- The "follow link" buttons have been scaled down and are very tiny. 🙂
- Images are breaking for scenes published from Spoke
@keianhzo hello, may i know is addon ready to use in production please?
@dirkarnez It is my opinion that the add-ons branch/PR is not yet ready for production use. A list of the current issues can be found in this Discord comment: https://discord.com/channels/498741086295031808/535606666708910101/1255627984400941236
- Images, videos, objects cannot be scaled or rotated with the spacebar menu once they have been dragged into a scene
- Images, videos, objects do not scale to the size of the media frames when they are pulled into a media frame
- Some materials turn black (including avatar materials) in the VR headset. This also happens when you turn down the skybox setting lights, whether or not you are using a headset. (This is only happening in the add-on branch.)
- The "follow link" buttons have been scaled down and are very tiny. 🙂
- Images are breaking for scenes published from Spoke
@Exairnous Thank you and i see, may i know how to play with addon as experimenting? Is this branch ("addon") dependent on other hubs' repos? Thanks!
@dirkarnez If you already have a Hubs Community Edition instance set up, you can rebuild the Hubs client with the addons branch and deploy it[1]. Otherwise, you'll need to work with Hubs-Compose[2]. For both, make sure to do an npm ci after switching to the addons branch to update the node modules and get the actual add-ons to play with. After running bin/init for Hubs Compose, you'll need to go into the hubs client folder it clones and switch the branch to the addons branch. There have been some issues reported about getting the add-ons to work, so if you run into trouble your best bet is probably to ask in the Hubs Discord server.
I hope this helps. Good luck!
[1] https://github.com/Hubs-Foundation/hubs-blender-files/blob/main/creator-labs-files/CL-archive/ghost-to-md-output/2023-10-16-community-edition-case-study-quick-start-on-gcp-w-aws-services.md#deploy-custom-apps [2] https://github.com/Hubs-Foundation/hubs-compose/
@Exairnous OMG, thank you so much for your very detailed information that helps a lot!
@dirkarnez You're welcome! :)
Note: since the scene grabbables PR was reverted in the master branch, this PR now additionally adds support for scene grabbables.