summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AABB.xml13
-rw-r--r--doc/classes/ARVRController.xml7
-rw-r--r--doc/classes/ARVRInterface.xml20
-rw-r--r--doc/classes/ARVRPositionalTracker.xml2
-rw-r--r--doc/classes/AStar.xml28
-rw-r--r--doc/classes/Animation.xml2
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml16
-rw-r--r--doc/classes/AnimationTreePlayer.xml2
-rw-r--r--doc/classes/Area2D.xml1
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamSample.xml4
-rw-r--r--doc/classes/BackBufferCopy.xml4
-rw-r--r--doc/classes/BaseButton.xml8
-rw-r--r--doc/classes/Basis.xml1
-rw-r--r--doc/classes/Button.xml2
-rw-r--r--doc/classes/Camera.xml21
-rw-r--r--doc/classes/Camera2D.xml2
-rw-r--r--doc/classes/CanvasItem.xml23
-rw-r--r--doc/classes/CharFXTransform.xml23
-rw-r--r--doc/classes/CollisionPolygon2D.xml8
-rw-r--r--doc/classes/CollisionShape2D.xml1
-rw-r--r--doc/classes/Color.xml9
-rw-r--r--doc/classes/ConfigFile.xml6
-rw-r--r--doc/classes/Control.xml15
-rw-r--r--doc/classes/CubeMap.xml10
-rw-r--r--doc/classes/Dictionary.xml8
-rw-r--r--doc/classes/Directory.xml14
-rw-r--r--doc/classes/DynamicFont.xml14
-rw-r--r--doc/classes/EditorInspectorPlugin.xml4
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorSettings.xml5
-rw-r--r--doc/classes/EditorSpinSlider.xml22
-rw-r--r--doc/classes/EditorVCSInterface.xml14
-rw-r--r--doc/classes/Environment.xml8
-rw-r--r--doc/classes/HTTPClient.xml18
-rw-r--r--doc/classes/HTTPRequest.xml38
-rw-r--r--doc/classes/IP.xml6
-rw-r--r--doc/classes/Image.xml25
-rw-r--r--doc/classes/ImmediateGeometry.xml4
-rw-r--r--doc/classes/Input.xml2
-rw-r--r--doc/classes/InputEvent.xml4
-rw-r--r--doc/classes/InputEventMouseMotion.xml8
-rw-r--r--doc/classes/JSONParseResult.xml4
-rw-r--r--doc/classes/KinematicBody.xml4
-rw-r--r--doc/classes/Label.xml4
-rw-r--r--doc/classes/Light2D.xml2
-rw-r--r--doc/classes/Line2D.xml9
-rw-r--r--doc/classes/LineEdit.xml4
-rw-r--r--doc/classes/Listener.xml8
-rw-r--r--doc/classes/MeshLibrary.xml22
-rw-r--r--doc/classes/MultiplayerAPI.xml2
-rw-r--r--doc/classes/Node.xml16
-rw-r--r--doc/classes/NodePath.xml13
-rw-r--r--doc/classes/OS.xml55
-rw-r--r--doc/classes/Object.xml9
-rw-r--r--doc/classes/PCKPacker.xml16
-rw-r--r--doc/classes/Particles.xml4
-rw-r--r--doc/classes/Particles2D.xml2
-rw-r--r--doc/classes/ParticlesMaterial.xml2
-rw-r--r--doc/classes/Physics2DServer.xml4
-rw-r--r--doc/classes/Physics2DShapeQueryParameters.xml12
-rw-r--r--doc/classes/Physics2DShapeQueryResult.xml7
-rw-r--r--doc/classes/PhysicsServer.xml54
-rw-r--r--doc/classes/PhysicsShapeQueryParameters.xml10
-rw-r--r--doc/classes/PhysicsShapeQueryResult.xml8
-rw-r--r--doc/classes/Plane.xml9
-rw-r--r--doc/classes/PlaneShape.xml3
-rw-r--r--doc/classes/PoolByteArray.xml7
-rw-r--r--doc/classes/PoolColorArray.xml7
-rw-r--r--doc/classes/PoolIntArray.xml7
-rw-r--r--doc/classes/PoolRealArray.xml7
-rw-r--r--doc/classes/PoolStringArray.xml7
-rw-r--r--doc/classes/PoolVector2Array.xml7
-rw-r--r--doc/classes/PoolVector3Array.xml7
-rw-r--r--doc/classes/Popup.xml2
-rw-r--r--doc/classes/PopupDialog.xml5
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/PrimitiveMesh.xml3
-rw-r--r--doc/classes/ProjectSettings.xml20
-rw-r--r--doc/classes/Quat.xml9
-rw-r--r--doc/classes/RayCast.xml1
-rw-r--r--doc/classes/RayCast2D.xml1
-rw-r--r--doc/classes/Rect2.xml11
-rw-r--r--doc/classes/RichTextEffect.xml11
-rw-r--r--doc/classes/RichTextLabel.xml30
-rw-r--r--doc/classes/SceneTree.xml6
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/Shape.xml1
-rw-r--r--doc/classes/Shape2D.xml1
-rw-r--r--doc/classes/SoftBody.xml24
-rw-r--r--doc/classes/Spatial.xml4
-rw-r--r--doc/classes/SpringArm.xml17
-rw-r--r--doc/classes/String.xml20
-rw-r--r--doc/classes/StyleBoxFlat.xml18
-rw-r--r--doc/classes/StyleBoxLine.xml7
-rw-r--r--doc/classes/StyleBoxTexture.xml15
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/TextEdit.xml26
-rw-r--r--doc/classes/TextureButton.xml2
-rw-r--r--doc/classes/Theme.xml68
-rw-r--r--doc/classes/TileMap.xml3
-rw-r--r--doc/classes/TouchScreenButton.xml2
-rw-r--r--doc/classes/Transform.xml9
-rw-r--r--doc/classes/Transform2D.xml9
-rw-r--r--doc/classes/Tree.xml4
-rw-r--r--doc/classes/TreeItem.xml2
-rw-r--r--doc/classes/Tween.xml4
-rw-r--r--doc/classes/VScrollBar.xml2
-rw-r--r--doc/classes/Variant.xml33
-rw-r--r--doc/classes/Vector2.xml9
-rw-r--r--doc/classes/Vector3.xml9
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml1
-rw-r--r--doc/classes/ViewportContainer.xml3
-rw-r--r--doc/classes/VisualServer.xml46
-rw-r--r--doc/classes/VisualShader.xml3
-rw-r--r--doc/classes/VisualShaderNodeCubeMap.xml6
-rw-r--r--doc/classes/VisualShaderNodeInput.xml6
-rw-r--r--doc/classes/XMLParser.xml2
123 files changed, 941 insertions, 288 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 7dcfa5345d..b64f926921 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -66,7 +66,7 @@
<return type="int">
</return>
<description>
- Returns the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum).
+ Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants).
</description>
</method>
<method name="get_longest_axis_size">
@@ -176,13 +176,22 @@
Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code].
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="aabb" type="AABB">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ </description>
+ </method>
<method name="merge">
<return type="AABB">
</return>
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Returns a larger AABB that contains this AABB and [code]with[/code].
+ Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index 9c6cfc1d7d..24d8b48077 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -22,7 +22,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<description>
- Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker].
+ Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand].
</description>
</method>
<method name="get_is_active" qualifiers="const">
@@ -61,7 +61,7 @@
<argument index="0" name="button" type="int">
</argument>
<description>
- Returns [code]true[/code] if the button at index [code]button[/code] is pressed.
+ Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants.
</description>
</method>
</methods>
@@ -73,7 +73,8 @@
When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off.
</member>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
- The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly.
+ The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly.
+ This is a useful property to animate if you want the controller to vibrate for a limited duration.
</member>
</members>
<signals>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index 1da1351e49..41effcaecb 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -21,7 +21,7 @@
<return type="int">
</return>
<description>
- Returns a combination of flags providing information about the capabilities of this interface.
+ Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.
</description>
</method>
<method name="get_name" qualifiers="const">
@@ -51,9 +51,9 @@
<description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
- [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR.
- If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different.
- While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
+ [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
+ If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.
+ While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
</description>
</method>
<method name="is_stereo">
@@ -73,13 +73,13 @@
</methods>
<members>
<member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false">
- On an AR interface, is our anchor detection enabled?
+ On an AR interface, [code]true[/code] if anchor detection is enabled.
</member>
<member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false">
- Has this interface been initialized?
+ [code]true[/code] if this interface been initialized.
</member>
<member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false">
- Is this our primary interface?
+ [code]true[/code] if this is the primary interface.
</member>
</members>
<constants>
@@ -93,10 +93,10 @@
This interface supports stereoscopic rendering.
</constant>
<constant name="ARVR_AR" value="4" enum="Capabilities">
- This interface support AR (video background and real world tracking).
+ This interface supports AR (video background and real world tracking).
</constant>
<constant name="ARVR_EXTERNAL" value="8" enum="Capabilities">
- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
+ This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
</constant>
<constant name="EYE_MONO" value="0" enum="Eyes">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
@@ -111,7 +111,7 @@
Tracking is behaving as expected.
</constant>
<constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status">
- Tracking is hindered by excessive motion, player is moving faster than tracking can keep up.
+ Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up).
</constant>
<constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status">
Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc.
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
index 5551d48a08..c4acfd3b51 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -15,7 +15,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<description>
- Returns the hand holding this tracker, if known. See [code]TRACKER_*[/code] constants.
+ Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
</description>
</method>
<method name="get_joy_id" qualifiers="const">
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index e835af01e8..6304bd34f6 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,11 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" category="Core" version="3.2">
<brief_description>
- AStar class representation that uses 3d-vectors as edges.
+ An implementation of A* to find shortest paths among connected points in space.
</brief_description>
<description>
- A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points.
- You must add points manually with [method add_point] and create segments manually with [method connect_points]. So you can test if there is a path between two points with the [method are_points_connected] function, get the list of existing ids in the found path with [method get_id_path], or the points list with [method get_point_path].
+ A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default.
+ You must add points manually with [method add_point] and create segments manually with [method connect_points]. Then you can test if there is a path between two points with the [method are_points_connected] function, get a path containing indices by [method get_id_path], or one containing actual coordinates with [method get_point_path].
+ It is also possible to use non-Euclidean distances. To do so, create a class that extends [code]AStar[/code] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example.
+ [codeblock]
+ class MyAStar:
+ extends AStar
+
+ func _compute_cost(u, v):
+ return abs(u - v)
+
+ func _estimate_cost(u, v):
+ return min(0, abs(u - v) - 1)
+ [/codeblock]
+ [method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) &lt;= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
</description>
<tutorials>
</tutorials>
@@ -19,6 +31,7 @@
</argument>
<description>
Called when computing the cost between two connected points.
+ Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
@@ -30,6 +43,7 @@
</argument>
<description>
Called when estimating the cost between a point and the path's ending point.
+ Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
<method name="add_point">
@@ -57,8 +71,10 @@
</argument>
<argument index="1" name="to_id" type="int">
</argument>
+ <argument index="2" name="bidirectional" type="bool" default="true">
+ </argument>
<description>
- Returns whether there is a connection/segment between the given points.
+ Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
</description>
</method>
<method name="clear">
@@ -94,8 +110,10 @@
</argument>
<argument index="1" name="to_id" type="int">
</argument>
+ <argument index="2" name="bidirectional" type="bool" default="true">
+ </argument>
<description>
- Deletes the segment between the given points.
+ Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 97da8c9980..9924f75289 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -656,7 +656,7 @@
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
</argument>
<description>
- Sets the update mode ([code]UPDATE_*[/code]) of a value track.
+ Sets the update mode (see [enum UpdateMode]) of a value track.
</description>
</method>
</methods>
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index c71a06d931..d8ea7fea5b 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -125,7 +125,7 @@
</methods>
<members>
<member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles" default="true">
- If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
+ If [code]true[/code], the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
</member>
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0">
Controls the interpolation between animations. See [enum BlendMode] constants.
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 5bb4a6e3c7..a47b4a590e 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
+ Updating the target properties of animations occurs at process time.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link>
@@ -28,7 +29,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
- Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
+ Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
</description>
</method>
<method name="animation_get_next" qualifiers="const">
@@ -105,7 +106,7 @@
<return type="float">
</return>
<description>
- Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method.
+ Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.
</description>
</method>
<method name="get_queue">
@@ -143,8 +144,9 @@
<argument index="3" name="from_end" type="bool" default="false">
</argument>
<description>
- Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards.
- If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation.
+ Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
+ The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
+ [b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code].
</description>
</method>
<method name="play_backwards">
@@ -156,7 +158,7 @@
</argument>
<description>
Plays the animation with key [code]name[/code] in reverse.
- If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards.
+ This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
</description>
</method>
<method name="queue">
@@ -219,8 +221,8 @@
<argument index="0" name="reset" type="bool" default="true">
</argument>
<description>
- Stops the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
- If [code]reset[/code] is [code]false[/code], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards].
+ Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
+ If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
</description>
</method>
</methods>
diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
index 3b6003b478..0d7a34b179 100644
--- a/doc/classes/AnimationTreePlayer.xml
+++ b/doc/classes/AnimationTreePlayer.xml
@@ -285,7 +285,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
- Gets the node type, will return from [code]NODE_*[/code] enum.
+ Gets the node type, will return from [enum NodeType] enum.
</description>
</method>
<method name="node_rename">
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index e1cb9056da..9a5870c73d 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -7,6 +7,7 @@
2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link>
</tutorials>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index a1529f3eb3..e09c1f4b08 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -316,7 +316,7 @@
<argument index="3" name="deep" type="bool" default="False">
</argument>
<description>
- Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is true. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
+ Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
</description>
</method>
<method name="sort">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 9f32691e57..62ff0edbd2 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -47,7 +47,7 @@
</argument>
<description>
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. See [Mesh] for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
+ Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] 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 [constant 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.
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 4bc29335ff..89fc18476b 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -57,7 +57,7 @@
Bus on which this audio is playing.
</member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0">
- If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants.
+ If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
Changes the pitch and the tempo of the audio.
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index a496902ded..bb418f3c36 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -27,7 +27,7 @@
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
- Audio format. See [code]FORMAT_*[/code] constants for values.
+ Audio format. See [enum Format] constants for values.
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0">
Loop start in bytes.
@@ -36,7 +36,7 @@
Loop end in bytes.
</member>
<member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0">
- Loop mode. See [code]LOOP_*[/code] constants for values.
+ Loop mode. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
The sample rate for mixing this audio.
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 9bb32e0444..945af0c701 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.2">
<brief_description>
- Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with [code]SCREEN_TEXTURE[/code] in the [code]texture()[/code] function.
+ Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function.
</brief_description>
<description>
- Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use [code]SCREEN_TEXTURE[/code] in the [code]texture()[/code] function to access the buffer.
+ Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index b4f4b21afd..21f46efe84 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -22,14 +22,14 @@
<argument index="0" name="button_pressed" type="bool">
</argument>
<description>
- Called when the button is toggled (only if toggle_mode is active).
+ Called when the button is toggled (only if [member toggle_mode] is active).
</description>
</method>
<method name="get_draw_mode" qualifiers="const">
<return type="int" enum="BaseButton.DrawMode">
</return>
<description>
- Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [code]DRAW_*[/code] enum.
+ Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum.
</description>
</method>
<method name="is_hovered" qualifiers="const">
@@ -42,7 +42,7 @@
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1">
- Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants.
+ Determines when the button is considered clicked, one of the [enum ActionMode] constants.
</member>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
Binary mask to choose which mouse buttons this button will respond to.
@@ -62,7 +62,7 @@
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
- If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
+ If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active).
</member>
<member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
[ShortCut] associated to the button.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index df9438e695..5a7fc0a41b 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -102,6 +102,7 @@
<argument index="1" name="epsilon" type="float" default="0.00001">
</argument>
<description>
+ Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="orthonormalized">
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 305be8b58d..3b73580294 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -12,7 +12,7 @@
</methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1">
- Text alignment policy for the button's text, use one of the [code]ALIGN_*[/code] constants.
+ Text alignment policy for the button's text, use one of the [enum TextAlign] constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index d410800141..aca53d4ed0 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -38,12 +38,14 @@
<argument index="0" name="layer" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise.
</description>
</method>
<method name="get_frustum" qualifiers="const">
<return type="Array">
</return>
<description>
+ Returns the camera's frustum planes in world-space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset].
</description>
</method>
<method name="is_position_behind" qualifiers="const">
@@ -77,10 +79,10 @@
</return>
<argument index="0" name="screen_point" type="Vector2">
</argument>
- <argument index="1" name="z_depth" type="float" default="0">
+ <argument index="1" name="z_depth" type="float">
</argument>
<description>
- Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given distance into the scene away from the camera.
+ Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera.
</description>
</method>
<method name="project_ray_normal" qualifiers="const">
@@ -109,6 +111,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ Enables or disables the given [code]layer[/code] in the [member cull_mask].
</description>
</method>
<method name="set_frustum">
@@ -123,6 +126,7 @@
<argument index="3" name="z_far" type="float">
</argument>
<description>
+ Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units.
</description>
</method>
<method name="set_orthogonal">
@@ -135,7 +139,7 @@
<argument index="2" name="z_far" type="float">
</argument>
<description>
- Sets the camera projection to orthogonal mode, by specifying a width and the [code]near[/code] and [code]far[/code] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
+ Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. (As a hint, 2D games often use this projection, with values specified in pixels.)
</description>
</method>
<method name="set_perspective">
@@ -148,7 +152,7 @@
<argument index="2" name="z_far" type="float">
</argument>
<description>
- Sets the camera projection to perspective mode, by specifying a [code]fov[/code] angle in degrees (FOV means Field of View), and the [code]near[/code] and [code]far[/code] clip planes in world-space units.
+ Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units.
</description>
</method>
<method name="unproject_position" qualifiers="const">
@@ -169,7 +173,7 @@
If [code]true[/code], the ancestor [Viewport] is currently using this camera.
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0">
- If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
+ If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] to use for this camera.
@@ -181,6 +185,7 @@
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )">
+ The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
The horizontal (X) offset of the camera viewport.
@@ -218,13 +223,13 @@
Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
- Disables Doppler effect simulation (default).
+ Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default).
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking">
- Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
+ Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant>
<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking">
- Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
+ Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant>
</constants>
</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index 6f1627e296..b575fa72e0 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -103,7 +103,7 @@
</methods>
<members>
<member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1">
- The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants.
+ The Camera2D's anchor point. See [enum AnchorMode] constants.
</member>
<member name="current" type="bool" setter="_set_current" getter="is_current" default="false">
If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 87b8f5c83d..8372d15324 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -22,6 +22,28 @@
Called (if exists) to draw the canvas item.
</description>
</method>
+ <method name="draw_arc">
+ <return type="void">
+ </return>
+ <argument index="0" name="center" type="Vector2">
+ </argument>
+ <argument index="1" name="radius" type="float">
+ </argument>
+ <argument index="2" name="start_angle" type="float">
+ </argument>
+ <argument index="3" name="end_angle" type="float">
+ </argument>
+ <argument index="4" name="point_count" type="int">
+ </argument>
+ <argument index="5" name="color" type="Color">
+ </argument>
+ <argument index="6" name="width" type="float" default="1.0">
+ </argument>
+ <argument index="7" name="antialiased" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="draw_char">
<return type="float">
</return>
@@ -341,6 +363,7 @@
<return type="void">
</return>
<description>
+ Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
</description>
</method>
<method name="get_canvas" qualifiers="const">
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index e03229abe1..399530bb5d 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CharFXTransform" inherits="Reference" category="Core" version="3.2">
<brief_description>
+ Controls how an individual character will be displayed in a [RichTextEffect].
</brief_description>
<description>
+ By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect].
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
+ <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
<method name="get_value_or">
@@ -15,25 +19,44 @@
<argument index="1" name="default_value" type="Variant">
</argument>
<description>
+ Returns the value for [code]key[/code] in the [member env] [Dictionary], or [code]default_value[/code] if [code]key[/code] isn't defined in [member env]. If the value's type doesn't match [code]default_value[/code]'s type, this method will return [code]default_value[/code].
</description>
</method>
</methods>
<members>
<member name="absolute_index" type="int" setter="set_absolute_index" getter="get_absolute_index" default="0">
+ The index of the current character (starting from 0). Setting this property won't affect drawing.
</member>
<member name="character" type="int" setter="set_character" getter="get_character" default="0">
+ The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:
+ [codeblock]
+ # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
+ # See the RichTextEffect documentation for details.
+ char_fx.character = ord("*")
+ [/codeblock]
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ The color the character will be drawn with.
</member>
<member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0">
+ The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].
+ [b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.
</member>
<member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}">
+ Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.
+ For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]:
+ [codeblock]
+ {"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
+ [/codeblock]
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ The position offset the character will be drawn with (in pixels).
</member>
<member name="relative_index" type="int" setter="set_relative_index" getter="get_relative_index" default="0">
+ The index of the current character (starting from 0). Setting this property won't affect drawing.
</member>
<member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true">
+ If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index fe46d45f71..1d935a3e99 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -4,7 +4,7 @@
Defines a 2D collision polygon.
</brief_description>
<description>
- Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices.
+ Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices.
</description>
<tutorials>
</tutorials>
@@ -12,18 +12,18 @@
</methods>
<members>
<member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0">
- Collision build mode. Use one of the [code]BUILD_*[/code] constants.
+ Collision build mode. Use one of the [enum BuildMode] constants.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collisions will be detected.
</member>
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false">
- If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
+ If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects.
</member>
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
- The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.
+ The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 5fd8826a98..4166ee31d3 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -19,6 +19,7 @@
Sets whether this collision shape should only detect collision on one side (top or bottom).
</member>
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
+ The margin used for one-way collision (in pixels).
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
The actual shape owned by this collision shape.
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 46499ed349..1d4225542a 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -151,6 +151,15 @@
[/codeblock]
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ </description>
+ </method>
<method name="lightened">
<return type="Color">
</return>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 56f54e4434..d99f90d09a 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -104,7 +104,8 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK].
+ Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="load_encrypted">
@@ -133,7 +134,8 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK].
+ Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="save_encrypted">
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 05ffac803a..75d5a72fb1 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -62,7 +62,7 @@
</argument>
<description>
Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. Use [code]for_text[/code] parameter to determine what text the tooltip should contain (likely the contents of [member hint_tooltip]).
- The returned node must be of type [Control] or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When null or non-Control node is returned, the default tooltip will be used instead.
+ The returned node must be of type [Control] or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When [code]null[/code] or non-Control node is returned, the default tooltip will be used instead.
[b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member rect_min_size] to some non-zero value.
Example of usage with custom-constructed node:
[codeblock]
@@ -652,7 +652,18 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
- Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data].
+ Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree.
+ [codeblock]
+ export (Color, RGBA) var color = Color(1, 0, 0, 1)
+
+ func get_drag_data(position):
+ # Use a control that is not in the tree
+ var cpb = ColorPickerButton.new()
+ cpb.color = color
+ cpb.rect_size = Vector2(50, 50)
+ set_drag_preview(cpb)
+ return color
+ [/codeblock]
</description>
</method>
<method name="set_end">
diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml
index 2cedc78499..6db1cf2d64 100644
--- a/doc/classes/CubeMap.xml
+++ b/doc/classes/CubeMap.xml
@@ -22,7 +22,7 @@
<argument index="0" name="side" type="int" enum="CubeMap.Side">
</argument>
<description>
- Returns an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5.
+ Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants.
</description>
</method>
<method name="get_width" qualifiers="const">
@@ -40,19 +40,19 @@
<argument index="1" name="image" type="Image">
</argument>
<description>
- Sets an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5.
+ Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants.
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="7">
- The render flags for the [CubeMap]. See the [code]FLAG_*[/code] constants for details.
+ The render flags for the [CubeMap]. See the [enum Flags] constants for details.
</member>
<member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7">
- The lossy storage quality of the [CubeMap] if the storage mode is set to STORAGE_COMPRESS_LOSSY.
+ The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY].
</member>
<member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0">
- The [CubeMap]'s storage mode. See [code]STORAGE_*[/code] constants.
+ The [CubeMap]'s storage mode. See [enum Storage] constants.
</member>
</members>
<constants>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 831a0bb02f..7cb6b1b754 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -83,7 +83,13 @@
<return type="int">
</return>
<description>
- Returns a hashed integer value representing the dictionary contents.
+ Returns a hashed integer value representing the dictionary contents. This can be used to compare dictionaries by value:
+ [codeblock]
+ var dict1 = {0: 10}
+ var dict2 = {0: 10}
+ # The line below prints `true`, whereas it would have printed `false` if both variables were compared directly.
+ print(dict1.hash() == dict2.hash())
+ [/codeblock]
</description>
</method>
<method name="keys">
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 8aae85563a..754fafadbe 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -33,7 +33,7 @@
</argument>
<description>
Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
- The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="copy">
@@ -45,7 +45,7 @@
</argument>
<description>
Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="current_is_dir" qualifiers="const">
@@ -145,7 +145,7 @@
</argument>
<description>
Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
- The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="make_dir_recursive">
@@ -155,7 +155,7 @@
</argument>
<description>
Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
- Returns one of the error code constants defined in [@GlobalScope] ([code]0K[/code], [code]FAILED[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="open">
@@ -165,7 +165,7 @@
</argument>
<description>
Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
- The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="remove">
@@ -175,7 +175,7 @@
</argument>
<description>
Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
- Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="rename">
@@ -187,7 +187,7 @@
</argument>
<description>
Renames (move) the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]).
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
</methods>
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
index 0820d4e1b6..ac8595d783 100644
--- a/doc/classes/DynamicFont.xml
+++ b/doc/classes/DynamicFont.xml
@@ -4,7 +4,8 @@
DynamicFont renders vector font files at runtime.
</brief_description>
<description>
- DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths.
+ DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallbacks fonts, which will be used when displaying a character not supported by the main font.
+ DynamicFont uses the [url=https://www.freetype.org/]FreeType[/url] library for rasterization.
[codeblock]
var dynamic_font = DynamicFont.new()
dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf")
@@ -46,6 +47,7 @@
<argument index="0" name="type" type="int">
</argument>
<description>
+ Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
</description>
</method>
<method name="remove_fallback">
@@ -76,6 +78,7 @@
<argument index="1" name="value" type="int">
</argument>
<description>
+ Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
</description>
</method>
</methods>
@@ -96,17 +99,20 @@
The font data.
</member>
<member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color( 1, 1, 1, 1 )">
+ The font outline's color.
+ [b]Note:[/b] It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item.
</member>
<member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ The font outline's thickness in pixels (not relative to the font size).
</member>
<member name="size" type="int" setter="set_size" getter="get_size" default="16">
- The font size.
+ The font size in pixels.
</member>
<member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false">
- If [code]true[/code], filtering is used.
+ If [code]true[/code], filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired.
</member>
<member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false">
- If [code]true[/code], mipmapping is used.
+ If [code]true[/code], mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective.
</member>
</members>
<constants>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index cab5af3985..a713e06585 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -6,7 +6,7 @@
<description>
This plugins allows adding custom property editors to [EditorInspector].
Plugins are registered via [method EditorPlugin.add_inspector_plugin].
- When an object is edited, the [method can_handle] function is called and must return true if the object type is supported.
+ When an object is edited, the [method can_handle] function is called and must return [code]true[/code] if the object type is supported.
If supported, the function [method parse_begin] will be called, allowing to place custom controls at the beginning of the class.
Subsequently, the [method parse_category] and [method parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
Finally [method parse_end] will be called.
@@ -54,7 +54,7 @@
<argument index="0" name="object" type="Object">
</argument>
<description>
- Returns true if this object can be handled by this plugin.
+ Returns [code]true[/code] if this object can be handled by this plugin.
</description>
</method>
<method name="parse_begin" qualifiers="virtual">
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 5c49e227be..981e0a6180 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File &gt; Run[/b] menu option (or by pressing [code]Ctrl+Shift+X[/code]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using [EditorPlugin]s instead.
- [b]Note:[/b] Extending scripts need to have [code]tool mode[/code] enabled.
+ [b]Note:[/b] Extending scripts need to have [code]tool[/code] mode enabled.
[b]Example script:[/b]
[codeblock]
tool
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 5395a8fcb0..18e8ee2d7e 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -21,7 +21,10 @@
<argument index="0" name="info" type="Dictionary">
</argument>
<description>
- Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String].
+ Adds a custom property info to a property. The dictionary must contain:
+ - [code]name[/code]: [String] (the name of the property)
+ - [code]type[/code]: [int] (see [enum Variant.Type])
+ - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String]
[b]Example:[/b]
[codeblock]
editor_settings.set("category/property_name", 0)
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
new file mode 100644
index 0000000000..bf01ebfe82
--- /dev/null
+++ b/doc/classes/EditorSpinSlider.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSpinSlider" inherits="Range" category="Core" version="3.2">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
+ </member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
+ </member>
+ <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index f67c1c9eb5..23d608dea8 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -34,13 +34,6 @@
- [code]"offset"[/code] to store the offset of the line change since the first contextual line content.
</description>
</method>
- <method name="get_is_vcs_intialized">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
- </description>
- </method>
<method name="get_modified_files_data">
<return type="Dictionary">
</return>
@@ -84,6 +77,13 @@
Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code].
</description>
</method>
+ <method name="is_vcs_initialized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
+ </description>
+ </method>
<method name="shut_down">
<return type="bool">
</return>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 2b44eb81b1..1feccec501 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -45,7 +45,7 @@
Global contrast value of the rendered scene (default value is 1).
</member>
<member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false">
- Enables the adjustment_* options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene.
+ Enables the [code]adjustment_*[/code] options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene.
</member>
<member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0">
Global color saturation value of the rendered scene (default value is 1).
@@ -96,13 +96,13 @@
[Sky] resource's custom field of view.
</member>
<member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
- [Sky] resource's rotation expressed as a [Basis]
+ [Sky] resource's rotation expressed as a [Basis].
</member>
<member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )">
- [Sky] resource's rotation expressed as euler angles in radians
+ [Sky] resource's rotation expressed as Euler angles in radians.
</member>
<member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )">
- [Sky] resource's rotation expressed as euler angles in degrees
+ [Sky] resource's rotation expressed as Euler angles in degrees.
</member>
<member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1">
Amount of far blur.
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 52e4b94051..57d2c6ff96 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -79,7 +79,7 @@
<return type="int" enum="HTTPClient.Status">
</return>
<description>
- Returns a [code]STATUS_*[/code] enum constant. Need to call [method poll] in order to get status updates.
+ Returns a [enum Status] constant. Need to call [method poll] in order to get status updates.
</description>
</method>
<method name="has_response" qualifiers="const">
@@ -143,7 +143,7 @@
</argument>
<description>
Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
- Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code].
+ Headers are HTTP request headers. For available HTTP methods, see [enum Method].
To create a POST request with query strings to push to the server, do:
[codeblock]
var fields = {"username" : "user", "password" : "pass"}
@@ -166,19 +166,10 @@
</argument>
<description>
Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
- Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code].
+ Headers are HTTP request headers. For available HTTP methods, see [enum Method].
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
- <method name="set_read_chunk_size">
- <return type="void">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Sets the size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk].
- </description>
- </method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false">
@@ -187,6 +178,9 @@
<member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection">
The connection to use for this client.
</member>
+ <member name="read_chunk_size" type="int" setter="set_read_chunk_size" getter="get_read_chunk_size" default="4096">
+ The size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk].
+ </member>
</members>
<constants>
<constant name="METHOD_GET" value="0" enum="Method">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 3a73d44a01..2fed423a32 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -1,13 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="HTTPRequest" inherits="Node" category="Core" version="3.2">
<brief_description>
- A node with the ability to send HTTP requests.
+ A node with the ability to send HTTP(S) requests.
</brief_description>
<description>
A node with the ability to send HTTP requests. Uses [HTTPClient] internally.
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
+ [b]Example of loading and displaying an image using HTTPRequest:[/b]
+ [codeblock]
+ func _ready():
+ # Create an HTTP request node and connect its completion signal.
+ var http_request = HTTPRequest.new()
+ add_child(http_request)
+ http_request.connect("request_completed", self, "_http_request_completed")
+
+ # Perform the HTTP request. The URL below returns a PNG image as of writing.
+ var error = http_request.request("https://via.placeholder.com/512")
+ if error != OK:
+ push_error("An error occurred in the HTTP request.")
+
+
+ # Called when the HTTP request is completed.
+ func _http_request_completed(result, response_code, headers, body):
+ var image = Image.new()
+ var error = image.load_png_from_buffer(body)
+ if error != OK:
+ push_error("Couldn't load the image.")
+
+ var texture = ImageTexture.new()
+ texture.create_from_image(image)
+
+ # Display the image in a TextureRect node.
+ var texture_rect = TextureRect.new()
+ add_child(texture_rect)
+ texture_rect.texture = texture
+ [/codeblock]
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link>
<link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
@@ -37,7 +67,7 @@
<return type="int" enum="HTTPClient.Status">
</return>
<description>
- Returns the current status of the underlying [HTTPClient]. See [code]STATUS_*[/code] enum on [HTTPClient].
+ Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status].
</description>
</method>
<method name="request">
@@ -63,6 +93,10 @@
<member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1">
Maximum allowed size for response bodies.
</member>
+ <member name="download_chunk_size" type="int" setter="set_download_chunk_size" getter="get_download_chunk_size" default="4096">
+ The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size].
+ Set this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory.
+ </member>
<member name="download_file" type="String" setter="set_download_file" getter="get_download_file" default="&quot;&quot;">
The file to download into. Will output any received file into it.
</member>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index b8b5f0bd39..bfc645b8e7 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -65,7 +65,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns a queued hostname's status as a [code]RESOLVER_STATUS_*[/code] constant, given its queue [code]id[/code].
+ Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code].
</description>
</method>
<method name="resolve_hostname">
@@ -76,7 +76,7 @@
<argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
</argument>
<description>
- Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [code]TYPE_*[/code] constant given as [code]ip_type[/code].
+ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code].
</description>
</method>
<method name="resolve_hostname_queue_item">
@@ -87,7 +87,7 @@
<argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
</argument>
<description>
- Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
+ Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
</description>
</method>
</methods>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index d297bc98ae..0303585120 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -90,7 +90,7 @@
<argument index="2" name="lossy_quality" type="float">
</argument>
<description>
- Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [code]COMPRESS_*[/code] constants.
+ Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants.
</description>
</method>
<method name="convert">
@@ -99,7 +99,7 @@
<argument index="0" name="format" type="int" enum="Image.Format">
</argument>
<description>
- Converts the image's format. See [code]FORMAT_*[/code] constants.
+ Converts the image's format. See [enum Format] constants.
</description>
</method>
<method name="copy_from">
@@ -123,7 +123,7 @@
<argument index="3" name="format" type="int" enum="Image.Format">
</argument>
<description>
- Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
+ Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
</description>
</method>
<method name="create_from_data">
@@ -140,7 +140,7 @@
<argument index="4" name="data" type="PoolByteArray">
</argument>
<description>
- Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
+ Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
</description>
</method>
<method name="crop">
@@ -165,7 +165,7 @@
<return type="int" enum="Image.AlphaMode">
</return>
<description>
- Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found.
+ Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are below a certain threshold or the maximum value. Returns [constant ALPHA_NONE] if no data for alpha values is found.
</description>
</method>
<method name="expand_x2_hq2x">
@@ -225,7 +225,7 @@
<return type="int" enum="Image.Format">
</return>
<description>
- Returns the image's format. See [code]FORMAT_*[/code] constants.
+ Returns the image's format. See [enum Format] constants.
</description>
</method>
<method name="get_height" qualifiers="const">
@@ -415,7 +415,7 @@
<argument index="1" name="grayscale" type="bool" default="false">
</argument>
<description>
- Saves the image as an EXR file to [code]path[/code]. If grayscale is true and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.
+ Saves the image as an EXR file to [code]path[/code]. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.
</description>
</method>
<method name="save_png" qualifiers="const">
@@ -456,6 +456,15 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code] if the image is locked. Note that the [code]dst[/code] values must be integers. Example:
+ [codeblock]
+ var img = Image.new()
+ img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
+ img.lock()
+ img.set_pixelv(Vector2(x, y), color) # Works
+ img.unlock()
+ img.set_pixelv(Vector2(x, y), color) # Does not have an effect
+ [/codeblock]
</description>
</method>
<method name="shrink_x2">
@@ -482,7 +491,7 @@
</methods>
<members>
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PoolByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
- Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants.
+ Holds all of the image's color data in a given format. See [enum Format] constants.
</member>
</members>
<constants>
diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml
index ddfd3d74d5..e0807760f7 100644
--- a/doc/classes/ImmediateGeometry.xml
+++ b/doc/classes/ImmediateGeometry.xml
@@ -41,8 +41,8 @@
<argument index="1" name="texture" type="Texture" default="null">
</argument>
<description>
- Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
- For the type of primitive, use the [Mesh].[code]PRIMITIVE_*[/code] enumerations.
+ Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references.
+ For the type of primitive, see the [enum Mesh.PrimitiveType] enum.
</description>
</method>
<method name="clear">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 6d4adfad51..3f94ad2d2c 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -314,7 +314,7 @@
<argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
- Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See enum [code]CURSOR_*[/code] for the list of shapes.
+ Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes.
[code]image[/code]'s size must be lower than 256×256.
[code]hotspot[/code] must be within [code]image[/code]'s size.
[b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed.
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 4c8d83adba..d412ce09e2 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -51,8 +51,10 @@
</return>
<argument index="0" name="action" type="String">
</argument>
+ <argument index="1" name="allow_echo" type="bool" default="false">
+ </argument>
<description>
- Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
+ Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
</description>
</method>
<method name="is_action_released" qualifiers="const">
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index fab4cc0fb9..5cd6a0c285 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -4,7 +4,7 @@
Input event type for mouse motion events.
</brief_description>
<description>
- Contains mouse motion information. Supports relative, absolute positions and speed. See [method Node._input].
+ Contains mouse and pen motion information. Supports relative, absolute positions and speed. See [method Node._input].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
@@ -12,12 +12,18 @@
<methods>
</methods>
<members>
+ <member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0">
+ Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
+ </member>
<member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )">
The mouse position relative to the previous position (position at the last frame).
</member>
<member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )">
The mouse speed in pixels per second.
</member>
+ <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2( 0, 0 )">
+ Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 98db123f5b..01cffe6262 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -12,13 +12,13 @@
</methods>
<members>
<member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
- The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants.
+ The error type if the JSON source was not successfully parsed. See the [enum Error] constants.
</member>
<member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1">
The line number where the error occurred if JSON source was not successfully parsed.
</member>
<member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default="&quot;&quot;">
- The error message if JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants.
+ The error message if JSON source was not successfully parsed. See the [enum Error] constants.
</member>
<member name="result" type="Variant" setter="set_result" getter="get_result">
A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned.
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 2fab689f89..164932749f 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -18,6 +18,7 @@
<argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis">
</argument>
<description>
+ Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z].
</description>
</method>
<method name="get_floor_velocity" qualifiers="const">
@@ -125,7 +126,7 @@
</argument>
<description>
Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting[code]snap[/code] to[code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
</description>
</method>
<method name="set_axis_lock">
@@ -136,6 +137,7 @@
<argument index="1" name="lock" type="bool">
</argument>
<description>
+ Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z].
</description>
</method>
<method name="test_move">
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 4d1584e9de..9222611090 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -41,7 +41,7 @@
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0">
- Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants.
+ Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants.
</member>
<member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false">
If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text.
@@ -67,7 +67,7 @@
If [code]true[/code], all the text displays as UPPERCASE.
</member>
<member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0">
- Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants.
+ Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum VAlign] constants.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
Restricts the number of characters to display. Set to -1 to disable.
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index f61be5a5af..5bb90daaf4 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -26,7 +26,7 @@
The Light2D's energy value. The larger the value, the stronger the light.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0">
- The Light2D's mode. See [code]MODE_*[/code] constants for values.
+ The Light2D's mode. See [enum Mode] constants for values.
</member>
<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
The offset of the Light2D's [code]texture[/code].
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 3cb04b8b89..9eaf70711e 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -66,14 +66,17 @@
</method>
</methods>
<members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
+ If [code]true[/code], the line's border will be anti-aliased.
+ </member>
<member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0">
- Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants.
+ Controls the style of the line's first point. Use [enum LineCapMode] constants.
</member>
<member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 0.4, 0.5, 1, 1 )">
The line's color. Will not be used if a gradient is set.
</member>
<member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0">
- Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants.
+ Controls the style of the line's last point. Use [enum LineCapMode] constants.
</member>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set.
@@ -94,7 +97,7 @@
The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0">
- The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants.
+ The style to render the [code]texture[/code] on the line. Use [enum LineTextureMode] constants.
</member>
<member name="width" type="float" setter="set_width" getter="get_width" default="10.0">
The line's width.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index de216563d3..78459d2839 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -54,7 +54,7 @@
<argument index="0" name="option" type="int">
</argument>
<description>
- Executes a given action as defined in the[code]MENU_*[/code] enum.
+ Executes a given action as defined in the [enum MenuItems] enum.
</description>
</method>
<method name="select">
@@ -84,7 +84,7 @@
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
- Text alignment as defined in the [code]ALIGN_*[/code] enum.
+ Text alignment as defined in the [enum Align] enum.
</member>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false">
If [code]true[/code], the caret (visual cursor) blinks.
diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml
index 130263a069..ae8c38198f 100644
--- a/doc/classes/Listener.xml
+++ b/doc/classes/Listener.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Listener" inherits="Spatial" category="Core" version="3.2">
<brief_description>
+ Overrides the location sounds are heard from.
</brief_description>
<description>
+ Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera].
+ [b]Note:[/b] There is no 2D equivalent for this node yet.
</description>
<tutorials>
</tutorials>
@@ -11,24 +14,29 @@
<return type="void">
</return>
<description>
+ Disables the listener to use the current camera's listener instead.
</description>
</method>
<method name="get_listener_transform" qualifiers="const">
<return type="Transform">
</return>
<description>
+ Returns the listener's global orthonormalized [Transform].
</description>
</method>
<method name="is_current" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise.
+ [b]Note:[/b] There may be more than one Listener marked as "current" in the scene tree, but only the one that was made current last will be used.
</description>
</method>
<method name="make_current">
<return type="void">
</return>
<description>
+ Enables the listener. This will override the current camera's listener.
</description>
</method>
</methods>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 44dc4f334f..49278be44e 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -4,7 +4,7 @@
Library of meshes.
</brief_description>
<description>
- A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. This resource is used in [GridMap].
+ A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap].
</description>
<tutorials>
</tutorials>
@@ -22,7 +22,8 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Create a new item in the library, supplied as an ID.
+ Creates a new item in the library with the given ID.
+ You can get an unused ID from [method get_last_unused_item_id].
</description>
</method>
<method name="find_item_by_name" qualifiers="const">
@@ -31,13 +32,14 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the first item with the given name.
</description>
</method>
<method name="get_item_list" qualifiers="const">
<return type="PoolIntArray">
</return>
<description>
- Returns the list of items.
+ Returns the list of item IDs in use.
</description>
</method>
<method name="get_item_mesh" qualifiers="const">
@@ -46,7 +48,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns the mesh of the item.
+ Returns the item's mesh.
</description>
</method>
<method name="get_item_name" qualifiers="const">
@@ -55,7 +57,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns the name of the item.
+ Returns the item's name.
</description>
</method>
<method name="get_item_navmesh" qualifiers="const">
@@ -64,6 +66,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns the item's navigation mesh.
</description>
</method>
<method name="get_item_navmesh_transform" qualifiers="const">
@@ -72,6 +75,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns the transform applied to the item's navigation mesh.
</description>
</method>
<method name="get_item_preview" qualifiers="const">
@@ -90,6 +94,8 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns an item's collision shapes.
+ The array consists of each [Shape] followed by its [Transform].
</description>
</method>
<method name="get_last_unused_item_id" qualifiers="const">
@@ -128,6 +134,7 @@
</argument>
<description>
Sets the item's name.
+ This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].
</description>
</method>
<method name="set_item_navmesh">
@@ -138,6 +145,7 @@
<argument index="1" name="navmesh" type="NavigationMesh">
</argument>
<description>
+ Sets the item's navigation mesh.
</description>
</method>
<method name="set_item_navmesh_transform">
@@ -148,6 +156,7 @@
<argument index="1" name="navmesh" type="Transform">
</argument>
<description>
+ Sets the transform to apply to the item's navigation mesh.
</description>
</method>
<method name="set_item_preview">
@@ -158,6 +167,7 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
+ Sets a texture to use as the item's preview icon in the editor.
</description>
</method>
<method name="set_item_shapes">
@@ -168,6 +178,8 @@
<argument index="1" name="shapes" type="Array">
</argument>
<description>
+ Sets an item's collision shapes.
+ The array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY].
</description>
</method>
</methods>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 5f8c7ed120..9cd3fe7bb4 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -92,7 +92,7 @@
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</member>
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
- The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
+ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
</member>
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections.
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 1f685aab81..e9fb47cbbd 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -251,7 +251,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call &lt;method&gt; on a null instance." error.
+ Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call &lt;method&gt; on a null instance." error.
[b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
[b]Example:[/b] Assume your current node is Character and the following tree:
[codeblock]
@@ -295,7 +295,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Similar to [method get_node], but does not raise an error if [code]path[/code] does not point to a valid [Node].
+ Similar to [method get_node], but does not log an error if [code]path[/code] does not point to a valid [Node].
</description>
</method>
<method name="get_parent" qualifiers="const">
@@ -783,15 +783,6 @@
Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour.
</description>
</method>
- <method name="set_process_priority">
- <return type="void">
- </return>
- <argument index="0" name="priority" type="int">
- </argument>
- <description>
- Sets the node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first.
- </description>
- </method>
<method name="set_process_unhandled_input">
<return type="void">
</return>
@@ -847,6 +838,9 @@
<member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0">
Pause mode. How the node will behave if the [SceneTree] is paused.
</member>
+ <member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
+ The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first.
+ </member>
</members>
<signals>
<signal name="ready">
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 5deee941da..0310068a90 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -7,6 +7,19 @@
A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite"[/code] which is a child of the other named nodes in the path.
You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
A [NodePath] is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties.
+ Some examples of NodePaths include the following:
+ [codeblock]
+ # No leading slash means it is relative to the current node.
+ @"A" # Immediate child A
+ @"A/B" # A's child B
+ @"." # The current node.
+ @".." # The parent node.
+ @"../C" # A sibling node C.
+ # A leading slash means it is absolute from the SceneTree.
+ @"/root" # Equivalent to get_tree().get_root().
+ @"/root/Main" # If your main scene's root node were named "Main".
+ @"/root/MyAutoload" # If you have an autoloaded node or scene.
+ [/codeblock]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 13a2fc2602..54b4f3df64 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -45,6 +45,8 @@
<return type="void">
</return>
<description>
+ Shuts down system MIDI driver.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="delay_msec" qualifiers="const">
@@ -119,6 +121,7 @@
[codeblock]
OS.execute("CMD.exe", ["/C", "cd %TEMP% &amp;&amp; dir"], true, output)
[/codeblock]
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="find_scancode_from_string" qualifiers="const">
@@ -157,6 +160,9 @@
<return type="PoolStringArray">
</return>
<description>
+ Returns an array of MIDI device names.
+ The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs].
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_current_video_driver" qualifiers="const">
@@ -217,11 +223,12 @@
Returns the path to the current engine executable.
</description>
</method>
- <method name="get_granted_permissions">
+ <method name="get_granted_permissions" qualifiers="const">
<return type="PoolStringArray">
</return>
<description>
With this function you can get the list of dangerous permissions that have been granted to the Android application.
+ [b]Note:[/b] This method is implemented on Android.
</description>
</method>
<method name="get_ime_selection" qualifiers="const">
@@ -230,6 +237,7 @@
<description>
Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="get_ime_text" qualifiers="const">
@@ -238,6 +246,7 @@
<description>
Returns the IME intermediate composition string.
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="get_latin_keyboard_variant" qualifiers="const">
@@ -246,6 +255,7 @@
<description>
Returns the current latin keyboard variant as a String.
Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code].
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms.
</description>
</method>
<method name="get_locale" qualifiers="const">
@@ -260,6 +270,7 @@
</return>
<description>
Returns the model name of the current device.
+ [b]Note:[/b] This method is implemented on Android and iOS. Returns [code]"GenericDevice"[/code] on unsupported platforms.
</description>
</method>
<method name="get_name" qualifiers="const">
@@ -273,14 +284,16 @@
<return type="int">
</return>
<description>
- Returns the amount of battery left in the device as a percentage.
+ Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_power_seconds_left">
<return type="int">
</return>
<description>
- Returns an estimate of the time left in seconds before the device runs out of battery.
+ Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_power_state">
@@ -288,6 +301,7 @@
</return>
<description>
Returns the current state of the device regarding battery and power. See [enum PowerState] constants.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_process_id" qualifiers="const">
@@ -295,6 +309,7 @@
</return>
<description>
Returns the project's process ID.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="get_processor_count" qualifiers="const">
@@ -343,6 +358,7 @@
xxhdpi - 480 dpi
xxxhdpi - 640 dpi
[/codeblock]
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms.
</description>
</method>
<method name="get_screen_position" qualifiers="const">
@@ -391,6 +407,7 @@
</argument>
<description>
Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir].
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
</description>
</method>
<method name="get_system_time_msecs" qualifiers="const">
@@ -517,6 +534,7 @@
</argument>
<description>
Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="global_menu_add_separator">
@@ -526,6 +544,7 @@
</argument>
<description>
Add a separator between items. Separators also occupy an index.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="global_menu_clear">
@@ -535,6 +554,7 @@
</argument>
<description>
Clear the global menu, in effect removing all items.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="global_menu_remove_item">
@@ -546,6 +566,7 @@
</argument>
<description>
Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="has_environment" qualifiers="const">
@@ -642,6 +663,7 @@
<description>
Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode.
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="move_window_to_foreground">
@@ -649,6 +671,7 @@
</return>
<description>
Moves the window to the front.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="native_video_is_playing">
@@ -656,6 +679,7 @@
</return>
<description>
Returns [code]true[/code] if native video is playing.
+ [b]Note:[/b] This method is implemented on Android and iOS.
</description>
</method>
<method name="native_video_pause">
@@ -663,6 +687,7 @@
</return>
<description>
Pauses native video playback.
+ [b]Note:[/b] This method is implemented on Android and iOS.
</description>
</method>
<method name="native_video_play">
@@ -678,7 +703,7 @@
</argument>
<description>
Plays native video from the specified path, at the given volume and with audio and subtitle tracks.
- [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options.
+ [b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options.
</description>
</method>
<method name="native_video_stop">
@@ -686,6 +711,7 @@
</return>
<description>
Stops native video playback.
+ [b]Note:[/b] This method is implemented on Android and iOS.
</description>
</method>
<method name="native_video_unpause">
@@ -693,12 +719,15 @@
</return>
<description>
Resumes native video playback.
+ [b]Note:[/b] This method is implemented on Android and iOS.
</description>
</method>
<method name="open_midi_inputs">
<return type="void">
</return>
<description>
+ Initialises the singleton for the system MIDI driver.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="print_all_resources">
@@ -740,6 +769,7 @@
</return>
<description>
Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="request_permission">
@@ -756,6 +786,7 @@
</return>
<description>
With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application.
+ [b]Note:[/b] This method is implemented on Android.
</description>
</method>
<method name="set_icon">
@@ -766,6 +797,7 @@
<description>
Sets the game's icon using an [Image] resource.
The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed.
+ [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows.
</description>
</method>
<method name="set_ime_active">
@@ -778,6 +810,7 @@
If active IME handles key events before the application and creates an composition string and suggestion list.
Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions.
Completed composition string is committed when input is finished.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="set_ime_position">
@@ -787,6 +820,7 @@
</argument>
<description>
Sets position of IME suggestion list popup (in window coordinates).
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="set_native_icon">
@@ -797,7 +831,7 @@
<description>
Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS).
Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog.
- [b]Note:[/b] This method is only implemented on macOS and Windows.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
</description>
</method>
<method name="set_thread_name">
@@ -825,6 +859,7 @@
</argument>
<description>
Sets whether the window should always be on top.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="set_window_title">
@@ -835,6 +870,7 @@
<description>
Sets the window title to the specified string.
[b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers.
+ [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows.
</description>
</method>
<method name="shell_open">
@@ -847,6 +883,7 @@
- [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder.
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
- [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added.
+ [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
</description>
</method>
<method name="show_virtual_keyboard">
@@ -856,6 +893,7 @@
</argument>
<description>
Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
+ [b]Note:[/b] This method is implemented on Android, iOS and UWP.
</description>
</method>
</methods>
@@ -875,6 +913,9 @@
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false">
If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
</member>
+ <member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900">
+ The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
+ </member>
<member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size" default="Vector2( 0, 0 )">
The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
</member>
@@ -887,6 +928,9 @@
<member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true">
If [code]true[/code], vertical synchronization (Vsync) is enabled.
</member>
+ <member name="vsync_via_compositor" type="bool" setter="set_vsync_via_compositor" getter="is_vsync_via_compositor_enabled" default="false">
+ If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode.
+ </member>
<member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false">
If [code]true[/code], removes the window frame.
[b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency.
@@ -904,6 +948,7 @@
If [code]true[/code], the window background is transparent and window frame is removed.
Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering.
[b]Note:[/b] This property has no effect if [b]Project &gt; Project Settings &gt; Display &gt; Window &gt; Per-pixel transparency &gt; Allowed[/b] setting is disabled.
+ [b]Note:[/b] This property is implemented on Linux, macOS and Windows.
</member>
<member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )">
The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 4b77197e29..5a09fe39c0 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -139,7 +139,7 @@
<argument index="4" name="flags" type="int" default="0">
</argument>
<description>
- Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
+ Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
Examples:
@@ -148,6 +148,13 @@
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal
[/codeblock]
+ An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]:
+ [codeblock]
+ connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
+ emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
+ func _on_Player_hit(hit_by, level, weapon_type, damage):
+ print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])
+ [/codeblock]
</description>
</method>
<method name="disconnect">
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index f3091a3e3f..e9ff2c0916 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PCKPacker" inherits="Reference" category="Core" version="3.2">
<brief_description>
+ Creates packages that can be loaded into a running project.
</brief_description>
<description>
+ The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack].
+ [codeblock]
+ var packer = PCKPacker.new()
+ packer.pck_start("test.pck")
+ packer.add_file("res://text.txt", "text.txt")
+ packer.flush()
+ [/codeblock]
+ The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package.
</description>
<tutorials>
</tutorials>
@@ -15,14 +24,16 @@
<argument index="1" name="source_path" type="String">
</argument>
<description>
+ Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]).
</description>
</method>
<method name="flush">
<return type="int" enum="Error">
</return>
- <argument index="0" name="verbose" type="bool">
+ <argument index="0" name="verbose" type="bool" default="false">
</argument>
<description>
+ Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging.
</description>
</method>
<method name="pck_start">
@@ -30,9 +41,10 @@
</return>
<argument index="0" name="pck_name" type="String">
</argument>
- <argument index="1" name="alignment" type="int">
+ <argument index="1" name="alignment" type="int" default="0">
</argument>
<description>
+ Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required).
</description>
</method>
</methods>
diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml
index fb74c5a3d4..2219be5a26 100644
--- a/doc/classes/Particles.xml
+++ b/doc/classes/Particles.xml
@@ -24,6 +24,7 @@
<argument index="0" name="pass" type="int">
</argument>
<description>
+ Returns the [Mesh] that is drawn at index [code]pass[/code].
</description>
</method>
<method name="restart">
@@ -41,6 +42,7 @@
<argument index="1" name="mesh" type="Mesh">
</argument>
<description>
+ Sets the [Mesh] that is drawn at index [code]pass[/code].
</description>
</method>
</methods>
@@ -49,7 +51,7 @@
Number of particles to emit.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder" default="0">
- Particle draw order. Uses [code]DRAW_ORDER_*[/code] values.
+ Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
[Mesh] that is drawn for the first draw pass.
diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml
index 7c7b42ce88..100585768d 100644
--- a/doc/classes/Particles2D.xml
+++ b/doc/classes/Particles2D.xml
@@ -31,7 +31,7 @@
Number of particles emitted in one emission cycle.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0">
- Particle draw order. Uses [code]DRAW_ORDER_*[/code] values.
+ Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
If [code]true[/code], particles are being emitted.
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 64751cdf76..187ad1688d 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -157,7 +157,7 @@
Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0">
- Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values.
+ Particles will be emitted inside this region. Use [enum EmissionShape] constants for values.
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index a139fa4664..02e3ef5efb 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -203,7 +203,7 @@
</argument>
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
- 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
+ 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
2: [RID] of the object that entered/exited the area.
3: Instance ID of the object that entered/exited the area.
4: The shape index of the object that entered/exited the area.
@@ -1155,7 +1155,7 @@
Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</constant>
<constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter">
- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE.
+ This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE].
</constant>
<constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter">
Constant to set/get the linear dampening factor of an area.
diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml
index 7d46dd2876..7ea00cbddc 100644
--- a/doc/classes/Physics2DShapeQueryParameters.xml
+++ b/doc/classes/Physics2DShapeQueryParameters.xml
@@ -4,7 +4,7 @@
Parameters to be sent to a 2D shape physics query.
</brief_description>
<description>
- This class contains the shape and other parameters for intersection/collision queries.
+ This class contains the shape and other parameters for 2D intersection/collision queries. See also [Physics2DShapeQueryResult].
</description>
<tutorials>
</tutorials>
@@ -21,14 +21,16 @@
</methods>
<members>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
+ If [code]true[/code], the query will take [Area2D]s into account.
</member>
<member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
+ If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647">
- The physics layer the query should be made on.
+ The physics layer(s) the query will take into account (as a bitmask).
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]">
- The list of objects or object [RID]s, that will be excluded from collisions.
+ The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The collision margin for the shape.
@@ -37,10 +39,10 @@
The motion of the shape being queried for.
</member>
<member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid">
- The [RID] of the queried shape. See also [method set_shape].
+ The queried shape's [RID]. See also [method set_shape].
</member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
- the transform matrix of the queried shape.
+ The queried shape's transform matrix.
</member>
</members>
<constants>
diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml
index dd38b488f5..06f943cb6d 100644
--- a/doc/classes/Physics2DShapeQueryResult.xml
+++ b/doc/classes/Physics2DShapeQueryResult.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.2">
<brief_description>
+ Result of a 2D shape query in [Physics2DServer].
</brief_description>
<description>
+ The result of a 2D shape query in [Physics2DServer]. See also [Physics2DShapeQueryParameters].
</description>
<tutorials>
</tutorials>
@@ -11,6 +13,7 @@
<return type="int">
</return>
<description>
+ Returns the number of objects that intersected with the shape.
</description>
</method>
<method name="get_result_object" qualifiers="const">
@@ -19,6 +22,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_id" qualifiers="const">
@@ -27,6 +31,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_shape" qualifiers="const">
@@ -35,6 +40,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_rid" qualifiers="const">
@@ -43,6 +49,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [RID] of the object that intersected with the shape at index [code]idx[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index a779a34e6a..d7eb4c8c4f 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -68,7 +68,7 @@
<argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
</argument>
<description>
- Returns an area parameter value. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants.
+ Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants.
</description>
</method>
<method name="area_get_shape" qualifiers="const">
@@ -194,7 +194,7 @@
</argument>
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
- 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
+ 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
2: [RID] of the object that entered/exited the area.
3: Instance ID of the object that entered/exited the area.
4: The shape index of the object that entered/exited the area.
@@ -221,7 +221,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Sets the value for an area parameter. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants.
+ Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants.
</description>
</method>
<method name="area_set_ray_pickable">
@@ -292,7 +292,7 @@
<argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
</argument>
<description>
- Sets the space override mode for the area. The modes are described in the constants [code]AREA_SPACE_OVERRIDE_*[/code].
+ Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants.
</description>
</method>
<method name="area_set_transform">
@@ -426,7 +426,7 @@
<argument index="1" name="init_sleeping" type="bool" default="false">
</argument>
<description>
- Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
+ Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
</description>
</method>
<method name="body_get_collision_layer" qualifiers="const">
@@ -500,7 +500,7 @@
<argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
</argument>
<description>
- Returns the value of a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants.
+ Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
</method>
<method name="body_get_shape" qualifiers="const">
@@ -715,7 +715,7 @@
<argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode">
</argument>
<description>
- Sets the body mode, from one of the constants BODY_MODE*.
+ Sets the body mode, from one of the [enum BodyMode] constants.
</description>
</method>
<method name="body_set_omit_force_integration">
@@ -739,7 +739,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants.
+ Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
</method>
<method name="body_set_ray_pickable">
@@ -812,7 +812,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Sets a body state (see BODY_STATE* constants).
+ Sets a body state (see [enum BodyState] constants).
</description>
</method>
<method name="cone_twist_joint_get_param" qualifiers="const">
@@ -823,7 +823,7 @@
<argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
</argument>
<description>
- Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants).
+ Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
</method>
<method name="cone_twist_joint_set_param">
@@ -836,7 +836,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants).
+ Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
</method>
<method name="free_rid">
@@ -858,7 +858,7 @@
<argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
</argument>
<description>
- Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants).
+ Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
<method name="generic_6dof_joint_get_param">
@@ -871,7 +871,7 @@
<argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
</argument>
<description>
- Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*).
+ Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants).
</description>
</method>
<method name="generic_6dof_joint_set_flag">
@@ -886,7 +886,7 @@
<argument index="3" name="enable" type="bool">
</argument>
<description>
- Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants).
+ Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
<method name="generic_6dof_joint_set_param">
@@ -901,7 +901,7 @@
<argument index="3" name="value" type="float">
</argument>
<description>
- Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*).
+ Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants).
</description>
</method>
<method name="get_process_info">
@@ -921,7 +921,7 @@
<argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
</argument>
<description>
- Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants).
+ Gets a hinge_joint flag (see [enum HingeJointFlag] constants).
</description>
</method>
<method name="hinge_joint_get_param" qualifiers="const">
@@ -932,7 +932,7 @@
<argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
</argument>
<description>
- Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*).
+ Gets a hinge_joint parameter (see [enum HingeJointParam]).
</description>
</method>
<method name="hinge_joint_set_flag">
@@ -945,7 +945,7 @@
<argument index="2" name="enabled" type="bool">
</argument>
<description>
- Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants).
+ Sets a hinge_joint flag (see [enum HingeJointFlag] constants).
</description>
</method>
<method name="hinge_joint_set_param">
@@ -958,7 +958,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*).
+ Sets a hinge_joint parameter (see [enum HingeJointParam] constants).
</description>
</method>
<method name="joint_create_cone_twist">
@@ -1091,7 +1091,7 @@
<argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
</argument>
<description>
- Gets a pin_joint parameter (see PIN_JOINT* constants).
+ Gets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
<method name="pin_joint_set_local_a">
@@ -1126,7 +1126,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets a pin_joint parameter (see PIN_JOINT* constants).
+ Sets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
<method name="set_active">
@@ -1144,7 +1144,7 @@
<argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType">
</argument>
<description>
- Creates a shape of type [code]SHAPE_*[/code]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
+ Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
</description>
</method>
<method name="shape_get_data" qualifiers="const">
@@ -1162,7 +1162,7 @@
<argument index="0" name="shape" type="RID">
</argument>
<description>
- Returns the type of shape (see [code]SHAPE_*[/code] constants).
+ Returns the type of shape (see [enum ShapeType] constants).
</description>
</method>
<method name="shape_set_data">
@@ -1184,7 +1184,7 @@
<argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
</argument>
<description>
- Gets a slider_joint parameter (see SLIDER_JOINT* constants).
+ Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
<method name="slider_joint_set_param">
@@ -1197,7 +1197,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
- Gets a slider_joint parameter (see SLIDER_JOINT* constants).
+ Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
<method name="space_create">
@@ -1257,7 +1257,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
- Sets the value for a space parameter. A list of available parameters is on the [code]SPACE_PARAM_*[/code] constants.
+ Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants.
</description>
</method>
</methods>
@@ -1509,7 +1509,7 @@
Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</constant>
<constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter">
- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE.
+ This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE].
</constant>
<constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter">
Constant to set/get the linear dampening factor of an area.
diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml
index 7d7307592e..d56247fcaf 100644
--- a/doc/classes/PhysicsShapeQueryParameters.xml
+++ b/doc/classes/PhysicsShapeQueryParameters.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.2">
<brief_description>
+ Parameters to be sent to a 3D shape physics query.
</brief_description>
<description>
+ This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult].
</description>
<tutorials>
</tutorials>
@@ -13,23 +15,31 @@
<argument index="0" name="shape" type="Resource">
</argument>
<description>
+ Sets the [Shape] that will be used for collision/intersection queries.
</description>
</method>
</methods>
<members>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
+ If [code]true[/code], the query will take [Area]s into account.
</member>
<member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
+ If [code]true[/code], the query will take [PhysicsBody]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
+ The physics layer(s) the query will take into account (as a bitmask).
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]">
+ The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape.
</member>
<member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid">
+ The queried shape's [RID]. See also [method set_shape].
</member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ The queried shape's transform matrix.
</member>
</members>
<constants>
diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml
index 92a4393979..1f151ebb1a 100644
--- a/doc/classes/PhysicsShapeQueryResult.xml
+++ b/doc/classes/PhysicsShapeQueryResult.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.2">
<brief_description>
- Result of a shape query in Physics2DServer.
+ Result of a 3D shape query in [PhysicsServer].
</brief_description>
<description>
+ The result of a 3D shape query in [PhysicsServer]. See also [PhysicsShapeQueryParameters].
</description>
<tutorials>
</tutorials>
@@ -12,6 +13,7 @@
<return type="int">
</return>
<description>
+ Returns the number of objects that intersected with the shape.
</description>
</method>
<method name="get_result_object" qualifiers="const">
@@ -20,6 +22,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_id" qualifiers="const">
@@ -28,6 +31,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_object_shape" qualifiers="const">
@@ -36,6 +40,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code].
</description>
</method>
<method name="get_result_rid" qualifiers="const">
@@ -44,6 +49,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the [RID] of the object that intersected with the shape at index [code]idx[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 69dfe28ac4..f179041327 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -116,6 +116,15 @@
Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="plane" type="Plane">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ </description>
+ </method>
<method name="is_point_over">
<return type="bool">
</return>
diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml
index b94bb8e613..ee841a3cff 100644
--- a/doc/classes/PlaneShape.xml
+++ b/doc/classes/PlaneShape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaneShape" inherits="Shape" category="Core" version="3.2">
<brief_description>
+ Infinite plane shape for 3D collisions.
</brief_description>
<description>
+ An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [PlaneShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane.
</description>
<tutorials>
</tutorials>
@@ -10,6 +12,7 @@
</methods>
<members>
<member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )">
+ The [Plane] used by the [PlaneShape] for collision.
</member>
</members>
<constants>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml
index 21bf078017..867f042cd2 100644
--- a/doc/classes/PoolByteArray.xml
+++ b/doc/classes/PoolByteArray.xml
@@ -53,6 +53,13 @@
Returns a new [PoolByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="get_string_from_ascii">
<return type="String">
</return>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml
index a1fb868ef5..34cfa0ab53 100644
--- a/doc/classes/PoolColorArray.xml
+++ b/doc/classes/PoolColorArray.xml
@@ -33,6 +33,13 @@
Appends a [PoolColorArray] at the end of this array.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml
index 28a28b2bba..25e1e718f7 100644
--- a/doc/classes/PoolIntArray.xml
+++ b/doc/classes/PoolIntArray.xml
@@ -34,6 +34,13 @@
Appends a [PoolIntArray] at the end of this array.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml
index 7eaec82338..e8afe46640 100644
--- a/doc/classes/PoolRealArray.xml
+++ b/doc/classes/PoolRealArray.xml
@@ -33,6 +33,13 @@
Appends a [PoolRealArray] at the end of this array.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml
index a408a18b19..f41a3c7a68 100644
--- a/doc/classes/PoolStringArray.xml
+++ b/doc/classes/PoolStringArray.xml
@@ -33,6 +33,13 @@
Appends a [PoolStringArray] at the end of this array.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml
index 623247e639..321846d08b 100644
--- a/doc/classes/PoolVector2Array.xml
+++ b/doc/classes/PoolVector2Array.xml
@@ -33,6 +33,13 @@
Appends a [PoolVector2Array] at the end of this array.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml
index adc28b46cb..c82bd62a11 100644
--- a/doc/classes/PoolVector3Array.xml
+++ b/doc/classes/PoolVector3Array.xml
@@ -33,6 +33,13 @@
Appends a [PoolVector3Array] at the end of this array.
</description>
</method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index 2357ee2469..6b15b5a1ea 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -4,7 +4,7 @@
Base container control for popups and dialogs.
</brief_description>
<description>
- Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
+ Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml
index d85f568abf..939453b977 100644
--- a/doc/classes/PopupDialog.xml
+++ b/doc/classes/PopupDialog.xml
@@ -12,4 +12,9 @@
</methods>
<constants>
</constants>
+ <theme_items>
+ <theme_item name="panel" type="StyleBox">
+ Sets a custom [StyleBox] for the panel of the [PopupDialog].
+ </theme_item>
+ </theme_items>
</class>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 691aec2eb1..bdb6ca84ee 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -444,7 +444,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Sets the type of the item at the specified index [code]idx[/code] to radio button. If false, sets the type of the item to plain text.
+ Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_as_separator">
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index b0e69bd089..3f07affdfd 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -22,7 +22,8 @@
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices.
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
- If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial].
+ If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
+ This gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 9657982016..1d00bb5712 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -6,6 +6,7 @@
<description>
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
+ [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary.
</description>
<tutorials>
</tutorials>
@@ -16,7 +17,10 @@
<argument index="0" name="hint" type="Dictionary">
</argument>
<description>
- Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String].
+ Adds a custom property info to a property. The dictionary must contain:
+ - [code]name[/code]: [String] (the property's name)
+ - [code]type[/code]: [int] (see [enum Variant.Type])
+ - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String]
[b]Example:[/b]
[codeblock]
ProjectSettings.set("category/property_name", 0)
@@ -144,6 +148,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Sets the specified property's initial value. This is the value the property reverts to.
</description>
</method>
<method name="set_order">
@@ -165,6 +170,11 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Sets the value of a setting.
+ [b]Example:[/b]
+ [codeblock]
+ ProjectSettings.set_setting("application/config/name", "Example")
+ [/codeblock]
</description>
</method>
</methods>
@@ -201,6 +211,7 @@
</member>
<member name="application/config/project_settings_override" type="String" setter="" getter="" default="&quot;&quot;">
Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code].
+ [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings (see this class' description at the top).
</member>
<member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false">
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
@@ -274,6 +285,9 @@
<member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings.
</member>
+ <member name="debug/gdscript/warnings/exclude_addons" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], scripts in the [code]res://addons[/code] folder will not generate warnings.
+ </member>
<member name="debug/gdscript/warnings/function_conflicts_constant" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when a function is declared with the same name as a constant.
</member>
@@ -420,8 +434,8 @@
<member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5).
</member>
- <member name="editor/active" type="bool" setter="" getter="" default="false">
- Internal editor setting, don't touch.
+ <member name="display/window/vsync/vsync_via_compositor" type="bool" setter="" getter="" default="false">
+ If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.)
</member>
<member name="editor/script_templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
</member>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 9d163e926c..eeb633f480 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -94,6 +94,15 @@
Returns the inverse of the quaternion.
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="quat" type="Quat">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ </description>
+ </method>
<method name="is_normalized">
<return type="bool">
</return>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml
index 19f62a57bd..5e17d6e7d7 100644
--- a/doc/classes/RayCast.xml
+++ b/doc/classes/RayCast.xml
@@ -11,6 +11,7 @@
RayCast calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_exception">
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 81d66ef496..c5ba5da24e 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -11,6 +11,7 @@
RayCast2D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_exception">
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 9d6bfbf398..90dd996691 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -137,13 +137,22 @@
Returns [code]true[/code] if the [Rect2] overlaps with another.
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ </description>
+ </method>
<method name="merge">
<return type="Rect2">
</return>
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns a larger Rect2 that contains this Rect2 and [code]b[/code].
+ Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 5c3ffd9cff..0e043b1d50 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RichTextEffect" inherits="Resource" category="Core" version="3.2">
<brief_description>
+ A custom effect for use with [RichTextLabel].
</brief_description>
<description>
+ A custom effect for use with [RichTextLabel].
+ [b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script.
+ [codeblock]
+ # The RichTextEffect will be usable like this: `[example]Some text[/example]`
+ var bbcode = "example"
+ [/codeblock]
+ [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively.
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
+ <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
<method name="_process_custom_fx" qualifiers="virtual">
@@ -13,6 +23,7 @@
<argument index="0" name="char_fx" type="CharFXTransform">
</argument>
<description>
+ Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text.
</description>
</method>
</methods>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 01c8ee4779..2962391b99 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -133,6 +133,18 @@
Adds an [code][align][/code] tag based on the given [code]align[/code] value. See [enum Align] for possible values.
</description>
</method>
+ <method name="push_bold">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="push_bold_italics">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="push_cell">
<return type="void">
</return>
@@ -167,6 +179,12 @@
Adds an [code][indent][/code] tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length.
</description>
</method>
+ <method name="push_italics">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="push_list">
<return type="void">
</return>
@@ -185,6 +203,18 @@
Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
</description>
</method>
+ <method name="push_mono">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="push_normal">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="push_strikethrough">
<return type="void">
</return>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index bd81a48ff5..0635dd8935 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -194,7 +194,7 @@
</return>
<description>
Reloads the currently active scene.
- Returns an [enum Error] code as described in [method change_scene], with the addition of [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet.
+ Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated.
</description>
</method>
<method name="set_auto_accept_quit">
@@ -204,6 +204,7 @@
</argument>
<description>
If [code]true[/code], the application automatically accepts quitting. Enabled by default.
+ For mobile platforms, see [method set_quit_on_go_back].
</description>
</method>
<method name="set_group">
@@ -248,6 +249,7 @@
</argument>
<description>
If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default.
+ To handle 'Go Back' button when this option is disabled, use [constant MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST].
</description>
</method>
<method name="set_screen_stretch">
@@ -287,7 +289,7 @@
If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
</member>
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
- The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals.
+ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals.
</member>
<member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false">
If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior:
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index e8a88acdb5..91014580d3 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -4,7 +4,7 @@
A class stored as a resource.
</brief_description>
<description>
- A class stored as a resource. A script exends the functionality of all objects that instance it.
+ A class stored as a resource. A script extends the functionality of all objects that instance it.
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index ce5947bc06..123353b59a 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -13,6 +13,7 @@
</methods>
<members>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
+ The collision margin for the shape.
</member>
</members>
<constants>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 2c3120f04d..70d55344ca 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -77,6 +77,7 @@
</methods>
<members>
<member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
+ The shape's custom solver bias.
</member>
</members>
<constants>
diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml
index 5cde31fa59..a51907b1bf 100644
--- a/doc/classes/SoftBody.xml
+++ b/doc/classes/SoftBody.xml
@@ -7,6 +7,7 @@
A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -43,12 +44,6 @@
Returns an individual bit on the collision mask.
</description>
</method>
- <method name="is_ray_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -80,25 +75,17 @@
Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
</description>
</method>
- <method name="set_ray_pickable">
- <return type="void">
- </return>
- <argument index="0" name="ray_pickable" type="bool">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5">
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
- The physics layers this area is in.
+ The physics layers this SoftBody is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The physics layers this area scans for collisions.
+ The physics layers this SoftBody scans for collisions.
</member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
@@ -107,15 +94,20 @@
<member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
</member>
<member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
+ [NodePath] to a [CollisionObject] this SoftBody should avoid clipping.
</member>
<member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0">
</member>
<member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
</member>
+ <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
+ If [code]true[/code], the [SoftBody] will respond to [RayCast]s.
+ </member>
<member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
</member>
<member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
+ The SoftBody's mass.
</member>
<member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5">
</member>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index 09a5bf3b8f..0309e73eec 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -15,6 +15,7 @@
<return type="void">
</return>
<description>
+ Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
</description>
</method>
<method name="get_parent_spatial" qualifiers="const">
@@ -48,6 +49,7 @@
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
+ Scales the global (world) transformation by the given [Vector3] scale factors.
</description>
</method>
<method name="global_translate">
@@ -77,6 +79,7 @@
<return type="bool">
</return>
<description>
+ Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale.
</description>
</method>
<method name="is_set_as_toplevel" qualifiers="const">
@@ -206,6 +209,7 @@
<argument index="0" name="disable" type="bool">
</argument>
<description>
+ Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved.
</description>
</method>
<method name="set_identity">
diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml
index 438d96f2b3..133ff68859 100644
--- a/doc/classes/SpringArm.xml
+++ b/doc/classes/SpringArm.xml
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SpringArm" inherits="Spatial" category="Core" version="3.2">
<brief_description>
+ A helper node, mostly used in 3rd person cameras.
</brief_description>
<description>
+ The SpringArm node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin.
+ The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment.
+ The SpringArm will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis.
+ If you use the SpringArm as a camera controller for your player, you might need to exclude the player's collider from the SpringArm's collision check.
</description>
<tutorials>
</tutorials>
@@ -13,18 +18,21 @@
<argument index="0" name="RID" type="RID">
</argument>
<description>
+ Adds the object with the given [RID] to the list of objects excluded from the collision check.
</description>
</method>
<method name="clear_excluded_objects">
<return type="void">
</return>
<description>
+ Clears the list of objects excluded from the collision check.
</description>
</method>
<method name="get_hit_length">
<return type="float">
</return>
<description>
+ Returns the proportion between the current arm length (after checking for collisions) and the [member spring_length]. Ranges from 0 to 1.
</description>
</method>
<method name="remove_excluded_object">
@@ -33,17 +41,26 @@
<argument index="0" name="RID" type="RID">
</argument>
<description>
+ Removes the given [RID] from the list of objects excluded from the collision check.
</description>
</method>
</methods>
<members>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+ The layers against which the collision check shall be done.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.01">
+ When the collision check is made, a candidate length for the SpringArm is given.
+ The margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm.
+ This margin is useful for when the SpringArm has a [Camera] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [Camera] would be placed close to the point of collision.
</member>
<member name="shape" type="Shape" setter="set_shape" getter="get_shape">
+ The [Shape] to use for the SpringArm.
+ When the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast.
</member>
<member name="spring_length" type="float" setter="set_length" getter="get_length" default="1.0">
+ The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes.
+ To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState] documentation.
</member>
</members>
<constants>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index cf152e716e..f5597d89e5 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -459,7 +459,7 @@
<argument index="1" name="what" type="String">
</argument>
<description>
- Inserts a substring at a given position.
+ Returns a copy of the string with the substring [code]what[/code] inserted at the given position.
</description>
</method>
<method name="is_abs_path">
@@ -744,7 +744,14 @@
Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right.
The splits in the returned array are sorted in the same order as the original string, from left to right.
If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split].
- For example, [code]"One,Two,Three,Four"[/code] will return [code]["Three","Four"][/code] if split by [code]","[/code] with a [code]maxsplit[/code] value of 2.
+ Example:
+ [codeblock]
+ var some_string = "One,Two,Three,Four"
+ var some_array = some_string.rsplit(",", true, 1)
+ print(some_array.size()) # Prints 2
+ print(some_array[0]) # Prints "Four"
+ print(some_array[1]) # Prints "Three,Two,One"
+ [/codeblock]
</description>
</method>
<method name="rstrip">
@@ -805,7 +812,14 @@
<description>
Splits the string by a [code]delimiter[/code] string and returns an array of the substrings.
If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of 0 means that all items are split.
- For example, [code]"One,Two,Three"[/code] will return [code]["One","Two"][/code] if split by [code]","[/code] with a [code]maxsplit[/code] value of 2.
+ Example:
+ [codeblock]
+ var some_string = "One,Two,Three,Four"
+ var some_array = some_string.split(",", true, 1)
+ print(some_array.size()) # Prints 2
+ print(some_array[0]) # Prints "One"
+ print(some_array[1]) # Prints "Two,Three,Four"
+ [/codeblock]
</description>
</method>
<method name="split_floats">
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 05ee79eef2..46b11ac010 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.2">
<brief_description>
- Customizable Stylebox with a given set of parameters. (no texture required)
+ Customizable [StyleBox] with a given set of parameters (no texture required).
</brief_description>
<description>
- This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
+ This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
- Color
- Border width (individual width for each border)
- Rounded corners (individual radius for each corner)
- - Shadow
+ - Shadow (with blur and offset)
Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example:
[codeblock]
height = 30
@@ -30,12 +30,14 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the given [code]margin[/code]'s border width. See [enum Margin] for possible values.
</description>
</method>
<method name="get_border_width_min" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the smallest border width out of all four borders.
</description>
</method>
<method name="get_corner_radius" qualifiers="const">
@@ -44,6 +46,7 @@
<argument index="0" name="corner" type="int" enum="Corner">
</argument>
<description>
+ Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values.
</description>
</method>
<method name="get_expand_margin" qualifiers="const">
@@ -52,6 +55,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
</description>
</method>
<method name="set_border_width">
@@ -62,6 +66,7 @@
<argument index="1" name="width" type="int">
</argument>
<description>
+ Sets the border width to [code]width[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_border_width_all">
@@ -70,6 +75,7 @@
<argument index="0" name="width" type="int">
</argument>
<description>
+ Sets the border width to [code]width[/code] pixels for all margins.
</description>
</method>
<method name="set_corner_radius">
@@ -80,6 +86,7 @@
<argument index="1" name="radius" type="int">
</argument>
<description>
+ Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values.
</description>
</method>
<method name="set_corner_radius_all">
@@ -88,6 +95,7 @@
<argument index="0" name="radius" type="int">
</argument>
<description>
+ Sets the corner radius to [code]radius[/code] pixels for all corners.
</description>
</method>
<method name="set_corner_radius_individual">
@@ -102,6 +110,7 @@
<argument index="3" name="radius_bottom_left" type="int">
</argument>
<description>
+ Sets the corner radius for each corner to [code]radius_top_left[/code], [code]radius_top_right[/code], [code]radius_bottom_right[/code], and [code]radius_bottom_left[/code] pixels.
</description>
</method>
<method name="set_expand_margin">
@@ -112,6 +121,7 @@
<argument index="1" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_expand_margin_all">
@@ -120,6 +130,7 @@
<argument index="0" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_individual">
@@ -134,6 +145,7 @@
<argument index="3" name="size_bottom" type="float">
</argument>
<description>
+ Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels.
</description>
</method>
</methods>
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index c0745c5f39..b5da81de79 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.2">
<brief_description>
+ [StyleBox] that displays a single line.
</brief_description>
<description>
+ [StyleBox] that displays a single line of a given color and thickness. It can be used to draw things like separators.
</description>
<tutorials>
</tutorials>
@@ -10,14 +12,19 @@
</methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ The line's color.
</member>
<member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0">
+ The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [StyleBoxLine]'s bounds.
</member>
<member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end" default="1.0">
+ The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [StyleBoxLine]'s bounds.
</member>
<member name="thickness" type="int" setter="set_thickness" getter="get_thickness" default="1">
+ The line's thickness in pixels.
</member>
<member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
+ If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal.
</member>
</members>
<constants>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index d5efc80846..af4186dcb6 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -15,6 +15,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
</description>
</method>
<method name="get_margin_size" qualifiers="const">
@@ -23,6 +24,7 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
+ Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_expand_margin_all">
@@ -31,6 +33,7 @@
<argument index="0" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_individual">
@@ -45,6 +48,7 @@
<argument index="3" name="size_bottom" type="float">
</argument>
<description>
+ Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels.
</description>
</method>
<method name="set_expand_margin_size">
@@ -55,6 +59,7 @@
<argument index="1" name="size" type="float">
</argument>
<description>
+ Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
<method name="set_margin_size">
@@ -65,15 +70,19 @@
<argument index="1" name="size" type="float">
</argument>
<description>
+ Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
</description>
</method>
</methods>
<members>
<member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0">
+ Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values.
</member>
<member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0">
+ Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values.
</member>
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true">
+ If [code]true[/code], the nine-patch texture's center tile will be drawn.
</member>
<member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0">
Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
@@ -114,7 +123,7 @@
The normal map to use when drawing this style box.
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
- Species a sub region of the texture to use.
+ Species a sub-region of the texture to use.
This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
@@ -124,15 +133,19 @@
<signals>
<signal name="texture_changed">
<description>
+ Emitted when the stylebox's texture is changed.
</description>
</signal>
</signals>
<constants>
<constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode">
+ Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly.
</constant>
<constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode">
+ Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system.
</constant>
<constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode">
+ Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly.
</constant>
</constants>
</class>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 7cfd8c6919..0c9ac9fbff 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -167,7 +167,7 @@
</argument>
<description>
Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
- Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]Mesh.ARRAY_COMPRESS_*[/code] constants for other flags.
+ Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags.
</description>
</method>
<method name="commit_to_arrays">
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 1b9f38fc54..1f584ad317 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -144,7 +144,7 @@
If [code]true[/code], tabs can be rearranged with mouse drag.
</member>
<member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1">
- The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details.
+ The alignment of all tabs in the tab container. See the [enum TabAlign] constants for details.
</member>
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true">
If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden.
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 27eab85301..75fceac500 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -94,7 +94,7 @@
</argument>
<description>
Moves the cursor at the specified [code]column[/code] index.
- If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs.
+ If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
</description>
</method>
<method name="cursor_set_line">
@@ -110,8 +110,8 @@
</argument>
<description>
Moves the cursor at the specified [code]line[/code] index.
- If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs.
- If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden].
+ If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
+ If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden using [method set_line_as_hidden].
</description>
</method>
<method name="cut">
@@ -310,7 +310,15 @@
<argument index="3" name="from_column" type="int">
</argument>
<description>
- Perform a search inside the text. Search flags can be specified in the[code]SEARCH_*[/code] enum.
+ Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
+ Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
+ [codeblock]
+ var result = search(key, flags, line, column)
+ if result.size() &gt; 0:
+ # result found
+ var res_line = result[TextEdit.SEARCH_RESULT_LINE]
+ var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]
+ [/codeblock]
</description>
</method>
<method name="select">
@@ -504,8 +512,14 @@
<constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags">
Search from end to beginning.
</constant>
+ <constant name="SEARCH_RESULT_COLUMN" value="0" enum="SearchResult">
+ Used to access the result column from [method search].
+ </constant>
+ <constant name="SEARCH_RESULT_LINE" value="1" enum="SearchResult">
+ Used to access the result line from [method search].
+ </constant>
<constant name="MENU_CUT" value="0" enum="MenuItems">
- Cuts (Copies and clears) the selected text.
+ Cuts (copies and clears) the selected text.
</constant>
<constant name="MENU_COPY" value="1" enum="MenuItems">
Copies the selected text.
@@ -530,7 +544,7 @@
</constant>
</constants>
<theme_items>
- <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )">
Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
</theme_item>
<theme_item name="bookmark_color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )">
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 899ab8b875..201f8ddb8e 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -16,7 +16,7 @@
If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node.
</member>
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0">
- Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more.
+ Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [enum StretchMode] constants. See the constants to learn more.
</member>
<member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask">
Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes.
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index e4db9243ef..b9aa74ebb7 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -15,6 +15,7 @@
<return type="void">
</return>
<description>
+ Clears all values on the theme.
</description>
</method>
<method name="clear_color">
@@ -25,7 +26,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Clears the [Color] at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the [Color] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_constant">
@@ -36,7 +37,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Clears the constant at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the constant at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_font">
@@ -47,7 +48,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Clears the [Font] at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the [Font] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_icon">
@@ -58,7 +59,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Clears the icon at [code]name[/code] if the Theme has [code]type[/code].
+ Clears the icon at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="clear_stylebox">
@@ -69,14 +70,14 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Clears [StyleBox] at [code]name[/code] if the Theme has [code]type[/code].
+ Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="copy_default_theme">
<return type="void">
</return>
<description>
- Sets the Theme's values to a copy of the default theme values.
+ Sets the theme's values to a copy of the default theme values.
</description>
</method>
<method name="copy_theme">
@@ -85,6 +86,7 @@
<argument index="0" name="other" type="Theme">
</argument>
<description>
+ Sets the theme's values to a copy of a given theme.
</description>
</method>
<method name="get_color" qualifiers="const">
@@ -95,7 +97,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Returns the [Color] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the [Color] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_color_list" qualifiers="const">
@@ -104,7 +106,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the Theme has [code]type[/code].
+ Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code].
</description>
</method>
<method name="get_constant" qualifiers="const">
@@ -115,7 +117,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Returns the constant at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the constant at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_constant_list" qualifiers="const">
@@ -124,7 +126,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the Theme has [code]type[/code].
+ Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code].
</description>
</method>
<method name="get_font" qualifiers="const">
@@ -135,7 +137,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Returns the [Font] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the [Font] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_font_list" qualifiers="const">
@@ -144,7 +146,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the Theme has [code]type[/code].
+ Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code].
</description>
</method>
<method name="get_icon" qualifiers="const">
@@ -155,7 +157,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Returns the icon [Texture] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the icon [Texture] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_icon_list" qualifiers="const">
@@ -164,7 +166,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the Theme has [code]type[/code].
+ Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox" qualifiers="const">
@@ -175,7 +177,7 @@
<argument index="1" name="type" type="String">
</argument>
<description>
- Returns the icon [StyleBox] at [code]name[/code] if the Theme has [code]type[/code].
+ Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
@@ -184,14 +186,14 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the Theme has [code]type[/code].
+ Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox_types" qualifiers="const">
<return type="PoolStringArray">
</return>
<description>
- Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the Theme has [code]type[/code].
+ Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code].
</description>
</method>
<method name="get_type_list" qualifiers="const">
@@ -200,7 +202,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if the Theme has [code]type[/code].
+ Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code].
</description>
</method>
<method name="has_color" qualifiers="const">
@@ -212,7 +214,7 @@
</argument>
<description>
Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_constant" qualifiers="const">
@@ -224,7 +226,7 @@
</argument>
<description>
Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_font" qualifiers="const">
@@ -236,7 +238,7 @@
</argument>
<description>
Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_icon" qualifiers="const">
@@ -248,7 +250,7 @@
</argument>
<description>
Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_stylebox" qualifiers="const">
@@ -260,7 +262,7 @@
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the Theme does not have [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_color">
@@ -273,8 +275,8 @@
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_constant">
@@ -287,8 +289,8 @@
<argument index="2" name="constant" type="int">
</argument>
<description>
- Sets the Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_font">
@@ -301,8 +303,8 @@
<argument index="2" name="font" type="Font">
</argument>
<description>
- Sets the Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_icon">
@@ -315,8 +317,8 @@
<argument index="2" name="texture" type="Texture">
</argument>
<description>
- Sets the Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets the theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
<method name="set_stylebox">
@@ -329,8 +331,8 @@
<argument index="2" name="texture" type="StyleBox">
</argument>
<description>
- Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the Theme does not have [code]type[/code].
+ Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code].
+ Does nothing if the theme does not have [code]type[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 75eb8b5862..7376f624cb 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -43,6 +43,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
+ Returns the coordinate of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling.
</description>
</method>
<method name="get_cellv" qualifiers="const">
@@ -255,6 +256,7 @@
</methods>
<members>
<member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false">
+ If [code]true[/code], the cell's UVs will be clipped.
</member>
<member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" default="Transform2D( 64, 0, 0, 64, 0, 0 )">
The custom [Transform2D] to be applied to the TileMap's cells.
@@ -294,6 +296,7 @@
If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body.
</member>
<member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false">
+ If [code]true[/code], this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D].
</member>
<member name="compatibility_mode" type="bool" setter="set_compatibility_mode" getter="is_compatibility_mode_enabled" default="false">
If [code]true[/code], the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing [code]flip_h[/code], [code]flip_v[/code] and [code]transpose[/code] tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index fccfb4cd6d..3d18534a68 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -37,7 +37,7 @@
The button's shape.
</member>
<member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered" default="true">
- If [code]true[/code], the button's shape is centered.
+ If [code]true[/code], the button's shape is centered in the provided texture. If no texture is used, this property has no effect.
</member>
<member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" default="true">
If [code]true[/code], the button's shape is visible.
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 6ebc389ed7..4c4022b3b5 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -89,6 +89,15 @@
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="transform" type="Transform">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ </description>
+ </method>
<method name="looking_at">
<return type="Transform">
</return>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 580da080b3..6288bb074c 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -106,6 +106,15 @@
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ </description>
+ </method>
<method name="orthonormalized">
<return type="Transform2D">
</return>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index e0c8d0b0e8..dd4330b00b 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -229,7 +229,7 @@
The number of columns.
</member>
<member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0">
- The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
+ The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
<member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false">
@@ -240,7 +240,7 @@
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
- Allows single or multiple selection. See the [code]SELECT_*[/code] constants.
+ Allows single or multiple selection. See the [enum SelectMode] constants.
</member>
</members>
<signals>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index c77388e5f4..f32c5527fd 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -396,7 +396,7 @@
<argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode">
</argument>
<description>
- Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants.
+ Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants.
</description>
</method>
<method name="set_checked">
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 0f7a93e8d5..aa995e6cbe 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -433,10 +433,10 @@
The interpolation starts quickly and slows down towards the end.
</constant>
<constant name="EASE_IN_OUT" value="2" enum="EaseType">
- A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends.
+ A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends.
</constant>
<constant name="EASE_OUT_IN" value="3" enum="EaseType">
- A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends.
+ A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends.
</constant>
</constants>
</class>
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index 4c06195d5c..6240178b82 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.2">
<brief_description>
- Vertical version of [ScrollBar], which goes from left (min) to right (max).
+ Vertical version of [ScrollBar], which goes from top (min) to bottom (max).
</brief_description>
<description>
</description>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 522e131b45..1976e812ba 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -4,7 +4,37 @@
The most important data type in Godot.
</brief_description>
<description>
+ In computer programming, a Variant class is a class that is designed to store a variety of other types. Dynamic programming languages like PHP, Lua, JavaScript and GDScript like to use them to store variables' data on the backend. With these Variants, properties are able to change value types freely.
+ [codeblock]
+ var foo = 2 # foo is dynamically an integer
+ foo = "Now foo is a string!"
+ foo = Reference.new() # foo is an Object
+ var bar: int = 2 # bar is a statically typed integer.
+ # bar = "Uh oh! I can't make static variables become a different type!"
+ [/codeblock]
+ Godot tracks all scripting API variables within Variants. Without even realizing it, you use Variants all the time. When a particular language enforces its own rules for keeping data typed, then that language is applying its own custom logic over the base Variant scripting API.
+ - GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types.
+ - VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time.
+ - C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept.
+ - The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects.
+ The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
+ [codeblock]
+ var foo = 2
+ match typeof(foo):
+ TYPE_NIL:
+ print("foo is null")
+ TYPE_INTEGER:
+ print("foo is an integer")
+ TYPE_OBJECT:
+ # Note that Objects are their own special category.
+ # To get the name of the underlying Object type, you need the `get_class()` method.
+ print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string.
+ # Note also that there is not yet any way to get a script's `class_name` string easily.
+ # To fetch that value, you need to dig deeply into a hidden ProjectSettings setting: an Array of Dictionaries called "_global_script_classes".
+ # Open your project.godot file to see it up close.
+ [/codeblock]
A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time. Instead, they are used mainly for communication, editing, serialization and moving data around.
+ Godot has specifically invested in making its Variant class as flexible as possible; so much so that it is used for a multitude of operations to facilitate communication between all of Godot's systems.
A Variant:
- Can store almost any datatype.
- Can perform operations between many variants. GDScript uses Variant as its atomic/native datatype.
@@ -16,10 +46,11 @@
- Can be serialized to text and use it for printing values and editable settings.
- Can work as an exported property, so the editor can edit it universally.
- Can be used for dictionaries, arrays, parsers, etc.
- [b]Containers ([Array] and [Dictionary]):[/b] Both are implemented using variants. A [Dictionary] can match any datatype used as key to any other datatype. An [Array] just holds an array of Variants. Of course, a Variant can also hold a [Dictionary] and an [Array] inside, making it even more flexible.
+ [b]Containers (Array and Dictionary):[/b] Both are implemented using variants. A [Dictionary] can match any datatype used as key to any other datatype. An [Array] just holds an array of Variants. Of course, a Variant can also hold a [Dictionary] and an [Array] inside, making it even more flexible.
Modifications to a container will modify all references to it. A [Mutex] should be created to lock it if multi-threaded access is desired.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 987ed9867b..b23c69de60 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -153,6 +153,15 @@
Returns the vector with all components rounded down.
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="v" type="Vector2">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ </description>
+ </method>
<method name="is_normalized">
<return type="bool">
</return>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 05ce6c43ae..d838e6d2f7 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -129,6 +129,15 @@
Returns the inverse of the vector. This is the same as [code]Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )[/code].
</description>
</method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="v" type="Vector3">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ </description>
+ </method>
<method name="is_normalized">
<return type="bool">
</return>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 2215f26c23..804489f7f1 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -16,7 +16,7 @@
Returns the video stream's name.
</description>
</method>
- <method name="get_video_texture">
+ <method name="get_video_texture" qualifiers="const">
<return type="Texture">
</return>
<description>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 9bc46881f9..4effe9aad2 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -126,6 +126,7 @@
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the viewport is currently performing a drag operation.
</description>
</method>
<method name="input">
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
index e4c6091909..2f1bc5d799 100644
--- a/doc/classes/ViewportContainer.xml
+++ b/doc/classes/ViewportContainer.xml
@@ -15,6 +15,9 @@
If [code]true[/code], the viewport will be scaled to the control's size.
</member>
<member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1">
+ Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.
+ For example, a 1280×720 viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container.
+ [b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index b95b970816..db3fd930c6 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -411,6 +411,8 @@
</argument>
<argument index="9" name="normal_map" type="RID">
</argument>
+ <argument index="10" name="antialiased" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
@@ -787,7 +789,7 @@
<argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode">
</argument>
<description>
- The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants.
+ The mode of the light, see [enum CanvasLightMode] constants.
</description>
</method>
<method name="canvas_light_set_scale">
@@ -841,7 +843,7 @@
<argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter">
</argument>
<description>
- Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants.
+ Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants.
</description>
</method>
<method name="canvas_light_set_shadow_gradient_length">
@@ -924,7 +926,7 @@
<argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode">
</argument>
<description>
- Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants.
+ Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants.
</description>
</method>
<method name="canvas_occluder_polygon_set_shape">
@@ -1330,7 +1332,7 @@
<argument index="0" name="info" type="int" enum="VisualServer.RenderInfo">
</argument>
<description>
- Returns a certain information, see [code]RENDER_INFO_*[/code] for options.
+ Returns a certain information, see [enum RenderInfo] for options.
</description>
</method>
<method name="get_test_cube">
@@ -2306,7 +2308,7 @@
</return>
<argument index="0" name="mesh" type="RID">
</argument>
- <argument index="1" name="primtive" type="int" enum="VisualServer.PrimitiveType">
+ <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType">
</argument>
<argument index="2" name="arrays" type="Array">
</argument>
@@ -2315,7 +2317,7 @@
<argument index="4" name="compress_format" type="int" default="97280">
</argument>
<description>
- Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types.
+ Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types.
</description>
</method>
<method name="mesh_clear">
@@ -2604,6 +2606,14 @@
<description>
</description>
</method>
+ <method name="multimesh_create">
+ <return type="RID">
+ </return>
+ <description>
+ Creates a new multimesh on the VisualServer and returns an [RID] handle.
+ Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
+ </description>
+ </method>
<method name="multimesh_get_aabb" qualifiers="const">
<return type="AABB">
</return>
@@ -2782,6 +2792,22 @@
<description>
</description>
</method>
+ <method name="particles_is_inactive">
+ <return type="bool">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_request_process">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="particles_restart">
<return type="void">
</return>
@@ -3639,7 +3665,7 @@
<argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo">
</argument>
<description>
- Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants.
+ Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants.
</description>
</method>
<method name="viewport_get_texture" qualifiers="const">
@@ -4238,6 +4264,12 @@
<constant name="VIEWPORT_MSAA_16X" value="4" enum="ViewportMSAA">
Multisample antialiasing is set to 16×.
</constant>
+ <constant name="VIEWPORT_MSAA_EXT_2X" value="5" enum="ViewportMSAA">
+ Multisample antialiasing is set to 2× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go).
+ </constant>
+ <constant name="VIEWPORT_MSAA_EXT_4X" value="6" enum="ViewportMSAA">
+ Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go).
+ </constant>
<constant name="VIEWPORT_USAGE_2D" value="0" enum="ViewportUsage">
The Viewport does not render 3D but samples.
</constant>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index f0f03b6c21..15216948e4 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShader" inherits="Shader" category="Core" version="3.2">
<brief_description>
+ A custom shader program with a visual editor.
</brief_description>
<description>
+ This class allows you to define a custom shader program that can be used for various materials to render objects.
+ The visual shader editor creates the shader.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubeMap.xml
index 36465a6b4d..29ebe95086 100644
--- a/doc/classes/VisualShaderNodeCubeMap.xml
+++ b/doc/classes/VisualShaderNodeCubeMap.xml
@@ -12,10 +12,16 @@
<member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map">
</member>
<member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
+ <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubeMap.Source" default="0">
+ </member>
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0">
</member>
</members>
<constants>
+ <constant name="SOURCE_TEXTURE" value="0" enum="Source">
+ </constant>
+ <constant name="SOURCE_PORT" value="1" enum="Source">
+ </constant>
<constant name="TYPE_DATA" value="0" enum="TextureType">
</constant>
<constant name="TYPE_COLOR" value="1" enum="TextureType">
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 302c8dff71..bfcd4c734c 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -7,6 +7,12 @@
<tutorials>
</tutorials>
<methods>
+ <method name="get_input_real_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" />
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 6989246e24..4375b2eb62 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -84,7 +84,7 @@
<return type="int" enum="XMLParser.NodeType">
</return>
<description>
- Gets the type of the current node. Compare with [code]NODE_*[/code] constants.
+ Gets the type of the current node. Compare with [enum NodeType] constants.
</description>
</method>
<method name="has_attribute" qualifiers="const">