summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Decal.xml10
-rw-r--r--doc/classes/Font.xml12
-rw-r--r--doc/classes/RichTextLabel.xml1
-rw-r--r--doc/classes/Vector4.xml101
-rw-r--r--doc/classes/Vector4i.xml6
-rw-r--r--doc/classes/WorkerThreadPool.xml6
-rwxr-xr-xdoc/tools/make_rst.py4
7 files changed, 127 insertions, 13 deletions
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index 861b4b480c..b86104a5e3 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -63,14 +63,14 @@
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them.
</member>
- <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="10.0">
- Distance from the camera at which the Decal begins to fade away.
+ <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="40.0">
+ The distance from the camera at which the Decal begins to fade away (in 3D units).
</member>
<member name="distance_fade_enabled" type="bool" setter="set_enable_distance_fade" getter="is_distance_fade_enabled" default="false">
- If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
+ If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
</member>
- <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="1.0">
- Distance over which the Decal fades. The Decal becomes slowly more transparent over this distance and is completely invisible at the end.
+ <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="10.0">
+ The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end.
</member>
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity.
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 6377c829e1..ec2776f636 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -14,8 +14,8 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="int" />
- <argument index="3" name="modulate" type="int" />
- <argument index="4" name="arg4" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="3" name="font_size" type="int" />
+ <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
@@ -26,9 +26,9 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="int" />
- <argument index="3" name="size" type="int" />
- <argument index="4" name="modulate" type="int" default="-1" />
- <argument index="5" name="arg5" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="3" name="font_size" type="int" />
+ <argument index="4" name="size" type="int" default="-1" />
+ <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draw a single Unicode character [code]char[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
@@ -129,7 +129,7 @@
<method name="get_char_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="char" type="int" />
- <argument index="1" name="arg1" type="int" />
+ <argument index="1" name="font_size" type="int" />
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
[b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 3c9e9b1bfc..8228bcc442 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -272,6 +272,7 @@
<method name="push_font">
<return type="void" />
<argument index="0" name="font" type="Font" />
+ <argument index="1" name="font_size" type="int" />
<description>
Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
</description>
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index e1175e57bd..4df3bbb80e 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector4" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Vector used for 4D math using floating point coordinates.
</brief_description>
<description>
+ 4-element structure that can be used to represent any quadruplet of numeric values.
+ It uses floating-point coordinates. See [Vector4i] for its integer counterpart.
+ [b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
</description>
<tutorials>
</tutorials>
@@ -10,18 +14,21 @@
<constructor name="Vector4">
<return type="Vector4" />
<description>
+ Constructs a default-initialized [Vector4] with all components set to [code]0[/code].
</description>
</constructor>
<constructor name="Vector4">
<return type="Vector4" />
<argument index="0" name="from" type="Vector4" />
<description>
+ Constructs a [Vector4] as a copy of the given [Vector4].
</description>
</constructor>
<constructor name="Vector4">
<return type="Vector4" />
<argument index="0" name="from" type="Vector4i" />
<description>
+ Constructs a new [Vector4] from [Vector4i].
</description>
</constructor>
<constructor name="Vector4">
@@ -31,6 +38,7 @@
<argument index="2" name="z" type="float" />
<argument index="3" name="w" type="float" />
<description>
+ Returns a [Vector4] with the given components.
</description>
</constructor>
</constructors>
@@ -38,6 +46,13 @@
<method name="abs" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="ceil" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -45,85 +60,127 @@
<argument index="0" name="min" type="Vector4" />
<argument index="1" name="max" type="Vector4" />
<description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Vector4" />
<description>
+ Returns the dot product of this vector and [code]with[/code].
+ </description>
+ </method>
+ <method name="floor" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded down (towards negative infinity).
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns the inverse of the vector. This is the same as [code]Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w)[/code].
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<argument index="0" name="with" type="Vector4" />
<description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the vector is normalized, i.e. its length is equal to 1.
</description>
</method>
<method name="length" qualifiers="const">
<return type="float" />
<description>
+ Returns the length (magnitude) of this vector.
</description>
</method>
<method name="length_squared" qualifiers="const">
<return type="float" />
<description>
+ Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length].
+ </description>
+ </method>
+ <method name="lerp" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="to" type="Vector4" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
<method name="min_axis_index" qualifiers="const">
<return type="int" />
<description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
</description>
</method>
<method name="normalized" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ </description>
+ </method>
+ <method name="round" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="0.0">
+ The vector's W component. Also accessible by using the index position [code][3][/code].
</member>
<member name="x" type="float" setter="" getter="" default="0.0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
</member>
<member name="y" type="float" setter="" getter="" default="0.0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
</member>
<member name="z" type="float" setter="" getter="" default="0.0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
</member>
</members>
<constants>
<constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_W" value="3">
+ Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector4(0, 0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
<constant name="ONE" value="Vector4(1, 1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
</constant>
<constant name="INF" value="Vector4(inf, inf, inf)">
+ Infinity vector, a vector with all components set to [constant @GDScript.INF].
</constant>
</constants>
<operators>
@@ -131,100 +188,144 @@
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="Projection" />
<description>
+ Inversely transforms (multiplies) the [Vector4] by the given [Projection] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Multiplies each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector4] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Adds each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Subtracts each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Divides each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector4] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], [code]v[2][/code] is equivalent to [code]v.z[/code], and [code]v[3][/code] is equivalent to [code]v.w[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector4" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector4" />
<description>
+ Returns the negative value of the [Vector4]. This is the same as writing [code]Vector4(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
</description>
</operator>
</operators>
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index c3114e20e2..3611b17757 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -194,6 +194,12 @@
<description>
</description>
</operator>
+ <operator name="operator []">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
<operator name="operator unary+">
<return type="Vector4i" />
<description>
diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml
index 22eabf9012..4f614bdadb 100644
--- a/doc/classes/WorkerThreadPool.xml
+++ b/doc/classes/WorkerThreadPool.xml
@@ -25,6 +25,12 @@
<description>
</description>
</method>
+ <method name="get_group_processed_element_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
<method name="is_group_task_completed" qualifiers="const">
<return type="bool" />
<argument index="0" name="group_id" type="int" />
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index 312dffc7ee..8fa530f1da 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -907,7 +907,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S
f.write(make_footer())
-def escape_rst(text, until_pos=-1): # type: (str) -> str
+def escape_rst(text, until_pos=-1): # type: (str, int) -> str
# Escape \ character, otherwise it ends up as an escape character in rst
pos = 0
while True:
@@ -1301,7 +1301,7 @@ def rstize_text(text, state): # type: (str, State) -> str
return text
-def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None
+def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]], bool) -> None
if len(data) == 0:
return