From 80938cfdf264bc0d636b932c42983e73e8aa7e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 8 May 2018 23:51:24 +0200 Subject: [PATCH] Sync classref with current source --- classes/class_@gdscript.rst | 4 +- classes/class_animationplayer.rst | 4 +- classes/class_arraymesh.rst | 14 ++- classes/class_arvrserver.rst | 20 +--- classes/class_audiostreamplayer.rst | 2 +- classes/class_audiostreamplayer2d.rst | 2 +- classes/class_audiostreamplayer3d.rst | 2 +- classes/class_basebutton.rst | 12 +- classes/class_camera.rst | 2 +- classes/class_canvasitemmaterial.rst | 1 + classes/class_capsuleshape2d.rst | 2 +- classes/class_configfile.rst | 2 +- classes/class_dictionary.rst | 2 + classes/class_editorplugin.rst | 4 + classes/class_engine.rst | 6 +- classes/class_generic6dofjoint.rst | 61 ++++++++-- classes/class_geometry.rst | 8 ++ classes/class_gradient.rst | 2 +- classes/class_graphedit.rst | 2 + classes/class_httprequest.rst | 4 + classes/class_itemlist.rst | 10 +- classes/class_lineedit.rst | 6 +- classes/class_node.rst | 6 + classes/class_object.rst | 2 + classes/class_optionbutton.rst | 2 + classes/class_os.rst | 130 ++++++++++++--------- classes/class_physicsserver.rst | 21 ++-- classes/class_poolbytearray.rst | 2 +- classes/class_poolcolorarray.rst | 2 +- classes/class_poolintarray.rst | 2 +- classes/class_poolrealarray.rst | 2 +- classes/class_poolstringarray.rst | 2 +- classes/class_poolvector2array.rst | 2 +- classes/class_poolvector3array.rst | 2 +- classes/class_popup.rst | 2 +- classes/class_popupmenu.rst | 2 + classes/class_prismmesh.rst | 2 +- classes/class_richtextlabel.rst | 8 ++ classes/class_scenetree.rst | 8 +- classes/class_script.rst | 2 + classes/class_scrollbar.rst | 2 + classes/class_scrollcontainer.rst | 4 + classes/class_spatial.rst | 8 +- classes/class_splitcontainer.rst | 2 +- classes/class_spriteframes.rst | 2 +- classes/class_string.rst | 32 +++++ classes/class_tilemap.rst | 4 +- classes/class_timer.rst | 18 +-- classes/class_transform.rst | 6 +- classes/class_tween.rst | 112 +++++++++--------- classes/class_vector2.rst | 2 +- classes/class_viewport.rst | 4 + classes/class_visualscriptbuiltinfunc.rst | 2 +- classes/class_visualscriptmathconstant.rst | 4 +- classes/class_visualserver.rst | 2 +- 55 files changed, 373 insertions(+), 202 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index aea30f403..4feef73fd 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -444,7 +444,9 @@ Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-i - :ref:`float` **exp** **(** :ref:`float` s **)** -Raises the Euler's constant **e** to the power of ``s`` and returns it. **e** has an approximate value of 2.71828. +The natural exponential function. It raises the mathematical constant **e** to the power of ``s`` and returns it. + +**e** has an approximate value of 2.71828. :: diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 15370189a..6daec312b 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -230,9 +230,7 @@ Returns ``true`` if playing an animation. - void **play** **(** :ref:`String` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** -Play the animation with key ``name``. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the - -animation backwards. +Play the animation with key ``name``. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. .. _class_AnimationPlayer_play_backwards: diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 8dd2765f7..7e1bc7c81 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -110,7 +110,9 @@ enum **ArrayType** - **ARRAY_TEX_UV2** = **5** --- Second UV array (array of :ref:`Vector3` UVs or float array of groups of 2 floats (u,v)). - **ARRAY_BONES** = **6** --- Array of bone indices, as a float array. Each element in groups of 4 floats. - **ARRAY_WEIGHTS** = **7** --- Array of bone weights, as a float array. Each element in groups of 4 floats. -- **ARRAY_INDEX** = **8** --- Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size. +- **ARRAY_INDEX** = **8** --- :ref:`Array` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the \*i\*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + +For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. - **ARRAY_MAX** = **9** @@ -125,9 +127,15 @@ Member Function Description - void **add_surface_from_arrays** **(** :ref:`int` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[ ], :ref:`int` compress_flags=97792 **)** -Create a new surface (:ref:`get_surface_count` that will become surf_idx for this. +Creates a new surface. -Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles). +Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See :ref:`Mesh` for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). :ref:`get_surface_count` will become the surf_idx for this new surface. + +The ``arrays`` argument is an array of arrays. See enum ArrayType for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for ``ARRAY_INDEX`` if it is used. + +Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. + +Godot uses clockwise winding order for front faces of triangle primitive modes. .. _class_ArrayMesh_center_geometry: diff --git a/classes/class_arvrserver.rst b/classes/class_arvrserver.rst index 6071baf9a..9b69cff8f 100644 --- a/classes/class_arvrserver.rst +++ b/classes/class_arvrserver.rst @@ -38,16 +38,12 @@ Member Functions +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_last_process_usec` **(** **)** | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ARVRInterface` | :ref:`get_primary_interface` **(** **)** const | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`get_reference_frame` **(** **)** const | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ARVRPositionalTracker` | :ref:`get_tracker` **(** :ref:`int` idx **)** const | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tracker_count` **(** **)** const | +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_primary_interface` **(** :ref:`ARVRInterface` interface **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -80,6 +76,10 @@ Signal send when a tracker is removed, you should remove any ARVRController or A Member Variables ---------------- + .. _class_ARVRServer_primary_interface: + +- :ref:`ARVRInterface` **primary_interface** + .. _class_ARVRServer_world_scale: - :ref:`float` **world_scale** - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. @@ -142,6 +142,8 @@ Find an interface by its name. Say that you're making a game that uses specific - :ref:`Transform` **get_hmd_transform** **(** **)** +Returns the primary interface's transformation. + .. _class_ARVRServer_get_interface: - :ref:`ARVRInterface` **get_interface** **(** :ref:`int` idx **)** const @@ -172,10 +174,6 @@ Returns a list of available interfaces with both id and name of the interface. - :ref:`int` **get_last_process_usec** **(** **)** -.. _class_ARVRServer_get_primary_interface: - -- :ref:`ARVRInterface` **get_primary_interface** **(** **)** const - .. _class_ARVRServer_get_reference_frame: - :ref:`Transform` **get_reference_frame** **(** **)** const @@ -194,10 +192,4 @@ Get the positional tracker at the given ID. Get the number of trackers currently registered. -.. _class_ARVRServer_set_primary_interface: - -- void **set_primary_interface** **(** :ref:`ARVRInterface` interface **)** - -Changes the primary interface to the specified interface. Again mostly exposed for GDNative interfaces. - diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index bdfe30a55..04980d234 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -56,7 +56,7 @@ Member Variables .. _class_AudioStreamPlayer_pitch_scale: -- :ref:`float` **pitch_scale** +- :ref:`float` **pitch_scale** - Changes the pitch and the tempo of the audio. .. _class_AudioStreamPlayer_playing: diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 65f452114..21dc60470 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -64,7 +64,7 @@ Member Variables .. _class_AudioStreamPlayer2D_pitch_scale: -- :ref:`float` **pitch_scale** +- :ref:`float` **pitch_scale** - Changes the pitch and the tempo of the audio. .. _class_AudioStreamPlayer2D_playing: diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 39dd97598..77f6085e3 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -96,7 +96,7 @@ Member Variables .. _class_AudioStreamPlayer3D_pitch_scale: -- :ref:`float` **pitch_scale** +- :ref:`float` **pitch_scale** - Changes the pitch and the tempo of the audio. .. _class_AudioStreamPlayer3D_playing: diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index d7a25f0bb..75436177e 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -66,6 +66,12 @@ Member Variables - :ref:`ActionMode` **action_mode** - Determines when the button is considered clicked, one of the ACTION_MODE\_\* constants. + .. _class_BaseButton_button_mask: + +- :ref:`int` **button_mask** - Binary mask to choose which mouse buttons this button will respond to. + +To allow both left-click and right-click, set this to 3, because it's BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT. + .. _class_BaseButton_disabled: - :ref:`bool` **disabled** - If ``true`` the button is in disabled state and can't be clicked or toggled. @@ -123,13 +129,13 @@ Member Function Description - void **_pressed** **(** **)** virtual -Called when button is pressed. +Called when the button is pressed. .. _class_BaseButton__toggled: - void **_toggled** **(** :ref:`bool` button_pressed **)** virtual -Called when button is toggled (only if toggle_mode is active). +Called when the button is toggled (only if toggle_mode is active). .. _class_BaseButton_get_draw_mode: @@ -141,6 +147,6 @@ Return the visual state used to draw the button. This is useful mainly when impl - :ref:`bool` **is_hovered** **(** **)** const -Return true if mouse entered the button before it exit. +Return true if the mouse has entered the button and has not left it yet. diff --git a/classes/class_camera.rst b/classes/class_camera.rst index 4af641896..2debce2ff 100644 --- a/classes/class_camera.rst +++ b/classes/class_camera.rst @@ -135,7 +135,7 @@ Member Function Description - void **clear_current** **(** :ref:`bool` enable_next=true **)** -If this is the current Camera, remove it from being current. If it is inside the node tree and ``enabled_next`` is ``true[/true], request to make the next Camera current, if any. +If this is the current Camera, remove it from being current. If ``enable_next`` is true, request to make the next Camera current, if any. .. _class_Camera_get_camera_transform: diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index abb8b8ce0..a398c679d 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -48,6 +48,7 @@ enum **BlendMode** - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode. - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode. - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. +- **BLEND_MODE_DISABLED** = **5** --- Disable blending mode. Colors including alpha are written as is. Only applicable for render targets with a transparent background. No lighting will be applied. Description diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 937b46e11..98f507688 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -25,7 +25,7 @@ Member Variables .. _class_CapsuleShape2D_radius: -- :ref:`float` **radius** - The capsules's radius. +- :ref:`float` **radius** - The capsule's radius. Description diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index f0475606c..e3260121f 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -123,6 +123,6 @@ Saves the contents of the ConfigFile object to the file specified as a parameter - void **set_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** -Assigns a value to the specified key of the specified section. If the section and/or the key do not exist, they are created. Passing a ``null`` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. +Assigns a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a ``null`` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 398bde9b7..c0ddc794b 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -57,6 +57,8 @@ Clear the dictionary, removing all key/value pairs. - :ref:`Dictionary` **duplicate** **(** :ref:`bool` deep=False **)** +Creates a copy of the dictionary, and returns it. + .. _class_Dictionary_empty: - :ref:`bool` **empty** **(** **)** diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index cf98fef57..4928726ad 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -234,6 +234,8 @@ During run-time, this will be a simple object with a script so this function doe - void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Object` handler, :ref:`String` callback, :ref:`Variant` ud=null **)** +Adds a custom menu to 'Project > Tools' as ``name`` that calls ``callback`` on an instance of ``handler`` with a parameter ``ud`` when user activates it. + .. _class_EditorPlugin_add_tool_submenu_item: - void **add_tool_submenu_item** **(** :ref:`String` name, :ref:`Object` submenu **)** @@ -400,6 +402,8 @@ Remove a custom type added by :ref:`EditorPlugin.add_custom_type` name **)** +Removes a menu ``name`` from 'Project > Tools'. + .. _class_EditorPlugin_save_external_data: - void **save_external_data** **(** **)** virtual diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 7de690d4c..97a08070b 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -93,11 +93,11 @@ Returns the current engine version information in a Dictionary. -"major" - Holds the major version number as a String +"major" - Holds the major version number as an int -"minor" - Holds the minor version number as a String +"minor" - Holds the minor version number as an int -"patch" - Holds the patch version number as a String +"patch" - Holds the patch version number as an int "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String diff --git a/classes/class_generic6dofjoint.rst b/classes/class_generic6dofjoint.rst index ace328868..eae262eed 100644 --- a/classes/class_generic6dofjoint.rst +++ b/classes/class_generic6dofjoint.rst @@ -225,6 +225,42 @@ The lower, the longer an impulse from one side takes to travel to the other side - :ref:`float` **linear_limit_z/upper_distance** - The maximum difference between the pivot points' z-axis. + .. _class_Generic6DOFJoint_linear_motor_x/enabled: + +- :ref:`bool` **linear_motor_x/enabled** - If ``true`` then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. + + .. _class_Generic6DOFJoint_linear_motor_x/force_limit: + +- :ref:`float` **linear_motor_x/force_limit** - The maximum force the linear motor can apply on the x-axis while trying to reach the target velocity. + + .. _class_Generic6DOFJoint_linear_motor_x/target_velocity: + +- :ref:`float` **linear_motor_x/target_velocity** - The speed that the linear motor will attempt to reach on the x-axis. + + .. _class_Generic6DOFJoint_linear_motor_y/enabled: + +- :ref:`bool` **linear_motor_y/enabled** - If ``true`` then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. + + .. _class_Generic6DOFJoint_linear_motor_y/force_limit: + +- :ref:`float` **linear_motor_y/force_limit** - The maximum force the linear motor can apply on the y-axis while trying to reach the target velocity. + + .. _class_Generic6DOFJoint_linear_motor_y/target_velocity: + +- :ref:`float` **linear_motor_y/target_velocity** - The speed that the linear motor will attempt to reach on the y-axis. + + .. _class_Generic6DOFJoint_linear_motor_z/enabled: + +- :ref:`bool` **linear_motor_z/enabled** - If ``true`` then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. + + .. _class_Generic6DOFJoint_linear_motor_z/force_limit: + +- :ref:`float` **linear_motor_z/force_limit** - The maximum force the linear motor can apply on the z-axis while trying to reach the target velocity. + + .. _class_Generic6DOFJoint_linear_motor_z/target_velocity: + +- :ref:`float` **linear_motor_z/target_velocity** - The speed that the linear motor will attempt to reach on the z-axis. + Enums ----- @@ -236,7 +272,8 @@ enum **Flag** - **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. - **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. - **FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes. -- **FLAG_MAX** = **3** --- End flag of FLAG\_\* constants, used internally. +- **FLAG_ENABLE_LINEAR_MOTOR** = **3** +- **FLAG_MAX** = **4** --- End flag of FLAG\_\* constants, used internally. .. _enum_Generic6DOFJoint_Param: @@ -247,16 +284,18 @@ enum **Param** - **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes The lower, the slower the movement. - **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement The lower, the more momentum gets lost. - **PARAM_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. -- **PARAM_ANGULAR_LOWER_LIMIT** = **5** --- The minimum rotation in negative direction to break loose and rotate around the axes. -- **PARAM_ANGULAR_UPPER_LIMIT** = **6** --- The minimum rotation in positive direction to break loose and rotate around the axes. -- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **7** --- The speed of all rotations across the axes. -- **PARAM_ANGULAR_DAMPING** = **8** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. -- **PARAM_ANGULAR_RESTITUTION** = **9** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. -- **PARAM_ANGULAR_FORCE_LIMIT** = **10** --- The maximum amount of force that can occur, when rotating around the axes. -- **PARAM_ANGULAR_ERP** = **11** --- When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. -- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** --- Target speed for the motor at the axes. -- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **13** --- Maximum acceleration for the motor at the axes. -- **PARAM_MAX** = **14** --- End flag of PARAM\_\* constants, used internally. +- **PARAM_LINEAR_MOTOR_TARGET_VELOCITY** = **5** --- The velocity the linear motor will try to reach. +- **PARAM_LINEAR_MOTOR_FORCE_LIMIT** = **6** --- The maximum force the linear motor will apply while trying to reach the velocity target. +- **PARAM_ANGULAR_LOWER_LIMIT** = **7** --- The minimum rotation in negative direction to break loose and rotate around the axes. +- **PARAM_ANGULAR_UPPER_LIMIT** = **8** --- The minimum rotation in positive direction to break loose and rotate around the axes. +- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **9** --- The speed of all rotations across the axes. +- **PARAM_ANGULAR_DAMPING** = **10** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. +- **PARAM_ANGULAR_RESTITUTION** = **11** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. +- **PARAM_ANGULAR_FORCE_LIMIT** = **12** --- The maximum amount of force that can occur, when rotating around the axes. +- **PARAM_ANGULAR_ERP** = **13** --- When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **14** --- Target speed for the motor at the axes. +- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **15** --- Maximum acceleration for the motor at the axes. +- **PARAM_MAX** = **16** --- End flag of PARAM\_\* constants, used internally. Description diff --git a/classes/class_geometry.rst b/classes/class_geometry.rst index b0cf9e1fd..c3c34f2ef 100644 --- a/classes/class_geometry.rst +++ b/classes/class_geometry.rst @@ -58,6 +58,8 @@ Member Functions +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`segment_intersects_segment_2d` **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`line_intersects_line_2d` **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** | ++--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolVector3Array` | :ref:`segment_intersects_sphere` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`segment_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | @@ -180,6 +182,12 @@ Checks if the segment (``from``, ``to``) intersects the cylinder with height ``h Checks if the two segments (``from_a``, ``to_a``) and (``from_b``, ``to_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. +.. _class_Geometry_line_intersects_line_2d: + +- :ref:`Variant` **line_intersects_line_2d** **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** + +Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. Note that the lines are specified using direction vectors, not end points. + .. _class_Geometry_segment_intersects_sphere: - :ref:`PoolVector3Array` **segment_intersects_sphere** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index f1088333d..40139de19 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -52,7 +52,7 @@ Member Variables Description ----------- -Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. +Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1. Member Function Description --------------------------- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 2419a68e9..aa67c5551 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -94,6 +94,8 @@ Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit. - **node_selected** **(** :ref:`Object` node **)** +Emitted when a GraphNode is selected. + .. _class_GraphEdit_popup_request: - **popup_request** **(** :ref:`Vector2` p_position **)** diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index aedfb49ba..4e5aeb249 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -120,4 +120,8 @@ Returns the current status of the underlying :ref:`HTTPClient` - :ref:`int` **request** **(** :ref:`String` url, :ref:`PoolStringArray` custom_headers=PoolStringArray( ), :ref:`bool` ssl_validate_domain=true, :ref:`int` method=0, :ref:`String` request_data="" **)** +Creates request on the underlying :ref:`HTTPClient`. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host` and passes parameters onto :ref:`HTTPClient.request`. + +Returns ``OK`` if request is successfully created. (Does not imply that the server has responded), ``ERR_UNCONFIGURED`` if not in the tree, ``ERR_BUSY`` if still processing previous request, ``ERR_INVALID_PARAMETER`` if given string is not a valid URL format, or ``ERR_CANT_CONNECT`` if not using thread and the :ref:`HTTPClient` cannot connect to host. + diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 16055c922..63d3d50aa 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -60,7 +60,7 @@ Member Functions +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_item` **(** :ref:`int` p_from_idx, :ref:`int` p_to_idx **)** | +| void | :ref:`move_item` **(** :ref:`int` from_idx, :ref:`int` to_idx **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_item` **(** :ref:`int` idx **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -301,6 +301,8 @@ Returns the current vertical scroll bar for the List. - :ref:`bool` **is_anything_selected** **(** **)** +Returns ``true`` if one or more items are selected. + .. _class_ItemList_is_item_disabled: - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const @@ -327,7 +329,9 @@ Returns whether or not item at the specified index is currently selected. .. _class_ItemList_move_item: -- void **move_item** **(** :ref:`int` p_from_idx, :ref:`int` p_to_idx **)** +- void **move_item** **(** :ref:`int` from_idx, :ref:`int` to_idx **)** + +Moves item at index ``from_idx`` to ``to_idx``. .. _class_ItemList_remove_item: @@ -417,4 +421,6 @@ Ensure item at specified index is not selected. - void **unselect_all** **(** **)** +Ensure there are no items selected. + diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 0033ebba6..261c5226d 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -100,7 +100,11 @@ Member Variables .. _class_LineEdit_secret: -- :ref:`bool` **secret** - If ``true`` every character is shown as "\*". +- :ref:`bool` **secret** - If ``true``, every character is replaced with the secret character (see :ref:`secret_character`). + + .. _class_LineEdit_secret_character: + +- string **secret_character** - The character to use to mask secret input (defaults to "\*"). Only a single character can be used as the secret character. .. _class_LineEdit_text: diff --git a/classes/class_node.rst b/classes/class_node.rst index 047fd48d8..d4418e2b4 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -184,6 +184,12 @@ Member Functions Signals ------- +.. _class_Node_ready: + +- **ready** **(** **)** + +Emitted when the node is ready. + .. _class_Node_renamed: - **renamed** **(** **)** diff --git a/classes/class_object.rst b/classes/class_object.rst index 73151d9fc..de1749636 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -112,6 +112,8 @@ Signals - **script_changed** **(** **)** +Emitted whenever the script of the Object is changed. + Numeric Constants ----------------- diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 2395ef0cd..6bf0003f3 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -68,6 +68,8 @@ Signals - **item_focused** **(** :ref:`int` ID **)** +This signal is emitted when user navigated to an item using ``ui_up`` or ``ui_down`` action. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). + .. _class_OptionButton_item_selected: - **item_selected** **(** :ref:`int` ID **)** diff --git a/classes/class_os.rst b/classes/class_os.rst index 49536a99b..8213870af 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -42,7 +42,7 @@ Member Functions +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_audio_driver_count` **(** **)** const | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_audio_driver_name` **(** :ref:`int` arg0 **)** const | +| :ref:`String` | :ref:`get_audio_driver_name` **(** :ref:`int` driver **)** const | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolStringArray` | :ref:`get_cmdline_args` **(** **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -114,7 +114,7 @@ Member Functions +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_video_driver_count` **(** **)** const | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_driver_name` **(** :ref:`int` arg0 **)** const | +| :ref:`String` | :ref:`get_video_driver_name` **(** :ref:`int` driver **)** const | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_virtual_keyboard_height` **(** **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -192,39 +192,39 @@ Member Variables .. _class_OS_exit_code: -- :ref:`int` **exit_code** +- :ref:`int` **exit_code** - The exit code passed to the OS when the main loop exits. .. _class_OS_keep_screen_on: -- :ref:`bool` **keep_screen_on** +- :ref:`bool` **keep_screen_on** - If ``true`` the engine tries to keep the screen on while the game is running. Useful on mobile. .. _class_OS_low_processor_usage_mode: -- :ref:`bool` **low_processor_usage_mode** +- :ref:`bool` **low_processor_usage_mode** - If ``true`` the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. .. _class_OS_screen_orientation: -- _OS.ScreenOrientation **screen_orientation** - The current screen orientation. +- :ref:`ScreenOrientation` **screen_orientation** - The current screen orientation. .. _class_OS_vsync_enabled: -- :ref:`bool` **vsync_enabled** +- :ref:`bool` **vsync_enabled** - If ``true`` vertical synchronization (Vsync) is enabled. .. _class_OS_window_borderless: -- :ref:`bool` **window_borderless** - If ``true``, removes the window frame. +- :ref:`bool` **window_borderless** - If ``true`` removes the window frame. .. _class_OS_window_fullscreen: -- :ref:`bool` **window_fullscreen** - If ``true``, the window is fullscreen. +- :ref:`bool` **window_fullscreen** - If ``true`` the window is fullscreen. .. _class_OS_window_maximized: -- :ref:`bool` **window_maximized** - If ``true``, the window is maximized. +- :ref:`bool` **window_maximized** - If ``true`` the window is maximized. .. _class_OS_window_minimized: -- :ref:`bool` **window_minimized** - If ``true``, the window is minimized. +- :ref:`bool` **window_minimized** - If ``true`` the window is minimized. .. _class_OS_window_position: @@ -246,65 +246,65 @@ Enums enum **SystemDir** -- **SYSTEM_DIR_DESKTOP** = **0** -- **SYSTEM_DIR_DCIM** = **1** -- **SYSTEM_DIR_DOCUMENTS** = **2** -- **SYSTEM_DIR_DOWNLOADS** = **3** -- **SYSTEM_DIR_MOVIES** = **4** -- **SYSTEM_DIR_MUSIC** = **5** -- **SYSTEM_DIR_PICTURES** = **6** -- **SYSTEM_DIR_RINGTONES** = **7** +- **SYSTEM_DIR_DESKTOP** = **0** --- Desktop directory path. +- **SYSTEM_DIR_DCIM** = **1** --- DCIM (Digital Camera Images) directory path. +- **SYSTEM_DIR_DOCUMENTS** = **2** --- Documents directory path. +- **SYSTEM_DIR_DOWNLOADS** = **3** --- Downloads directory path. +- **SYSTEM_DIR_MOVIES** = **4** --- Movies directory path. +- **SYSTEM_DIR_MUSIC** = **5** --- Music directory path. +- **SYSTEM_DIR_PICTURES** = **6** --- Pictures directory path. +- **SYSTEM_DIR_RINGTONES** = **7** --- Ringtones directory path. .. _enum_OS_ScreenOrientation: enum **ScreenOrientation** -- **SCREEN_ORIENTATION_LANDSCAPE** = **0** -- **SCREEN_ORIENTATION_PORTRAIT** = **1** -- **SCREEN_ORIENTATION_REVERSE_LANDSCAPE** = **2** -- **SCREEN_ORIENTATION_REVERSE_PORTRAIT** = **3** -- **SCREEN_ORIENTATION_SENSOR_LANDSCAPE** = **4** -- **SCREEN_ORIENTATION_SENSOR_PORTRAIT** = **5** -- **SCREEN_ORIENTATION_SENSOR** = **6** +- **SCREEN_ORIENTATION_LANDSCAPE** = **0** --- Landscape screen orientation. +- **SCREEN_ORIENTATION_PORTRAIT** = **1** --- Portrait screen orientation. +- **SCREEN_ORIENTATION_REVERSE_LANDSCAPE** = **2** --- Reverse landscape screen orientation. +- **SCREEN_ORIENTATION_REVERSE_PORTRAIT** = **3** --- Reverse portrait screen orientation. +- **SCREEN_ORIENTATION_SENSOR_LANDSCAPE** = **4** --- Uses landscape or reverse landscape based on the hardware sensor. +- **SCREEN_ORIENTATION_SENSOR_PORTRAIT** = **5** --- Uses portrait or reverse portrait based on the hardware sensor. +- **SCREEN_ORIENTATION_SENSOR** = **6** --- Uses most suitable orientation based on the hardware sensor. .. _enum_OS_PowerState: enum **PowerState** -- **POWERSTATE_UNKNOWN** = **0** -- **POWERSTATE_ON_BATTERY** = **1** -- **POWERSTATE_NO_BATTERY** = **2** -- **POWERSTATE_CHARGING** = **3** -- **POWERSTATE_CHARGED** = **4** +- **POWERSTATE_UNKNOWN** = **0** --- Unknown powerstate. +- **POWERSTATE_ON_BATTERY** = **1** --- Unplugged, running on battery. +- **POWERSTATE_NO_BATTERY** = **2** --- Plugged in, no battery available. +- **POWERSTATE_CHARGING** = **3** --- Plugged in, battery charging. +- **POWERSTATE_CHARGED** = **4** --- Plugged in, battery fully charged. .. _enum_OS_Weekday: enum **Weekday** -- **DAY_SUNDAY** = **0** -- **DAY_MONDAY** = **1** -- **DAY_TUESDAY** = **2** -- **DAY_WEDNESDAY** = **3** -- **DAY_THURSDAY** = **4** -- **DAY_FRIDAY** = **5** -- **DAY_SATURDAY** = **6** +- **DAY_SUNDAY** = **0** --- Sunday. +- **DAY_MONDAY** = **1** --- Monday. +- **DAY_TUESDAY** = **2** --- Tuesday. +- **DAY_WEDNESDAY** = **3** --- Wednesday. +- **DAY_THURSDAY** = **4** --- Thursday. +- **DAY_FRIDAY** = **5** --- Friday. +- **DAY_SATURDAY** = **6** --- Saturday. .. _enum_OS_Month: enum **Month** -- **MONTH_JANUARY** = **1** -- **MONTH_FEBRUARY** = **2** -- **MONTH_MARCH** = **3** -- **MONTH_APRIL** = **4** -- **MONTH_MAY** = **5** -- **MONTH_JUNE** = **6** -- **MONTH_JULY** = **7** -- **MONTH_AUGUST** = **8** -- **MONTH_SEPTEMBER** = **9** -- **MONTH_OCTOBER** = **10** -- **MONTH_NOVEMBER** = **11** -- **MONTH_DECEMBER** = **12** +- **MONTH_JANUARY** = **1** --- January. +- **MONTH_FEBRUARY** = **2** --- February. +- **MONTH_MARCH** = **3** --- March. +- **MONTH_APRIL** = **4** --- April. +- **MONTH_MAY** = **5** --- May. +- **MONTH_JUNE** = **6** --- June. +- **MONTH_JULY** = **7** --- July. +- **MONTH_AUGUST** = **8** --- August. +- **MONTH_SEPTEMBER** = **9** --- September. +- **MONTH_OCTOBER** = **10** --- October. +- **MONTH_NOVEMBER** = **11** --- November. +- **MONTH_DECEMBER** = **12** --- December. Description @@ -337,17 +337,19 @@ Returns ``true`` if the current host platform is using multiple threads. - void **center_window** **(** **)** +Centers the window on the screen if in windowed mode. + .. _class_OS_delay_msec: - void **delay_msec** **(** :ref:`int` msec **)** const -Delay executing of the current thread by given milliseconds. +Delay execution of the current thread by given milliseconds. .. _class_OS_delay_usec: - void **delay_usec** **(** :ref:`int` usec **)** const -Delay executing of the current thread by given microseconds. +Delay execution of the current thread by given microseconds. .. _class_OS_dump_memory_to_file: @@ -355,7 +357,7 @@ Delay executing of the current thread by given microseconds. Dumps the memory allocation ringlist to a file (only works in debug). -Entry format per line: "Address - Size - Description" +Entry format per line: "Address - Size - Description". .. _class_OS_dump_resources_to_file: @@ -363,7 +365,7 @@ Entry format per line: "Address - Size - Description" Dumps all used resources to file (only works in debug). -Entry format per line: "Resource Type : Resource Location" +Entry format per line: "Resource Type : Resource Location". At the end of the file is a statistic of all used Resource Types. @@ -400,9 +402,13 @@ Returns the scancode of the given string (e.g. "Escape") - :ref:`int` **get_audio_driver_count** **(** **)** const +Returns the total number of available audio drivers. + .. _class_OS_get_audio_driver_name: -- :ref:`String` **get_audio_driver_name** **(** :ref:`int` arg0 **)** const +- :ref:`String` **get_audio_driver_name** **(** :ref:`int` driver **)** const + +Returns the audio driver name for the given index. .. _class_OS_get_cmdline_args: @@ -508,6 +514,8 @@ Returns the number of cores available in the host machine. - :ref:`Vector2` **get_real_window_size** **(** **)** const +Returns the window size including decorations like window borders. + .. _class_OS_get_scancode_string: - :ref:`String` **get_scancode_string** **(** :ref:`int` code **)** const @@ -612,7 +620,7 @@ Returns empty string on HTML5 and UWP which are not supported yet. - :ref:`int` **get_unix_time** **(** **)** const -Return the current unix timestamp. +Returns the current unix epoch timestamp. .. _class_OS_get_unix_time_from_datetime: @@ -644,12 +652,14 @@ If the project name is empty, ``user://`` falls back to ``res://``. .. _class_OS_get_video_driver_name: -- :ref:`String` **get_video_driver_name** **(** :ref:`int` arg0 **)** const +- :ref:`String` **get_video_driver_name** **(** :ref:`int` driver **)** const .. _class_OS_get_virtual_keyboard_height: - :ref:`int` **get_virtual_keyboard_height** **(** **)** +Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or it is currently hidden. + .. _class_OS_has_environment: - :ref:`bool` **has_environment** **(** :ref:`String` environment **)** const @@ -660,6 +670,8 @@ Returns ``true`` if an environment variable exists. - :ref:`bool` **has_feature** **(** :ref:`String` tag_name **)** const +Returns ``true`` if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. See feature tags documentation. + .. _class_OS_has_touchscreen_ui_hint: - :ref:`bool` **has_touchscreen_ui_hint** **(** **)** const @@ -716,6 +728,8 @@ If ``true``, the ``user://`` file system is persistent, so that its state is the - :ref:`bool` **is_window_always_on_top** **(** **)** const +Returns ``true`` if the window should always be on top of other windows. + .. _class_OS_kill: - :ref:`int` **kill** **(** :ref:`int` pid **)** @@ -808,6 +822,8 @@ Enables backup saves if ``enabled`` is ``true``. - void **set_window_always_on_top** **(** :ref:`bool` enabled **)** +Sets whether the window should always be on top. + .. _class_OS_set_window_title: - void **set_window_title** **(** :ref:`String` title **)** diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index 7555ea652..c6dc4ba77 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -255,15 +255,17 @@ enum **G6DOFJointAxisParam** - **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor that gets applied to the movement across the axes. The lower, the slower the movement. - **G6DOF_JOINT_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. - **G6DOF_JOINT_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. -- **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **5** --- The minimum rotation in negative direction to break loose and rotate around the axes. -- **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **6** --- The minimum rotation in positive direction to break loose and rotate around the axes. -- **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **7** --- A factor that gets multiplied onto all rotations across the axes. -- **G6DOF_JOINT_ANGULAR_DAMPING** = **8** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. -- **G6DOF_JOINT_ANGULAR_RESTITUTION** = **9** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. -- **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **10** --- The maximum amount of force that can occur, when rotating around the axes. -- **G6DOF_JOINT_ANGULAR_ERP** = **11** --- When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. -- **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** --- Target speed for the motor at the axes. -- **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **13** --- Maximum acceleration for the motor at the axes. +- **G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY** = **5** --- The velocity that the joint's linear motor will attempt to reach. +- **G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT** = **6** --- The maximum force that the linear motor can apply while trying to reach the target velocity. +- **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **7** --- The minimum rotation in negative direction to break loose and rotate around the axes. +- **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **8** --- The minimum rotation in positive direction to break loose and rotate around the axes. +- **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **9** --- A factor that gets multiplied onto all rotations across the axes. +- **G6DOF_JOINT_ANGULAR_DAMPING** = **10** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. +- **G6DOF_JOINT_ANGULAR_RESTITUTION** = **11** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. +- **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **12** --- The maximum amount of force that can occur, when rotating around the axes. +- **G6DOF_JOINT_ANGULAR_ERP** = **13** --- When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **14** --- Target speed for the motor at the axes. +- **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **15** --- Maximum acceleration for the motor at the axes. .. _enum_PhysicsServer_ProcessInfo: @@ -399,6 +401,7 @@ enum **G6DOFJointAxisFlag** - **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. - **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. - **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes. +- **G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR** = **3** --- If ``set`` there is a linear motor on this axis that targets a specific velocity. .. _enum_PhysicsServer_SliderJointParam: diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index cf8fdc1c2..cac7dad81 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -52,7 +52,7 @@ Member Functions Description ----------- -Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. +Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_poolcolorarray.rst b/classes/class_poolcolorarray.rst index dea7bfe88..c397a2593 100644 --- a/classes/class_poolcolorarray.rst +++ b/classes/class_poolcolorarray.rst @@ -42,7 +42,7 @@ Member Functions Description ----------- -Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory. +Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_poolintarray.rst b/classes/class_poolintarray.rst index 4ec7b1d70..3d19b961f 100644 --- a/classes/class_poolintarray.rst +++ b/classes/class_poolintarray.rst @@ -42,7 +42,7 @@ Member Functions Description ----------- -Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory. +Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_poolrealarray.rst b/classes/class_poolrealarray.rst index dad7adb95..2a14ea3a3 100644 --- a/classes/class_poolrealarray.rst +++ b/classes/class_poolrealarray.rst @@ -42,7 +42,7 @@ Member Functions Description ----------- -Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. +Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_poolstringarray.rst b/classes/class_poolstringarray.rst index 495bbef95..0e1fb7b94 100644 --- a/classes/class_poolstringarray.rst +++ b/classes/class_poolstringarray.rst @@ -44,7 +44,7 @@ Member Functions Description ----------- -String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. +String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_poolvector2array.rst b/classes/class_poolvector2array.rst index f2e31ff4f..d4f895c15 100644 --- a/classes/class_poolvector2array.rst +++ b/classes/class_poolvector2array.rst @@ -42,7 +42,7 @@ Member Functions Description ----------- -An Array specifically designed to hold Vector2. +An Array specifically designed to hold Vector2. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_poolvector3array.rst b/classes/class_poolvector3array.rst index 23453acf9..7835df077 100644 --- a/classes/class_poolvector3array.rst +++ b/classes/class_poolvector3array.rst @@ -42,7 +42,7 @@ Member Functions Description ----------- -An Array specifically designed to hold Vector3. +An Array specifically designed to hold Vector3. Note that this type is passed by value and not by reference. Member Function Description --------------------------- diff --git a/classes/class_popup.rst b/classes/class_popup.rst index 23edabe83..b19693d66 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -52,7 +52,7 @@ Member Variables .. _class_Popup_popup_exclusive: -- :ref:`bool` **popup_exclusive** +- :ref:`bool` **popup_exclusive** - If ``true`` the popup will not be hidden when a click event occurs outside of it, or when it receives the ``ui_cancel`` action event. Numeric Constants diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 3446ee61b..cb36d372e 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -118,6 +118,8 @@ Signals - **id_focused** **(** :ref:`int` ID **)** +This event is emitted when user navigated to an item of some id using ``ui_up`` or ``ui_down`` action. + .. _class_PopupMenu_id_pressed: - **id_pressed** **(** :ref:`int` ID **)** diff --git a/classes/class_prismmesh.rst b/classes/class_prismmesh.rst index 4e56cdf77..542451d1c 100644 --- a/classes/class_prismmesh.rst +++ b/classes/class_prismmesh.rst @@ -21,7 +21,7 @@ Member Variables .. _class_PrismMesh_left_to_right: -- :ref:`float` **left_to_right** - Displacement of the upper edge along the x-axis. 0.0 positions edge straight above the bottom left edge. Defaults to 0.5 (positioned on the midpoint). +- :ref:`float` **left_to_right** - Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint). .. _class_PrismMesh_size: diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 7454f27a9..74db120d9 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -36,6 +36,8 @@ Member Functions +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_visible_line_count` **(** **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_content_height` **(** **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`newline` **(** **)** | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | @@ -235,6 +237,12 @@ Returns the vertical scrollbar. Returns the number of visible lines. +.. _class_RichTextLabel_get_content_height: + +- :ref:`int` **get_content_height** **(** **)** + +Returns the height of the content. + .. _class_RichTextLabel_newline: - void **newline** **(** **)** diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index b8aac166b..2b121f8f7 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -206,10 +206,10 @@ Enums enum **GroupCallFlags** -- **GROUP_CALL_DEFAULT** = **0** -- **GROUP_CALL_REVERSE** = **1** -- **GROUP_CALL_REALTIME** = **2** -- **GROUP_CALL_UNIQUE** = **4** +- **GROUP_CALL_DEFAULT** = **0** --- Call a group with no flags (default). +- **GROUP_CALL_REVERSE** = **1** --- Call a group in reverse scene order. +- **GROUP_CALL_REALTIME** = **2** --- Call a group immediately (calls are normally made on idle). +- **GROUP_CALL_UNIQUE** = **4** --- Call a group only once even if the call is executed many times. .. _enum_SceneTree_StretchMode: diff --git a/classes/class_script.rst b/classes/class_script.rst index b240dd0e9..65f618005 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -67,6 +67,8 @@ Returns true if the script can be instanced. - :ref:`Script` **get_base_script** **(** **)** const +Returns the script directly inherited by this script. + .. _class_Script_get_instance_base_type: - :ref:`String` **get_instance_base_type** **(** **)** const diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index 08034cc22..aa53973cb 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -25,6 +25,8 @@ Signals - **scrolling** **(** **)** +Emitted whenever the scrollbar is being scrolled. + Member Variables ---------------- diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 4a3c81dd6..d6e1c9983 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -23,10 +23,14 @@ Signals - **scroll_ended** **(** **)** +Emitted whenever scrolling stops. + .. _class_ScrollContainer_scroll_started: - **scroll_started** **(** **)** +Emitted whenever scrolling is started. + Member Variables ---------------- diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index d6b2c42b8..58c78238f 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -217,13 +217,17 @@ Returns whether the node is visible, taking into consideration that its parents - void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** -Rotates itself to point into direction of target position. Operations take place in global space. +Rotates itself so that the local -Z axis points towards the ``target`` position. + +The transform will first be rotated around the given ``up`` vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the ``target`` and ``up`` vectors. + +Operations take place in global space. .. _class_Spatial_look_at_from_position: - void **look_at_from_position** **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up **)** -Moves the node to specified position and then rotates itself to point into direction of target position. Operations take place in global space. +Moves the node to the specified ``position``, and then rotates itself to point toward the ``target`` as per :ref:`look_at`. Operations take place in global space. .. _class_Spatial_orthonormalize: diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index 54fe15812..a4ce3cc8a 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -37,7 +37,7 @@ Member Variables .. _class_SplitContainer_dragger_visibility: -- :ref:`DraggerVisibility` **dragger_visibility** +- :ref:`DraggerVisibility` **dragger_visibility** - Determines whether the dragger is visible. .. _class_SplitContainer_split_offset: diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index c81ae8873..e0600b3c3 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -71,7 +71,7 @@ Member Function Description - void **add_animation** **(** :ref:`String` anim **)** -Adds a new animation to the library. +Adds a new animation to the the library. .. _class_SpriteFrames_add_frame: diff --git a/classes/class_string.rst b/classes/class_string.rst index 6baebd776..eb4aca5c8 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -132,6 +132,8 @@ Member Functions +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`length` **(** **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`lstrip` **(** :ref:`String` chars **)** | ++------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`match` **(** :ref:`String` expr **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`matchn` **(** :ref:`String` expr **)** | @@ -164,6 +166,8 @@ Member Functions +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`right` **(** :ref:`int` position **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`rstrip` **(** :ref:`String` chars **)** | ++------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolByteArray` | :ref:`sha256_buffer` **(** **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`sha256_text` **(** **)** | @@ -190,6 +194,10 @@ Member Functions +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolByteArray` | :ref:`to_utf8` **(** **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** | ++------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** | ++------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`xml_escape` **(** **)** | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`xml_unescape` **(** **)** | @@ -545,6 +553,12 @@ Returns a number of characters from the left of the string. Returns the string's amount of characters. +.. _class_String_lstrip: + +- :ref:`String` **lstrip** **(** :ref:`String` chars **)** + +Returns a copy of the string with characters removed from the left. + .. _class_String_match: - :ref:`bool` **match** **(** :ref:`String` expr **)** @@ -641,6 +655,12 @@ Performs a search for a substring, but starts from the end of the string instead Returns the right side of the string from a given position. +.. _class_String_rstrip: + +- :ref:`String` **rstrip** **(** :ref:`String` chars **)** + +Returns a copy of the string with characters removed from the right. + .. _class_String_sha256_buffer: - :ref:`PoolByteArray` **sha256_buffer** **(** **)** @@ -719,6 +739,18 @@ Returns the string converted to uppercase. Converts the String (which is an array of characters) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). +.. _class_String_trim_prefix: + +- :ref:`String` **trim_prefix** **(** :ref:`String` prefix **)** + +Removes a given string from the start if it starts with it or leaves the string unchanged. + +.. _class_String_trim_suffix: + +- :ref:`String` **trim_suffix** **(** :ref:`String` suffix **)** + +Removes a given string from the end if it ends with it or leaves the string unchanged. + .. _class_String_xml_escape: - :ref:`String` **xml_escape** **(** **)** diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 0f27a43eb..631249b97 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -157,7 +157,7 @@ enum **TileOrigin** - **TILE_ORIGIN_TOP_LEFT** = **0** --- Tile origin at its top-left corner. - **TILE_ORIGIN_CENTER** = **1** --- Tile origin at its center. -- **TILE_ORIGIN_BOTTOM_LEFT** = **2** +- **TILE_ORIGIN_BOTTOM_LEFT** = **2** --- Tile origin at its bottom-left corner. .. _enum_TileMap_Mode: @@ -272,6 +272,8 @@ Optionally, the tile can also be flipped over the X and Y axes or transposed. - void **set_collision_layer_bit** **(** :ref:`int` bit, :ref:`bool` value **)** +Set any collision layer to be ``true`` or ``false``. + .. _class_TileMap_set_collision_mask_bit: - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 7a4a3b1d6..fea058b29 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -19,13 +19,13 @@ A countdown timer. Member Functions ---------------- -+--------------------------+-------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_stopped` **(** **)** const | -+--------------------------+-------------------------------------------------------------+ -| void | :ref:`start` **(** **)** | -+--------------------------+-------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+--------------------------+-------------------------------------------------------------+ ++--------------------------+-----------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_stopped` **(** **)** const | ++--------------------------+-----------------------------------------------------------------------------------+ +| void | :ref:`start` **(** :ref:`float` time_sec=-1 **)** | ++--------------------------+-----------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++--------------------------+-----------------------------------------------------------------------------------+ Signals ------- @@ -92,9 +92,9 @@ Returns ``true`` if the timer is stopped. .. _class_Timer_start: -- void **start** **(** **)** +- void **start** **(** :ref:`float` time_sec=-1 **)** -Starts the timer. This also resets the remaining time to ``wait_time``. +Starts the timer. Sets ``wait_time`` to ``time_sec`` if ``time_sec`` > 0. This also resets the remaining time to ``wait_time``. Note: this method will not resume a paused timer. See :ref:`set_paused`. diff --git a/classes/class_transform.rst b/classes/class_transform.rst index 76b312c33..bdff20919 100644 --- a/classes/class_transform.rst +++ b/classes/class_transform.rst @@ -121,7 +121,11 @@ Returns the inverse of the transform, under the assumption that the transformati - :ref:`Transform` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** -Rotate the transform around the up vector to face the target. +Returns a copy of the transform rotated such that its -Z axis points towards the ``target`` position. + +The transform will first be rotated around the given ``up`` vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the ``target`` and ``up`` vectors. + +Operations take place in global space. .. _class_Transform_orthonormalized: diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 96af7ad0a..2b6cfcaab 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -14,7 +14,7 @@ Tween Brief Description ----------------- -Node useful for animations with unknown start and end points. +Smoothly animates a node's properties over time. Member Functions ---------------- @@ -72,19 +72,19 @@ Signals - **tween_completed** **(** :ref:`Object` object, :ref:`NodePath` key **)** -This signal is emitted when a tween ends. +Emitted when a tween ends. .. _class_Tween_tween_started: - **tween_started** **(** :ref:`Object` object, :ref:`NodePath` key **)** -This signal is emitted when a tween starts. +Emitted when a tween starts. .. _class_Tween_tween_step: - **tween_step** **(** :ref:`Object` object, :ref:`NodePath` key, :ref:`float` elapsed, :ref:`Object` value **)** -This signal is emitted each step of the tweening. +Emitted at each step of the animation. Member Variables @@ -92,15 +92,15 @@ Member Variables .. _class_Tween_playback_process_mode: -- :ref:`TweenProcessMode` **playback_process_mode** +- :ref:`TweenProcessMode` **playback_process_mode** - The tween's animation process thread. See enum TweenProcessMode. Default value: enum TWEEN_PROCESS_IDLE. .. _class_Tween_playback_speed: -- :ref:`float` **playback_speed** - The speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using :ref:`set_active` or :ref:`stop_all` and :ref:`resume_all` for this. +- :ref:`float` **playback_speed** - The tween's speed multiplier. For example, set it to ``1.0`` for normal speed, ``2.0`` for two times normal speed, or ``0.5`` for half of the normal speed. A value of ``0`` pauses the animation, but see also :ref:`set_active` or :ref:`stop_all` for this. .. _class_Tween_repeat: -- :ref:`bool` **repeat** - If ``true``, the tween will repeat. +- :ref:`bool` **repeat** - If ``true`` the tween loops. Enums @@ -110,51 +110,53 @@ Enums enum **TweenProcessMode** -- **TWEEN_PROCESS_PHYSICS** = **0** --- The ``Tween`` should use ``_physics_process`` for timekeeping when this is enabled. -- **TWEEN_PROCESS_IDLE** = **1** --- The ``Tween`` should use ``_process`` for timekeeping when this is enabled (default). +- **TWEEN_PROCESS_PHYSICS** = **0** --- The tween updates with the ``_physics_process`` callback. +- **TWEEN_PROCESS_IDLE** = **1** --- The tween updates with the ``_process`` callback. .. _enum_Tween_EaseType: enum **EaseType** -- **EASE_IN** = **0** --- Signifies that the interpolation should be focused in the beginning. -- **EASE_OUT** = **1** --- Signifies that the interpolation should be focused in the end. -- **EASE_IN_OUT** = **2** --- Signifies that the interpolation should be focused in both ends. -- **EASE_OUT_IN** = **3** --- Signifies that the interpolation should be focused in both ends, but they should be switched (a bit hard to explain, try it for yourself to be sure). +- **EASE_IN** = **0** --- The interpolation starts slowly and speeds up towards the end. +- **EASE_OUT** = **1** --- The interpolation starts quickly and slows down towards the end. +- **EASE_IN_OUT** = **2** --- A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends. +- **EASE_OUT_IN** = **3** --- A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends. .. _enum_Tween_TransitionType: enum **TransitionType** -- **TRANS_LINEAR** = **0** --- Means that the animation is interpolated linearly. -- **TRANS_SINE** = **1** --- Means that the animation is interpolated using a sine wave. -- **TRANS_QUINT** = **2** --- Means that the animation is interpolated with a quinary (to the power of 5) function. -- **TRANS_QUART** = **3** --- Means that the animation is interpolated with a quartic (to the power of 4) function. -- **TRANS_QUAD** = **4** --- Means that the animation is interpolated with a quadratic (to the power of 2) function. -- **TRANS_EXPO** = **5** --- Means that the animation is interpolated with an exponential (some number to the power of x) function. -- **TRANS_ELASTIC** = **6** --- Means that the animation is interpolated with elasticity, wiggling around the edges. -- **TRANS_CUBIC** = **7** --- Means that the animation is interpolated with a cubic (to the power of 3) function. -- **TRANS_CIRC** = **8** --- Means that the animation is interpolated with a function using square roots. -- **TRANS_BOUNCE** = **9** --- Means that the animation is interpolated by bouncing at, but never surpassing, the end. -- **TRANS_BACK** = **10** --- Means that the animation is interpolated backing out at edges. +- **TRANS_LINEAR** = **0** --- The animation is interpolated linearly. +- **TRANS_SINE** = **1** --- The animation is interpolated using a sine function. +- **TRANS_QUINT** = **2** --- The animation is interpolated with a quintic (to the power of 5) function. +- **TRANS_QUART** = **3** --- The animation is interpolated with a quartic (to the power of 4) function. +- **TRANS_QUAD** = **4** --- The animation is interpolated with a quadratic (to the power of 2) function. +- **TRANS_EXPO** = **5** --- The animation is interpolated with an exponential (to the power of x) function. +- **TRANS_ELASTIC** = **6** --- The animation is interpolated with elasticity, wiggling around the edges. +- **TRANS_CUBIC** = **7** --- The animation is interpolated with a cubic (to the power of 3) function. +- **TRANS_CIRC** = **8** --- The animation is interpolated with a function using square roots. +- **TRANS_BOUNCE** = **9** --- The animation is interpolated by bouncing at the end. +- **TRANS_BACK** = **10** --- The animation is interpolated backing out at ends. Description ----------- -Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior. +Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name \*tween\* comes from \*in-betweening\*, an animation technique where you specify \*keyframes\* and the computer interpolates the frames that appear between them. -Because it is easy to get it wrong, here is a quick usage example: +Here is a brief usage example that causes a 2D node to move smoothly between two positions: :: var tween = get_node("Tween") - tween.interpolate_property(get_node("Node2D_to_move"), "transform/origin", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) + tween.interpolate_property($Node2D, "position", + Vector2(0, 0), Vector2(100, 100), 1, + Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() -Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor. +Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. -Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an TRANS\_\* constant, and refers to the way the timing of the animation is handled (you might want to see ``http://easings.net/`` for some examples). The second accepts an EASE\_\* constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different TRANS\_\* constants with EASE_IN_OUT, and use the one that looks best. +Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an enum TransitionType constant, and refers to the way the timing of the animation is handled (see ``http://easings.net/`` for some examples). The second accepts an enum EaseType constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different enum TransitionType constants with enum EASE_IN_OUT, and use the one that looks best. Member Function Description --------------------------- @@ -163,75 +165,75 @@ Member Function Description - :ref:`bool` **follow_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` duration, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** -Follow ``method`` of ``object`` and apply the returned value on ``target_method`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` later. Methods are animated by calling them with consequitive values. +Follows ``method`` of ``object`` and applies the returned value on ``target_method`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` later. Methods are called with consecutive values. -``trans_type`` accepts TRANS\_\* constants, and is the way the animation is interpolated, while ``ease_type`` accepts EASE\_\* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + Use enum TransitionType for ``trans_type`` and enum EaseType for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_follow_property: - :ref:`bool` **follow_property** **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` initial_val, :ref:`Object` target, :ref:`NodePath` target_property, :ref:`float` duration, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** -Follow ``property`` of ``object`` and apply it on ``target_property`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` seconds later. Note that ``target:target_property`` would equal ``object:property`` at the end of the tween. +Follows ``property`` of ``object`` and applies it on ``target_property`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` seconds later. -``trans_type`` accepts TRANS\_\* constants, and is the way the animation is interpolated, while ``ease_type`` accepts EASE\_\* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + Use enum TransitionType for ``trans_type`` and enum EaseType for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_get_runtime: - :ref:`float` **get_runtime** **(** **)** const -Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished. +Returns the total time needed for all tweens to end. If you have two tweens, one lasting 10 seconds and the other 20 seconds, it would return 20 seconds, as by that time all tweens would have finished. .. _class_Tween_interpolate_callback: - :ref:`bool` **interpolate_callback** **(** :ref:`Object` object, :ref:`float` duration, :ref:`String` callback, :ref:`Variant` arg1=null, :ref:`Variant` arg2=null, :ref:`Variant` arg3=null, :ref:`Variant` arg4=null, :ref:`Variant` arg5=null **)** -Call ``callback`` of ``object`` after ``duration``. ``arg1``-``arg5`` are arguments to be passed to the callback. +Calls ``callback`` of ``object`` after ``duration``. ``arg1``-``arg5`` are arguments to be passed to the callback. .. _class_Tween_interpolate_deferred_callback: - :ref:`bool` **interpolate_deferred_callback** **(** :ref:`Object` object, :ref:`float` duration, :ref:`String` callback, :ref:`Variant` arg1=null, :ref:`Variant` arg2=null, :ref:`Variant` arg3=null, :ref:`Variant` arg4=null, :ref:`Variant` arg5=null **)** -Call ``callback`` of ``object`` after ``duration`` on the main thread (similar to :ref:`Object.call_deferred`). ``arg1``-``arg5`` are arguments to be passed to the callback. +Calls ``callback`` of ``object`` after ``duration`` on the main thread (similar to :ref:`Object.call_deferred`). ``arg1``-``arg5`` are arguments to be passed to the callback. .. _class_Tween_interpolate_method: - :ref:`bool` **interpolate_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` initial_val, :ref:`Variant` final_val, :ref:`float` duration, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** -Animate ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecutive values. +Animates ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are called with consecutive values. -``trans_type`` accepts TRANS\_\* constants, and is the way the animation is interpolated, while ``ease_type`` accepts EASE\_\* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + Use enum TransitionType for ``trans_type`` and enum EaseType for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_interpolate_property: - :ref:`bool` **interpolate_property** **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` initial_val, :ref:`Variant` final_val, :ref:`float` duration, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** -Animate ``property`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. +Animates ``property`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. -``trans_type`` accepts TRANS\_\* constants, and is the way the animation is interpolated, while ``ease_type`` accepts EASE\_\* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + Use enum TransitionType for ``trans_type`` and enum EaseType for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_is_active: - :ref:`bool` **is_active** **(** **)** const -Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended. +Returns ``true`` if any tweens are currently running. Note that this method doesn't consider tweens that have ended. .. _class_Tween_remove: - :ref:`bool` **remove** **(** :ref:`Object` object, :ref:`String` key="" **)** -Stop animating and completely remove a tween, given its object and property/method pair. Passing empty String as key will remove all tweens for given object. +Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless ``key`` is specified. .. _class_Tween_remove_all: - :ref:`bool` **remove_all** **(** **)** -Stop animating and completely remove all tweens. +Stops animation and removes all tweens. .. _class_Tween_reset: - :ref:`bool` **reset** **(** :ref:`Object` object, :ref:`String` key="" **)** -Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair. Passing empty String as key will reset all tweens for given object. +Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless ``key`` is specified. .. _class_Tween_reset_all: @@ -243,59 +245,59 @@ Resets all tweens to their initial values (the ones given, not those before the - :ref:`bool` **resume** **(** :ref:`Object` object, :ref:`String` key="" **)** -Continue animating a stopped tween, given its object and property/method pair. Passing empty String as key will resume all tweens for given object. +Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless ``key`` is specified. .. _class_Tween_resume_all: - :ref:`bool` **resume_all** **(** **)** -Continue animating all stopped tweens. +Continues animating all stopped tweens. .. _class_Tween_seek: - :ref:`bool` **seek** **(** :ref:`float` time **)** -Seek the animation to the given ``time`` in seconds. +Sets the interpolation to the given ``time`` in seconds. .. _class_Tween_set_active: - void **set_active** **(** :ref:`bool` active **)** -Activate/deactivate the tween. You can use this for pausing animations, though :ref:`stop_all` and :ref:`resume_all` might be more fit for this. +Activates/deactivates the tween. See also :ref:`stop_all` and :ref:`resume_all`. .. _class_Tween_start: - :ref:`bool` **start** **(** **)** -Start the tween node. You can define tweens both before and after this. +Starts the tween. You can define animations both before and after this. .. _class_Tween_stop: - :ref:`bool` **stop** **(** :ref:`Object` object, :ref:`String` key="" **)** -Stop animating a tween, given its object and property/method pair. Passing empty String as key will stop all tweens for given object. +Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless ``key`` is specified. .. _class_Tween_stop_all: - :ref:`bool` **stop_all** **(** **)** -Stop animating all tweens. +Stops animating all tweens. .. _class_Tween_targeting_method: - :ref:`bool` **targeting_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, :ref:`Variant` final_val, :ref:`float` duration, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** -Animate ``method`` of ``object`` from the value returned by ``initial.initial_method`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecutive values. +Animates ``method`` of ``object`` from the value returned by ``initial_method`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecutive values. -``trans_type`` accepts TRANS\_\* constants, and is the way the animation is interpolated, while ``ease_type`` accepts EASE\_\* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + Use enum TransitionType for ``trans_type`` and enum EaseType for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_targeting_property: - :ref:`bool` **targeting_property** **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Object` initial, :ref:`NodePath` initial_val, :ref:`Variant` final_val, :ref:`float` duration, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** -Animate ``property`` of ``object`` from the current value of the ``initial_val`` property of ``initial`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. +Animates ``property`` of ``object`` from the current value of the ``initial_val`` property of ``initial`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. -``trans_type`` accepts TRANS\_\* constants, and is the way the animation is interpolated, while ``ease_type`` accepts EASE\_\* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + Use enum TransitionType for ``trans_type`` and enum EaseType for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_tell: diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 5ed1939ab..de5967111 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -141,7 +141,7 @@ Returns the vector with a maximum length. - :ref:`float` **cross** **(** :ref:`Vector2` with **)** -Returns the 2-dimensional analog of the cross product with ``b``. +Returns the 2-dimensional analog of the cross product with the given Vector2. .. _class_Vector2_cubic_interpolate: diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 780e3cc10..4ccfc81a8 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -116,6 +116,10 @@ Member Variables - :ref:`bool` **hdr** - If ``true`` the viewport rendering will receive benefits from High Dynamic Range algorithm. Default value: ``true``. + .. _class_Viewport_keep_3d_linear: + +- :ref:`bool` **keep_3d_linear** - If ``true`` the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. + .. _class_Viewport_msaa: - :ref:`MSAA` **msaa** - The multisample anti-aliasing mode. Default value: ``MSAA_DISABLED``. diff --git a/classes/class_visualscriptbuiltinfunc.rst b/classes/class_visualscriptbuiltinfunc.rst index 4bfad3a6b..1ddbfafab 100644 --- a/classes/class_visualscriptbuiltinfunc.rst +++ b/classes/class_visualscriptbuiltinfunc.rst @@ -51,7 +51,7 @@ enum **BuiltinFunc** - **MATH_SIGN** = **17** --- Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. - **MATH_POW** = **18** --- Return the input raised to a given power. - **MATH_LOG** = **19** --- Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. -- **MATH_EXP** = **20** --- Return **e** raised to the power of the input. **e** sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828. +- **MATH_EXP** = **20** --- Return the mathematical constant **e** raised to the specified power of the input. **e** has an approximate value of 2.71828. - **MATH_ISNAN** = **21** --- Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. - **MATH_ISINF** = **22** --- Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. - **MATH_EASE** = **23** --- Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. diff --git a/classes/class_visualscriptmathconstant.rst b/classes/class_visualscriptmathconstant.rst index d20bf023c..ef52ded32 100644 --- a/classes/class_visualscriptmathconstant.rst +++ b/classes/class_visualscriptmathconstant.rst @@ -35,7 +35,7 @@ enum **MathConstant** - **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593`` - **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796`` - **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185`` -- **MATH_CONSTANT_E** = **4** --- Natural log: ``2.718282`` +- **MATH_CONSTANT_E** = **4** --- Mathematical constant ``e``, the natural log base: ``2.718282`` - **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214`` - **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf`` - **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan`` @@ -45,7 +45,7 @@ enum **MathConstant** Description ----------- -Provides common math constants, such as Pi or Euler's constant, on an output Data port. +Provides common math constants, such as Pi, on an output Data port. **Input Ports:** diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index 28178e4d3..9870fb916 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -1260,7 +1260,7 @@ Adds a rectangle to the :ref:`CanvasItem`'s draw commands. Adds a :ref:`Transform2D` command to the :ref:`CanvasItem`'s draw commands. -This sets the extra_matrix uniform when executed. This affects the later command's of the canvas item. +This sets the extra_matrix uniform when executed. This affects the later commands of the canvas item. .. _class_VisualServer_canvas_item_add_texture_rect: