Skip to content

User JSON GyroscopeTextIndicator

roosit edited this page Nov 15, 2026 · 1 revision

Gyroscope Text JSON

Back to list | Indicator page | Русский

Purpose

This page describes the JSON template of the gyroscopeText indicator for manual editing of .vttp.

Full Template

{
  "name": "com.velitask.plagin.official.gyroscopeText",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "Gyroscope": {},
      "font": {"name":"Dialog","style":0,"size":48,"color":{"r":255,"g":255,"b":255,"a":255}},
      "textAlign": {"value":4},
      "textTemplate": {"template":"{total} {unit}","vars":{"total":"%.1f","x":"%.1f","y":"%.1f","z":"%.1f","unit":"%s"}}
    }
  }
}

Settings

Gyroscope

Selects the sensor the values are taken from.

{
  "Gyroscope": {}
}
Field Values What it does
sourceId {"value": number} Identifier of the source in the project. Absent in the template.
sensorId {"value": number} Identifier of the sensor in the source. Absent in the template.

In a template, leave an empty object {}: the source and the sensor will be selected when the indicator is added to the project.

font

Changes the font, style, size and color of the text.

{
  "font": {"name":"Dialog","style":0,"size":48,"color":{"r":255,"g":255,"b":255,"a":255}}
}
Field Values What it does
name string, the font name; Dialog by default Font family.
style 0, 1, 2 Style: 0 plain, 1 bold, 2 italic.
size integer 1..999; 48 by default Font size; it is recalculated proportionally when the layer is scaled.
color object r, g, b, a Text color, see below.

color

Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Transparency: 0 fully transparent, 255 opaque.

textAlign

Selects the position of the text inside the layer.

{
  "textAlign": {"value":4}
}
Field Values What it does
value integer 0..8; 4 by default Number of the text position.
value Text position
0 top left
1 top center
2 top right
3 vertically centered, left
4 centered (default)
5 vertically centered, right
6 bottom left
7 bottom center
8 bottom right

A value outside the range 0..8 is treated as 3 (vertically centered, left).

textTemplate

Sets the text with the angular velocity: the vector magnitude, the values around the X, Y, Z axes and the unit label.

{
  "textTemplate": {"template":"{total} {unit}","vars":{"total":"%.1f","x":"%.1f","y":"%.1f","z":"%.1f","unit":"%s"}}
}
Field Values What it does
template string The resulting text with variables in curly braces.
vars object Variable formats: the key is the variable name without braces, the value is the format.

Template variables

Variable Default format What it shows
{total} %.1f Overall angular velocity, the vector magnitude over the three axes, in degrees per second.
{x} %.1f Rotation speed around the camera X axis, in degrees per second; the sign shows the direction.
{y} %.1f Rotation speed around the camera Y axis, in degrees per second; the sign shows the direction.
{z} %.1f Rotation speed around the camera Z axis, in degrees per second; the sign shows the direction.
{unit} %s Unit label ("°/s"); it is set by the interface language and cannot be configured separately.

For numeric variables the format is applied to a floating-point number: %.1f, %.0f, %.2f and the like are allowed. The format %d does not suit them: the variable will be replaced with an empty string. For {unit} use %s.

The "Compact" skin replaces template with {total}; the vars fields stay the same.

Clone this wiki locally