Skip to content

Commit f593c47

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (4714e95)
1 parent 4e78e11 commit f593c47

File tree

68 files changed

+1205
-465
lines changed

Some content is hidden

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

68 files changed

+1205
-465
lines changed

classes/[email protected]

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,8 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES<class_@GlobalSco
538538

539539
@export_node_path("Button", "TouchScreenButton") var some_button
540540

541+
\ **Note:** The type must be a native class or a globally registered script (using the ``class_name`` keyword) that inherits :ref:`Node<class_Node>`.
542+
541543
.. rst-class:: classref-item-separator
542544

543545
----
@@ -665,7 +667,7 @@ Mark the following method for remote procedure calls. See :doc:`High-level multi
665667

666668
If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config<class_Node_method_rpc_config>`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY<class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY>` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER<class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER>` RPC modes. See :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there.
667669

668-
If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config<class_Node_method_rpc_config>`, this is equivalent to setting `call_local` to `true`.
670+
If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config<class_Node_method_rpc_config>`, this is equivalent to setting ``call_local`` to ``true``.
669671

670672
The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer<class_MultiplayerPeer>`. See :ref:`MultiplayerPeer.transfer_mode<class_MultiplayerPeer_property_transfer_mode>`.
671673

classes/[email protected]

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Properties
5151
+---------------------------------------------------------------+-------------------------------------------------------------------------------------+
5252
| :ref:`DisplayServer<class_DisplayServer>` | :ref:`DisplayServer<class_@GlobalScope_property_DisplayServer>` |
5353
+---------------------------------------------------------------+-------------------------------------------------------------------------------------+
54+
| :ref:`EditorInterface<class_EditorInterface>` | :ref:`EditorInterface<class_@GlobalScope_property_EditorInterface>` |
55+
+---------------------------------------------------------------+-------------------------------------------------------------------------------------+
5456
| :ref:`Engine<class_Engine>` | :ref:`Engine<class_@GlobalScope_property_Engine>` |
5557
+---------------------------------------------------------------+-------------------------------------------------------------------------------------+
5658
| :ref:`EngineDebugger<class_EngineDebugger>` | :ref:`EngineDebugger<class_@GlobalScope_property_EngineDebugger>` |
@@ -4725,6 +4727,20 @@ The :ref:`DisplayServer<class_DisplayServer>` singleton.
47254727

47264728
----
47274729

4730+
.. _class_@GlobalScope_property_EditorInterface:
4731+
4732+
.. rst-class:: classref-property
4733+
4734+
:ref:`EditorInterface<class_EditorInterface>` **EditorInterface**
4735+
4736+
The :ref:`EditorInterface<class_EditorInterface>` singleton.
4737+
4738+
\ **Note:** Only available in editor builds.
4739+
4740+
.. rst-class:: classref-item-separator
4741+
4742+
----
4743+
47284744
.. _class_@GlobalScope_property_Engine:
47294745

47304746
.. rst-class:: classref-property
@@ -5598,9 +5614,9 @@ Returns a human-readable name for the given :ref:`Error<enum_@GlobalScope_Error>
55985614

55995615
:ref:`float<class_float>` **exp** **(** :ref:`float<class_float>` x **)**
56005616

5601-
The natural exponential function. It raises the mathematical constant **e** to the power of ``x`` and returns it.
5617+
The natural exponential function. It raises the mathematical constant *e* to the power of ``x`` and returns it.
56025618

5603-
\ **e** has an approximate value of 2.71828, and can be obtained with ``exp(1)``.
5619+
\ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``.
56045620

56055621
For exponents to other bases use the method :ref:`pow<class_@GlobalScope_method_pow>`.
56065622

@@ -6158,9 +6174,7 @@ Use a negative ``delta`` value to move away.
61586174

61596175
:ref:`int<class_int>` **nearest_po2** **(** :ref:`int<class_int>` value **)**
61606176

6161-
Returns the nearest equal or larger power of 2 for the integer ``value``.
6162-
6163-
In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such that ``value <= a`` for some non-negative integer ``n``.
6177+
Returns the smallest integer power of 2 that is greater than or equal to ``value``.
61646178

61656179
::
61666180

@@ -6171,7 +6185,7 @@ In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such th
61716185
nearest_po2(0) # Returns 0 (this may not be expected)
61726186
nearest_po2(-1) # Returns 0 (this may not be expected)
61736187

