class_spotlight.rst 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. A spotlight, such as a reflector spotlight or a lantern.
  10. Description
  11. -----------
  12. 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>`.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/3d/lights_and_shadows`
  16. Properties
  17. ----------
  18. +---------------------------+--------------------------------------------------------------------------------+----------+
  19. | :ref:`float<class_float>` | :ref:`spot_angle<class_SpotLight_property_spot_angle>` | ``45.0`` |
  20. +---------------------------+--------------------------------------------------------------------------------+----------+
  21. | :ref:`float<class_float>` | :ref:`spot_angle_attenuation<class_SpotLight_property_spot_angle_attenuation>` | ``1.0`` |
  22. +---------------------------+--------------------------------------------------------------------------------+----------+
  23. | :ref:`float<class_float>` | :ref:`spot_attenuation<class_SpotLight_property_spot_attenuation>` | ``1.0`` |
  24. +---------------------------+--------------------------------------------------------------------------------+----------+
  25. | :ref:`float<class_float>` | :ref:`spot_range<class_SpotLight_property_spot_range>` | ``5.0`` |
  26. +---------------------------+--------------------------------------------------------------------------------+----------+
  27. Property Descriptions
  28. ---------------------
  29. .. _class_SpotLight_property_spot_angle:
  30. - :ref:`float<class_float>` **spot_angle**
  31. +-----------+------------------+
  32. | *Default* | ``45.0`` |
  33. +-----------+------------------+
  34. | *Setter* | set_param(value) |
  35. +-----------+------------------+
  36. | *Getter* | get_param() |
  37. +-----------+------------------+
  38. The spotlight's angle in degrees.
  39. ----
  40. .. _class_SpotLight_property_spot_angle_attenuation:
  41. - :ref:`float<class_float>` **spot_angle_attenuation**
  42. +-----------+------------------+
  43. | *Default* | ``1.0`` |
  44. +-----------+------------------+
  45. | *Setter* | set_param(value) |
  46. +-----------+------------------+
  47. | *Getter* | get_param() |
  48. +-----------+------------------+
  49. The spotlight's angular attenuation curve.
  50. ----
  51. .. _class_SpotLight_property_spot_attenuation:
  52. - :ref:`float<class_float>` **spot_attenuation**
  53. +-----------+------------------+
  54. | *Default* | ``1.0`` |
  55. +-----------+------------------+
  56. | *Setter* | set_param(value) |
  57. +-----------+------------------+
  58. | *Getter* | get_param() |
  59. +-----------+------------------+
  60. The spotlight's light energy attenuation curve.
  61. ----
  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. Note that the effectively lit area may appear to be smaller depending on the :ref:`spot_attenuation<class_SpotLight_property_spot_attenuation>` in use. No matter the :ref:`spot_attenuation<class_SpotLight_property_spot_attenuation>` in use, the light will never reach anything outside this range.
  72. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  73. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  74. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`