classref: Sync with current master branch (f87858a8f)

This commit is contained in:
Yuri Sizov
2022-12-05 20:38:58 +03:00
parent 913ff5e602
commit a7745c4cc4
843 changed files with 158186 additions and 80821 deletions

View File

@@ -14,6 +14,8 @@ PathFollow2D
Point sampler for a :ref:`Path2D<class_Path2D>`.
.. rst-class:: classref-introduction-group
Description
-----------
@@ -21,41 +23,51 @@ This node takes its parent :ref:`Path2D<class_Path2D>`, and returns the coordina
It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the :ref:`progress<class_PathFollow2D_property_progress>` in this node.
.. rst-class:: classref-reftable-group
Properties
----------
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`cubic_interp<class_PathFollow2D_property_cubic_interp>` | ``true`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`h_offset<class_PathFollow2D_property_h_offset>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`lookahead<class_PathFollow2D_property_lookahead>` | ``4.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`loop<class_PathFollow2D_property_loop>` | ``true`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`progress<class_PathFollow2D_property_progress>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`progress_ratio<class_PathFollow2D_property_progress_ratio>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`rotates<class_PathFollow2D_property_rotates>` | ``true`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`v_offset<class_PathFollow2D_property_v_offset>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
.. table::
:widths: auto
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`cubic_interp<class_PathFollow2D_property_cubic_interp>` | ``true`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`h_offset<class_PathFollow2D_property_h_offset>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`lookahead<class_PathFollow2D_property_lookahead>` | ``4.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`loop<class_PathFollow2D_property_loop>` | ``true`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`progress<class_PathFollow2D_property_progress>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`progress_ratio<class_PathFollow2D_property_progress_ratio>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`rotates<class_PathFollow2D_property_rotates>` | ``true`` |
+---------------------------+-------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`v_offset<class_PathFollow2D_property_v_offset>` | ``0.0`` |
+---------------------------+-------------------------------------------------------------------+----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_PathFollow2D_property_cubic_interp:
- :ref:`bool<class_bool>` **cubic_interp**
.. rst-class:: classref-property
+-----------+--------------------------------+
| *Default* | ``true`` |
+-----------+--------------------------------+
| *Setter* | set_cubic_interpolation(value) |
+-----------+--------------------------------+
| *Getter* | get_cubic_interpolation() |
+-----------+--------------------------------+
:ref:`bool<class_bool>` **cubic_interp** = ``true``
.. rst-class:: classref-property-setget
- void **set_cubic_interpolation** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **get_cubic_interpolation** **(** **)**
If ``true``, the position between two cached points is interpolated cubically, and linearly otherwise.
@@ -63,115 +75,122 @@ The points along the :ref:`Curve2D<class_Curve2D>` of the :ref:`Path2D<class_Pat
There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_h_offset:
- :ref:`float<class_float>` **h_offset**
.. rst-class:: classref-property
+-----------+---------------------+
| *Default* | ``0.0`` |
+-----------+---------------------+
| *Setter* | set_h_offset(value) |
+-----------+---------------------+
| *Getter* | get_h_offset() |
+-----------+---------------------+
:ref:`float<class_float>` **h_offset** = ``0.0``
.. rst-class:: classref-property-setget
- void **set_h_offset** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_h_offset** **(** **)**
The node's offset along the curve.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_lookahead:
- :ref:`float<class_float>` **lookahead**
.. rst-class:: classref-property
+-----------+----------------------+
| *Default* | ``4.0`` |
+-----------+----------------------+
| *Setter* | set_lookahead(value) |
+-----------+----------------------+
| *Getter* | get_lookahead() |
+-----------+----------------------+
:ref:`float<class_float>` **lookahead** = ``4.0``
.. rst-class:: classref-property-setget
- void **set_lookahead** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_lookahead** **(** **)**
How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_loop:
- :ref:`bool<class_bool>` **loop**
.. rst-class:: classref-property
+-----------+-----------------+
| *Default* | ``true`` |
+-----------+-----------------+
| *Setter* | set_loop(value) |
+-----------+-----------------+
| *Getter* | has_loop() |
+-----------+-----------------+
:ref:`bool<class_bool>` **loop** = ``true``
.. rst-class:: classref-property-setget
- void **set_loop** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **has_loop** **(** **)**
If ``true``, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_progress:
- :ref:`float<class_float>` **progress**
.. rst-class:: classref-property
+-----------+---------------------+
| *Default* | ``0.0`` |
+-----------+---------------------+
| *Setter* | set_progress(value) |
+-----------+---------------------+
| *Getter* | get_progress() |
+-----------+---------------------+
:ref:`float<class_float>` **progress** = ``0.0``
.. rst-class:: classref-property-setget
- void **set_progress** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_progress** **(** **)**
The distance along the path, in pixels. Changing this value sets this node's position to a point within the path.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_progress_ratio:
- :ref:`float<class_float>` **progress_ratio**
.. rst-class:: classref-property
+-----------+---------------------------+
| *Default* | ``0.0`` |
+-----------+---------------------------+
| *Setter* | set_progress_ratio(value) |
+-----------+---------------------------+
| *Getter* | get_progress_ratio() |
+-----------+---------------------------+
:ref:`float<class_float>` **progress_ratio** = ``0.0``
.. rst-class:: classref-property-setget
- void **set_progress_ratio** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_progress_ratio** **(** **)**
The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_rotates:
- :ref:`bool<class_bool>` **rotates**
.. rst-class:: classref-property
+-----------+--------------------+
| *Default* | ``true`` |
+-----------+--------------------+
| *Setter* | set_rotates(value) |
+-----------+--------------------+
| *Getter* | is_rotating() |
+-----------+--------------------+
:ref:`bool<class_bool>` **rotates** = ``true``
.. rst-class:: classref-property-setget
- void **set_rotates** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_rotating** **(** **)**
If ``true``, this node rotates to follow the path, with the +X direction facing forward on the path.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow2D_property_v_offset:
- :ref:`float<class_float>` **v_offset**
.. rst-class:: classref-property
+-----------+---------------------+
| *Default* | ``0.0`` |
+-----------+---------------------+
| *Setter* | set_v_offset(value) |
+-----------+---------------------+
| *Getter* | get_v_offset() |
+-----------+---------------------+
:ref:`float<class_float>` **v_offset** = ``0.0``
.. rst-class:: classref-property-setget
- void **set_v_offset** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_v_offset** **(** **)**
The node's offset perpendicular to the curve.