Bläddra i källkod

classref: Sync with current 3.5 branch (65368771)

Rémi Verschelde 3 år sedan
förälder
incheckning
9e1434d1c9

+ 1 - 1
classes/class_canvasitem.rst

@@ -404,7 +404,7 @@ Draws a string character using a custom font. Returns the advance, depending on
 
 
 - void **draw_circle** **(** :ref:`Vector2<class_Vector2>` position, :ref:`float<class_float>` radius, :ref:`Color<class_Color>` color **)**
 - void **draw_circle** **(** :ref:`Vector2<class_Vector2>` position, :ref:`float<class_float>` radius, :ref:`Color<class_Color>` color **)**
 
 
-Draws a colored, unfilled circle. See also :ref:`draw_arc<class_CanvasItem_method_draw_arc>`, :ref:`draw_polyline<class_CanvasItem_method_draw_polyline>` and :ref:`draw_polygon<class_CanvasItem_method_draw_polygon>`.
+Draws a colored, filled circle. See also :ref:`draw_arc<class_CanvasItem_method_draw_arc>`, :ref:`draw_polyline<class_CanvasItem_method_draw_polyline>` and :ref:`draw_polygon<class_CanvasItem_method_draw_polygon>`.
 
 
 \ **Note:** Built-in antialiasing is not provided for :ref:`draw_circle<class_CanvasItem_method_draw_circle>`. As a workaround, install the `Antialiased Line2D <https://github.com/godot-extended-libraries/godot-antialiased-line2d>`__ add-on then create an AntialiasedRegularPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
 \ **Note:** Built-in antialiasing is not provided for :ref:`draw_circle<class_CanvasItem_method_draw_circle>`. As a workaround, install the `Antialiased Line2D <https://github.com/godot-extended-libraries/godot-antialiased-line2d>`__ add-on then create an AntialiasedRegularPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
 
 

+ 9 - 9
classes/class_color.rst

@@ -852,7 +852,7 @@ Constructs a color from a 32-bit integer in RGBA format (each byte represents a
 
 
 ::
 ::
 
 
-    var c = Color(274) # Similar to Color(0.0, 0.0, 0.004, 0.07)
+    var color = Color(274) # Similar to Color(0.0, 0.0, 0.004, 0.07)
 
 
 ----
 ----
 
 
@@ -898,8 +898,8 @@ Returns the most contrasting color.
 
 
 ::
 ::
 
 
-    var c = Color(0.3, 0.4, 0.9)
-    var contrasted_color = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255)
+    var color = Color(0.3, 0.4, 0.9)
+    var contrasted_color = color.contrasted() # Equivalent to RGBA(204, 229, 102, 255)
 
 
 ----
 ----
 
 
@@ -924,7 +924,7 @@ Constructs a color from an HSV profile. ``h``, ``s``, and ``v`` are values betwe
 
 
 ::
 ::
 
 
-    var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
+    var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
 
 
 ----
 ----
 
 
@@ -948,8 +948,8 @@ The gray value is calculated as ``(r + g + b) / 3``.
 
 
 ::
 ::
 
 
-    var c = Color(0.2, 0.45, 0.82)
-    var gray = c.gray() # A value of 0.466667
+    var color = Color(0.2, 0.45, 0.82)
+    var gray = color.gray() # A value of 0.466667
 
 
 ----
 ----
 
 
@@ -1063,9 +1063,9 @@ Setting ``with_alpha`` to ``false`` excludes alpha from the hexadecimal string.
 
 
 ::
 ::
 
 
-    var c = Color(1, 1, 1, 0.5)
-    var s1 = c.to_html() # Returns "7fffffff"
-    var s2 = c.to_html(false) # Returns "ffffff"
+    var color = Color(1, 1, 1, 0.5)
+    var s1 = color.to_html() # Returns "7fffffff"
+    var s2 = color.to_html(false) # Returns "ffffff"
 
 
 ----
 ----
 
 

+ 1 - 1
classes/class_editorplugin.rst

@@ -616,7 +616,7 @@ For main screen plugins, this appears at the top of the screen, to the right of
 
 
 - :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog** **(** **)**
 - :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog** **(** **)**
 
 
-Gets the Editor's dialogue used for making scripts.
+Gets the Editor's dialog used for making scripts.
 
 
 \ **Note:** Users can configure it before use.
 \ **Note:** Users can configure it before use.
 
 

+ 2 - 2
classes/class_environment.rst

@@ -378,9 +378,9 @@ enum **SSAOQuality**:
 
 
 - **SSAO_QUALITY_LOW** = **0** --- Low quality for the screen-space ambient occlusion effect (fastest).
 - **SSAO_QUALITY_LOW** = **0** --- Low quality for the screen-space ambient occlusion effect (fastest).
 
 
