1.0.0 • Published 7 months ago

@onirix/extras-module v1.0.0

Weekly downloads
-
License
Propietary
Repository
-
Last release
7 months ago

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"
    }
);
1.0.0

7 months ago