Skip to content

Commit de1b79e

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (89cc635)
1 parent 43f0195 commit de1b79e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1056
-621
lines changed

classes/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ See also :ref:`@GlobalScope.typeof<class_@GlobalScope_method_typeof>`, :ref:`typ
972972

973973
:ref:`int<class_int>` **len** **(** :ref:`Variant<class_Variant>` var **)**
974974

975-
Returns the length of the given Variant ``var``. The length can be the character count of a :ref:`String<class_String>`, the element count of any array type or the size of a :ref:`Dictionary<class_Dictionary>`. For every other Variant type, a run-time error is generated and execution is stopped.
975+
Returns the length of the given Variant ``var``. The length can be the character count of a :ref:`String<class_String>` or :ref:`StringName<class_StringName>`, the element count of any array type, or the size of a :ref:`Dictionary<class_Dictionary>`. For every other Variant type, a run-time error is generated and execution is stopped.
976976

977977
::
978978

classes/[email protected]

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5480,20 +5480,10 @@ Clamps the ``value``, returning a :ref:`Variant<class_Variant>` not less than ``
54805480
54815481
var b = clamp(8.1, 0.9, 5.5)
54825482
# b is 5.5
5483-
5484-
var c = clamp(Vector2(-3.5, -4), Vector2(-3.2, -2), Vector2(2, 6.5))
5485-
# c is (-3.2, -2)
5486-
5487-
var d = clamp(Vector2i(7, 8), Vector2i(-3, -2), Vector2i(2, 6))
5488-
# d is (2, 6)
5489-
5490-
var e = clamp(Vector3(-7, 8.5, -3.8), Vector3(-3, -2, 5.4), Vector3(-2, 6, -4.1))
5491-
# e is (-3, -2, 5.4)
5492-
5493-
var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6))
5494-
# f is (-4, -5, -6)
54955483

5496-
\ **Note:** For better type safety, use :ref:`clampf<class_@GlobalScope_method_clampf>`, :ref:`clampi<class_@GlobalScope_method_clampi>`, :ref:`Vector2.clamp<class_Vector2_method_clamp>`, :ref:`Vector2i.clamp<class_Vector2i_method_clamp>`, :ref:`Vector3.clamp<class_Vector3_method_clamp>`, :ref:`Vector3i.clamp<class_Vector3i_method_clamp>`, :ref:`Vector4.clamp<class_Vector4_method_clamp>`, :ref:`Vector4i.clamp<class_Vector4i_method_clamp>`, or :ref:`Color.clamp<class_Color_method_clamp>`.
5484+
\ **Note:** For better type safety, use :ref:`clampf<class_@GlobalScope_method_clampf>`, :ref:`clampi<class_@GlobalScope_method_clampi>`, :ref:`Vector2.clamp<class_Vector2_method_clamp>`, :ref:`Vector2i.clamp<class_Vector2i_method_clamp>`, :ref:`Vector3.clamp<class_Vector3_method_clamp>`, :ref:`Vector3i.clamp<class_Vector3i_method_clamp>`, :ref:`Vector4.clamp<class_Vector4_method_clamp>`, :ref:`Vector4i.clamp<class_Vector4i_method_clamp>`, or :ref:`Color.clamp<class_Color_method_clamp>` (not currently supported by this method).
5485+
5486+
\ **Note:** When using this on vectors it will *not* perform component-wise clamping, and will pick ``min`` if ``value < min`` or ``max`` if ``value > max``. To perform component-wise clamping use the methods listed above.
54975487

54985488
.. rst-class:: classref-item-separator
54995489

classes/class_array.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,8 @@ Removes an element from the array by index. If the index does not exist in the a
10471047

10481048
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are ``null``. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the other :ref:`Error<enum_@GlobalScope_Error>` values if the operation failed.
10491049

1050+
Calling :ref:`resize<class_Array_method_resize>` once and assigning the new values is faster than adding new elements one by one.
1051+
10501052
\ **Note:** This method acts in-place and doesn't return a modified array.
10511053

10521054
.. rst-class:: classref-item-separator

classes/class_astargrid2d.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Properties
5656
.. table::
5757
:widths: auto
5858

59+
+----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+
60+
| :ref:`CellShape<enum_AStarGrid2D_CellShape>` | :ref:`cell_shape<class_AStarGrid2D_property_cell_shape>` | ``0`` |
5961
+----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+
6062
| :ref:`Vector2<class_Vector2>` | :ref:`cell_size<class_AStarGrid2D_property_cell_size>` | ``Vector2(1, 1)`` |
6163
+----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+
@@ -250,6 +252,48 @@ The pathfinding algorithm will avoid using diagonals if any obstacle has been pl
250252

251253
Represents the size of the :ref:`DiagonalMode<enum_AStarGrid2D_DiagonalMode>` enum.
252254

255+
.. rst-class:: classref-item-separator
256+
257+
----
258+
259+
.. _enum_AStarGrid2D_CellShape:
260+
261+
.. rst-class:: classref-enumeration
262+
263+
enum **CellShape**:
264+
265+
.. _class_AStarGrid2D_constant_CELL_SHAPE_SQUARE:
266+
267+
.. rst-class:: classref-enumeration-constant
268+
269+
:ref:`CellShape<enum_AStarGrid2D_CellShape>` **CELL_SHAPE_SQUARE** = ``0``
270+
271+
Rectangular cell shape.
272+
273+
.. _class_AStarGrid2D_constant_CELL_SHAPE_ISOMETRIC_RIGHT:
274+
275+
.. rst-class:: classref-enumeration-constant
276+
277+
:ref:`CellShape<enum_AStarGrid2D_CellShape>` **CELL_SHAPE_ISOMETRIC_RIGHT** = ``1``
278+
279+
Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.
280+
281+
.. _class_AStarGrid2D_constant_CELL_SHAPE_ISOMETRIC_DOWN:
282+
283+
.. rst-class:: classref-enumeration-constant
284+
285+
:ref:`CellShape<enum_AStarGrid2D_CellShape>` **CELL_SHAPE_ISOMETRIC_DOWN** = ``2``
286+
287+
Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.
288+
289+
.. _class_AStarGrid2D_constant_CELL_SHAPE_MAX:
290+
291+
.. rst-class:: classref-enumeration-constant
292+
293+
:ref:`CellShape<enum_AStarGrid2D_CellShape>` **CELL_SHAPE_MAX** = ``3``
294+
295+
Represents the size of the :ref:`CellShape<enum_AStarGrid2D_CellShape>` enum.
296+
253297
.. rst-class:: classref-section-separator
254298

255299
----
@@ -259,6 +303,23 @@ Represents the size of the :ref:`DiagonalMode<enum_AStarGrid2D_DiagonalMode>` en
259303
Property Descriptions
260304
---------------------
261305

306+
.. _class_AStarGrid2D_property_cell_shape:
307+
308+
.. rst-class:: classref-property
309+
310+
:ref:`CellShape<enum_AStarGrid2D_CellShape>` **cell_shape** = ``0``
311+
312+
.. rst-class:: classref-property-setget
313+
314+
- void **set_cell_shape** **(** :ref:`CellShape<enum_AStarGrid2D_CellShape>` value **)**
315+
- :ref:`CellShape<enum_AStarGrid2D_CellShape>` **get_cell_shape** **(** **)**
316+
317+
The cell shape. Affects how the positions are placed in the grid. If changed, :ref:`update<class_AStarGrid2D_method_update>` needs to be called before finding the next path.
318+
319+
.. rst-class:: classref-item-separator
320+
321+
----
322+
262323
.. _class_AStarGrid2D_property_cell_size:
263324

264325
.. rst-class:: classref-property

classes/class_basematerial3d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3108,7 +3108,7 @@ If ``true``, enables subsurface scattering transmittance. Only effective if :ref
31083108
- void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
31093109
- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
31103110

3111-
The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also :ref:`subsurf_scatter_texture<class_BaseMaterial3D_property_subsurf_scatter_texture>`. Ignored if :ref:`subsurf_scatter_skin_mode<class_BaseMaterial3D_property_subsurf_scatter_skin_mode>` is ``true``.
3111+
The texture to use for multiplying the intensity of the subsurface scattering transmittance intensity. See also :ref:`subsurf_scatter_texture<class_BaseMaterial3D_property_subsurf_scatter_texture>`. Ignored if :ref:`subsurf_scatter_skin_mode<class_BaseMaterial3D_property_subsurf_scatter_skin_mode>` is ``true``.
31123112

31133113
.. rst-class:: classref-item-separator
31143114

0 commit comments

Comments
 (0)