Skip to content

Commit acb8eda

Browse files
authored
Merge pull request godotengine#8390 from godotengine/classref/sync-5ee9831
classref: Sync with current master branch (5ee9831)
2 parents 3d2daae + 2bba3c8 commit acb8eda

21 files changed

+135
-71
lines changed

classes/class_audiostreamgeneratorplayback.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ Returns the number of frames that can be pushed to the audio sample data buffer
103103

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

106-
.. container:: contribute
107-
108-
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
106+
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.
109107

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

classes/class_concavepolygonshape2d.rst

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

2222
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.
2323

24-
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.
24+
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.
2525

2626
\ **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.
2727

classes/class_concavepolygonshape3d.rst

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

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

24-
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.
24+
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.
2525

2626
\ **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.
2727

classes/class_dictionary.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,48 @@ void **merge** **(** :ref:`Dictionary<class_Dictionary>` dictionary, :ref:`bool<
532532

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

535+
536+
.. tabs::
537+
538+
.. code-tab:: gdscript
539+
540+
var dict = { "item": "sword", "quantity": 2 }
541+
var other_dict = { "quantity": 15, "color": "silver" }
542+
543+
# Overwriting of existing keys is disabled by default.
544+
dict.merge(other_dict)
545+
print(dict) # { "item": "sword", "quantity": 2, "color": "silver" }
546+
547+
# With overwriting of existing keys enabled.
548+
dict.merge(other_dict, true)
549+
print(dict) # { "item": "sword", "quantity": 15, "color": "silver" }
550+
551+
.. code-tab:: csharp
552+
553+
var dict = new Godot.Collections.Dictionary
554+
{
555+
["item"] = "sword",
556+
["quantity"] = 2,
557+
};
558+
559+
var otherDict = new Godot.Collections.Dictionary
560+
{
561+
["quantity"] = 15,
562+
["color"] = "silver",
563+
};
564+
565+
// Overwriting of existing keys is disabled by default.
566+
dict.Merge(otherDict);
567+
GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" }
568+
569+
// With overwriting of existing keys enabled.
570+
dict.Merge(otherDict, true);
571+
GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" }
572+
573+
574+
575+
\ **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.
576+
535577
.. rst-class:: classref-item-separator
536578

537579
----

classes/class_gpuparticles2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ If ``true``, results in fractional delta calculation which has a smoother partic
384384

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

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

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

classes/class_gpuparticles3d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ If ``true``, results in fractional delta calculation which has a smoother partic
567567

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

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

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

classes/class_importermesh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ If not yet cached and ``base_mesh`` is provided, ``base_mesh`` will be used and
255255

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

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

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

classes/class_mesh.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,14 @@ Flag used to mark that the mesh contains up to 8 bone influences per vertex. Thi
589589

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

592+
.. _class_Mesh_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES:
593+
594+
.. rst-class:: classref-enumeration-constant
595+
596+
:ref:`ArrayFormat<enum_Mesh_ArrayFormat>` **ARRAY_FLAG_COMPRESS_ATTRIBUTES** = ``536870912``
597+
598+
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.
599+
592600
.. rst-class:: classref-item-separator
593601

594602
----

classes/class_multiplayerapiextension.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following example augment the default implementation (:ref:`SceneMultiplayer
3535
var base_multiplayer = SceneMultiplayer.new()
3636

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

48+
func _poll():
49+
return base_multiplayer.poll()
50+
4851
# Log RPC being made and forward it to the default multiplayer.
49-
func _rpc(peer: int, object: Object, method: StringName, args: Array) -> int: # Error
52+
func _rpc(peer: int, object: Object, method: StringName, args: Array) -> Error:
5053
print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args])
5154
return base_multiplayer.rpc(peer, object, method, args)
5255

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

6164
# Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
62-
func _object_configuration_remove(object, config: Variant) -> int: # Error
65+
func _object_configuration_remove(object, config: Variant) -> Error:
6366
if config is MultiplayerSynchronizer:
6467
print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config])
6568
elif config is MultiplayerSpawner:

classes/class_node.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ Notification received every frame when the internal physics process flag is set
769769

770770
**NOTIFICATION_POST_ENTER_TREE** = ``27``
771771

772-
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.
772+
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.
773773

774774
.. _class_Node_constant_NOTIFICATION_DISABLED:
775775

0 commit comments

Comments
 (0)