mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
275 lines
15 KiB
ReStructuredText
275 lines
15 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_GLTFLight:
|
||
|
||
GLTFLight
|
||
=========
|
||
|
||
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Представляє світло glTF.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
Представляє світло, як визначено розширенням ``KHR_lights_punctual`` glTF.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Посібники
|
||
------------------
|
||
|
||
- :doc:`Завантаження та збереження файлів під час виконання <../tutorials/io/runtime_file_loading_and_saving>`
|
||
|
||
- `Специфікація розширення KHR_lights_punctual glTF <https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual>`__
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------+--------------------------------------------------------------------+-----------------------+
|
||
| :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:`String<class_String>` | :ref:`light_type<class_GLTFLight_property_light_type>` | ``""`` |
|
||
+-----------------------------+--------------------------------------------------------------------+-----------------------+
|
||
| :ref:`float<class_float>` | :ref:`outer_cone_angle<class_GLTFLight_property_outer_cone_angle>` | ``0.7853982`` |
|
||
+-----------------------------+--------------------------------------------------------------------+-----------------------+
|
||
| :ref:`float<class_float>` | :ref:`range<class_GLTFLight_property_range>` | ``inf`` |
|
||
+-----------------------------+--------------------------------------------------------------------+-----------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`GLTFLight<class_GLTFLight>` | :ref:`from_dictionary<class_GLTFLight_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| |
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`GLTFLight<class_GLTFLight>` | :ref:`from_node<class_GLTFLight_method_from_node>`\ (\ light_node\: :ref:`Light3D<class_Light3D>`\ ) |static| |
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFLight_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) |
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_additional_data<class_GLTFLight_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFLight_method_to_dictionary>`\ (\ ) |const| |
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Light3D<class_Light3D>` | :ref:`to_node<class_GLTFLight_method_to_node>`\ (\ ) |const| |
|
||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_GLTFLight_property_color:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_GLTFLight_property_color>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||
- :ref:`Color<class_Color>` **get_color**\ (\ )
|
||
|
||
:ref:`Color<class_Color>` світла в лінійному просторі. За замовчуванням білий. Чорний колір не впливає на світло.
|
||
|
||
Це значення є лінійним для відповідності glTF, але буде перетворено на нелінійний sRGB під час створення вузла Godot :ref:`Light3D<class_Light3D>` під час імпорту або на лінійний під час експорту Godot :ref:`Light3D<class_Light3D>` до glTF.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_property_inner_cone_angle:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **inner_cone_angle** = ``0.0`` :ref:`🔗<class_GLTFLight_property_inner_cone_angle>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_inner_cone_angle**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_inner_cone_angle**\ (\ )
|
||
|
||
Внутрішній кут конуса в точковому світлі. Необхідно менше або дорівнює зовнішнього кута конуса.
|
||
|
||
У такому куті світло при повній яскравості. Між внутрішніми і зовнішніми кутами конуса є перехід від повної яскравості до нульової яскравості. При створенні Godot :ref:`SpotLight3D<class_SpotLight3D>` співвідношення між внутрішніми і зовнішніми кутами конуса використовується для обчислення загартування світла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_property_intensity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **intensity** = ``1.0`` :ref:`🔗<class_GLTFLight_property_intensity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_intensity**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_intensity**\ (\ )
|
||
|
||
Інтенсивність світла. Це виражається в канделі (люмень на тераді) для точних і точкових світильників, а люкс (люмень на м2) для спрямованих вогнів. При створенні Godot світло, це значення перетворюється на безшумний множник.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_property_light_type:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`String<class_String>` **light_type** = ``""`` :ref:`🔗<class_GLTFLight_property_light_type>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_light_type**\ (\ value\: :ref:`String<class_String>`\ )
|
||
- :ref:`String<class_String>` **get_light_type**\ (\ )
|
||
|
||
Тип світла. Цінності, прийняті Godot, "пошта", "направлений", які відповідають Godot's :ref:`OmniLight3D<class_OmniLight3D>`, :ref:`SpotLight3D<class_SpotLight3D>`, і :ref:`DirectionalLight3D<class_DirectionalLight3D>` відповідно.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_property_outer_cone_angle:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **outer_cone_angle** = ``0.7853982`` :ref:`🔗<class_GLTFLight_property_outer_cone_angle>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_outer_cone_angle**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_outer_cone_angle**\ (\ )
|
||
|
||
Зовнішній кут конуса в точковому світлі. Необхідно бути більшим, ніж або дорівнює внутрішнього кута.
|
||
|
||
При цьому куті світло відпадає до нульової яскравості. Між внутрішніми і зовнішніми кутами конуса є перехід від повної яскравості до нульової яскравості. Якщо цей кут є половиною поворотом, то прожектор випромінює в усіх напрямках. При створенні Godot :ref:`SpotLight3D<class_SpotLight3D>` зовнішній кут конуса використовується в якості кута прожектора.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_property_range:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **range** = ``inf`` :ref:`🔗<class_GLTFLight_property_range>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_range**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_range**\ (\ )
|
||
|
||
Діапазон світла, за межами якого світло не має жодного ефекту. Світильники glTF без визначеного діапазону поводяться як фізичні світильники (які мають нескінченний діапазон). Під час створення світильника Godot діапазон обмежується значенням ``4096.0``.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_GLTFLight_method_from_dictionary:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`GLTFLight<class_GLTFLight>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFLight_method_from_dictionary>`
|
||
|
||
Створює новий екземпляр GLTFLight, що приписує дані :ref:`Dictionary<class_Dictionary>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_method_from_node:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`GLTFLight<class_GLTFLight>` **from_node**\ (\ light_node\: :ref:`Light3D<class_Light3D>`\ ) |static| :ref:`🔗<class_GLTFLight_method_from_node>`
|
||
|
||
Створіть новий GLTFLight екземпляр з даної Godot :ref:`Light3D<class_Light3D>` вузол.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_method_get_additional_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFLight_method_get_additional_data>`
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_method_set_additional_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFLight_method_set_additional_data>`
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_method_to_dictionary:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFLight_method_to_dictionary>`
|
||
|
||
Серіалізує цей екземпляр GLTFLight у :ref:`Dictionary<class_Dictionary>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFLight_method_to_node:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Light3D<class_Light3D>` **to_node**\ (\ ) |const| :ref:`🔗<class_GLTFLight_method_to_node>`
|
||
|
||
Перетворює цей екземпляр GLTFLight у вузол Godot :ref:`Light3D<class_Light3D>`.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|