6174-
\ **Warning:** Due to the way it is implemented, this function returns ``0`` rather than ``1`` for negative values of ``value`` (in reality, 1 is the smallest integer power of 2).
6188+
\ **Warning:** Due to its implementation, this method returns ``0`` rather than ``1`` for values less than or equal to ``0``, with an exception for ``value`` being the smallest negative 64-bit integer (``-9223372036854775808``) in which case the ``value`` is returned unchanged.
61756189

61766190
.. rst-class:: classref-item-separator
61776191

classes/class_area3d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Description
2323

2424
This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses.
2525

26-
\ **Warning:** Using a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` inside a :ref:`CollisionShape3D<class_CollisionShape3D>` child of this node (created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D<class_MeshInstance3D>` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>`\ s or primitive shapes like :ref:`BoxShape3D<class_BoxShape3D>`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`.
26+
\ **Warning:** Using a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` inside a :ref:`CollisionShape3D<class_CollisionShape3D>` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D<class_MeshInstance3D>` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>`\ s or primitive shapes like :ref:`BoxShape3D<class_BoxShape3D>`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`.
2727

2828
.. rst-class:: classref-introduction-group
2929

classes/class_astargrid2d.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ Methods
8989
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9090
| void | :ref:`clear<class_AStarGrid2D_method_clear>` **(** **)** |
9191
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
92+
| void | :ref:`fill_solid_region<class_AStarGrid2D_method_fill_solid_region>` **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`bool<class_bool>` solid=true **)** |
93+
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
94+
| void | :ref:`fill_weight_scale_region<class_AStarGrid2D_method_fill_weight_scale_region>` **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`float<class_float>` weight_scale **)** |
95+
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9296
| :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_id_path<class_AStarGrid2D_method_get_id_path>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |
9397
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9498
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_point_path<class_AStarGrid2D_method_get_point_path>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |
@@ -440,6 +444,34 @@ Clears the grid and sets the :ref:`region<class_AStarGrid2D_property_region>` to
440444

441445
----
442446

447+
.. _class_AStarGrid2D_method_fill_solid_region:
448+
449+
.. rst-class:: classref-method
450+
451+
void **fill_solid_region** **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`bool<class_bool>` solid=true **)**
452+
453+
Fills the given ``region`` on the grid with the specified value for the solid flag.
454+
455+
\ **Note:** Calling :ref:`update<class_AStarGrid2D_method_update>` is not needed after the call of this function.
456+
457+
.. rst-class:: classref-item-separator
458+
459+
----
460+
461+
.. _class_AStarGrid2D_method_fill_weight_scale_region:
462+
463+
.. rst-class:: classref-method
464+
465+
void **fill_weight_scale_region** **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`float<class_float>` weight_scale **)**
466+
467+
Fills the given ``region`` on the grid with the specified value for the weight scale.
468+
469+
\ **Note:** Calling :ref:`update<class_AStarGrid2D_method_update>` is not needed after the call of this function.
470+
471+
.. rst-class:: classref-item-separator
472+
473+
----
474+
443475
.. _class_AStarGrid2D_method_get_id_path:
444476

445477
.. rst-class:: classref-method

classes/class_audioeffectdelay.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Feedback delay time in milliseconds.
137137
- void **set_feedback_level_db** **(** :ref:`float<class_float>` value **)**
138138
- :ref:`float<class_float>` **get_feedback_level_db** **(** **)**
139139

140-
Sound level for ``tap1``.
140+
Sound level for feedback.
141141

142142
.. rst-class:: classref-item-separator
143143

@@ -171,7 +171,7 @@ Low-pass filter for feedback, in Hz. Frequencies below this value are filtered o
171171
- void **set_tap1_active** **(** :ref:`bool<class_bool>` value **)**
172172
- :ref:`bool<class_bool>` **is_tap1_active** **(** **)**
173173

174-
If ``true``, ``tap1`` will be enabled.
174+
If ``true``, the first tap will be enabled.
175175

176176
.. rst-class:: classref-item-separator
177177

@@ -188,7 +188,7 @@ If ``true``, ``tap1`` will be enabled.
188188
- void **set_tap1_delay_ms** **(** :ref:`float<class_float>` value **)**
189189
- :ref:`float<class_float>` **get_tap1_delay_ms** **(** **)**
190190

191-
``tap1`` delay time in milliseconds.
191+
First tap delay time in milliseconds.
192192

193193
.. rst-class:: classref-item-separator
194194

@@ -205,7 +205,7 @@ If ``true``, ``tap1`` will be enabled.
205205
- void **set_tap1_level_db** **(** :ref:`float<class_float>` value **)**
206206
- :ref:`float<class_float>` **get_tap1_level_db** **(** **)**
207207

