.. default-domain:: http .. highlight:: json Drawable ======== .. _http-Drawing.Drawable: .. rubric:: Drawable The base class of boxes, markers, paths, points, spheres and text. | Derived classes: :ref:`Box `, :ref:`Marker `, :ref:`Path `, :ref:`SphereShape `, :ref:`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)``. .. http:get:: /drawing/drawable/(id)/visible Whether the object is visible. :param id: The identifier of the :ref:`Drawable ` object. :resjson bool value: .. http:put:: /drawing/drawable/(id)/visible Whether the object is visible. :param id: The identifier of the :ref:`Drawable ` object. :reqjson bool value: The new value. .. http: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. :param id: The identifier of the :ref:`Drawable ` object. :resjson StdLib.ColorRGB value: .. http: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. :param id: The identifier of the :ref:`Drawable ` object. :reqjson StdLib.ColorRGB value: The new value. .. http: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. :param id: The identifier of the :ref:`Drawable ` object. :resjson string value: .. http: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. :param id: The identifier of the :ref:`Drawable ` object. :reqjson string value: The new value. .. http:post:: /drawing/drawable/(id)/remove Remove the object. :param id: The identifier of the :ref:`Drawable ` object.