-- **SSAO_QUALITY_MEDIUM** = **1** --- Low quality for the screen-space ambient occlusion effect.
+- **SSAO_QUALITY_MEDIUM** = **1** --- Medium quality for the screen-space ambient occlusion effect.
 
 
-- **SSAO_QUALITY_HIGH** = **2** --- Low quality for the screen-space ambient occlusion effect (slowest).
+- **SSAO_QUALITY_HIGH** = **2** --- High quality for the screen-space ambient occlusion effect (slowest).
 
 
 Property Descriptions
 Property Descriptions
 ---------------------
 ---------------------

+ 5 - 1
classes/class_navigation2dserver.rst

@@ -18,7 +18,11 @@ Description
 
 
 Navigation2DServer is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents.
 Navigation2DServer is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents.
 
 
-Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than :ref:`Navigation.edge_connection_margin<class_Navigation_property_edge_connection_margin>` to the respective other edge's vertex.
+Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world.
+
+\ **Note:** Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
+
+For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than :ref:`Navigation.edge_connection_margin<class_Navigation_property_edge_connection_margin>` to the respective other edge's vertex.
 
 
 To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
 To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
 
 

+ 5 - 1
classes/class_navigationserver.rst

@@ -18,7 +18,11 @@ Description
 
 
 NavigationServer is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents.
 NavigationServer is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents.
 
 
-Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than :ref:`Navigation.edge_connection_margin<class_Navigation_property_edge_connection_margin>` to the respective other edge's vertex.
+Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world.
+
+\ **Note:** Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
+
+For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than :ref:`Navigation.edge_connection_margin<class_Navigation_property_edge_connection_margin>` to the respective other edge's vertex.
 
 
 To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
 To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
 
 

+ 1 - 1
classes/class_nodepath.rst

@@ -128,7 +128,7 @@ Returns all subnames concatenated with a colon character (``:``) as separator, i
 
 
 - :ref:`String<class_String>` **get_name** **(** :ref:`int<class_int>` idx **)**
 - :ref:`String<class_String>` **get_name** **(** :ref:`int<class_int>` idx **)**
 
 
-Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count<class_NodePath_method_get_name_count>`).
+Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count<class_NodePath_method_get_name_count>` - 1).
 
 
 ::
 ::
 
 

+ 1 - 1
classes/class_os.rst

@@ -2237,7 +2237,7 @@ Requests the OS to open a resource with the most appropriate program. For exampl
 
 
 - ``OS.shell_open("https://godotengine.org")`` opens the default web browser on the official Godot website.
 - ``OS.shell_open("https://godotengine.org")`` opens the default web browser on the official Godot website.
 
 
-- ``OS.shell_open("mailto:[email protected]")`` opens the default email client with the "To" field set to ``[email protected]``. See `Customizing [code]mailto:[/code] Links <https://blog.escapecreative.com/customizing-mailto-links/>`__ for a list of fields that can be added.
+- ``OS.shell_open("mailto:[email protected]")`` opens the default email client with the "To" field set to ``[email protected]``. See `RFC 2368 - The [code]mailto[/code] URL scheme <https://datatracker.ietf.org/doc/html/rfc2368>`__ for a list of fields that can be added.
 
 
 Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>` to convert a ``res://`` or ``user://`` path into a system path for use with this method.
 Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>` to convert a ``res://`` or ``user://`` path into a system path for use with this method.
 
 

+ 1 - 1
classes/class_poolbytearray.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold bytes. Optimized for memory usage, does n
 
 
     var array = [PoolByteArray()]
     var array = [PoolByteArray()]
     array[0].push_back(123)
     array[0].push_back(123)
-    print(array)  # [[]] (empty PoolByteArray within an empty Array)
+    print(array)  # [[]] (empty PoolByteArray within an Array)
 
 
 Instead, the entire ``PoolByteArray`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolByteArray`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_poolcolorarray.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold :ref:`Color<class_Color>`. Optimized for
 
 
     var array = [PoolColorArray()]
     var array = [PoolColorArray()]
     array[0].push_back(Color(0.1, 0.2, 0.3, 0.4))
     array[0].push_back(Color(0.1, 0.2, 0.3, 0.4))
-    print(array)  # [[]] (empty PoolColorArray within an empty Array)
+    print(array)  # [[]] (empty PoolColorArray within an Array)
 
 
 Instead, the entire ``PoolColorArray`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolColorArray`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_poolintarray.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold integer values (:ref:`int<class_int>`). O
 
 
     var array = [PoolIntArray()]
     var array = [PoolIntArray()]
     array[0].push_back(1234)
     array[0].push_back(1234)
-    print(array)  # [[]] (empty PoolIntArray within an empty Array)
+    print(array)  # [[]] (empty PoolIntArray within an Array)
 
 
 Instead, the entire ``PoolIntArray`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolIntArray`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_poolrealarray.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold floating-point values. Optimized for memo
 
 
     var array = [PoolRealArray()]
     var array = [PoolRealArray()]
     array[0].push_back(12.34)
     array[0].push_back(12.34)
-    print(array)  # [[]] (empty PoolRealArray within an empty Array)
+    print(array)  # [[]] (empty PoolRealArray within an Array)
 
 
 Instead, the entire ``PoolRealArray`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolRealArray`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_poolstringarray.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold :ref:`String<class_String>`\ s. Optimized
 
 
     var array = [PoolStringArray()]
     var array = [PoolStringArray()]
     array[0].push_back("hello")
     array[0].push_back("hello")
