Skip to content

Commit c54e09a

Browse files
committed
Overhaul some "uncommon" wording in class reference
1 parent 7d2ca2d commit c54e09a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+128
-121
lines changed

doc/classes/@GlobalScope.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@
999999
<method name="randf">
10001000
<return type="float" />
10011001
<description>
1002-
Returns a random floating point value between [code]0.0[/code] and [code]1.0[/code] (inclusive).
1002+
Returns a random floating-point value between [code]0.0[/code] and [code]1.0[/code] (inclusive).
10031003
[codeblocks]
10041004
[gdscript]
10051005
randf() # Returns e.g. 0.375671
@@ -1015,7 +1015,7 @@
10151015
<param index="0" name="from" type="float" />
10161016
<param index="1" name="to" type="float" />
10171017
<description>
1018-
Returns a random floating point value between [param from] and [param to] (inclusive).
1018+
Returns a random floating-point value between [param from] and [param to] (inclusive).
10191019
[codeblocks]
10201020
[gdscript]
10211021
randf_range(0, 20.5) # Returns e.g. 7.45315
@@ -1033,7 +1033,8 @@
10331033
<param index="0" name="mean" type="float" />
10341034
<param index="1" name="deviation" type="float" />
10351035
<description>
1036-
Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution.
1036+
Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url], pseudo-random floating-point value from the specified [param mean] and a standard [param deviation]. This is also known as a Gaussian distribution.
1037+
[b]Note:[/b] This method uses the [url=https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform]Box-Muller transform[/url] algorithm.
10371038
</description>
10381039
</method>
10391040
<method name="randi">
@@ -1261,7 +1262,7 @@
12611262
<param index="0" name="x" type="Variant" />
12621263
<param index="1" name="step" type="Variant" />
12631264
<description>
1264-
Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating point number to an arbitrary number of decimals.
1265+
Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating-point number to an arbitrary number of decimals.
12651266
The returned value is the same type of [Variant] as [param step]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
12661267
[codeblock]
12671268
snapped(100, 32) # Returns 96
@@ -1278,7 +1279,7 @@
12781279
<param index="0" name="x" type="float" />
12791280
<param index="1" name="step" type="float" />
12801281
<description>
1281-
Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating point number to an arbitrary number of decimals.
1282+
Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating-point number to an arbitrary number of decimals.
12821283
A type-safe version of [method snapped], returning a [float].
12831284
[codeblock]
12841285
snappedf(32.0, 2.5) # Returns 32.5

doc/classes/Basis.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
A 3×3 matrix for representing 3D rotation and scale.
55
</brief_description>
66
<description>
7-
The [Basis] built-in [Variant] type is a 3x3 [url=https://en.wikipedia.org/wiki/Matrix_(mathematics)]matrix[/url] used to represent 3D rotation, scale, and shear. It is frequently used within a [Transform3D].
7+
The [Basis] built-in [Variant] type is a 3×3 [url=https://en.wikipedia.org/wiki/Matrix_(mathematics)]matrix[/url] used to represent 3D rotation, scale, and shear. It is frequently used within a [Transform3D].
88
A [Basis] is composed by 3 axis vectors, each representing a column of the matrix: [member x], [member y], and [member z]. The length of each axis ([method Vector3.length]) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted.
99
A [Basis] is [b]orthogonal[/b] if its axes are perpendicular to each other. A basis is [b]normalized[/b] if the length of every axis is [code]1[/code]. A basis is [b]uniform[/b] if all axes share the same length (see [method get_scale]). A basis is [b]orthonormal[/b] if it is both orthogonal and normalized, which allows it to only represent rotations. A basis is [b]conformal[/b] if it is both orthogonal and uniform, which ensures it is not distorted.
1010
For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial.

doc/classes/CanvasItem.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@
700700
Texture will repeat normally.
701701
</constant>
702702
<constant name="TEXTURE_REPEAT_MIRROR" value="3" enum="TextureRepeat">
703-
Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored.
703+
Texture will repeat in a 2×2 tiled mode, where elements at even positions are mirrored.
704704
</constant>
705705
<constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat">
706706
Represents the size of the [enum TextureRepeat] enum.

doc/classes/CodeEdit.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@
6262
<param index="1" name="end_key" type="String" />
6363
<param index="2" name="line_only" type="bool" default="false" />
6464
<description>
65-
Adds a comment delimiter.
66-
Both the start and end keys must be symbols. Only the start key has to be unique.
67-
[param line_only] denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
65+
Adds a comment delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters.
66+
If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
6867
</description>
6968
</method>
7069
<method name="add_string_delimiter">
@@ -73,9 +72,8 @@
7372
<param index="1" name="end_key" type="String" />
7473
<param index="2" name="line_only" type="bool" default="false" />
7574
<description>
76-
Adds a string delimiter.
77-
Both the start and end keys must be symbols. Only the start key has to be unique.
78-
[param line_only] denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
75+
Defines a string delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters.
76+
If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
7977
</description>
8078
</method>
8179
<method name="can_fold_line" qualifiers="const">
@@ -623,7 +621,7 @@
623621
The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes).
624622
</constant>
625623
<constant name="LOCATION_PARENT_MASK" value="256" enum="CodeCompletionLocation">
626-
The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class.
624+
The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. [code]0[/code] for the local class, [code]1[/code] for the parent, [code]2[/code] for the grandparent, etc.) to store the depth of an option in the class or a parent class.
627625
</constant>
628626
<constant name="LOCATION_OTHER_USER_CODE" value="512" enum="CodeCompletionLocation">
629627
The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons).

