@onirix/extras-module
v1.0.0
Published
Onirix extras module.
Readme
Onirix Extras Module
This library includes several utility functions for Onirix experiences.
Usage
Initialization
import OnirixExtrasModule from "https://www.unpkg.com/@onirix/extras-module@latest/dist/ox-extras-module.esm.js"
const oxExtras = new OnirixExtrasModule();Load Onirix splash screen
Onirix splash screen can be loaded by calling the following async function:
await oxExtras.loadSplashScreen();
// Init code for your experience ...Internationalization
If you want to translate the strings, you can pass an object to the loadSplashScreen method, with the following keys and their associated translation:
- madeWith
- footer
- experienceLibrary
Example for Spanish:
await oxExtras.loadSplashScreen(
{
"madeWith": "Desarrollado con",
"footer": "Echa un vistazo a otros ejemplos accediendo a la ",
"experienceLibrary": "Librería de experiencias"
}
);