Drawable#
Drawable
The base class of boxes, markers, paths, points, spheres and text.
A Drawable 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/drawable/(id)/visible#
Whether the object is visible.
- Parameters:
id – The identifier of the Drawable object.
- Response JSON Object:
value (bool)
- PUT /drawing/drawable/(id)/visible#
Whether the object is visible.
- Parameters:
id – The identifier of the Drawable object.
- Request JSON Object:
value (bool) – The new value.
- GET /drawing/drawable/(id)/color#
The color of the object.
Note
For a path drawn with more than one color, this is the color at its start.
- Parameters:
id – The identifier of the Drawable object.
- Response JSON Object:
value (StdLib.ColorRGB)
- PUT /drawing/drawable/(id)/color#
The color of the object.
Note
For a path drawn with more than one color, this is the color at its start.
- Parameters:
id – The identifier of the Drawable object.
- Request JSON Object:
value (StdLib.ColorRGB) – The new value.
- GET /drawing/drawable/(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.
- Parameters:
id – The identifier of the Drawable object.
- Response JSON Object:
value (string)
- PUT /drawing/drawable/(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.
- Parameters:
id – The identifier of the Drawable object.
- Request JSON Object:
value (string) – The new value.