Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions classes/class_audiostreamgeneratorplayback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ Returns the number of frames that can be pushed to the audio sample data buffer

:ref:`int<class_int>` **get_skips** **(** **)** |const|

.. container:: contribute

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
Returns the number of times the playback skipped due to a buffer underrun in the audio sample data. This value is reset at the start of the playback.

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

Expand Down
2 changes: 1 addition & 1 deletion classes/class_concavepolygonshape2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Description

A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D<class_CollisionPolygon2D>` when it's in :ref:`CollisionPolygon2D.BUILD_SEGMENTS<class_CollisionPolygon2D_constant_BUILD_SEGMENTS>` mode.

Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, :ref:`ConvexPolygonShape2D<class_ConvexPolygonShape2D>` is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection.
Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, **ConcavePolygonShape2D** is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection.

\ **Note:** When used for collision, **ConcavePolygonShape2D** is intended to work with static :ref:`CollisionShape2D<class_CollisionShape2D>` nodes like :ref:`StaticBody2D<class_StaticBody2D>` and will likely not behave well for :ref:`CharacterBody2D<class_CharacterBody2D>`\ s or :ref:`RigidBody2D<class_RigidBody2D>`\ s in a mode other than Static.

Expand Down
2 changes: 1 addition & 1 deletion classes/class_concavepolygonshape3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Description

A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D<class_CollisionShape3D>`.

Being just a collection of interconnected triangles, **ConcavePolygonShape3D** is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` is *hollow* even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.
Being just a collection of interconnected triangles, **ConcavePolygonShape3D** is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, **ConcavePolygonShape3D** is *hollow* even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.

\ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`CollisionShape3D<class_CollisionShape3D>` nodes like :ref:`StaticBody3D<class_StaticBody3D>` and will likely not behave well for :ref:`CharacterBody3D<class_CharacterBody3D>`\ s or :ref:`RigidBody3D<class_RigidBody3D>`\ s in a mode other than Static.

Expand Down
42 changes: 42 additions & 0 deletions classes/class_dictionary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,48 @@ void **merge** **(** :ref:`Dictionary<class_Dictionary>` dictionary, :ref:`bool<

Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``.


.. tabs::

.. code-tab:: gdscript

var dict = { "item": "sword", "quantity": 2 }
var other_dict = { "quantity": 15, "color": "silver" }

# Overwriting of existing keys is disabled by default.
dict.merge(other_dict)
print(dict) # { "item": "sword", "quantity": 2, "color": "silver" }

# With overwriting of existing keys enabled.
dict.merge(other_dict, true)
print(dict) # { "item": "sword", "quantity": 15, "color": "silver" }

.. code-tab:: csharp

var dict = new Godot.Collections.Dictionary
{
["item"] = "sword",
["quantity"] = 2,
};

var otherDict = new Godot.Collections.Dictionary
{
["quantity"] = 15,
["color"] = "silver",
};

// Overwriting of existing keys is disabled by default.
dict.Merge(otherDict);
GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" }

// With overwriting of existing keys enabled.
dict.Merge(otherDict, true);
GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" }



\ **Note:** :ref:`merge<class_Dictionary_method_merge>` is *not* recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of ``overwrite``, but they will never be merged together.

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

----
Expand Down
2 changes: 1 addition & 1 deletion classes/class_gpuparticles2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ If ``true``, results in fractional delta calculation which has a smoother partic

Causes all the particles in this node to interpolate towards the end of their lifetime.

\ **Note**: This only works when used with a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`. It needs to be manually implemented for custom process shaders.
\ **Note:** This only works when used with a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`. It needs to be manually implemented for custom process shaders.

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

Expand Down
2 changes: 1 addition & 1 deletion classes/class_gpuparticles3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ If ``true``, results in fractional delta calculation which has a smoother partic

Causes all the particles in this node to interpolate towards the end of their lifetime.

\ **Note**: This only works when used with a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`. It needs to be manually implemented for custom process shaders.
\ **Note:** This only works when used with a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`. It needs to be manually implemented for custom process shaders.

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

Expand Down
2 changes: 1 addition & 1 deletion classes/class_importermesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ If not yet cached and ``base_mesh`` is provided, ``base_mesh`` will be used and

