diff options
Diffstat (limited to 'doc/classes')
45 files changed, 529 insertions, 95 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 709863b70f..4a16244235 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -380,7 +380,7 @@ <argument index="1" name="to" type="float" /> <argument index="2" name="weight" type="float" /> <description> - Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). + Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired. [codeblock] # The interpolation ratio in the `lerp()` call below is 0.75. var middle = lerp(20, 30, 0.75) @@ -389,7 +389,7 @@ var ratio = inverse_lerp(20, 30, 27.5) # `ratio` is now 0.75. [/codeblock] - See also [method lerp] which performs the reverse of this operation. + See also [method lerp] which performs the reverse of this operation, and [method range_lerp] to map a continuous series of values to another. </description> </method> <method name="is_equal_approx"> @@ -444,11 +444,11 @@ <argument index="1" name="to" type="float" /> <argument index="2" name="weight" type="float" /> <description> - Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. + Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired. [codeblock] lerp(0, 4, 0.75) # Returns 3.0 [/codeblock] - See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. + See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method range_lerp] to map a continuous series of values to another. </description> </method> <method name="lerp_angle"> @@ -807,10 +807,11 @@ <argument index="3" name="ostart" type="float" /> <argument index="4" name="ostop" type="float" /> <description> - Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. + Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [code]value[/code] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method range_lerp] if this is not desired. [codeblock] range_lerp(75, 0, 100, -1, 1) # Returns 0.5 [/codeblock] + For complex use cases where you need multiple ranges, consider using [Curve] or [Gradient] instead. </description> </method> <method name="rid_allocate_id"> @@ -1209,6 +1210,7 @@ The [ResourceSaver] singleton. </member> <member name="ResourceUID" type="ResourceUID" setter="" getter=""> + The [ResourceUID] singleton. </member> <member name="TextServerManager" type="TextServerManager" setter="" getter=""> The [TextServerManager] singleton. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index a92b237624..f40f11944d 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -391,13 +391,13 @@ </description> </method> <method name="track_insert_key"> - <return type="void" /> + <return type="int" /> <argument index="0" name="track_idx" type="int" /> <argument index="1" name="time" type="float" /> <argument index="2" name="key" type="Variant" /> <argument index="3" name="transition" type="float" default="1" /> <description> - Insert a generic key in a given track. + Inserts a generic key in a given track. Returns the key index. </description> </method> <method name="track_is_compressed" qualifiers="const"> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index b24c439432..d3c8bdac3a 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationPlayer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Container and player of [Animation] resources. + Player of [Animation] resources. </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. - [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween] node, but it requires doing everything by code. + An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions. + Some methods and properties use a single key to refence an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation whithin the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library. + [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween], but it requires doing everything by code. Updating the target properties of animations occurs at process time. </description> <tutorials> @@ -19,6 +20,7 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="library" type="AnimationLibrary" /> <description> + Adds [code]library[/code] to the animation player, under the key [code]name[/code]. </description> </method> <method name="advance"> @@ -32,7 +34,7 @@ <return type="StringName" /> <argument index="0" name="anim_from" type="StringName" /> <description> - Returns the name of the next animation in the queue. + Returns the key of the animation which is queued to play after the [code]anim_from[/code] animation. </description> </method> <method name="animation_set_next"> @@ -59,13 +61,14 @@ <return type="StringName" /> <argument index="0" name="animation" type="Animation" /> <description> - Returns the name of [code]animation[/code] or an empty string if not found. + Returns the key of [code]animation[/code] or an empty [StringName] if not found. </description> </method> <method name="find_animation_library" qualifiers="const"> <return type="StringName" /> <argument index="0" name="animation" type="Animation" /> <description> + Returns the key for the [AnimationLibrary] that contains [code]animation[/code] or an empty [StringName] if not found. </description> </method> <method name="get_animation" qualifiers="const"> @@ -79,17 +82,19 @@ <return type="AnimationLibrary" /> <argument index="0" name="name" type="StringName" /> <description> + Returns the first [AnimationLibrary] with key [code]name[/code] or [code]null[/code] if not found. </description> </method> <method name="get_animation_library_list" qualifiers="const"> <return type="StringName[]" /> <description> + Returns the list of stored library keys. </description> </method> <method name="get_animation_list" qualifiers="const"> <return type="PackedStringArray" /> <description> - Returns the list of stored animation names. + Returns the list of stored animation keys. </description> </method> <method name="get_blend_time" qualifiers="const"> @@ -97,7 +102,7 @@ <argument index="0" name="anim_from" type="StringName" /> <argument index="1" name="anim_to" type="StringName" /> <description> - Gets the blend time (in seconds) between two animations, referenced by their names. + Gets the blend time (in seconds) between two animations, referenced by their keys. </description> </method> <method name="get_playing_speed" qualifiers="const"> @@ -109,7 +114,7 @@ <method name="get_queue"> <return type="PackedStringArray" /> <description> - Returns a list of the animation names that are currently queued to play. + Returns a list of the animation keys that are currently queued to play. </description> </method> <method name="has_animation" qualifiers="const"> @@ -123,6 +128,7 @@ <return type="bool" /> <argument index="0" name="name" type="StringName" /> <description> + Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [code]name[/code]. </description> </method> <method name="is_playing" qualifiers="const"> @@ -164,6 +170,7 @@ <return type="void" /> <argument index="0" name="name" type="StringName" /> <description> + Removes the [AnimationLibrary] assosiated with the key [code]name[/code]. </description> </method> <method name="rename_animation_library"> @@ -171,6 +178,7 @@ <argument index="0" name="name" type="StringName" /> <argument index="1" name="newname" type="StringName" /> <description> + Moves the [AnimationLibrary] associated with the key [code]name[/code] to the key [code]newname[/code]. </description> </method> <method name="seek"> @@ -188,7 +196,7 @@ <argument index="1" name="anim_to" type="StringName" /> <argument index="2" name="sec" type="float" /> <description> - Specifies a blend time (in seconds) between two animations, referenced by their names. + Specifies a blend time (in seconds) between two animations, referenced by their keys. </description> </method> <method name="stop"> @@ -202,17 +210,17 @@ </methods> <members> <member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation"> - If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation]. + If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation]. </member> <member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay" default=""""> - The name of the animation to play when the scene loads. + The key of the animation to play when the scene loads. </member> <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default=""""> - The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. + The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. [b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. </member> <member name="current_animation_length" type="float" setter="" getter="get_current_animation_length"> - The length (in seconds) of the currently being played animation. + The length (in seconds) of the currently playing animation. </member> <member name="current_animation_position" type="float" setter="" getter="get_current_animation_position"> The position (in seconds) of the currently playing animation. @@ -237,8 +245,8 @@ The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed. </member> <member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true"> - This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving. - In other words, the saved scene file will contain the "default pose", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving. + This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]"RESET"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. + This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. </member> <member name="root_node" type="NodePath" setter="set_root" getter="get_root" default="NodePath("..")"> The node from which node path references will travel. @@ -249,8 +257,8 @@ <argument index="0" name="old_name" type="StringName" /> <argument index="1" name="new_name" type="StringName" /> <description> - Emitted when a queued animation plays after the previous animation was finished. See [method queue]. - [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree]. + Emitted when a queued animation plays after the previous animation finished. See [method queue]. + [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or by an [AnimationTree]. </description> </signal> <signal name="animation_finished"> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index b3cea7217e..d0290ff5fd 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -218,30 +218,44 @@ Grows object vertices in the direction of their normals. </member> <member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled" default="false"> + If [code]true[/code], uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see [member heightmap_enabled]). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference. </member> <member name="heightmap_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled]. + If [code]true[/code], height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled]. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference. [b]Note:[/b] Height mapping is not supported if triplanar mapping is used on the same material. The value of [member heightmap_enabled] will be ignored if [member uv1_triplanar] is enabled. </member> <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal" default="false"> + If [code]true[/code], flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable [member heightmap_scale]), try setting this to [code]true[/code]. </member> <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent" default="false"> + If [code]true[/code], flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable [member heightmap_scale]), try setting this to [code]true[/code]. </member> <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values. + This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case [member heightmap_flip_texture] should remain [code]false[/code]. </member> <member name="heightmap_max_layers" type="int" setter="set_heightmap_deep_parallax_max_layers" getter="get_heightmap_deep_parallax_max_layers"> + The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + [b]Note:[/b] Only effective if [member heightmap_deep_parallax] is [code]true[/code]. </member> <member name="heightmap_min_layers" type="int" setter="set_heightmap_deep_parallax_min_layers" getter="get_heightmap_deep_parallax_min_layers"> + The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + [b]Note:[/b] Only effective if [member heightmap_deep_parallax] is [code]true[/code]. </member> - <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale" default="0.05"> + <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale" default="5.0"> + The heightmap scale to use for the parallax effect (see [member heightmap_enabled]). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using [member heightmap_flip_texture] as the material will also appear to be "closer" to the camera. In most cases, [member heightmap_scale] should be kept to a positive value. + [b]Note:[/b] If the height map effect looks strange regardless of this value, try adjusting [member heightmap_flip_binormal] and [member heightmap_flip_tangent]. See also [member heightmap_texture] for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how [member heightmap_scale] behaves. </member> <member name="heightmap_texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The texture to use as a height map. See also [member heightmap_enabled]. + For best results, the texture should be normalized (with [member heightmap_scale] reduced to compensate). In [url=https://gimp.org]GIMP[/url], this can be done using [b]Colors > Auto > Equalize[/b]. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves. + [b]Note:[/b] To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data. </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]. </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. + Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to [code]0.0[/code], no specular reflections will be visible. This differs from the [constant SPECULAR_DISABLED] [enum SpecularMode] as [constant SPECULAR_DISABLED] only applies to the specular lobe from the light source. [b]Note:[/b] Unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]. </member> <member name="metallic_texture" type="Texture2D" setter="set_texture" getter="get_texture"> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index dacdca1cee..b0282e4107 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -192,8 +192,8 @@ </member> <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false"> + If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index f2a0040ed4..d8faf8e91d 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -224,8 +224,8 @@ <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> Minimum linear acceleration. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false"> + If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> The [Mesh] used for each particle. If [code]null[/code], particles will be spheres. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 3aedbbd1e6..643351efc0 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -113,7 +113,7 @@ <argument index="2" name="z_near" type="float" /> <argument index="3" name="z_far" type="float" /> <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. + 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. See also [member frustum_offset]. </description> </method> <method name="set_orthogonal"> @@ -144,7 +144,7 @@ # This code block is part of a script that inherits from Node3D. # `control` is a reference to a node inheriting from Control. control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin) - control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) + control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) [/codeblock] </description> </method> @@ -179,6 +179,7 @@ </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]. + [b]Note:[/b] Only effective if [member projection] is [constant PROJECTION_FRUSTUM]. </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. diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 383d33532b..179b0344c2 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -5,6 +5,7 @@ </brief_description> <description> A curve that can be saved and re-used for other objects. By default, it ranges between [code]0[/code] and [code]1[/code] on the Y axis and positions points relative to the [code]0.5[/code] Y position. + See also [Gradient] which is designed for color interpolation. See also [Curve2D] and [Curve3D]. </description> <tutorials> </tutorials> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index cec504584c..bc6cd88fa5 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -930,7 +930,7 @@ <return type="void" /> <argument index="0" name="existing_text" type="String" /> <argument index="1" name="position" type="Rect2" default="Rect2(0, 0, 0, 0)" /> - <argument index="2" name="multiline" type="bool" default="false" /> + <argument index="2" name="type" type="int" enum="DisplayServer.VirtualKeyboardType" default="0" /> <argument index="3" name="max_length" type="int" default="-1" /> <argument index="4" name="cursor_start" type="int" default="-1" /> <argument index="5" name="cursor_end" type="int" default="-1" /> @@ -938,11 +938,11 @@ Shows the virtual keyboard if the platform has one. [code]existing_text[/code] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). [code]position[/code] parameter is the screen space [Rect2] of the edited text. - [code]multiline[/code] parameter needs to be set to [code]true[/code] to be able to enter multiple lines of text, as in [TextEdit]. + [code]type[/code] parameter allows configuring which type of virtual keyboard to show. [code]max_length[/code] limits the number of characters that can be entered if different from [code]-1[/code]. [code]cursor_start[/code] can optionally define the current text cursor position if [code]cursor_end[/code] is not set. [code]cursor_start[/code] and [code]cursor_end[/code] can optionally define the current text selection. - [b]Note:[/b] This method is implemented on Android, iOS and UWP. + [b]Note:[/b] This method is implemented on Android, iOS and HTML5. </description> </method> <method name="warp_mouse"> @@ -1049,7 +1049,7 @@ <return type="int" enum="DisplayServer.VSyncMode" /> <argument index="0" name="window_id" type="int" default="0" /> <description> - Returns the VSync mode of the given window. + Returns the V-Sync mode of the given window. </description> </method> <method name="window_move_to_foreground"> @@ -1234,7 +1234,7 @@ <argument index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" /> <argument index="1" name="window_id" type="int" default="0" /> <description> - Sets the VSync mode of the given window. + Sets the V-Sync mode of the given window. See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED], if the desired mode is not supported. </description> @@ -1323,6 +1323,31 @@ </constant> <constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation"> </constant> + <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType"> + Default text virtual keyboard. + </constant> + <constant name="KEYBOARD_TYPE_MULTILINE" value="1" enum="VirtualKeyboardType"> + Multiline virtual keyboard. + </constant> + <constant name="KEYBOARD_TYPE_NUMBER" value="2" enum="VirtualKeyboardType"> + Virtual number keypad, useful for PIN entry. + </constant> + <constant name="KEYBOARD_TYPE_NUMBER_DECIMAL" value="3" enum="VirtualKeyboardType"> + Virtual number keypad, useful for entering fractional numbers. + </constant> + <constant name="KEYBOARD_TYPE_PHONE" value="4" enum="VirtualKeyboardType"> + Virtual phone number keypad. + </constant> + <constant name="KEYBOARD_TYPE_EMAIL_ADDRESS" value="5" enum="VirtualKeyboardType"> + Virtual keyboard with additional keys to assist with typing email addresses. + </constant> + <constant name="KEYBOARD_TYPE_PASSWORD" value="6" enum="VirtualKeyboardType"> + Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + [b]Note:[/b] This is not supported on HTML5. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT]. + </constant> + <constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType"> + Virtual keyboard with additional keys to assist with typing URLs. + </constant> <constant name="CURSOR_ARROW" value="0" enum="CursorShape"> </constant> <constant name="CURSOR_IBEAM" value="1" enum="CursorShape"> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 84f8523da3..586458bd28 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -101,6 +101,13 @@ Used by sub-inspectors. Emit it if what was selected was an Object ID. </description> </signal> + <signal name="property_can_revert_changed"> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="can_revert" type="bool" /> + <description> + Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed. + </description> + </signal> <signal name="property_changed"> <argument index="0" name="property" type="StringName" /> <argument index="1" name="value" type="Variant" /> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 687c3d70ca..fea4085019 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -347,7 +347,7 @@ </member> <member name="editors/visual_editors/minimap_opacity" type="float" setter="" getter=""> </member> - <member name="editors/visual_editors/visualshader/port_preview_size" type="int" setter="" getter=""> + <member name="editors/visual_editors/visual_shader/port_preview_size" type="int" setter="" getter=""> </member> <member name="filesystem/directories/autoscan_project_path" type="String" setter="" getter=""> </member> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 9da360915b..f662a07825 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -97,7 +97,7 @@ Blend factor between the fog's color and the color of the background [Sky]. Must have [member background_mode] set to [constant BG_SKY]. This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled. </member> - <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.001"> + <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.01"> The exponential fog density to use. Higher values result in a more dense fog. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> @@ -109,7 +109,7 @@ <member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0"> The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value. </member> - <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)"> + <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.518, 0.553, 0.608, 1)"> The fog's color. </member> <member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0"> @@ -320,8 +320,9 @@ <member name="volumetric_fog_enabled" type="bool" setter="set_volumetric_fog_enabled" getter="is_volumetric_fog_enabled" default="false"> Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with [FogVolume]s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission. </member> - <member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="0.0"> - Scales the strength of Global Illumination used in the volumetric fog. A value of [code]0[/code] means that Global Illumination will not impact the volumetric fog. + <member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="1.0"> + Scales the strength of Global Illumination used in the volumetric fog. A value of [code]0.0[/code] means that Global Illumination will not impact the volumetric fog. + [b]Note:[/b] Only [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) are taken into account when using [member volumetric_fog_gi_inject]. Global illumination from [LightmapGI], [ReflectionProbe] and SSIL (see [member ssil_enabled]) will be ignored by volumetric fog. </member> <member name="volumetric_fog_length" type="float" setter="set_volumetric_fog_length" getter="get_volumetric_fog_length" default="64.0"> The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 0b4a8fa46e..3a2776ff21 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -115,9 +115,10 @@ </method> <method name="get_as_text" qualifiers="const"> <return type="String" /> + <argument index="0" name="skip_cr" type="bool" default="false" /> <description> - Returns the whole file as a [String]. - Text is interpreted as being UTF-8 encoded. + Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded. + If [code]skip_cr[/code] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention). </description> </method> <method name="get_buffer" qualifiers="const"> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 53894bad87..e60ab094c6 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -63,8 +63,8 @@ <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false"> + If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles2D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [GPUParticles2D] node (and its parents) when it is moved or rotated. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index c4bd18db69..b415c56154 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -95,8 +95,8 @@ <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false"> + If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only [code]amount[/code] particles will be emitted. diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 195c481187..a4cfa1ddff 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -188,6 +188,16 @@ Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. </description> </method> + <method name="segment_intersects_circle"> + <return type="float" /> + <argument index="0" name="segment_from" type="Vector2" /> + <argument index="1" name="segment_to" type="Vector2" /> + <argument index="2" name="circle_position" type="Vector2" /> + <argument index="3" name="circle_radius" type="float" /> + <description> + Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + </description> + </method> <method name="segment_intersects_segment"> <return type="Variant" /> <argument index="0" name="from_a" type="Vector2" /> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index c803f43fb0..365efa6761 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -9,7 +9,7 @@ <tutorials> </tutorials> <methods> - <method name="get_shader_instance_uniform" qualifiers="const"> + <method name="get_instance_shader_uniform" qualifiers="const"> <return type="Variant" /> <argument index="0" name="uniform" type="StringName" /> <description> @@ -22,7 +22,7 @@ Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. </description> </method> - <method name="set_shader_instance_uniform"> + <method name="set_instance_shader_uniform"> <return type="void" /> <argument index="0" name="uniform" type="StringName" /> <argument index="1" name="value" type="Variant" /> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 89c968cc9e..8c5373216a 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -5,6 +5,7 @@ </brief_description> <description> Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the gradient will interpolate from color 1 to color 2 and from color 2 to color 3. The gradient will initially have 2 colors (black and white), one (black) at gradient lower offset 0 and the other (white) at the gradient higher offset 1. + See also [Curve] which supports more complex easing methods, but does not support colors. </description> <tutorials> </tutorials> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 965dbe7449..33145dccd0 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -55,6 +55,29 @@ [/codeblock] </description> </method> + <method name="_is_node_hover_valid" qualifiers="virtual"> + <return type="bool" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_slot" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_slot" type="int" /> + <description> + This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. + Return [code]true[/code] if the connection is indeed valid or return [code]false[/code] if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen. + In this example a connection to same node is suppressed: + [codeblocks] + [gdscript] + func _is_node_hover_valid(from, from_slot, to, to_slot): + return from != to + [/gdscript] + [csharp] + public override bool _IsNodeHoverValid(String from, int fromSlot, String to, int toSlot) { + return from != to; + } + [/csharp] + [/codeblocks] + </description> + </method> <method name="add_valid_connection_type"> <return type="void" /> <argument index="0" name="from_type" type="int" /> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 15c97b0838..97ee946acd 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -445,7 +445,7 @@ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the item is selected. </theme_item> - <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)"> + <theme_item name="guide_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.25)"> [Color] of the guideline. The guideline is a line drawn between each row of items. </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="4"> diff --git a/doc/classes/LabelSettings.xml b/doc/classes/LabelSettings.xml index 227313d3b3..aa972f2cf3 100644 --- a/doc/classes/LabelSettings.xml +++ b/doc/classes/LabelSettings.xml @@ -9,21 +9,21 @@ <members> <member name="font" type="Font" setter="set_font" getter="get_font"> </member> - <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(0.875, 0.875, 0.875, 1)"> + <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(1, 1, 1, 1)"> </member> <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16"> </member> - <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="0.0"> + <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="3.0"> </member> <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color(1, 1, 1, 1)"> </member> <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(1, 1, 1, 1)"> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0)"> </member> <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(1, 1)"> </member> - <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="0"> + <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="1"> </member> </members> </class> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 84471bafc0..2ff13a676b 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -246,6 +246,9 @@ <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true"> If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. </member> + <member name="virtual_keyboard_type" type="int" setter="set_virtual_keyboard_type" getter="get_virtual_keyboard_type" enum="LineEdit.VirtualKeyboardType" default="0"> + Specifies the type of virtual keyboard to show. + </member> </members> <signals> <signal name="text_change_rejected"> @@ -356,6 +359,31 @@ <constant name="MENU_MAX" value="28" enum="MenuItems"> Represents the size of the [enum MenuItems] enum. </constant> + <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType"> + Default text virtual keyboard. + </constant> + <constant name="KEYBOARD_TYPE_MULTILINE" value="1" enum="VirtualKeyboardType"> + Multiline virtual keyboard. + </constant> + <constant name="KEYBOARD_TYPE_NUMBER" value="2" enum="VirtualKeyboardType"> + Virtual number keypad, useful for PIN entry. + </constant> + <constant name="KEYBOARD_TYPE_NUMBER_DECIMAL" value="3" enum="VirtualKeyboardType"> + Virtual number keypad, useful for entering fractional numbers. + </constant> + <constant name="KEYBOARD_TYPE_PHONE" value="4" enum="VirtualKeyboardType"> + Virtual phone number keypad. + </constant> + <constant name="KEYBOARD_TYPE_EMAIL_ADDRESS" value="5" enum="VirtualKeyboardType"> + Virtual keyboard with additional keys to assist with typing email addresses. + </constant> + <constant name="KEYBOARD_TYPE_PASSWORD" value="6" enum="VirtualKeyboardType"> + Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + [b]Note:[/b] This is not supported on HTML5. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT]. + </constant> + <constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType"> + Virtual keyboard with additional keys to assist with typing URLs. + </constant> </constants> <theme_items> <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)"> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 966f964b12..33d2535ca2 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -28,6 +28,7 @@ <argument index="0" name="mesh" type="Mesh" /> <description> Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. + [b]Note:[/b] The given [code]mesh[/code] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array. </description> </method> <method name="get_collision_mask_value" qualifiers="const"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 5473347cb1..75cd52787a 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -198,6 +198,17 @@ } [/csharp] [/codeblocks] + [b]Note:[/b] Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, the best way is to use the standard UNIX double dash ([code]--[/code]) and then pass custom arguments, which the engine itself will ignore. These can be read via [method get_cmdline_user_args]. + </description> + </method> + <method name="get_cmdline_user_args"> + <return type="PackedStringArray" /> + <description> + Similar to [method get_cmdline_args], but this returns the user arguments (any argument passed after the double dash [code]--[/code] argument). These are left untouched by Godot for the user. + For example, in the command line below, [code]--fullscreen[/code] will not be returned in [method get_cmdline_user_args] and [code]--level 1[/code] will only be returned in [method get_cmdline_user_args]: + [codeblock] + godot --fullscreen -- --level 1 + [/codeblock] </description> </method> <method name="get_config_dir" qualifiers="const"> @@ -363,6 +374,12 @@ [b]Note:[/b] This method is only implemented on Windows, macOS, Linux and iOS. On Android, HTML5 and UWP, [method get_processor_name] returns an empty string. </description> </method> + <method name="get_restart_on_exit_arguments" qualifiers="const"> + <return type="PackedStringArray" /> + <description> + Returns the list of command line arguments that will be used when the project automatically restarts using [method set_restart_on_exit]. See also [method is_restart_on_exit_set]. + </description> + </method> <method name="get_static_memory_peak_usage" qualifiers="const"> <return type="int" /> <description> @@ -470,6 +487,12 @@ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> + <method name="is_restart_on_exit_set" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the project will automatically restart when it exits for any reason, [code]false[/code] otherwise. See also [method set_restart_on_exit] and [method get_restart_on_exit_arguments]. + </description> + </method> <method name="is_stdout_verbose" qualifiers="const"> <return type="bool" /> <description> @@ -561,6 +584,17 @@ [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> + <method name="set_restart_on_exit"> + <return type="void" /> + <argument index="0" name="restart" type="bool" /> + <argument index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" /> + <description> + If [code]restart[/code] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [code]arguments[/code] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [code]arguments[/code]. + [method set_restart_on_exit] can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments]. + [b]Note:[/b] This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. + [b]Note:[/b] If the project process crashes or is [i]killed[/i] by the user (by sending [code]SIGKILL[/code] instead of the usual [code]SIGTERM[/code]), the project won't restart automatically. + </description> + </method> <method name="set_thread_name"> <return type="int" enum="Error" /> <argument index="0" name="name" type="String" /> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index a7b1f0ea33..737662fe69 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -194,6 +194,10 @@ <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" /> <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" /> + <member name="fit_to_longest_item" type="bool" setter="set_fit_to_longest_item" getter="is_fit_to_longest_item" default="true"> + If [code]true[/code], minimum size will be determined by the longest item's text, instead of the currently selected one's. + [b]Note:[/b] For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items. + </member> <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0"> The number of items to select from. </member> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 354fbd462c..7badd826d9 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -271,6 +271,42 @@ <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> Minimum equivalent of [member tangential_accel_max]. </member> + <member name="turbulence_enabled" type="bool" setter="set_turbulence_enabled" getter="get_turbulence_enabled" default="false"> + Enables and disables Turbulence for the particle system. + </member> + <member name="turbulence_influence_max" type="float" setter="set_param_max" getter="get_param_max" default="0.1"> + Minimum turbulence influence on each particle. + The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life]. + </member> + <member name="turbulence_influence_min" type="float" setter="set_param_min" getter="get_param_min" default="0.1"> + Maximum turbulence influence on each particle. + The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life]. + </member> + <member name="turbulence_influence_over_life" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> + Each particle's amount of turbulence will be influenced along this [CurveTexture] over its life time. + </member> + <member name="turbulence_initial_displacement_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum displacement of each particles spawn position by the turbulence. + The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max]. + </member> + <member name="turbulence_initial_displacement_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum displacement of each particles spawn position by the turbulence. + The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max]. + </member> + <member name="turbulence_noise_scale" type="float" setter="set_turbulence_noise_scale" getter="get_turbulence_noise_scale" default="9.0"> + This value controls the overall scale/frequency of the turbulence noise pattern. + A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features. + </member> + <member name="turbulence_noise_speed" type="Vector3" setter="set_turbulence_noise_speed" getter="get_turbulence_noise_speed" default="Vector3(0.5, 0.5, 0.5)"> + The movement speed of the turbulence pattern. This changes how quickly the noise changes over time. + A value of [code]Vector3(0.0, 0.0, 0.0)[/code] will freeze the turbulence pattern in place. + </member> + <member name="turbulence_noise_speed_random" type="float" setter="set_turbulence_noise_speed_random" getter="get_turbulence_noise_speed_random" default="0.0"> + Use to influence the noise speed in a random pattern. This helps to break up visible movement patterns. + </member> + <member name="turbulence_noise_strength" type="float" setter="set_turbulence_noise_strength" getter="get_turbulence_noise_strength" default="1.0"> + The turbulence noise strength. Increasing this will result in a stronger, more contrasting, noise pattern. + </member> </members> <constants> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> @@ -309,7 +345,7 @@ <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties. </constant> - <constant name="PARAM_MAX" value="12" enum="Parameter"> + <constant name="PARAM_MAX" value="15" enum="Parameter"> Represents the size of the [enum Parameter] enum. </constant> <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags"> @@ -348,6 +384,15 @@ <constant name="EMISSION_SHAPE_MAX" value="7" enum="EmissionShape"> Represents the size of the [enum EmissionShape] enum. </constant> + <constant name="PARAM_TURB_VEL_INFLUENCE" value="13" enum="Parameter"> + Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum und maximum influence on each particles velocity. + </constant> + <constant name="PARAM_TURB_INIT_DISPLACEMENT" value="14" enum="Parameter"> + Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum and maximum displacement of the particles spawn position. + </constant> + <constant name="PARAM_TURB_INFLUENCE_OVER_LIFE" value="12" enum="Parameter"> + Use with [method set_param_texture] to set the turbulence influence over the particles life time. + </constant> <constant name="SUB_EMITTER_DISABLED" value="0" enum="SubEmitterMode"> </constant> <constant name="SUB_EMITTER_CONSTANT" value="1" enum="SubEmitterMode"> @@ -357,6 +402,7 @@ <constant name="SUB_EMITTER_AT_COLLISION" value="3" enum="SubEmitterMode"> </constant> <constant name="SUB_EMITTER_MAX" value="4" enum="SubEmitterMode"> + Represents the size of the [enum SubEmitterMode] enum. </constant> </constants> </class> diff --git a/doc/classes/PhysicsRayQueryParameters2D.xml b/doc/classes/PhysicsRayQueryParameters2D.xml index 36933ef9a2..1cfc6caadf 100644 --- a/doc/classes/PhysicsRayQueryParameters2D.xml +++ b/doc/classes/PhysicsRayQueryParameters2D.xml @@ -8,6 +8,22 @@ </description> <tutorials> </tutorials> + <methods> + <method name="create" qualifiers="static"> + <return type="PhysicsRayQueryParameters2D" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <argument index="2" name="collision_mask" type="int" default="4294967295" /> + <argument index="3" name="exclude" type="Array" default="[]" /> + <description> + Returns a new, pre-configured [PhysicsRayQueryParameters2D] object. Use it to quickly create query parameters using the most common options. + [codeblock] + var query = PhysicsRayQueryParameters2D.create(global_position, global_position + Vector2(0, 100)) + var collision = get_world_2d().direct_space_state.intersect_ray(query) + [/codeblock] + </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 [Area2D]s into account. diff --git a/doc/classes/PhysicsRayQueryParameters3D.xml b/doc/classes/PhysicsRayQueryParameters3D.xml index 4244ec785f..e9216a8300 100644 --- a/doc/classes/PhysicsRayQueryParameters3D.xml +++ b/doc/classes/PhysicsRayQueryParameters3D.xml @@ -8,6 +8,22 @@ </description> <tutorials> </tutorials> + <methods> + <method name="create" qualifiers="static"> + <return type="PhysicsRayQueryParameters3D" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="collision_mask" type="int" default="4294967295" /> + <argument index="3" name="exclude" type="Array" default="[]" /> + <description> + Returns a new, pre-configured [PhysicsRayQueryParameters3D] object. Use it to quickly create query parameters using the most common options. + [codeblock] + var query = PhysicsRayQueryParameters3D.create(position, position + Vector3(0, -10, 0)) + var collision = get_world_3d().direct_space_state.intersect_ray(query) + [/codeblock] + </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 [Area3D]s into account. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b1e3d2f628..40477d27d4 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -588,7 +588,7 @@ [b]Note:[/b] By default, or when set to 0, the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and HTML5. </member> <member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1"> - Sets the VSync mode for the main game window. + Sets the V-Sync mode for the main game window. See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code], if the desired mode is not supported. </member> @@ -1962,9 +1962,11 @@ Lower-end override for [member rendering/shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3"> + The filtering quality to use for [Decal] nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level]. </member> <member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2"> Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled. + The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See [member rendering/textures/decals/filter] and [member rendering/textures/light_projectors/filter]. [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. </member> <member name="rendering/textures/default_filters/texture_mipmap_bias" type="float" setter="" getter="" default="0.0"> @@ -1977,6 +1979,7 @@ [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. </member> <member name="rendering/textures/light_projectors/filter" type="int" setter="" getter="" default="3"> + The filtering quality to use for [OmniLight3D] and [SpotLight3D] projectors. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level]. </member> <member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP. diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 6248394b1a..3962f309de 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -305,6 +305,12 @@ <description> </description> </method> + <method name="framebuffer_is_valid" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="framebuffer" type="RID" /> + <description> + </description> + </method> <method name="free_rid"> <return type="void" /> <argument index="0" name="rid" type="RID" /> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 9616ab3515..1b58b50bc7 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1391,21 +1391,21 @@ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> - <method name="instance_geometry_get_shader_parameter" qualifiers="const"> + <method name="instance_geometry_get_shader_uniform" qualifiers="const"> <return type="Variant" /> <argument index="0" name="instance" type="RID" /> <argument index="1" name="parameter" type="StringName" /> <description> </description> </method> - <method name="instance_geometry_get_shader_parameter_default_value" qualifiers="const"> + <method name="instance_geometry_get_shader_uniform_default_value" qualifiers="const"> <return type="Variant" /> <argument index="0" name="instance" type="RID" /> <argument index="1" name="parameter" type="StringName" /> <description> </description> </method> - <method name="instance_geometry_get_shader_parameter_list" qualifiers="const"> + <method name="instance_geometry_get_shader_uniform_list" qualifiers="const"> <return type="Array" /> <argument index="0" name="instance" type="RID" /> <description> @@ -1460,7 +1460,7 @@ Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. </description> </method> - <method name="instance_geometry_set_shader_parameter"> + <method name="instance_geometry_set_shader_uniform"> <return type="void" /> <argument index="0" name="instance" type="RID" /> <argument index="1" name="parameter" type="StringName" /> @@ -2741,7 +2741,7 @@ <description> </description> </method> - <method name="shader_get_param_list" qualifiers="const"> + <method name="shader_get_shader_uniform_list" qualifiers="const"> <return type="Dictionary[]" /> <argument index="0" name="shader" type="RID" /> <description> @@ -3747,14 +3747,22 @@ Use [Transform3D] to store MultiMesh transform. </constant> <constant name="LIGHT_PROJECTOR_FILTER_NEAREST" value="0" enum="LightProjectorFilter"> + Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. </constant> - <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="1" enum="LightProjectorFilter"> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="1" enum="LightProjectorFilter"> + Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. </constant> - <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="2" enum="LightProjectorFilter"> + <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="2" enum="LightProjectorFilter"> + Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. </constant> <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS" value="3" enum="LightProjectorFilter"> + Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. </constant> - <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter"> + <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter"> + Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="5" enum="LightProjectorFilter"> + Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. @@ -3896,14 +3904,22 @@ <constant name="DECAL_TEXTURE_MAX" value="4" enum="DecalTexture"> </constant> <constant name="DECAL_FILTER_NEAREST" value="0" enum="DecalFilter"> + Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. </constant> - <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="1" enum="DecalFilter"> + <constant name="DECAL_FILTER_LINEAR" value="1" enum="DecalFilter"> + Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. </constant> - <constant name="DECAL_FILTER_LINEAR" value="2" enum="DecalFilter"> + <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="2" enum="DecalFilter"> + Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. </constant> <constant name="DECAL_FILTER_LINEAR_MIPMAPS" value="3" enum="DecalFilter"> + Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + </constant> + <constant name="DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter"> + Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. </constant> - <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter"> + <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="5" enum="DecalFilter"> + Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. </constant> <constant name="VOXEL_GI_QUALITY_LOW" value="0" enum="VoxelGIQuality"> </constant> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index dd52d09750..729058c9b3 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -95,8 +95,10 @@ <argument index="0" name="path" type="String" /> <argument index="1" name="type_hint" type="String" default="""" /> <argument index="2" name="use_sub_threads" type="bool" default="false" /> + <argument index="3" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" /> <description> Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). + The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. </description> </method> <method name="remove_resource_format_loader"> diff --git a/doc/classes/ResourceUID.xml b/doc/classes/ResourceUID.xml index f91c39b512..782a8a2968 100644 --- a/doc/classes/ResourceUID.xml +++ b/doc/classes/ResourceUID.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ResourceUID" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Singleton for managing a cache of resource UIDs within a project. </brief_description> <description> + Resources can not only be referenced using their resource paths [code]res://[/code], but alternatively through a unique identifier specified via [code]uid://[/code]. + Using UIDs allows for the engine to keep references between resources intact, even if the files get renamed or moved. + This singleton is responsible for keeping track of all registered resource UIDs of a project, generating new UIDs and converting between the string and integer representation. </description> <tutorials> </tutorials> @@ -12,35 +16,45 @@ <argument index="0" name="id" type="int" /> <argument index="1" name="path" type="String" /> <description> + Adds a new UID value which is mapped to the given resource path. + Fails with an error if the UID already exists, so be sure to check [method has_id] beforehand, or use [method set_id] instead. </description> </method> <method name="create_id"> <return type="int" /> <description> + Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. + In order for this UID to be registered, you must call [method add_id] or [method set_id]. </description> </method> <method name="get_id_path" qualifiers="const"> <return type="String" /> <argument index="0" name="id" type="int" /> <description> + Returns the path that the given UID value refers to. + Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand. </description> </method> <method name="has_id" qualifiers="const"> <return type="bool" /> <argument index="0" name="id" type="int" /> <description> + Returns whether the given UID value is known to the cache. </description> </method> <method name="id_to_text" qualifiers="const"> <return type="String" /> <argument index="0" name="id" type="int" /> <description> + Converts the given UID to a [code]uid://[/code] string value. </description> </method> <method name="remove_id"> <return type="void" /> <argument index="0" name="id" type="int" /> <description> + Removes a loaded UID value from the cache. + Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand. </description> </method> <method name="set_id"> @@ -48,17 +62,22 @@ <argument index="0" name="id" type="int" /> <argument index="1" name="path" type="String" /> <description> + Updates the resource path of an existing UID. + Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand, or use [method add_id] instead. </description> </method> <method name="text_to_id" qualifiers="const"> <return type="int" /> <argument index="0" name="text_id" type="String" /> <description> + Extracts the UID value from the given [code]uid://[/code] string. </description> </method> </methods> <constants> <constant name="INVALID_ID" value="-1"> + The value to use for an invalid UID, for example if the resource could not be loaded. + Its text representation is [code]uid://<invalid>[/code]. </constant> </constants> </class> diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml index 88b8f2cd03..3f3b00e2cb 100644 --- a/doc/classes/RootMotionView.xml +++ b/doc/classes/RootMotionView.xml @@ -5,25 +5,25 @@ </brief_description> <description> [i]Root motion[/i] refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also [AnimationTree]. - [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script. + [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project. </description> <tutorials> <link title="Using AnimationTree - Root motion">$DOCS_URL/tutorials/animation/animation_tree.html#root-motion</link> </tutorials> <members> - <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path"> + <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path" default="NodePath("")"> Path to an [AnimationTree] node to use as a basis for root motion. </member> - <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size"> + <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0"> The grid's cell size in 3D units. </member> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0.5, 0.5, 1, 1)"> The grid's color. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this [member radius] is reached. </member> - <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y"> + <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y" default="true"> If [code]true[/code], the grid's points will all be on the same Y coordinate ([i]local[/i] Y = 0). If [code]false[/code], the points' original Y coordinate is preserved. </member> </members> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 10deaf1c41..1921c5b91d 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -26,7 +26,7 @@ Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]. </description> </method> - <method name="has_param" qualifiers="const"> + <method name="has_uniform" qualifiers="const"> <return type="bool" /> <argument index="0" name="name" type="StringName" /> <description> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 672b660c34..1208b93a62 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -10,7 +10,7 @@ <link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link> </tutorials> <methods> - <method name="get_shader_param" qualifiers="const"> + <method name="get_shader_uniform" qualifiers="const"> <return type="Variant" /> <argument index="0" name="param" type="StringName" /> <description> @@ -31,7 +31,7 @@ Returns the default value of the material property with given [code]name[/code]. </description> </method> - <method name="set_shader_param"> + <method name="set_shader_uniform"> <return type="void" /> <argument index="0" name="param" type="StringName" /> <argument index="1" name="value" type="Variant" /> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index e84f9c38ff..8df039794a 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -47,6 +47,9 @@ <members> <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0"> </member> + <member name="custom_arrow_step" type="float" setter="set_custom_arrow_step" getter="get_custom_arrow_step" default="0.0"> + If not [code]0[/code], [code]value[/code] will always be rounded to a multiple of [code]custom_arrow_step[/code] when interacting with the arrow buttons of the [SpinBox]. + </member> <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only. </member> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index e1b676427b..b54536f897 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -937,6 +937,16 @@ Returns [code]true[/code] if the server supports a feature. </description> </method> + <method name="is_confusable" qualifiers="const"> + <return type="int" /> + <argument index="0" name="string" type="String" /> + <argument index="1" name="dict" type="PackedStringArray" /> + <description> + Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found. + [b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check]. + [b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature. + </description> + </method> <method name="is_locale_right_to_left" qualifiers="const"> <return type="bool" /> <argument index="0" name="locale" type="String" /> @@ -944,6 +954,21 @@ Returns [code]true[/code] if locale is right-to-left. </description> </method> + <method name="is_valid_identifier" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="string" type="String" /> + <description> + Returns [code]true[/code] is [code]string[/code] is a valid identifier. + If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must: + - Conform to normalization form C. + - Begin with a Unicode character of class XID_Start or [code]"_"[/code]. + - May contain Unicode characters of class XID_Continue in the other positions. + - Use UAX #31 recommended scripts only (mixed scripts are allowed). + If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must: + - Begin with a Unicode character of class XID_Start or [code]"_"[/code]. + - May contain Unicode characters of class XID_Continue in the other positions. + </description> + </method> <method name="load_support_data"> <return type="bool" /> <argument index="0" name="filename" type="String" /> @@ -1461,6 +1486,14 @@ Aligns shaped text to the given tab-stops. </description> </method> + <method name="spoof_check" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="string" type="String" /> + <description> + Returns [code]true[/code] if [code]string[/code] is likely to be an attempt at confusing the reader. + [b]Note:[/b] Always returns [code]false[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature. + </description> + </method> <method name="string_get_word_breaks" qualifiers="const"> <return type="PackedInt32Array" /> <argument index="0" name="string" type="String" /> @@ -1646,6 +1679,9 @@ <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag" is_bitfield="true"> Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe. </constant> + <constant name="GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL" value="2048" enum="GraphemeFlag" is_bitfield="true"> + It is safe to insert a U+0640 before this grapheme for elongation. + </constant> <constant name="HINTING_NONE" value="0" enum="Hinting"> Disables font hinting (smoother but less crisp). </constant> @@ -1713,7 +1749,13 @@ TextServer supports locale dependent and context sensitive case conversion. </constant> <constant name="FEATURE_USE_SUPPORT_DATA" value="4096" enum="Feature"> - TextServer require external data file for some features. + TextServer require external data file for some features, see [method load_support_data]. + </constant> + <constant name="FEATURE_UNICODE_IDENTIFIERS" value="8192" enum="Feature"> + TextServer supports UAX #31 identifier validation, see [method is_valid_identifier]. + </constant> + <constant name="FEATURE_UNICODE_SECURITY" value="16384" enum="Feature"> + TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features. </constant> <constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag"> Contour point is on the curve. diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index 4501ec744a..c686a06e5e 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -934,6 +934,14 @@ Returns [code]true[/code] if the server supports a feature. </description> </method> + <method name="is_confusable" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="string" type="String" /> + <argument index="1" name="dict" type="PackedStringArray" /> + <description> + Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found. + </description> + </method> <method name="is_locale_right_to_left" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="locale" type="String" /> @@ -941,6 +949,13 @@ Returns [code]true[/code] if locale is right-to-left. </description> </method> + <method name="is_valid_identifier" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="string" type="String" /> + <description> + Returns [code]true[/code] is [code]string[/code] is a valid identifier. + </description> + </method> <method name="load_support_data" qualifiers="virtual"> <return type="bool" /> <argument index="0" name="filename" type="String" /> @@ -1481,6 +1496,13 @@ [b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented. </description> </method> + <method name="spoof_check" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="string" type="String" /> + <description> + Returns [code]true[/code] if [code]string[/code] is likely to be an attempt at confusing the reader. + </description> + </method> <method name="string_get_word_breaks" qualifiers="virtual const"> <return type="PackedInt32Array" /> <argument index="0" name="string" type="String" /> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 924b4cd8e4..9979a73527 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -141,14 +141,40 @@ <return type="Transform2D" /> <argument index="0" name="angle" type="float" /> <description> - Returns a copy of the transform rotated by the given [code]angle[/code] (in radians), using matrix multiplication. + Returns a copy of the transform rotated by the given [code]angle[/code] (in radians). + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code]. + This can be seen as transforming with respect to the global/parent frame. + </description> + </method> + <method name="rotated_local" qualifiers="const"> + <return type="Transform2D" /> + <argument index="0" name="angle" type="float" /> + <description> + Returns a copy of the transform rotated by the given [code]angle[/code] (in radians). + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code]. + This can be seen as transforming with respect to the local frame. </description> </method> <method name="scaled" qualifiers="const"> <return type="Transform2D" /> <argument index="0" name="scale" type="Vector2" /> <description> - Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication. + Returns a copy of the transform scaled by the given [code]scale[/code] factor. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code]. + This can be seen as transforming with respect to the global/parent frame. + </description> + </method> + <method name="scaled_local" qualifiers="const"> + <return type="Transform2D" /> + <argument index="0" name="scale" type="Vector2" /> + <description> + Returns a copy of the transform scaled by the given [code]scale[/code] factor. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code]. + This can be seen as transforming with respect to the local frame. </description> </method> <method name="set_rotation"> @@ -173,12 +199,24 @@ Sets the transform's skew (in radians). </description> </method> + <method name="translated" qualifiers="const"> + <return type="Transform2D" /> + <argument index="0" name="offset" type="Vector2" /> + <description> + Returns a copy of the transform translated by the given [code]offset[/code]. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code]. + This can be seen as transforming with respect to the global/parent frame. + </description> + </method> <method name="translated_local" qualifiers="const"> <return type="Transform2D" /> <argument index="0" name="offset" type="Vector2" /> <description> - Returns a copy of the transform translated by the given [code]offset[/code], relative to the transform's basis vectors. - Unlike [method rotated] and [method scaled], this does not use matrix multiplication. + Returns a copy of the transform translated by the given [code]offset[/code]. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code]. + This can be seen as transforming with respect to the local frame. </description> </method> </methods> diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index de1db718c2..9b673701ae 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -102,14 +102,43 @@ <argument index="0" name="axis" type="Vector3" /> <argument index="1" name="angle" type="float" /> <description> - Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians), using matrix multiplication. The [code]axis[/code] must be a normalized vector. + Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians). + The [code]axis[/code] must be a normalized vector. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code]. + This can be seen as transforming with respect to the global/parent frame. + </description> + </method> + <method name="rotated_local" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> + <description> + Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians). + The [code]axis[/code] must be a normalized vector. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code]. + This can be seen as transforming with respect to the local frame. </description> </method> <method name="scaled" qualifiers="const"> <return type="Transform3D" /> <argument index="0" name="scale" type="Vector3" /> <description> - Returns a copy of the transform with its basis and origin scaled by the given [code]scale[/code] factor, using matrix multiplication. + Returns a copy of the transform scaled by the given [code]scale[/code] factor. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code]. + This can be seen as transforming with respect to the global/parent frame. + </description> + </method> + <method name="scaled_local" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="scale" type="Vector3" /> + <description> + Returns a copy of the transform scaled by the given [code]scale[/code] factor. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code]. + This can be seen as transforming with respect to the local frame. </description> </method> <method name="spherical_interpolate_with" qualifiers="const"> @@ -120,12 +149,24 @@ Returns a transform spherically 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="translated" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="offset" type="Vector3" /> + <description> + Returns a copy of the transform translated by the given [code]offset[/code]. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code]. + This can be seen as transforming with respect to the global/parent frame. + </description> + </method> <method name="translated_local" qualifiers="const"> <return type="Transform3D" /> <argument index="0" name="offset" type="Vector3" /> <description> - Returns a copy of the transform translated by the given [code]offset[/code], relative to the transform's basis vectors. - Unlike [method rotated] and [method scaled], this does not use matrix multiplication. + Returns a copy of the transform translated by the given [code]offset[/code]. + This method is an optimized version of multiplying the given transform [code]X[/code] + with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code]. + This can be seen as transforming with respect to the local frame. </description> </method> </methods> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index b06be0cf99..f326948e9c 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -461,7 +461,7 @@ <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)"> Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> - <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)"> + <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. </theme_item> <theme_item name="font_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)"> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index bff6f2015d..9014f79f54 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -39,12 +39,15 @@ Represents the size of the [enum TextureType] enum. </constant> <constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault"> - Defaults to white color. + Defaults to fully opaque white color. </constant> <constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault"> - Defaults to black color. + Defaults to fully opaque black color. </constant> - <constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault"> + <constant name="COLOR_DEFAULT_TRANSPARENT" value="2" enum="ColorDefault"> + Defaults to fully transparent black color. + </constant> + <constant name="COLOR_DEFAULT_MAX" value="3" enum="ColorDefault"> Represents the size of the [enum ColorDefault] enum. </constant> <constant name="FILTER_DEFAULT" value="0" enum="TextureFilter"> diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml index b8d424b5fe..9198da4bc6 100644 --- a/doc/classes/VoxelGIData.xml +++ b/doc/classes/VoxelGIData.xml @@ -72,10 +72,10 @@ <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0"> The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code]. </member> - <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7"> - If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness. + <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.5"> + The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness. </member> - <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false"> + <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="true"> If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy]. </member> </members> diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml index f80381acda..ea520178c7 100644 --- a/doc/classes/WeakRef.xml +++ b/doc/classes/WeakRef.xml @@ -12,7 +12,7 @@ <method name="get_ref" qualifiers="const"> <return type="Variant" /> <description> - Returns the [Object] this weakref is referring to. + Returns the [Object] this weakref is referring to. Returns [code]null[/code] if that object no longer exists. </description> </method> </methods> |