Skip to content

Commit 6e91392

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (dad6c77)
1 parent 3439a19 commit 6e91392

Some content is hidden

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

57 files changed

+137
-126
lines changed

classes/[email protected]

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6677,7 +6677,7 @@ Given a ``seed``, returns a :ref:`PackedInt64Array<class_PackedInt64Array>` of s
66776677

66786678
:ref:`float<class_float>` **randf**\ (\ )
66796679

6680-
Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive).
6680+
Returns a random floating-point value between ``0.0`` and ``1.0`` (inclusive).
66816681

66826682

66836683
.. tabs::
@@ -6702,7 +6702,7 @@ Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive).
67026702

67036703
:ref:`float<class_float>` **randf_range**\ (\ from\: :ref:`float<class_float>`, to\: :ref:`float<class_float>`\ )
67046704

6705-
Returns a random floating point value between ``from`` and ``to`` (inclusive).
6705+
Returns a random floating-point value between ``from`` and ``to`` (inclusive).
67066706

67076707

67086708
.. tabs::
@@ -6729,7 +6729,9 @@ Returns a random floating point value between ``from`` and ``to`` (inclusive).
67296729

67306730
:ref:`float<class_float>` **randfn**\ (\ mean\: :ref:`float<class_float>`, deviation\: :ref:`float<class_float>`\ )
67316731

6732-
Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. This is also called Gaussian distribution.
6732+
Returns a `normally-distributed <https://en.wikipedia.org/wiki/Normal_distribution>`__, pseudo-random floating-point value from the specified ``mean`` and a standard ``deviation``. This is also known as a Gaussian distribution.
6733+
6734+
\ **Note:** This method uses the `Box-Muller transform <https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform>`__ algorithm.
67336735

67346736
.. rst-class:: classref-item-separator
67356737

@@ -7079,7 +7081,7 @@ Compared to :ref:`ease<class_@GlobalScope_method_ease>` with a curve value of ``
70797081

70807082
:ref:`Variant<class_Variant>` **snapped**\ (\ x\: :ref:`Variant<class_Variant>`, step\: :ref:`Variant<class_Variant>`\ )
70817083

7082-
Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating point number to an arbitrary number of decimals.
7084+
Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating-point number to an arbitrary number of decimals.
70837085

70847086
The returned value is the same type of :ref:`Variant<class_Variant>` as ``step``. Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector2i<class_Vector2i>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`.
70857087

@@ -7104,7 +7106,7 @@ See also :ref:`ceil<class_@GlobalScope_method_ceil>`, :ref:`floor<class_@GlobalS
71047106