:ref:`Array<class_Array>` **get_surface_arrays** **(** :ref:`int<class_int>` surface_idx **)** |const|

Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See :ref:`add_surface<class_ImporterMesh_method_add_surface>`.
Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See :ref:`add_surface<class_ImporterMesh_method_add_surface>`.

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

Expand Down
8 changes: 8 additions & 0 deletions classes/class_mesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,14 @@ Flag used to mark that the mesh contains up to 8 bone influences per vertex. Thi

Flag used to mark that the mesh intentionally contains no vertex array.

.. _class_Mesh_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES:

.. rst-class:: classref-enumeration-constant

:ref:`ArrayFormat<enum_Mesh_ArrayFormat>` **ARRAY_FLAG_COMPRESS_ATTRIBUTES** = ``536870912``

Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can.

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

----
Expand Down
11 changes: 7 additions & 4 deletions classes/class_multiplayerapiextension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following example augment the default implementation (:ref:`SceneMultiplayer
var base_multiplayer = SceneMultiplayer.new()

func _init():
# Just passthourgh base signals (copied to var to avoid cyclic reference)
# Just passthrough base signals (copied to var to avoid cyclic reference)
var cts = connected_to_server
var cf = connection_failed
var pc = peer_connected
Expand All @@ -45,21 +45,24 @@ The following example augment the default implementation (:ref:`SceneMultiplayer
base_multiplayer.peer_connected.connect(func(id): pc.emit(id))
base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id))

func _poll():
return base_multiplayer.poll()

# Log RPC being made and forward it to the default multiplayer.
func _rpc(peer: int, object: Object, method: StringName, args: Array) -> int: # Error
func _rpc(peer: int, object: Object, method: StringName, args: Array) -> Error:
print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args])
return base_multiplayer.rpc(peer, object, method, args)

# Log configuration add. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
func _object_configuration_add(object, config: Variant) -> int: # Error
func _object_configuration_add(object, config: Variant) -> Error:
if config is MultiplayerSynchronizer:
print("Adding synchronization configuration for %s. Synchronizer: %s" % [object, config])
elif config is MultiplayerSpawner:
print("Adding node %s to the spawn list. Spawner: %s" % [object, config])
return base_multiplayer.object_configuration_add(object, config)

# Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
func _object_configuration_remove(object, config: Variant) -> int: # Error
func _object_configuration_remove(object, config: Variant) -> Error:
if config is MultiplayerSynchronizer:
print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config])
elif config is MultiplayerSpawner:
Expand Down
2 changes: 1 addition & 1 deletion classes/class_node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ Notification received every frame when the internal physics process flag is set

**NOTIFICATION_POST_ENTER_TREE** = ``27``

Notification received when the node is ready, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` is received. Unlike the latter, it's sent every time the node enters tree, instead of only once.
Notification received when the node is ready, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` is received. Unlike the latter, it's sent every time the node enters the tree, instead of only once.

.. _class_Node_constant_NOTIFICATION_DISABLED:

Expand Down
4 changes: 1 addition & 3 deletions classes/class_particleprocessmaterial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2295,9 +2295,7 @@ A :ref:`CurveTexture<class_CurveTexture>` that defines the maximum velocity of a
- void **set_velocity_pivot** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_velocity_pivot** **(** **)**

.. container:: contribute

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
A pivot point used to calculate radial and orbital velocity of particles.

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

Expand Down
2 changes: 1 addition & 1 deletion classes/class_popupmenu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ If ``allow_echo`` is ``true``, the shortcut can be activated with echo events.

void **add_submenu_item** **(** :ref:`String<class_String>` label, :ref:`String<class_String>` submenu, :ref:`int<class_int>` id=-1 **)**

Adds an item that will act as a submenu of the parent **PopupMenu** node when clicked. The ``submenu`` argument is the name of the child **PopupMenu** node that will be shown when the item is clicked.
Adds an item that will act as a submenu of the parent **PopupMenu** node when clicked. The ``submenu`` argument must be the name of an existing **PopupMenu** that has been added as a child to this node. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the ``ui_select`` or ``ui_right`` input actions.

An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index.

Expand Down
Loading