class_spotlight.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the SpotLight.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_SpotLight:
  6. SpotLight
  7. =========
  8. **Inherits:** :ref:`Light<class_Light>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. A spotlight, such as a reflector spotlight or a lantern.
  13. Properties
  14. ----------
  15. +---------------------------+--------------------------------------------------------------------------------+------+
  16. | :ref:`float<class_float>` | :ref:`spot_angle<class_SpotLight_property_spot_angle>` | 45.0 |
  17. +---------------------------+--------------------------------------------------------------------------------+------+
  18. | :ref:`float<class_float>` | :ref:`spot_angle_attenuation<class_SpotLight_property_spot_angle_attenuation>` | 1.0 |
  19. +---------------------------+--------------------------------------------------------------------------------+------+
  20. | :ref:`float<class_float>` | :ref:`spot_attenuation<class_SpotLight_property_spot_attenuation>` | 1.0 |
  21. +---------------------------+--------------------------------------------------------------------------------+------+
  22. | :ref:`float<class_float>` | :ref:`spot_range<class_SpotLight_property_spot_range>` | 5.0 |
  23. +---------------------------+--------------------------------------------------------------------------------+------+
  24. Description
  25. -----------
  26. A Spotlight is a type of :ref:`Light<class_Light>` node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of :ref:`Light<class_Light>`.
  27. Tutorials
  28. ---------
  29. - :doc:`../tutorials/3d/lights_and_shadows`
  30. Property Descriptions
  31. ---------------------
  32. .. _class_SpotLight_property_spot_angle:
  33. - :ref:`float<class_float>` **spot_angle**
  34. +-----------+------------------+
  35. | *Default* | 45.0 |
  36. +-----------+------------------+
  37. | *Setter* | set_param(value) |
  38. +-----------+------------------+
  39. | *Getter* | get_param() |
  40. +-----------+------------------+
  41. The spotlight's angle in degrees.
  42. .. _class_SpotLight_property_spot_angle_attenuation:
  43. - :ref:`float<class_float>` **spot_angle_attenuation**
  44. +-----------+------------------+
  45. | *Default* | 1.0 |
  46. +-----------+------------------+
  47. | *Setter* | set_param(value) |
  48. +-----------+------------------+
  49. | *Getter* | get_param() |
  50. +-----------+------------------+
  51. The spotlight's angular attenuation curve.
  52. .. _class_SpotLight_property_spot_attenuation:
  53. - :ref:`float<class_float>` **spot_attenuation**
  54. +-----------+------------------+
  55. | *Default* | 1.0 |
  56. +-----------+------------------+
  57. | *Setter* | set_param(value) |
  58. +-----------+------------------+
  59. | *Getter* | get_param() |
  60. +-----------+------------------+
  61. The spotlight's light energy attenuation curve.
  62. .. _class_SpotLight_property_spot_range:
  63. - :ref:`float<class_float>` **spot_range**
  64. +-----------+------------------+
  65. | *Default* | 5.0 |
  66. +-----------+------------------+
  67. | *Setter* | set_param(value) |
  68. +-----------+------------------+
  69. | *Getter* | get_param() |
  70. +-----------+------------------+
  71. The maximal range that can be reached by the spotlight.