Text#

Text

Text. Created using POST /drawing/add-text.

Base class: Drawable

A Text object is returned as {"id": ..., "class": ...}, its identifier and the name of its own class. An argument is that object or the identifier alone. A path that acts on an object takes the identifier as (id).

GET /drawing/text/(id)/position#

Position of the text.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (tuple<double, double, double>)

PUT /drawing/text/(id)/position#

Position of the text.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (tuple<double, double, double>) – The new value.

GET /drawing/text/(id)/rotation#

Rotation of the text as a quaternion.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (tuple<double, double, double, double>)

PUT /drawing/text/(id)/rotation#

Rotation of the text as a quaternion.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (tuple<double, double, double, double>) – The new value.

GET /drawing/text/(id)/face-camera#

Whether the text turns to face the camera, in place of its GET /drawing/text/(id)/rotation.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (bool)

PUT /drawing/text/(id)/face-camera#

Whether the text turns to face the camera, in place of its GET /drawing/text/(id)/rotation.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (bool) – The new value.

GET /drawing/text/(id)/reference-frame#

Reference frame for the positions of the object.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (SpaceCenter.ReferenceFrame)

PUT /drawing/text/(id)/reference-frame#

Reference frame for the positions of the object.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (SpaceCenter.ReferenceFrame) – The new value.

GET /drawing/text/(id)/visible#

Whether the object is visible.

Inherited from Drawable.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (bool)

PUT /drawing/text/(id)/visible#

Whether the object is visible.

Inherited from Drawable.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (bool) – The new value.

POST /drawing/text/(id)/remove#

Remove the object.

Inherited from Drawable.

Parameters:
  • id – The identifier of the Text object.

GET /drawing/text/(id)/content#

The text string

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (string)

PUT /drawing/text/(id)/content#

The text string

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (string) – The new value.

GET /drawing/text/(id)/font#

Name of the font

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (string)

PUT /drawing/text/(id)/font#

Name of the font

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (string) – The new value.

POST /drawing/text/available-fonts#

A list of all available fonts.

Response JSON Object:
  • value (list<string>)

GET /drawing/text/(id)/size#

Font size.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (int32)

PUT /drawing/text/(id)/size#

Font size.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (int32) – The new value.

GET /drawing/text/(id)/character-size#

Character size.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (float)

PUT /drawing/text/(id)/character-size#

Character size.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (float) – The new value.

GET /drawing/text/(id)/style#

Font style.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (UI.FontStyle)

PUT /drawing/text/(id)/style#

Font style.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (UI.FontStyle) – The new value.

GET /drawing/text/(id)/color#

The color of the object.

Inherited from Drawable.

Note

For a path drawn with more than one color, this is the color at its start.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (StdLib.ColorRGB)

PUT /drawing/text/(id)/color#

The color of the object.

Inherited from Drawable.

Note

For a path drawn with more than one color, this is the color at its start.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (StdLib.ColorRGB) – The new value.

GET /drawing/text/(id)/material#

The material used to render the object. Creates the material from a shader with the given name. Throws an exception if the object is a marker, which the game draws with its own material.

Inherited from Drawable.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (string)

PUT /drawing/text/(id)/material#

The material used to render the object. Creates the material from a shader with the given name. Throws an exception if the object is a marker, which the game draws with its own material.

Inherited from Drawable.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (string) – The new value.

GET /drawing/text/(id)/alignment#

Alignment.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (UI.TextAlignment)

PUT /drawing/text/(id)/alignment#

Alignment.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (UI.TextAlignment) – The new value.

GET /drawing/text/(id)/line-spacing#

Line spacing.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (float)

PUT /drawing/text/(id)/line-spacing#

Line spacing.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (float) – The new value.

GET /drawing/text/(id)/anchor#

Anchor.

Parameters:
  • id – The identifier of the Text object.

Response JSON Object:
  • value (UI.TextAnchor)

PUT /drawing/text/(id)/anchor#

Anchor.

Parameters:
  • id – The identifier of the Text object.

Request JSON Object:
  • value (UI.TextAnchor) – The new value.