App.json

App.json

From BeamNG

App.json

used to explain : alpha_prerace\html\apps\SimpleDigSpeedo\app.json


Arguments

Arguments

Info Section

Name Type Optional Default Value Description
name string NOk n/a The name of the app
author string NOk n/a The name of who created it and helpers
version string NOk n/a The version of the app
description string NOk n/a The description to explain what does your app

Author, version and description are display when the mouse is on our app

appearance

Name Type Optional Default Value Description
background string NOk n/a Type of background (opaque-simple,...)
resize boolean NOk n/a App is resizeable??
size string NOk n/a
initial string NOk n/a The initial size if the app

data

Name Type Optional Default Value Description
streams string NOk n/a Streams used by the app (electrics)

Example

{
    "info": {
        "name" : "Digital Speedometer",
        "author": "Metalmuncher",
        "version": "0.1",
        "description": "Displays current speed in km/h or MPH. Click the unit label to swap between metric and imperial."
    },

     "appearance": {
      "background" : "opaque-simple",
      "resize" : false,
      "size" : {
       "initial" : [100,66]
      }
     },

    "data": {
        "streams" : ["electrics"]
    }
}

Example with all valid properties

(Comments aren't allowed in json and only used to describe the attributes in this example)

{
    "info": {                                           // Object, needed
        "name" : "Name of the app",                     // String, needed
        "author": "Auther(s) of the app",               // String, needed
        "version": "Version of the app",                // String, needed
        "description": "description of the app"         // String, needed
    },

    "appearance": {                                     // Object, needed
        "resize" : true,                                // Boolean, optional, default: true
        "background" : "transparent",                   // String, needed, allowed values: "", "transparent", "opaque", "opaque-simple"
        "size" : {                                      // Object, needed
            "initial" : [300,300],                      // Array, optional, default:[300,"auto"] WARNING: "auto" is only allowed for the height
            "minimal" : [300,300],                      // Array, optional, default:[150,150] if 'minimal' is smaller than 'initial', it will set to 'initial' WARNING: [20,20] is the minimal size, smaller values will be ignored
            "maximal" : [300,300]                       // Array, optional, on default the maximal appsize isn't limited
        }
    },

    "data": {                                           // Object, needed
        "streams" : ["nameOfStream1", "nameOfStream2"]  // Array, needed, can be empthy
    }
}