mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
129 lines
5.9 KiB
ReStructuredText
129 lines
5.9 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. meta::
|
||
:keywords: omni, spot
|
||
|
||
.. _class_PointLight2D:
|
||
|
||
PointLight2D
|
||
============
|
||
|
||
**Наследует:** :ref:`Light2D<class_Light2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Позиционный 2D-источник света.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
Проливает свет в 2D-среде. Форма этого света определяется текстурой (обычно в оттенках серого).
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Обучающие материалы
|
||
--------------------------------------
|
||
|
||
- :doc:`2D свет и тени <../tutorials/2d/2d_lights_and_shadows>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Свойства
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------+-----------------------------------------------------------------+-------------------+
|
||
| :ref:`float<class_float>` | :ref:`height<class_PointLight2D_property_height>` | ``0.0`` |
|
||
+-----------------------------------+-----------------------------------------------------------------+-------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`offset<class_PointLight2D_property_offset>` | ``Vector2(0, 0)`` |
|
||
+-----------------------------------+-----------------------------------------------------------------+-------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`texture<class_PointLight2D_property_texture>` | |
|
||
+-----------------------------------+-----------------------------------------------------------------+-------------------+
|
||
| :ref:`float<class_float>` | :ref:`texture_scale<class_PointLight2D_property_texture_scale>` | ``1.0`` |
|
||
+-----------------------------------+-----------------------------------------------------------------+-------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания свойств
|
||
--------------------------------
|
||
|
||
.. _class_PointLight2D_property_height:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **height** = ``0.0`` :ref:`🔗<class_PointLight2D_property_height>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_height**\ (\ )
|
||
|
||
Высота источника света. Используется с 2D-нормальным отображением. Единицы измерения — пиксели, например, если высота равна 100, то объект будет освещаться на расстоянии 100 пикселей под углом 45° к плоскости.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PointLight2D_property_offset:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_PointLight2D_property_offset>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_texture_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
||
- :ref:`Vector2<class_Vector2>` **get_texture_offset**\ (\ )
|
||
|
||
Смещение :ref:`texture<class_PointLight2D_property_texture>` источника света.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PointLight2D_property_texture:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_PointLight2D_property_texture>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ )
|
||
- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ )
|
||
|
||
:ref:`Texture2D<class_Texture2D>` используется для создания внешнего вида света.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PointLight2D_property_texture_scale:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **texture_scale** = ``1.0`` :ref:`🔗<class_PointLight2D_property_texture_scale>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_texture_scale**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_texture_scale**\ (\ )
|
||
|
||
Коэффициент масштабирования :ref:`texture<class_PointLight2D_property_texture>`.
|
||
|
||
.. |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 (Нет возвращаемого значения.)`
|