class_pointlight2d.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. :github_url: hide
  2. .. meta::
  3. :keywords: omni, spot
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PointLight2D.xml.
  8. .. _class_PointLight2D:
  9. PointLight2D
  10. ============
  11. **Inherits:** :ref:`Light2D<class_Light2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  12. Positional 2D light source.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. Casts light in a 2D environment. This light's shape is defined by a (usually grayscale) texture.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +-----------------------------------+-----------------------------------------------------------------+-------------------+
  27. | :ref:`float<class_float>` | :ref:`height<class_PointLight2D_property_height>` | ``0.0`` |
  28. +-----------------------------------+-----------------------------------------------------------------+-------------------+
  29. | :ref:`Vector2<class_Vector2>` | :ref:`offset<class_PointLight2D_property_offset>` | ``Vector2(0, 0)`` |
  30. +-----------------------------------+-----------------------------------------------------------------+-------------------+
  31. | :ref:`Texture2D<class_Texture2D>` | :ref:`texture<class_PointLight2D_property_texture>` | |
  32. +-----------------------------------+-----------------------------------------------------------------+-------------------+
  33. | :ref:`float<class_float>` | :ref:`texture_scale<class_PointLight2D_property_texture_scale>` | ``1.0`` |
  34. +-----------------------------------+-----------------------------------------------------------------+-------------------+
  35. .. rst-class:: classref-section-separator
  36. ----
  37. .. rst-class:: classref-descriptions-group
  38. Property Descriptions
  39. ---------------------
  40. .. _class_PointLight2D_property_height:
  41. .. rst-class:: classref-property
  42. :ref:`float<class_float>` **height** = ``0.0`` :ref:`🔗<class_PointLight2D_property_height>`
  43. .. rst-class:: classref-property-setget
  44. - |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ )
  45. - :ref:`float<class_float>` **get_height**\ (\ )
  46. The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane.
  47. .. rst-class:: classref-item-separator
  48. ----
  49. .. _class_PointLight2D_property_offset:
  50. .. rst-class:: classref-property
  51. :ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_PointLight2D_property_offset>`
  52. .. rst-class:: classref-property-setget
  53. - |void| **set_texture_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
  54. - :ref:`Vector2<class_Vector2>` **get_texture_offset**\ (\ )
  55. The offset of the light's :ref:`texture<class_PointLight2D_property_texture>`.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_PointLight2D_property_texture:
  59. .. rst-class:: classref-property
  60. :ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_PointLight2D_property_texture>`
  61. .. rst-class:: classref-property-setget
  62. - |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ )
  63. - :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ )
  64. :ref:`Texture2D<class_Texture2D>` used for the light's appearance.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_PointLight2D_property_texture_scale:
  68. .. rst-class:: classref-property
  69. :ref:`float<class_float>` **texture_scale** = ``1.0`` :ref:`🔗<class_PointLight2D_property_texture_scale>`
  70. .. rst-class:: classref-property-setget
  71. - |void| **set_texture_scale**\ (\ value\: :ref:`float<class_float>`\ )
  72. - :ref:`float<class_float>` **get_texture_scale**\ (\ )
  73. The :ref:`texture<class_PointLight2D_property_texture>`'s scale factor.
  74. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  75. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  76. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  77. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  78. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  79. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  80. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  81. .. |void| replace:: :abbr:`void (No return value.)`