-    print(array)  # [[]] (empty PoolStringArray within an empty Array)
+    print(array)  # [[]] (empty PoolStringArray within an Array)
 
 
 Instead, the entire ``PoolStringArray`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolStringArray`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_poolvector2array.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold :ref:`Vector2<class_Vector2>`. Optimized
 
 
     var array = [PoolVector2Array()]
     var array = [PoolVector2Array()]
     array[0].push_back(Vector2(12, 34))
     array[0].push_back(Vector2(12, 34))
-    print(array)  # [[]] (empty PoolVector2Array within an empty Array)
+    print(array)  # [[]] (empty PoolVector2Array within an Array)
 
 
 Instead, the entire ``PoolVector2Array`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolVector2Array`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_poolvector3array.rst

@@ -22,7 +22,7 @@ An array specifically designed to hold :ref:`Vector3<class_Vector3>`. Optimized
 
 
     var array = [PoolVector3Array()]
     var array = [PoolVector3Array()]
     array[0].push_back(Vector3(12, 34, 56))
     array[0].push_back(Vector3(12, 34, 56))
-    print(array)  # [[]] (empty PoolVector3Array within an empty Array)
+    print(array)  # [[]] (empty PoolVector3Array within an Array)
 
 
 Instead, the entire ``PoolVector3Array`` property must be *reassigned* with ``=`` for it to be changed:
 Instead, the entire ``PoolVector3Array`` property must be *reassigned* with ``=`` for it to be changed:
 
 

+ 1 - 1
classes/class_range.rst

@@ -18,7 +18,7 @@ Abstract base class for range-based controls.
 Description
 Description
 -----------
 -----------
 
 
-Range is a base class for :ref:`Control<class_Control>` nodes that change a floating-point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar<class_ScrollBar>`.
+Range is a base class for :ref:`Control<class_Control>` nodes that change a floating-point :ref:`value<class_Range_property_value>` between a :ref:`min_value<class_Range_property_min_value>` and :ref:`max_value<class_Range_property_max_value>`, using a configured :ref:`step<class_Range_property_step>` and :ref:`page<class_Range_property_page>` size. See e.g. :ref:`ScrollBar<class_ScrollBar>` and :ref:`Slider<class_Slider>` for examples of higher level nodes using Range.
 
 
 Properties
 Properties
 ----------
 ----------

+ 1 - 1
classes/class_rigidbody.rst

@@ -222,7 +222,7 @@ Property Descriptions
 | *Getter*  | get_angular_damp()      |
 | *Getter*  | get_angular_damp()      |
 +-----------+-------------------------+
 +-----------+-------------------------+
 
 
-Damps RigidBody's rotational forces. If this value is different from -1.0 it will be added to any linear damp derived from the world or areas.
+Damps the body's rotational forces. If this value is different from -1.0 it will be added to any angular damp derived from the world or areas.
 
 
 See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_property_physics/3d/default_angular_damp>` for more details about damping.
 See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_property_physics/3d/default_angular_damp>` for more details about damping.
 
 

+ 1 - 1
classes/class_scenetreetimer.rst

@@ -27,7 +27,7 @@ As opposed to :ref:`Timer<class_Timer>`, it does not require the instantiation o
         yield(get_tree().create_timer(1.0), "timeout")
         yield(get_tree().create_timer(1.0), "timeout")
         print("Timer ended.")
         print("Timer ended.")
 
 
-The timer will be automatically freed after its time elapses.
+The timer will be automatically freed after its time elapses, so be aware that any reference you might have kept to it will become invalid.
 
 
 Properties
 Properties
 ----------
 ----------

+ 1 - 1
classes/class_viewport.rst

@@ -642,7 +642,7 @@ The multisample anti-aliasing mode. A higher number results in smoother edges at
 | *Getter*  | is_using_own_world()     |
 | *Getter*  | is_using_own_world()     |
 +-----------+--------------------------+
 +-----------+--------------------------+
 
 
-If ``true``, the viewport will use :ref:`World<class_World>` defined in ``world`` property.
+If ``true``, the viewport will use a unique copy of the :ref:`World<class_World>` defined in :ref:`world<class_Viewport_property_world>`.
 
 
 ----
 ----
 
 

+ 1 - 1
classes/class_visualserver.rst

@@ -4911,7 +4911,7 @@ For example, you can set the root viewport to not render at all with the followi
         get_viewport().set_attach_to_screen_rect(Rect2())
         get_viewport().set_attach_to_screen_rect(Rect2())
         $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
         $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
 
 
-Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, :ref:`viewport_set_render_direct_to_screen<class_VisualServer_method_viewport_set_render_direct_to_screen>`.
+Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see :ref:`viewport_set_render_direct_to_screen<class_VisualServer_method_viewport_set_render_direct_to_screen>`.
 
 
 ----
 ----