hubs icon indicating copy to clipboard operation
hubs copied to clipboard

Add-ons support

Open keianhzo opened this issue 1 year ago • 7 comments

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.json file.
{
  "addons": [
    "hubs-duck-addon", 
    "hubs-portals-addon"
  ]
}
  • Create a hubs room
  • Enable the add-on in the room settings

Screenshot 2024-02-12 at 17 22 03

  • The add-on would run in the Hubs client after the client reloads.

keianhzo avatar Feb 12 '24 15:02 keianhzo

@keianhzo hello, may i know is addon ready to use in production please?

dirkarnez avatar Jul 20 '24 20:07 dirkarnez

@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

  1. Images, videos, objects cannot be scaled or rotated with the spacebar menu once they have been dragged into a scene
  2. Images, videos, objects do not scale to the size of the media frames when they are pulled into a media frame
  3. 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.)
  4. The "follow link" buttons have been scaled down and are very tiny. 🙂
  5. Images are breaking for scenes published from Spoke

Exairnous avatar Jul 21 '24 05:07 Exairnous

@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

  1. Images, videos, objects cannot be scaled or rotated with the spacebar menu once they have been dragged into a scene
  2. Images, videos, objects do not scale to the size of the media frames when they are pulled into a media frame
  3. 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.)
  4. The "follow link" buttons have been scaled down and are very tiny. 🙂
  5. 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 avatar Jul 23 '24 13:07 dirkarnez

@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 avatar Jul 25 '24 09:07 Exairnous

@Exairnous OMG, thank you so much for your very detailed information that helps a lot!

dirkarnez avatar Jul 25 '24 12:07 dirkarnez

@dirkarnez You're welcome! :)

Exairnous avatar Jul 25 '24 19:07 Exairnous

Note: since the scene grabbables PR was reverted in the master branch, this PR now additionally adds support for scene grabbables.

Exairnous avatar Nov 18 '24 05:11 Exairnous