Skip to content
Mistium edited this page Aug 22, 2024 · 1 revision

The globals function returns an object of all functions, commands and methods.

{
  "commands": {},
  "functions": {},
  "methods": {}
}

Some example data for the Globals() function is

{
  "commands": {
    "hello": {
      "type": "command",
      "code": [
        "log \"hello\" ∆"
      ],
      "parameters": [
        ""
      ],
      "name": "hello"
    }
  },
  "functions": {
    "rand": {
      "type": "function",
      "code": [
        "return random() * this.input"
      ],
      "parameters": [
        "this.input"
      ],
      "name": "rand"
    }
  },
  "methods": {
    "inpt.addition": {
      "type": "method",
      "code": [
        "return inpt + this.val"
      ],
      "parameters": [
        "this.input"
      ],
      "input": "inpt",
      "name": "inpt.addition"
    }
  }
}

originOS Wiki

Wiki Views:
:views

OSL | RSH | ICN

Clone this wiki locally