71057107
:ref:`float<class_float>` **snappedf**\ (\ x\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`\ )
71067108

7107-
Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating point number to an arbitrary number of decimals.
7109+
Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating-point number to an arbitrary number of decimals.
71087110

71097111
A type-safe version of :ref:`snapped<class_@GlobalScope_method_snapped>`, returning a :ref:`float<class_float>`.
71107112

classes/class_basis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A 3×3 matrix for representing 3D rotation and scale.
1717
Description
1818
-----------
1919

20-
The **Basis** built-in :ref:`Variant<class_Variant>` type is a 3x3 `matrix <https://en.wikipedia.org/wiki/Matrix_(mathematics)>`__ used to represent 3D rotation, scale, and shear. It is frequently used within a :ref:`Transform3D<class_Transform3D>`.
20+
The **Basis** built-in :ref:`Variant<class_Variant>` type is a 3×3 `matrix <https://en.wikipedia.org/wiki/Matrix_(mathematics)>`__ used to represent 3D rotation, scale, and shear. It is frequently used within a :ref:`Transform3D<class_Transform3D>`.
2121

2222
A **Basis** is composed by 3 axis vectors, each representing a column of the matrix: :ref:`x<class_Basis_property_x>`, :ref:`y<class_Basis_property_y>`, and :ref:`z<class_Basis_property_z>`. The length of each axis (:ref:`Vector3.length<class_Vector3_method_length>`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted.
2323

classes/class_canvasitem.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ Texture will repeat normally.
388388

389389
:ref:`TextureRepeat<enum_CanvasItem_TextureRepeat>` **TEXTURE_REPEAT_MIRROR** = ``3``
390390

391-
Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored.
391+
Texture will repeat in a 2×2 tiled mode, where elements at even positions are mirrored.
392392

393393
.. _class_CanvasItem_constant_TEXTURE_REPEAT_MAX:
394394

classes/class_codeedit.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ The option is local to the location of the code completion query - e.g. a local
453453

454454
:ref:`CodeCompletionLocation<enum_CodeEdit_CodeCompletionLocation>` **LOCATION_PARENT_MASK** = ``256``
455455

456-
The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class.
456+
The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. ``0`` for the local class, ``1`` for the parent, ``2`` for the grandparent, etc.) to store the depth of an option in the class or a parent class.
457457

458458
.. _class_CodeEdit_constant_LOCATION_OTHER_USER_CODE:
459459

@@ -899,11 +899,9 @@ Submits an item to the queue of potential candidates for the autocomplete menu.
899899

900900
|void| **add_comment_delimiter**\ (\ start_key\: :ref:`String<class_String>`, end_key\: :ref:`String<class_String>`, line_only\: :ref:`bool<class_bool>` = false\ )
901901

902-
Adds a comment delimiter.
902+
Adds a comment delimiter from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters.
903903

904-
Both the start and end keys must be symbols. Only the start key has to be unique.
905-
906-
\ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
904+
If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String<class_String>`, the region does not carry over to the next line.
907905

908906
.. rst-class:: classref-item-separator
909907

@@ -915,11 +913,9 @@ Both the start and end keys must be symbols. Only the start key has to be unique
915913

916914
|void| **add_string_delimiter**\ (\ start_key\: :ref:`String<class_String>`, end_key\: :ref:`String<class_String>`, line_only\: :ref:`bool<class_bool>` = false\ )
917915

918-
Adds a string delimiter.
919-
920-
Both the start and end keys must be symbols. Only the start key has to be unique.
916+
Defines a string delimiter from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters.
921917

922-
\ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
918+
If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String<class_String>`, the region does not carry over to the next line.
923919

924920
.. rst-class:: classref-item-separator
925921

classes/class_codehighlighter.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,9 @@ Method Descriptions
222222

223223
|void| **add_color_region**\ (\ start_key\: :ref:`String<class_String>`, end_key\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`, line_only\: :ref:`bool<class_bool>` = false\ )
224224

225-
Adds a color region such as comments or strings.
225+
Adds a color region (such as for comments or strings) from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters.
226226

227-
Both the start and end keys must be symbols. Only the start key has to be unique.
228-
229-
\ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
227+
If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String<class_String>`, the region does not carry over to the next line.
230228

231229
.. rst-class:: classref-item-separator
232230

classes/class_compositor.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Compositor
1414

1515
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
1616

17-
The compositor resource holds the configuration with which rendering of a viewport can be customised.
17+
Stores attributes used to customize how a Viewport is rendered.
1818

1919
.. rst-class:: classref-introduction-group
2020

2121
Description
2222
-----------
2323

24-
The compositor resource holds the configuration with which rendering of a viewport can be customised.
24+
The compositor resource stores attributes used to customize how a :ref:`Viewport<class_Viewport>` is rendered.
2525

2626
.. rst-class:: classref-reftable-group
2727

classes/class_cubemaparray.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ An array of :ref:`Cubemap<class_Cubemap>`\ s, stored together and with a single
1919
Description
2020
-----------
2121

22-
**CubemapArray**\ s are made of an array of :ref:`Cubemap<class_Cubemap>`\ s. Like :ref:`Cubemap<class_Cubemap>`\ s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube). The primary benefit of **CubemapArray**\ s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple :ref:`Cubemap<class_Cubemap>`\ s into a shader using a single **CubemapArray**.
22+
**CubemapArray**\ s are made of an array of :ref:`Cubemap<class_Cubemap>`\ s. Like :ref:`Cubemap<class_Cubemap>`\ s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube).
2323

