class_gltflight.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the GLTFLight.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_GLTFLight:
  6. GLTFLight
  7. =========
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Properties
  10. ----------
  11. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  12. | :ref:`Color<class_Color>` | :ref:`color<class_GLTFLight_property_color>` | ``Color(1, 1, 1, 1)`` |
  13. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  14. | :ref:`float<class_float>` | :ref:`inner_cone_angle<class_GLTFLight_property_inner_cone_angle>` | ``0.0`` |
  15. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  16. | :ref:`float<class_float>` | :ref:`intensity<class_GLTFLight_property_intensity>` | ``1.0`` |
  17. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  18. | :ref:`String<class_String>` | :ref:`light_type<class_GLTFLight_property_light_type>` | ``""`` |
  19. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  20. | :ref:`float<class_float>` | :ref:`outer_cone_angle<class_GLTFLight_property_outer_cone_angle>` | ``0.785398`` |
  21. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  22. | :ref:`float<class_float>` | :ref:`range<class_GLTFLight_property_range>` | ``inf`` |
  23. +-----------------------------+--------------------------------------------------------------------+-----------------------+
  24. Property Descriptions
  25. ---------------------
  26. .. _class_GLTFLight_property_color:
  27. - :ref:`Color<class_Color>` **color**
  28. +-----------+-----------------------+
  29. | *Default* | ``Color(1, 1, 1, 1)`` |
  30. +-----------+-----------------------+
  31. | *Setter* | set_color(value) |
  32. +-----------+-----------------------+
  33. | *Getter* | get_color() |
  34. +-----------+-----------------------+
  35. The :ref:`Color<class_Color>` of the light. Defaults to white. A black color causes the light to have no effect.
  36. ----
  37. .. _class_GLTFLight_property_inner_cone_angle:
  38. - :ref:`float<class_float>` **inner_cone_angle**
  39. +-----------+-----------------------------+
  40. | *Default* | ``0.0`` |
  41. +-----------+-----------------------------+
  42. | *Setter* | set_inner_cone_angle(value) |
  43. +-----------+-----------------------------+
  44. | *Getter* | get_inner_cone_angle() |
  45. +-----------+-----------------------------+
  46. The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle.
  47. Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot :ref:`SpotLight3D<class_SpotLight3D>`, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.
  48. ----
  49. .. _class_GLTFLight_property_intensity:
  50. - :ref:`float<class_float>` **intensity**
  51. +-----------+----------------------+
  52. | *Default* | ``1.0`` |
  53. +-----------+----------------------+
  54. | *Setter* | set_intensity(value) |
  55. +-----------+----------------------+
  56. | *Getter* | get_intensity() |
  57. +-----------+----------------------+
  58. The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier.
  59. ----
  60. .. _class_GLTFLight_property_light_type:
  61. - :ref:`String<class_String>` **light_type**
  62. +-----------+-----------------------+
  63. | *Default* | ``""`` |
  64. +-----------+-----------------------+
  65. | *Setter* | set_light_type(value) |
  66. +-----------+-----------------------+
  67. | *Getter* | get_light_type() |
  68. +-----------+-----------------------+
  69. The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's :ref:`OmniLight3D<class_OmniLight3D>`, :ref:`SpotLight3D<class_SpotLight3D>`, and :ref:`DirectionalLight3D<class_DirectionalLight3D>` respectively.
  70. ----
  71. .. _class_GLTFLight_property_outer_cone_angle:
  72. - :ref:`float<class_float>` **outer_cone_angle**
  73. +-----------+-----------------------------+
  74. | *Default* | ``0.785398`` |
  75. +-----------+-----------------------------+
  76. | *Setter* | set_outer_cone_angle(value) |
  77. +-----------+-----------------------------+
  78. | *Getter* | get_outer_cone_angle() |
  79. +-----------+-----------------------------+
  80. The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle.
  81. At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot :ref:`SpotLight3D<class_SpotLight3D>`, the outer cone angle is used as the angle of the spotlight.
  82. ----
  83. .. _class_GLTFLight_property_range:
  84. - :ref:`float<class_float>` **range**
  85. +-----------+------------------+
  86. | *Default* | ``inf`` |
  87. +-----------+------------------+
  88. | *Setter* | set_range(value) |
  89. +-----------+------------------+
  90. | *Getter* | get_range() |
  91. +-----------+------------------+
  92. The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096.
  93. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  94. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  95. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  96. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  97. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  98. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`