diff options
Diffstat (limited to 'doc/classes')
25 files changed, 155 insertions, 64 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 7f794fef6e..20a371c3d0 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2699,31 +2699,31 @@ <constant name="TYPE_ARRAY" value="25" enum="Variant.Type"> Variable is of type [Array]. </constant> - <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type"> + <constant name="TYPE_PACKED_BYTE_ARRAY" value="26" enum="Variant.Type"> Variable is of type [PackedByteArray]. </constant> - <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type"> + <constant name="TYPE_PACKED_INT32_ARRAY" value="27" enum="Variant.Type"> Variable is of type [PackedInt32Array]. </constant> - <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type"> + <constant name="TYPE_PACKED_INT64_ARRAY" value="28" enum="Variant.Type"> Variable is of type [PackedInt64Array]. </constant> - <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type"> + <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="29" enum="Variant.Type"> Variable is of type [PackedFloat32Array]. </constant> - <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type"> + <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="30" enum="Variant.Type"> Variable is of type [PackedFloat64Array]. </constant> - <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type"> + <constant name="TYPE_PACKED_STRING_ARRAY" value="31" enum="Variant.Type"> Variable is of type [PackedStringArray]. </constant> - <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type"> + <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="32" enum="Variant.Type"> Variable is of type [PackedVector2Array]. </constant> - <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type"> + <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="33" enum="Variant.Type"> Variable is of type [PackedVector3Array]. </constant> - <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type"> + <constant name="TYPE_PACKED_COLOR_ARRAY" value="34" enum="Variant.Type"> Variable is of type [PackedColorArray]. </constant> <constant name="TYPE_MAX" value="35" enum="Variant.Type"> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 768006ebe4..7a2120379f 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -53,7 +53,6 @@ <argument index="1" name="texture" type="Texture2D" /> <description> Sets the texture for the slot specified by [code]param[/code]. See [enum TextureParam] for available slots. - [b]Note:[/b] When setting a roughness or metallic texture on a material that has no texture assigned to those slots, [member roughness] or [member metallic] will automatically be set to [code]1.0[/code] to ensure correct appearance. </description> </method> </methods> @@ -233,7 +232,6 @@ </member> <member name="metallic" type="float" setter="set_metallic" getter="get_metallic" default="0.0"> A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness]. - [b]Note:[/b] [member metallic] is automatically set to [code]1.0[/code] when assigning a metallic texture using [method set_texture]. </member> <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5"> Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources. @@ -306,7 +304,6 @@ </member> <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0"> Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic]. - [b]Note:[/b] [member roughness] is automatically set to [code]1.0[/code] when assigning a roughness texture using [method set_texture]. </member> <member name="roughness_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to control the roughness per-pixel. Multiplied by [member roughness]. diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index c432410d3b..be6d9e07c3 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -109,6 +109,14 @@ Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed. </description> </method> + <method name="force_connection_drag_end"> + <return type="void" /> + <description> + Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor. + This is best used together with [signal connection_drag_begun] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts. + [b]Note:[/b] This method suppresses any other connection request signals apart from [signal connection_drag_ended]. + </description> + </method> <method name="get_connection_line"> <return type="PackedVector2Array" /> <argument index="0" name="from" type="Vector2" /> @@ -241,6 +249,19 @@ Emitted at the beginning of a GraphNode movement. </description> </signal> + <signal name="connection_drag_begun"> + <argument index="0" name="from" type="String" /> + <argument index="1" name="slot" type="String" /> + <argument index="2" name="is_output" type="bool" /> + <description> + Emitted at the beginning of a connection drag. + </description> + </signal> + <signal name="connection_drag_ended"> + <description> + Emitted at the end of a connection drag. + </description> + </signal> <signal name="connection_from_empty"> <argument index="0" name="to" type="StringName" /> <argument index="1" name="to_slot" type="int" /> diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index b29f821da5..0b2d65d339 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -15,7 +15,7 @@ var err = ctx.start(HashingContext.HASH_SHA256, key) assert(err == OK) var msg1 = "this is ".to_utf8() - var msg2 = "vewy vewy secret".to_utf8() + var msg2 = "super duper secret".to_utf8() err = ctx.update(msg1) assert(err == OK) err = ctx.update(msg2) @@ -38,7 +38,7 @@ Error err = ctx.Start(HashingContext.HASH_SHA256, key); GD.Assert(err == OK); PackedByteArray msg1 = String("this is ").to_utf8(); - PackedByteArray msg2 = String("vewy vew secret").to_utf8(); + PackedByteArray msg2 = String("super duper secret").to_utf8(); err = ctx.Update(msg1); GD.Assert(err == OK); err = ctx.Update(msg2); diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 1036c1fbcf..6b5a627575 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -134,6 +134,20 @@ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> + <method name="property_can_revert"> + <return type="bool" /> + <argument index="0" name="name" type="String" /> + <description> + Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. + </description> + </method> + <method name="property_get_revert"> + <return type="Variant" /> + <argument index="0" name="name" type="String" /> + <description> + Returns the default value of the Node3D property with given [code]name[/code]. + </description> + </method> <method name="rotate"> <return type="void" /> <argument index="0" name="axis" type="Vector3" /> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index b16d45b8ca..686854ffe8 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -363,7 +363,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 13d7440bb9..d875549319 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -126,7 +126,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 151014192f..6c77c4bee2 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -127,7 +127,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index 963a02ace8..a8282c099a 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -127,7 +127,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index cef113dee9..da26e93b96 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -127,7 +127,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the array size. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 072df519c6..9ddf43a837 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -127,7 +127,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the array size. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 0bded150a3..439d59dde7 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -127,7 +127,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 8e993c41ab..8c4f052016 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -127,7 +127,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index df69e3cd4a..8229af984d 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -126,7 +126,7 @@ <method name="size" qualifiers="const"> <return type="int" /> <description> - Returns the size of the array. + Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 00f072b306..a249786388 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1692,6 +1692,8 @@ <member name="rendering/gles2/compatibility/enable_high_float.Android" type="bool" setter="" getter="" default="false"> </member> <member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false"> + If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. + [b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead. </member> <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4"> </member> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 8abd3f84b1..8a8d6e73f0 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -38,8 +38,7 @@ <method name="force_raycast_update"> <return type="void" /> <description> - Updates the collision information for the ray. - Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work. </description> </method> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index f17f6293bc..009e9d3df4 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1068,7 +1068,7 @@ <argument index="8" name="light_affect" type="float" /> <argument index="9" name="ao_channel_affect" type="float" /> <description> - Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details. + Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssao_quality"> @@ -1080,6 +1080,19 @@ <argument index="4" name="fadeout_from" type="float" /> <argument index="5" name="fadeout_to" type="float" /> <description> + Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details. + </description> + </method> + <method name="environment_set_ssil_quality"> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSILQuality" /> + <argument index="1" name="half_size" type="bool" /> + <argument index="2" name="adaptive_target" type="float" /> + <argument index="3" name="blur_passes" type="int" /> + <argument index="4" name="fadeout_from" type="float" /> + <argument index="5" name="fadeout_to" type="float" /> + <description> + Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr"> @@ -1252,6 +1265,13 @@ Returns the id of a white texture. Creates one if none exists. </description> </method> + <method name="gi_set_use_half_resolution"> + <return type="void" /> + <argument index="0" name="half_resolution" type="bool" /> + <description> + If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution]. + </description> + </method> <method name="global_variable_add"> <return type="void" /> <argument index="0" name="name" type="StringName" /> @@ -4131,19 +4151,34 @@ <constant name="ENV_SSR_ROUGNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality"> </constant> <constant name="ENV_SSAO_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSAOQuality"> - Lowest quality of screen space ambient occlusion. + Lowest quality of screen-space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_LOW" value="1" enum="EnvironmentSSAOQuality"> - Low quality screen space ambient occlusion. + Low quality screen-space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_MEDIUM" value="2" enum="EnvironmentSSAOQuality"> - Medium quality screen space ambient occlusion. + Medium quality screen-space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_HIGH" value="3" enum="EnvironmentSSAOQuality"> - High quality screen space ambient occlusion. + High quality screen-space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_ULTRA" value="4" enum="EnvironmentSSAOQuality"> - Highest quality screen space ambient occlusion. Uses the adaptive setting which can be dynamically adjusted to smoothly balance performance and visual quality. + Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. + </constant> + <constant name="ENV_SSIL_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSILQuality"> + Lowest quality of screen-space indirect lighting. + </constant> + <constant name="ENV_SSIL_QUALITY_LOW" value="1" enum="EnvironmentSSILQuality"> + Low quality screen-space indirect lighting. + </constant> + <constant name="ENV_SSIL_QUALITY_MEDIUM" value="2" enum="EnvironmentSSILQuality"> + High quality screen-space indirect lighting. + </constant> + <constant name="ENV_SSIL_QUALITY_HIGH" value="3" enum="EnvironmentSSILQuality"> + High quality screen-space indirect lighting. + </constant> + <constant name="ENV_SSIL_QUALITY_ULTRA" value="4" enum="EnvironmentSSILQuality"> + Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. </constant> <constant name="ENV_SDFGI_CASCADES_4" value="0" enum="EnvironmentSDFGICascades"> </constant> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 805f056289..69d224ed24 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -70,7 +70,7 @@ <return type="String" /> <argument index="0" name="bytes" type="int" default="-1" /> <description> - Gets a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. + Gets an ASCII string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. </description> </method> <method name="get_u16"> diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index f97b3e08d1..d0976be4b5 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -49,19 +49,6 @@ Returns [code]true[/code] if select with right mouse button is enabled. </description> </method> - <method name="get_tab_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of tabs. - </description> - </method> - <method name="get_tab_disabled" qualifiers="const"> - <return type="bool" /> - <argument index="0" name="tab_idx" type="int" /> - <description> - Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled. - </description> - </method> <method name="get_tab_icon" qualifiers="const"> <return type="Texture2D" /> <argument index="0" name="tab_idx" type="int" /> @@ -117,6 +104,13 @@ Returns the [TabBar]'s rearrange group ID. </description> </method> + <method name="is_tab_disabled" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="tab_idx" type="int" /> + <description> + Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled. + </description> + </method> <method name="move_tab"> <return type="void" /> <argument index="0" name="from" type="int" /> @@ -214,6 +208,9 @@ <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="TabBar.CloseButtonDisplayPolicy" default="0"> Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details. </member> + <member name="tab_count" type="int" setter="set_tab_count" getter="get_tab_count" default="0"> + The number of tabs currently in the bar. + </member> </members> <signals> <signal name="active_tab_rearranged"> diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index e62cb9216e..e679a8cfeb 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -60,13 +60,13 @@ <argument index="0" name="xform" type="Transform3D" /> <argument index="1" name="weight" type="float" /> <description> - Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0). + Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0). </description> </method> <method name="inverse" qualifiers="const"> <return type="Transform3D" /> <description> - 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). + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling). </description> </method> <method name="is_equal_approx" qualifiers="const"> @@ -88,7 +88,7 @@ <method name="orthonormalized" qualifiers="const"> <return type="Transform3D" /> <description> - Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors. + Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). </description> </method> <method name="rotated" qualifiers="const"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7e773a0249..64256f33fd 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -95,7 +95,7 @@ <method name="ceil" qualifiers="const"> <return type="Vector2" /> <description> - Returns the vector with all components rounded up (towards positive infinity). + Returns a new vector with all components rounded up (towards positive infinity). </description> </method> <method name="clamp" qualifiers="const"> @@ -158,7 +158,7 @@ <method name="floor" qualifiers="const"> <return type="Vector2" /> <description> - Returns the vector with all components rounded down (towards negative infinity). + Returns a new vector with all components rounded down (towards negative infinity). </description> </method> <method name="from_angle" qualifiers="static"> @@ -231,7 +231,7 @@ <argument index="0" name="to" type="Vector2" /> <argument index="1" name="delta" type="float" /> <description> - Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. + Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. </description> </method> <method name="normalized" qualifiers="const"> @@ -264,7 +264,7 @@ <return type="Vector2" /> <argument index="0" name="b" type="Vector2" /> <description> - Returns the vector projected onto the vector [code]b[/code]. + Returns this vector projected onto the vector [code]b[/code]. </description> </method> <method name="reflect" qualifiers="const"> @@ -284,13 +284,13 @@ <method name="round" qualifiers="const"> <return type="Vector2" /> <description> - Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. + 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="Vector2" /> <description> - Returns the 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. + 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> <method name="slerp" qualifiers="const"> @@ -299,7 +299,7 @@ <argument index="1" name="weight" type="float" /> <description> Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. - [b]Note:[/b] Both vectors must be normalized. + This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp]. </description> </method> <method name="slide" qualifiers="const"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index a9334d924f..721c73d603 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -53,7 +53,7 @@ <method name="aspect" qualifiers="const"> <return type="float" /> <description> - Returns the ratio of [member x] to [member y]. + Returns the aspect ratio of this vector, the ratio of [member x] to [member y]. </description> </method> <method name="clamp" qualifiers="const"> @@ -64,6 +64,19 @@ 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="length" qualifiers="const"> + <return type="float" /> + <description> + Returns the length (magnitude) of this vector. + </description> + </method> + <method name="length_squared" qualifiers="const"> + <return type="int" /> + <description> + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> @@ -79,7 +92,7 @@ <method name="sign" qualifiers="const"> <return type="Vector2i" /> <description> - Returns the vector with each component set to one or negative one, depending on the signs of the components. + 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> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index da5e4f4f43..ead08d86df 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -96,7 +96,7 @@ <argument index="2" name="post_b" type="Vector3" /> <argument index="3" name="weight" type="float" /> <description> - Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Performs a cubic interpolation between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to" qualifiers="const"> @@ -201,7 +201,7 @@ <argument index="0" name="to" type="Vector3" /> <argument index="1" name="delta" type="float" /> <description> - Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. + Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. </description> </method> <method name="normalized" qualifiers="const"> @@ -246,7 +246,7 @@ <return type="Vector3" /> <argument index="0" name="b" type="Vector3" /> <description> - Returns this vector projected onto another vector [code]b[/code]. + Returns this vector projected onto the vector [code]b[/code]. </description> </method> <method name="reflect" qualifiers="const"> @@ -267,13 +267,13 @@ <method name="round" qualifiers="const"> <return type="Vector3" /> <description> - Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. + 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="Vector3" /> <description> - Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. + 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> <method name="signed_angle_to" qualifiers="const"> @@ -290,7 +290,7 @@ <argument index="1" name="weight" type="float" /> <description> Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. - [b]Note:[/b] Both vectors must be normalized. + This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp]. </description> </method> <method name="slide" qualifiers="const"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 9b952292b6..da729e1ec2 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -58,6 +58,19 @@ 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="length" qualifiers="const"> + <return type="float" /> + <description> + Returns the length (magnitude) of this vector. + </description> + </method> + <method name="length_squared" qualifiers="const"> + <return type="int" /> + <description> + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 995f2796dd..b9ff711f44 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -25,7 +25,7 @@ </method> <method name="_get_code" qualifiers="virtual const"> <return type="String" /> - <argument index="0" name="input_vars" type="PackedStringArray" /> + <argument index="0" name="input_vars" type="String[]" /> <argument index="1" name="output_vars" type="String[]" /> <argument index="2" name="mode" type="int" enum="Shader.Mode" /> <argument index="3" name="type" type="int" enum="VisualShader.Type" /> |