24-
Moreover, :ref:`Cubemap<class_Cubemap>`\ s are allocated in adjacent cache regions on the GPU. This makes **CubemapArray**\ s the most efficient way to store multiple :ref:`Cubemap<class_Cubemap>`\ s.
24+
The primary benefit of **CubemapArray**\ s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple :ref:`Cubemap<class_Cubemap>`\ s into a shader using a single **CubemapArray**. :ref:`Cubemap<class_Cubemap>`\ s are allocated in adjacent cache regions on the GPU, which makes **CubemapArray**\ s the most efficient way to store multiple :ref:`Cubemap<class_Cubemap>`\ s.
2525

26-
Internally, Godot uses **CubemapArray**\ s for many effects, including the :ref:`Sky<class_Sky>` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections>` to ``true``.
27-
28-
To create such a texture file yourself, reimport your image files using the import presets of the File System dock.
26+
\ **Note:** Godot uses **CubemapArray**\ s internally for many effects, including the :ref:`Sky<class_Sky>` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections>` to ``true``. To create such a texture file yourself, reimport your image files using the import presets of the File System dock.
2927

3028
\ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend.
3129

classes/class_displayserver.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,9 +1582,9 @@ Returns the default mouse cursor shape set by :ref:`cursor_set_shape<class_Displ
15821582

15831583
|void| **cursor_set_custom_image**\ (\ cursor\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ )
15841584

1585-
Sets a custom mouse cursor image for the defined ``shape``. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be ``256x256`` or smaller for correct appearance. ``hotspot`` can optionally be set to define the area where the cursor will click. By default, ``hotspot`` is set to ``Vector2(0, 0)``, which is the top-left corner of the image. See also :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
1585+
Sets a custom mouse cursor image for the given ``shape``. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance.
15861586

1587-
\ ``cursor`` can be either :ref:`Texture2D<class_Texture2D>` or :ref:`Image<class_Image>`.
1587+
\ ``cursor`` can be either a :ref:`Texture2D<class_Texture2D>` or an :ref:`Image<class_Image>`, and it should not be larger than 256×256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
15881588

15891589
.. rst-class:: classref-item-separator
15901590

classes/class_editorexportplatformweb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web b
349349

350350
:ref:`bool<class_bool>` **variant/thread_support**
351351

352-
If enabled, the exported game will support threads. It requires `a "cross-origin isolated" website <https://web.dev/articles/coop-coep>`__, which can be difficult to setup and brings some limitations (e.g. not being able to communicate with third-party websites).
352+
If ``true``, the exported game will support threads. It requires `a "cross-origin isolated" website <https://web.dev/articles/coop-coep>`__, which may be difficult to set up and is limited for security reasons (such as not being able to communicate with third-party websites).
353353

354-
If disabled, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on a HTTPS website.
354+
If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on a HTTPS website.
355355

356356
.. rst-class:: classref-item-separator
357357

classes/class_editorplugin.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ Override this method in your plugin to return a :ref:`Texture2D<class_Texture2D>
835835

836836
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
837837

838-
Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
838+
Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size.
839839

840840

841841
.. tabs::
@@ -1093,7 +1093,9 @@ Adds a script at ``path`` to the Autoload list as ``name``.
10931093

10941094
:ref:`Button<class_Button>` **add_control_to_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`\ )
10951095

1096-
Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
1096+
Adds a control to the bottom panel (together with **Output**, **Debug**, **Animation**, etc.). Returns the button added to the tab bar. It's up to you to manage the button's visibility as needed.
1097+
1098+
When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
10971099

10981100
.. rst-class:: classref-item-separator
10991101

0 commit comments

Comments
 (0)