mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
143 lines
6.5 KiB
ReStructuredText
143 lines
6.5 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/modules/gltf/doc_classes/GLTFLight.xml.
|
|
|
|
.. _class_GLTFLight:
|
|
|
|
GLTFLight
|
|
=========
|
|
|
|
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
**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.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`color<class_GLTFLight_property_color>` | ``Color( 1, 1, 1, 1 )`` |
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
| :ref:`float<class_float>` | :ref:`inner_cone_angle<class_GLTFLight_property_inner_cone_angle>` | ``0.0`` |
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
| :ref:`float<class_float>` | :ref:`intensity<class_GLTFLight_property_intensity>` | ``1.0`` |
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
| :ref:`float<class_float>` | :ref:`outer_cone_angle<class_GLTFLight_property_outer_cone_angle>` | ``0.785398`` |
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
| :ref:`float<class_float>` | :ref:`range<class_GLTFLight_property_range>` | ``inf`` |
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
| :ref:`String<class_String>` | :ref:`type<class_GLTFLight_property_type>` | ``""`` |
|
|
+-----------------------------+--------------------------------------------------------------------+-------------------------+
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_GLTFLight_property_color:
|
|
|
|
- :ref:`Color<class_Color>` **color**
|
|
|
|
+-----------+-------------------------+
|
|
| *Default* | ``Color( 1, 1, 1, 1 )`` |
|
|
+-----------+-------------------------+
|
|
| *Setter* | set_color(value) |
|
|
+-----------+-------------------------+
|
|
| *Getter* | get_color() |
|
|
+-----------+-------------------------+
|
|
|
|
The :ref:`Color<class_Color>` of the light. Defaults to white. A black color causes the light to have no effect.
|
|
|
|
----
|
|
|
|
.. _class_GLTFLight_property_inner_cone_angle:
|
|
|
|
- :ref:`float<class_float>` **inner_cone_angle**
|
|
|
|
+-----------+-----------------------------+
|
|
| *Default* | ``0.0`` |
|
|
+-----------+-----------------------------+
|
|
| *Setter* | set_inner_cone_angle(value) |
|
|
+-----------+-----------------------------+
|
|
| *Getter* | get_inner_cone_angle() |
|
|
+-----------+-----------------------------+
|
|
|
|
The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle.
|
|
|
|
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.
|
|
|
|
----
|
|
|
|
.. _class_GLTFLight_property_intensity:
|
|
|
|
- :ref:`float<class_float>` **intensity**
|
|
|
|
+-----------+----------------------+
|
|
| *Default* | ``1.0`` |
|
|
+-----------+----------------------+
|
|
| *Setter* | set_intensity(value) |
|
|
+-----------+----------------------+
|
|
| *Getter* | get_intensity() |
|
|
+-----------+----------------------+
|
|
|
|
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.
|
|
|
|
----
|
|
|
|
.. _class_GLTFLight_property_outer_cone_angle:
|
|
|
|
- :ref:`float<class_float>` **outer_cone_angle**
|
|
|
|
+-----------+-----------------------------+
|
|
| *Default* | ``0.785398`` |
|
|
+-----------+-----------------------------+
|
|
| *Setter* | set_outer_cone_angle(value) |
|
|
+-----------+-----------------------------+
|
|
| *Getter* | get_outer_cone_angle() |
|
|
+-----------+-----------------------------+
|
|
|
|
The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle.
|
|
|
|
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.
|
|
|
|
----
|
|
|
|
.. _class_GLTFLight_property_range:
|
|
|
|
- :ref:`float<class_float>` **range**
|
|
|
|
+-----------+------------------+
|
|
| *Default* | ``inf`` |
|
|
+-----------+------------------+
|
|
| *Setter* | set_range(value) |
|
|
+-----------+------------------+
|
|
| *Getter* | get_range() |
|
|
+-----------+------------------+
|
|
|
|
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.
|
|
|
|
----
|
|
|
|
.. _class_GLTFLight_property_type:
|
|
|
|
- :ref:`String<class_String>` **type**
|
|
|
|
+-----------+-----------------+
|
|
| *Default* | ``""`` |
|
|
+-----------+-----------------+
|
|
| *Setter* | set_type(value) |
|
|
+-----------+-----------------+
|
|
| *Getter* | get_type() |
|
|
+-----------+-----------------+
|
|
|
|
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.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|