content/hifi-content/Experiences/Releases/usefulUtilities/appLoader/2019-02-14_10-45-00
2022-02-13 23:16:46 +01:00
..
appLoader.js More files 2022-02-13 23:16:46 +01:00
README.md More files 2022-02-13 23:16:46 +01:00

App Loader

When this script is attached to an entity as an entity script, the entity serves as an "app loader".

Features

  • App Loader will load scripts defined as hardcoded URLs in the JavaScript, AND will load scripts defined in the userData property of the attached entity.
  • When the user leaves the domain (or otherwise unloads the script attached to the entity), App Loader will stop client scripts that it loaded. App Loader will NOT stop client scripts that it did not load (i.e. those that were previously running).

Setup

  1. Add an entity to your domain.
    • A Box primitive would work perfectly.
    • Note that anyone who can modify the userData of this entity will be able to control which scripts other users load!
    • A good place for this entity is right under the floor near your domain's spawn point. You want to ensure that all visitors to your domain load this entity.
  2. Add the below userData object to the attached entity's userData
    1. Fill in the apps array in the userData by adding URLs to scripts that you want users to load.
  3. Add the appLoader.js script to the entity

Here's the object to add to the zone entity's userData:

{
    "appURLs": []
}

Releases

2019-02-14_10-45-00 :: 3fee98493cf228259b231b88384f5aafd47309b0

  • Initial release