.. role:: ts-api-decorator

#####
Light
#####

.. container:: ts-api-section

   .. js:class:: Light

      Contains properties of a light. More information can be found [here](https://docs.techsoft3d.com/communicator/latest/prog_guide/viewing/scene_attributes/lights.html).



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Light.constructor`



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-class

   * :js:attr:`~Light.color`
   * :js:attr:`~Light.position`
   * :js:attr:`~Light.space`
   * :js:attr:`~Light.type`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: Light.constructor( type, space, position, color)

      :param type: The light's type. See [[type]].
      :type type: LightType
      :param space: The space in which a light is defined. See [[space]]
      :type space: LightSpace
      :param position: The light's position. See [[position]].
      :type position: Point3
      :param color: The light's color. See [[color]].
      :type color: Color


      :rtype: Light



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: Light.color

      :type: Color

      The light's color.



.. container:: ts-api-section

   .. js:attribute:: Light.position

      :type: Point3

      The light's position in the scene. See [[LightType.Directional]]
      for information on how the position is interpreted for directional
      lights.



.. container:: ts-api-section

   .. js:attribute:: Light.space

      :type: LightSpace

      The space in which the light's position is defined.



.. container:: ts-api-section

   .. js:attribute:: Light.type

      :type: LightType

      The light's type.



