class_gltflight.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/modules/gltf/doc_classes/GLTFLight.xml.
  6. .. _class_GLTFLight:
  7. GLTFLight
  8. =========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. .. rst-class:: classref-introduction-group
  11. Description
  12. -----------
  13. **Note:** This class is only compiled in editor builds. Run-time glTF loading and saving is *not* available in exported projects. References to **GLTFLight** within a script will cause an error in an exported project.
  14. .. rst-class:: classref-reftable-group
  15. Properties
  16. ----------
  17. .. table::
  18. :widths: auto
  19. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  20. | :ref:`Color<class_Color>` | :ref:`color<class_GLTFLight_property_color>` | ``Color( 1, 1, 1, 1 )`` |
  21. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  22. | :ref:`float<class_float>` | :ref:`inner_cone_angle<class_GLTFLight_property_inner_cone_angle>` | ``0.0`` |
  23. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  24. | :ref:`float<class_float>` | :ref:`intensity<class_GLTFLight_property_intensity>` | ``1.0`` |
  25. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  26. | :ref:`float<class_float>` | :ref:`outer_cone_angle<class_GLTFLight_property_outer_cone_angle>` | ``0.785398`` |
  27. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  28. | :ref:`float<class_float>` | :ref:`range<class_GLTFLight_property_range>` | ``inf`` |
  29. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  30. | :ref:`String<class_String>` | :ref:`type<class_GLTFLight_property_type>` | ``""`` |
  31. +-----------------------------+--------------------------------------------------------------------+-------------------------+
  32. .. rst-class:: classref-section-separator
  33. ----
  34. .. rst-class:: classref-descriptions-group
  35. Property Descriptions
  36. ---------------------
  37. .. _class_GLTFLight_property_color:
  38. .. rst-class:: classref-property
  39. :ref:`Color<class_Color>` **color** = ``Color( 1, 1, 1, 1 )``
  40. .. rst-class:: classref-property-setget
  41. - void **set_color** **(** :ref:`Color<class_Color>` value **)**
  42. - :ref:`Color<class_Color>` **get_color** **(** **)**
  43. The :ref:`Color<class_Color>` of the light. Defaults to white. A black color causes the light to have no effect.
  44. .. rst-class:: classref-item-separator
  45. ----
  46. .. _class_GLTFLight_property_inner_cone_angle:
  47. .. rst-class:: classref-property
  48. :ref:`float<class_float>` **inner_cone_angle** = ``0.0``
  49. .. rst-class:: classref-property-setget
  50. - void **set_inner_cone_angle** **(** :ref:`float<class_float>` value **)**
  51. - :ref:`float<class_float>` **get_inner_cone_angle** **(** **)**
  52. The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle.
  53. 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:`SpotLight<class_SpotLight>`, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.
  54. .. rst-class:: classref-item-separator
  55. ----
  56. .. _class_GLTFLight_property_intensity:
  57. .. rst-class:: classref-property
  58. :ref:`float<class_float>` **intensity** = ``1.0``
  59. .. rst-class:: classref-property-setget
  60. - void **set_intensity** **(** :ref:`float<class_float>` value **)**
  61. - :ref:`float<class_float>` **get_intensity** **(** **)**
  62. 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.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_GLTFLight_property_outer_cone_angle:
  66. .. rst-class:: classref-property
  67. :ref:`float<class_float>` **outer_cone_angle** = ``0.785398``
  68. .. rst-class:: classref-property-setget
  69. - void **set_outer_cone_angle** **(** :ref:`float<class_float>` value **)**
  70. - :ref:`float<class_float>` **get_outer_cone_angle** **(** **)**
  71. The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle.
  72. 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:`SpotLight<class_SpotLight>`, the outer cone angle is used as the angle of the spotlight.
  73. .. rst-class:: classref-item-separator
  74. ----
  75. .. _class_GLTFLight_property_range:
  76. .. rst-class:: classref-property
  77. :ref:`float<class_float>` **range** = ``inf``
  78. .. rst-class:: classref-property-setget
  79. - void **set_range** **(** :ref:`float<class_float>` value **)**
  80. - :ref:`float<class_float>` **get_range** **(** **)**
  81. 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.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_GLTFLight_property_type:
  85. .. rst-class:: classref-property
  86. :ref:`String<class_String>` **type** = ``""``
  87. .. rst-class:: classref-property-setget
  88. - void **set_type** **(** :ref:`String<class_String>` value **)**
  89. - :ref:`String<class_String>` **get_type** **(** **)**
  90. The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's :ref:`OmniLight<class_OmniLight>`, :ref:`SpotLight<class_SpotLight>`, and :ref:`DirectionalLight<class_DirectionalLight>` respectively.
  91. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  92. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  93. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  94. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`