208-
Sound level for ``tap1``.
208+
Sound level for the first tap.
209209

210210
.. rst-class:: classref-item-separator
211211

@@ -222,7 +222,7 @@ Sound level for ``tap1``.
222222
- void **set_tap1_pan** **(** :ref:`float<class_float>` value **)**
223223
- :ref:`float<class_float>` **get_tap1_pan** **(** **)**
224224

225-
Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right).
225+
Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right).
226226

227227
.. rst-class:: classref-item-separator
228228

@@ -239,7 +239,7 @@ Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully righ
239239
- void **set_tap2_active** **(** :ref:`bool<class_bool>` value **)**
240240
- :ref:`bool<class_bool>` **is_tap2_active** **(** **)**
241241

242-
If ``true``, ``tap2`` will be enabled.
242+
If ``true``, the second tap will be enabled.
243243

244244
.. rst-class:: classref-item-separator
245245

@@ -256,7 +256,7 @@ If ``true``, ``tap2`` will be enabled.
256256
- void **set_tap2_delay_ms** **(** :ref:`float<class_float>` value **)**
257257
- :ref:`float<class_float>` **get_tap2_delay_ms** **(** **)**
258258

259-
**Tap2** delay time in milliseconds.
259+
Second tap delay time in milliseconds.
260260

261261
.. rst-class:: classref-item-separator
262262

@@ -273,7 +273,7 @@ If ``true``, ``tap2`` will be enabled.
273273
- void **set_tap2_level_db** **(** :ref:`float<class_float>` value **)**
274274
- :ref:`float<class_float>` **get_tap2_level_db** **(** **)**
275275

276-
Sound level for ``tap2``.
276+
Sound level for the second tap.
277277

278278
.. rst-class:: classref-item-separator
279279

@@ -290,7 +290,7 @@ Sound level for ``tap2``.
290290
- void **set_tap2_pan** **(** :ref:`float<class_float>` value **)**
291291
- :ref:`float<class_float>` **get_tap2_pan** **(** **)**
292292

293-
Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right).
293+
Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right).
294294

295295
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
296296
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`

classes/class_audioserver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Returns the names of all audio output devices detected on the system.
488488

489489
:ref:`float<class_float>` **get_output_latency** **(** **)** |const|
490490

491-
Returns the audio driver's output latency.
491+
Returns the audio driver's output latency. This can be expensive, it is not recommended to call this every frame.
492492

493493
.. rst-class:: classref-item-separator
494494

classes/class_basebutton.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Methods
6666
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
6767
| void | :ref:`_pressed<class_BaseButton_method__pressed>` **(** **)** |virtual| |
6868
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
69-
| void | :ref:`_toggled<class_BaseButton_method__toggled>` **(** :ref:`bool<class_bool>` button_pressed **)** |virtual| |
69+
| void | :ref:`_toggled<class_BaseButton_method__toggled>` **(** :ref:`bool<class_bool>` toggled_on **)** |virtual| |
7070
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
7171
| :ref:`DrawMode<enum_BaseButton_DrawMode>` | :ref:`get_draw_mode<class_BaseButton_method_get_draw_mode>` **(** **)** |const| |
7272
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
@@ -126,9 +126,9 @@ If you need to know the button's pressed state (and :ref:`toggle_mode<class_Base
126126

127127
.. rst-class:: classref-signal
128128

129-
**toggled** **(** :ref:`bool<class_bool>` button_pressed **)**
129+
**toggled** **(** :ref:`bool<class_bool>` toggled_on **)**
130130

131-
Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active). The new state is contained in the ``button_pressed`` argument.
131+
Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active). The new state is contained in the ``toggled_on`` argument.
132132

133133
.. rst-class:: classref-section-separator
134134

@@ -419,7 +419,7 @@ Called when the button is pressed. If you need to know the button's pressed stat
419419

420420
.. rst-class:: classref-method
421421

422-
void **_toggled** **(** :ref:`bool<class_bool>` button_pressed **)** |virtual|
422+
void **_toggled** **(** :ref:`bool<class_bool>` toggled_on **)** |virtual|
423423

424424
Called when the button is toggled (only if :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active).
425425

classes/class_bone2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void **set_bone_angle** **(** :ref:`float<class_float>` angle **)**
192192

193193
Sets the bone angle for the **Bone2D**. This is typically set to the rotation from the **Bone2D** to a child **Bone2D** node.
194194

195-
\ **Note:** **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform<class_Node2D_property_transform>`.
195+
\ **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform<class_Node2D_property_transform>`.
196196

197197
.. rst-class:: classref-item-separator
198198

0 commit comments

Comments
 (0)