doc/classes/CodeHighlighter.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
<param index="2" name="color" type="Color" />
1717
<param index="3" name="line_only" type="bool" default="false" />
1818
<description>
19-
Adds a color region such as comments or strings.
20-
Both the start and end keys must be symbols. Only the start key has to be unique.
21-
[param line_only] denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
19+
Adds a color region (such as for comments or strings) from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters.
20+
If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
2221
</description>
2322
</method>
2423
<method name="add_keyword_color">

doc/classes/Compositor.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<class name="Compositor" inherits="Resource" experimental="More customisation of the rendering pipeline will be added in the future." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
33
<brief_description>
4-
The compositor resource holds the configuration with which rendering of a viewport can be customised.
4+
Stores attributes used to customize how a Viewport is rendered.
55
</brief_description>
66
<description>
7-
The compositor resource holds the configuration with which rendering of a viewport can be customised.
7+
The compositor resource stores attributes used to customize how a [Viewport] is rendered.
88
</description>
99
<tutorials>
1010
</tutorials>

doc/classes/CubemapArray.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
An array of [Cubemap]s, stored together and with a single reference.
55
</brief_description>
66
<description>
7-
[CubemapArray]s are made of an array of [Cubemap]s. Like [Cubemap]s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube). The primary benefit of [CubemapArray]s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple [Cubemap]s into a shader using a single [CubemapArray].
8-
Moreover, [Cubemap]s are allocated in adjacent cache regions on the GPU. This makes [CubemapArray]s the most efficient way to store multiple [Cubemap]s.
9-
Internally, Godot uses [CubemapArray]s for many effects, including the [Sky] if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code].
10-
To create such a texture file yourself, reimport your image files using the import presets of the File System dock.
7+
[CubemapArray]s are made of an array of [Cubemap]s. Like [Cubemap]s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube).
8+
The primary benefit of [CubemapArray]s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple [Cubemap]s into a shader using a single [CubemapArray]. [Cubemap]s are allocated in adjacent cache regions on the GPU, which makes [CubemapArray]s the most efficient way to store multiple [Cubemap]s.
9+
[b]Note:[/b] Godot uses [CubemapArray]s internally for many effects, including the [Sky] if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code]. To create such a texture file yourself, reimport your image files using the import presets of the File System dock.
1110
[b]Note:[/b] [CubemapArray] is not supported in the OpenGL 3 rendering backend.
1211
</description>
1312
<tutorials>

doc/classes/DisplayServer.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
<param index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" />
7878
<param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
7979
<description>
80-
Sets a custom mouse cursor image for the defined [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be [code]256x256[/code] or smaller for correct appearance. [param hotspot] can optionally be set to define the area where the cursor will click. By default, [param hotspot] is set to [code]Vector2(0, 0)[/code], which is the top-left corner of the image. See also [method cursor_set_shape].
81-
[param cursor] can be either [Texture2D] or [Image].
80+
Sets a custom mouse cursor image for the given [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance.
81+
[param cursor] can be either a [Texture2D] or an [Image], and it should not be larger than 256×256 to display correctly. Optionally, [param hotspot] can be set to offset the image's position relative to the click point. By default, [param hotspot] is set to the top-left corner of the image. See also [method cursor_set_shape].
8282
</description>
8383
</method>
8484
<method name="cursor_set_shape">

doc/classes/EditorPlugin.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
<description>
240240
Override this method in your plugin to return a [Texture2D] in order to give it an icon.
241241
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
242-
Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
242+
Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size.
243243
[codeblocks]
244244
[gdscript]
245245
func _get_plugin_icon():
@@ -410,7 +410,8 @@
410410
<param index="0" name="control" type="Control" />
411411
<param index="1" name="title" type="String" />
412412
<description>
413-
Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
413+
Adds a control to the bottom panel (together with [b]Output[/b], [b]Debug[/b], [b]Animation[/b], etc.). Returns the button added to the tab bar. It's up to you to manage the button's visibility as needed.
414+
When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
414415
</description>
415416
</method>
416417
<method name="add_control_to_container">

doc/classes/EditorSelection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
<method name="get_selected_nodes">
2828
<return type="Node[]" />
2929
<description>
30-
Gets the list of selected nodes.
30+
Returns the list of selected nodes.
3131
</description>
3232
</method>
3333
<method name="get_transformable_selected_nodes">
3434
<return type="Node[]" />
3535
<description>
36-
Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild.
36+
Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild.
3737
</description>
3838
</method>
3939
<method name="remove_node">

0 commit comments

Comments
 (0)