mooball
    Preparing search index...

    Type Alias ILibrary

    type ILibrary = {
        prototype: Addon;
        new (name: string, metadata?: any): Addon;
    }
    • Creates a new Library instance.

      Parameters

      • name: string

        Name of the Library. Every Library should have a unique name, since they can be accessed directly by their names from inside a Room object.

      • Optionalmetadata: any

        Any information that we would want to show/update inside a GUI application about this Library. This is not used by the API by default, but we can reprogram the Library's prototype to make use of this value if we want.

      Returns Addon

      void.

      // If you are using require.js library or in node.js, 
      // API might also be defined via var API = require("mooball");
      function TestLibrary(API){
      const { Library } = API;
      Object.setPrototypeOf(this, Library.prototype);
      Library.call(this, "testLibrary", { // this is the call to the constructor.
      version: 0.1,
      author: "author",
      description: `This is a test library`
      });
      // Custom Library codes here...
      }
    Index

    Properties

    Properties

    prototype: Addon