diff options
Diffstat (limited to 'doc/classes')
62 files changed, 355 insertions, 151 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 0021b2f857..a40b851efc 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -457,6 +457,7 @@ rotation = lerp_angle(min_angle, max_angle, elapsed) elapsed += delta [/codeblock] + [b]Note:[/b] This method lerps through the shortest path between [code]from[/code] and [code]to[/code]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise. </description> </method> <method name="linear2db"> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 4b65a64389..7a27568d30 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -33,7 +33,7 @@ <argument index="1" name="position" type="Vector2" /> <argument index="2" name="weight_scale" type="float" default="1.0" /> <description> - Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. + Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. [codeblocks] [gdscript] diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml index 3087b9e363..33407c3e74 100644 --- a/doc/classes/AStar3D.xml +++ b/doc/classes/AStar3D.xml @@ -62,7 +62,7 @@ <argument index="1" name="position" type="Vector3" /> <argument index="2" name="weight_scale" type="float" default="1.0" /> <description> - Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. + Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. [codeblocks] [gdscript] diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 2cafdf8aaa..6140dd799f 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -39,12 +39,6 @@ Adds a transition between the given nodes. </description> </method> - <method name="get_end_node" qualifiers="const"> - <return type="String" /> - <description> - Returns the graph's end node. - </description> - </method> <method name="get_graph_offset" qualifiers="const"> <return type="Vector2" /> <description> @@ -72,12 +66,6 @@ Returns the given node's coordinates. Used for display in the editor. </description> </method> - <method name="get_start_node" qualifiers="const"> - <return type="String" /> - <description> - Returns the graph's end node. - </description> - </method> <method name="get_transition" qualifiers="const"> <return type="AnimationNodeStateMachineTransition" /> <argument index="0" name="idx" type="int" /> @@ -157,13 +145,6 @@ <description> </description> </method> - <method name="set_end_node"> - <return type="void" /> - <argument index="0" name="name" type="StringName" /> - <description> - Sets the given node as the graph end point. - </description> - </method> <method name="set_graph_offset"> <return type="void" /> <argument index="0" name="offset" type="Vector2" /> @@ -179,12 +160,5 @@ Sets the node's coordinates. Used for display in the editor. </description> </method> - <method name="set_start_node"> - <return type="void" /> - <argument index="0" name="name" type="StringName" /> - <description> - Sets the given node as the graph start point. - </description> - </method> </methods> </class> diff --git a/doc/classes/AspectRatioContainer.xml b/doc/classes/AspectRatioContainer.xml index 742a7276d4..e7847ba05c 100644 --- a/doc/classes/AspectRatioContainer.xml +++ b/doc/classes/AspectRatioContainer.xml @@ -7,6 +7,7 @@ Arranges child controls in a way to preserve their aspect ratio automatically whenever the container is resized. Solves the problem where the container size is dynamic and the contents' size needs to adjust accordingly without losing proportions. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <members> <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignmentMode" default="1"> diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml index ff176c6ad8..5c62ba982f 100644 --- a/doc/classes/AudioEffectStereoEnhance.xml +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -1,13 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + An audio effect that can be used to adjust the intensity of stereo panning. </brief_description> <description> + An audio effect that can be used to adjust the intensity of stereo panning. </description> <tutorials> </tutorials> <members> <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0"> + Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. </member> <member name="surround" type="float" setter="set_surround" getter="get_surround" default="0.0"> </member> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 4b6f6eec67..f3e2c4b308 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -59,6 +59,7 @@ <members> <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)"> The material's base color. + [b]Note:[/b] If [member detail_enabled] is [code]true[/code] and a [member detail_albedo] texture is specified, [member albedo_color] will [i]not[/i] modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent [member detail_albedo] texture instead. </member> <member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> Forces a conversion of the [member albedo_texture] from sRGB space to linear space. @@ -148,19 +149,20 @@ Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency]. </member> <member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture that specifies the color of the detail overlay. + Texture that specifies the color of the detail overlay. [member detail_albedo]'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see [member detail_mask]. + [b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member albedo_color]. </member> <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode" default="0"> Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options. </member> <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures. + If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask] and [member detail_albedo]'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures. </member> <member name="detail_mask" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture used to specify how the detail textures get blended with the base textures. + Texture used to specify how the detail textures get blended with the base textures. [member detail_mask] can be used together with [member detail_albedo]'s alpha channel (if any). </member> <member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture that specifies the per-pixel normal of the detail overlay. + Texture that specifies the per-pixel normal of the detail overlay. The [member detail_normal] texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member detail_normal] is oriented around the surface normal provided by the [Mesh]. [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. </member> <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV" default="0"> @@ -262,9 +264,10 @@ The strength of the normal map's effect. </member> <member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh]. + Texture used to specify the normal at a given pixel. The [member normal_texture] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member normal_texture] is oriented around the surface normal provided by the [Mesh]. [b]Note:[/b] The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [SurfaceTool], you can use [method SurfaceTool.generate_normals] and [method SurfaceTool.generate_tangents] to automatically generate normals and tangents respectively. [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. + [b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To display a normal map [i]above[/i] the [member detail_albedo] texture, use [member detail_normal] instead. </member> <member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> @@ -709,7 +712,7 @@ Used to read from the alpha channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel"> - Currently unused. + Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. </constant> <constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator"> Adds the emission color to the color from the emission texture. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 3b703884a5..0af482d654 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -35,9 +35,9 @@ <constructor name="Basis"> <return type="Basis" /> <argument index="0" name="axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="1" name="angle" type="float" /> <description> - Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector. + Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]angle[/code] (in radians). The axis must be a normalized vector. </description> </constructor> <constructor name="Basis"> @@ -136,9 +136,9 @@ <method name="rotated" qualifiers="const"> <return type="Basis" /> <argument index="0" name="axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="1" name="angle" type="float" /> <description> - Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector. + Introduce an additional rotation around the given axis by [code]angle[/code] (in radians). The axis must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index 92fccaa884..c76a178368 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -7,6 +7,7 @@ Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <methods> <method name="add_spacer"> diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml index 08cdf64cea..f5f32bd325 100644 --- a/doc/classes/CenterContainer.xml +++ b/doc/classes/CenterContainer.xml @@ -7,6 +7,7 @@ CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <members> <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left" default="false"> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index a9d8a85226..f290fc9801 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -18,6 +18,7 @@ </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. + [b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a child of an [Area2D] node. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index f3a4cbc2d6..246e0e8663 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -18,6 +18,7 @@ </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> Sets whether this collision shape should only detect collision on one side (top or bottom). + [b]Note:[/b] This property has no effect if this [CollisionShape2D] is a child of an [Area2D] node. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml index 11b20b5654..900997d119 100644 --- a/doc/classes/Container.xml +++ b/doc/classes/Container.xml @@ -8,6 +8,7 @@ A Control can inherit this to create custom container classes. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <methods> <method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index ede3a1e199..cec504584c 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -104,6 +104,19 @@ <description> </description> </method> + <method name="get_display_cutouts" qualifiers="const"> + <return type="Array" /> + <description> + Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method get_display_safe_area]. + [b]Note:[/b] Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. + </description> + </method> + <method name="get_display_safe_area" qualifiers="const"> + <return type="Rect2i" /> + <description> + Returns the unobscured area of the display where interactive controls should be rendered. See also [method get_display_cutouts]. + </description> + </method> <method name="get_name" qualifiers="const"> <return type="String" /> <description> diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml index 45eb926108..752ecda867 100644 --- a/doc/classes/EngineProfiler.xml +++ b/doc/classes/EngineProfiler.xml @@ -20,11 +20,11 @@ <method name="_tick" qualifiers="virtual"> <return type="void" /> <argument index="0" name="frame_time" type="float" /> - <argument index="1" name="idle_time" type="float" /> + <argument index="1" name="process_time" type="float" /> <argument index="2" name="physics_time" type="float" /> <argument index="3" name="physics_frame_time" type="float" /> <description> - Called once every engine iteration when the profiler is active with information about the current frame. + Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. </description> </method> <method name="_toggle" qualifiers="virtual"> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index e5e7efd315..9da360915b 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -51,16 +51,17 @@ The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color(0, 0, 0, 1)"> - The ambient light's [Color]. + The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive). </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> - The ambient light's energy. The higher the value, the stronger the light. + The ambient light's energy. The higher the value, the stronger the light. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive). </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0"> Defines the amount of light that the sky brings on the scene. A value of [code]0.0[/code] means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of [code]1.0[/code] means that [i]all[/i] the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. [b]Note:[/b] [member ambient_light_sky_contribution] is internally clamped between [code]0.0[/code] and [code]1.0[/code] (inclusive). </member> <member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0"> + The ambient light source to use for rendering materials and global illumination. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure_enabled" getter="is_tonemap_auto_exposure_enabled" default="false"> If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. @@ -97,6 +98,7 @@ 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"> + 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"> If [code]true[/code], fog effects are enabled. @@ -108,10 +110,13 @@ 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)"> + 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"> + The fog's brightness. Higher values result in brighter fog. </member> <member name="fog_sun_scatter" type="float" setter="set_fog_sun_scatter" getter="get_fog_sun_scatter" default="0.0"> + If set above [code]0.0[/code], renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> The glow blending mode. @@ -132,7 +137,7 @@ The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> - The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. + The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to [code]1.5[/code] to compensate for the lack of HDR rendering. </member> <member name="glow_levels/1" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 1st level of glow. This is the most "local" level (least blurry). @@ -163,6 +168,7 @@ How strong of an impact the [member glow_map] should have on the overall glow effect. A strength of [code]0.0[/code] means the glow map has no effect on the overall glow effect. A strength of [code]1.0[/code] means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas). </member> <member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05"> + When using the [constant GLOW_BLEND_MODE_MIX] [member glow_blend_mode], this controls how much the source image is blended with the glow layer. A value of [code]0.0[/code] makes the glow rendering invisible, while a value of [code]1.0[/code] is equivalent to [constant GLOW_BLEND_MODE_REPLACE]. </member> <member name="glow_normalized" type="bool" setter="set_glow_normalized" getter="is_glow_normalized" default="false"> If [code]true[/code], glow levels will be normalized so that summed together their intensities equal [code]1.0[/code]. @@ -171,10 +177,15 @@ The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> + The reflected (specular) light source. </member> <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.5"> + The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than [code]0.0[/code] will simulate multiple bounces, resulting in a more realistic appearance. Increasing [member sdfgi_bounce_feedback] generally has no performance impact. See also [member sdfgi_energy]. + [b]Note:[/b] Values greater than [code]0.5[/code] can cause infinite feedback loops and should be avoided in scenes with bright materials. + [b]Note:[/b] If [member sdfgi_bounce_feedback] is [code]0.0[/code], indirect lighting will not be represented in reflections as light will only bounce one time. </member> <member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8"> + [b]Note:[/b] This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_max_distance]. Changing its value will automatically change those properties as well. </member> <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="4"> The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between [code]1[/code] and [code]4[/code] to improve performance. @@ -185,27 +196,39 @@ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. </member> <member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0"> + The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also [member sdfgi_bounce_feedback]. </member> <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="204.8"> + The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as [ReflectionProbe] will be used as a fallback. + [b]Note:[/b] This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well. </member> <member name="sdfgi_min_cell_size" type="float" setter="set_sdfgi_min_cell_size" getter="get_sdfgi_min_cell_size" default="0.2"> + The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates. + [b]Note:[/b] This property is linked to [member sdfgi_max_distance] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well. </member> <member name="sdfgi_normal_bias" type="float" setter="set_sdfgi_normal_bias" getter="get_sdfgi_normal_bias" default="1.1"> + The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. </member> <member name="sdfgi_probe_bias" type="float" setter="set_sdfgi_probe_bias" getter="get_sdfgi_probe_bias" default="1.1"> + The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. </member> <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="true"> + If [code]true[/code], SDFGI takes the environment lighting into account. This should be set to [code]false[/code] for interior scenes. </member> <member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false"> + If [code]true[/code], SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. [member sdfgi_use_occlusion] has a performance impact and should only be enabled when needed. </member> <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="1"> + The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. [member sdfgi_y_scale] should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). </member> <member name="sky" type="Sky" setter="set_sky" getter="get_sky"> The [Sky] resource used for this [Environment]. </member> <member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> + If set to a value greater than [code]0.0[/code], overrides the field of view to use for sky rendering. If set to [code]0.0[/code], the same FOV as the current [Camera3D] is used for sky rendering. </member> <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3(0, 0, 0)"> + The rotation to use for sky rendering. </member> <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0"> The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures. @@ -265,13 +288,13 @@ The maximum number of steps for screen-space reflections. Higher values are slower. </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> - The default exposure used for tonemapping. + The default exposure used for tonemapping. Higher values result in a brighter image. See also [member tonemap_white]. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) </member> <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> - The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. + The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. See also [member tonemap_exposure]. </member> <member name="volumetric_fog_albedo" type="Color" setter="set_volumetric_fog_albedo" getter="get_volumetric_fog_albedo" default="Color(1, 1, 1, 1)"> The [Color] of the volumetric fog when interacting with lights. Mist and fog have an albedo close to [code]Color(1, 1, 1, 1)[/code] while smoke has a darker albedo. @@ -336,10 +359,10 @@ Gather ambient light from whichever source is specified as the background. </constant> <constant name="AMBIENT_SOURCE_DISABLED" value="1" enum="AmbientSource"> - Disable ambient light. + Disable ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. </constant> <constant name="AMBIENT_SOURCE_COLOR" value="2" enum="AmbientSource"> - Specify a specific [Color] for ambient light. + Specify a specific [Color] for ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. </constant> <constant name="AMBIENT_SOURCE_SKY" value="3" enum="AmbientSource"> Gather ambient light from the [Sky] regardless of what the background is. @@ -348,22 +371,23 @@ Use the background for reflections. </constant> <constant name="REFLECTION_SOURCE_DISABLED" value="1" enum="ReflectionSource"> - Disable reflections. + Disable reflections. This provides a slight performance boost over other options. </constant> <constant name="REFLECTION_SOURCE_SKY" value="2" enum="ReflectionSource"> Use the [Sky] for reflections regardless of what the background is. </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> - Linear tonemapper operator. Reads the linear data and passes it on unmodified. + Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. </constant> <constant name="TONE_MAPPER_REINHARDT" value="1" enum="ToneMapper"> - Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. + Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull. </constant> <constant name="TONE_MAPPER_FILMIC" value="2" enum="ToneMapper"> - Filmic tonemapper operator. + Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant TONE_MAPPER_REINHARDT]. </constant> <constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper"> - Academy Color Encoding System tonemapper operator. + Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] and [constant TONE_MAPPER_FILMIC]. + [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="GlowBlendMode"> Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. @@ -381,10 +405,13 @@ Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. </constant> <constant name="SDFGI_Y_SCALE_50_PERCENT" value="0" enum="SDFGIYScale"> + Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. </constant> <constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale"> + Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. </constant> <constant name="SDFGI_Y_SCALE_100_PERCENT" value="2" enum="SDFGIYScale"> + Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. </constant> </constants> </class> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index bb27c35785..8b7a0fe407 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -9,6 +9,7 @@ [b]Note:[/b] GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <members> diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml index 0af9f7a0f4..21267215eb 100644 --- a/doc/classes/HBoxContainer.xml +++ b/doc/classes/HBoxContainer.xml @@ -7,6 +7,7 @@ Horizontal box container. See [BoxContainer]. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <theme_items> <theme_item name="separation" data_type="constant" type="int" default="4"> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index f240718176..8137e26b8c 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -7,6 +7,7 @@ Horizontal split container. See [SplitContainer]. This goes from left to right. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <theme_items> <theme_item name="autohide" data_type="constant" type="int" default="1"> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 61d54e85f8..eb708432b4 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -45,6 +45,7 @@ <argument index="0" name="action" type="StringName" /> <description> Returns an array of [InputEvent]s associated with a given action. + [b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the [code]input/*[/code] settings from [ProjectSettings]. </description> </method> <method name="action_has_event"> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index edfd8daec1..83e7eba5e5 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -407,19 +407,26 @@ </member> </members> <signals> + <signal name="empty_clicked"> + <argument index="0" name="at_position" type="Vector2" /> + <argument index="1" name="mouse_button_index" type="int" /> + <description> + Triggered when any mouse click is issued within the rect of the list but on empty space. + </description> + </signal> <signal name="item_activated"> <argument index="0" name="index" type="int" /> <description> Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd]. </description> </signal> - <signal name="item_rmb_selected"> + <signal name="item_clicked"> <argument index="0" name="index" type="int" /> <argument index="1" name="at_position" type="Vector2" /> + <argument index="2" name="mouse_button_index" type="int" /> <description> - Triggered when specified list item has been selected via right mouse clicking. + Triggered when specified list item has been clicked with any mouse button. The click position is also provided to allow appropriate popup of context menus at the correct location. - [member allow_rmb_select] must be enabled. </description> </signal> <signal name="item_selected"> @@ -436,18 +443,6 @@ Triggered when a multiple selection is altered on a list allowing multiple selection. </description> </signal> - <signal name="nothing_selected"> - <description> - Triggered when a left mouse click is issued within the rect of the list but on empty space. - </description> - </signal> - <signal name="rmb_clicked"> - <argument index="0" name="at_position" type="Vector2" /> - <description> - Triggered when a right mouse click is issued within the rect of the list but on empty space. - [member allow_rmb_select] must be enabled. - </description> - </signal> </signals> <constants> <constant name="ICON_MODE_TOP" value="0" enum="IconMode"> diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index c95b691bf3..1bd52ab2dc 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -92,15 +92,28 @@ <member name="no_depth_test" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false"> If [code]true[/code], depth testing is disabled and the object will be drawn in render order. </member> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> + The text drawing offset (in pixels). + </member> <member name="outline_modulate" type="Color" setter="set_outline_modulate" getter="get_outline_modulate" default="Color(0, 0, 0, 1)"> The tint of [Font]'s outline. </member> + <member name="outline_render_priority" type="int" setter="set_outline_render_priority" getter="get_outline_render_priority" default="-1"> + Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. + [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + </member> <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> Text outline size. </member> <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> The size of one pixel's width on the label to scale it in 3D. </member> + <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> + Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. + [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false"> If [code]true[/code], the [Light3D] in the [Environment] has effects on the label. </member> diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index 3f9f93a39b..3b2ace8475 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -26,6 +26,7 @@ [/codeblocks] </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <theme_items> <theme_item name="margin_bottom" data_type="constant" type="int" default="0"> diff --git a/doc/classes/MissingNode.xml b/doc/classes/MissingNode.xml new file mode 100644 index 0000000000..b5aa02cfd6 --- /dev/null +++ b/doc/classes/MissingNode.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MissingNode" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + This is an internal editor class intended for keeping data of nodes of unknown type. + </brief_description> + <description> + This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is. + </description> + <tutorials> + </tutorials> + <members> + <member name="original_class" type="String" setter="set_original_class" getter="get_original_class"> + </member> + <member name="recording_properties" type="bool" setter="set_recording_properties" getter="is_recording_properties"> + </member> + </members> +</class> diff --git a/doc/classes/MissingResource.xml b/doc/classes/MissingResource.xml new file mode 100644 index 0000000000..eede6350d8 --- /dev/null +++ b/doc/classes/MissingResource.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MissingResource" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + This is an internal editor class intended for keeping data of resources of unknown type. + </brief_description> + <description> + This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is. + </description> + <tutorials> + </tutorials> + <members> + <member name="original_class" type="String" setter="set_original_class" getter="get_original_class"> + </member> + <member name="recording_properties" type="bool" setter="set_recording_properties" getter="is_recording_properties"> + </member> + </members> +</class> diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml index ccdbb617ab..e5e11c1c95 100644 --- a/doc/classes/NativeExtension.xml +++ b/doc/classes/NativeExtension.xml @@ -43,9 +43,7 @@ </constant> <constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel"> </constant> - <constant name="INITIALIZATION_LEVEL_DRIVER" value="3" enum="InitializationLevel"> - </constant> - <constant name="INITIALIZATION_LEVEL_EDITOR" value="4" enum="InitializationLevel"> + <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel"> </constant> </constants> </class> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index b1165174a2..5cd2e035b6 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -10,6 +10,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_region_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this region on the [NavigationServer2D]. Combined with [method NavigationServer2D.map_get_closest_point_owner] can be used to identify the [NavigationRegion2D] closest to a point on the merged navigation map. + </description> + </method> + </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion2D] is enabled or disabled. diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index e007633a1e..60f1020286 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -12,8 +12,15 @@ <methods> <method name="bake_navigation_mesh"> <return type="void" /> + <argument index="0" name="on_thread" type="bool" default="true" /> <description> - Bakes the [NavigationMesh]. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. + Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. + </description> + </method> + <method name="get_region_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this region on the [NavigationServer3D]. Combined with [method NavigationServer3D.map_get_closest_point_owner] can be used to identify the [NavigationRegion3D] closest to a point on the merged navigation map. </description> </method> </methods> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f45bee4db4..266a2573de 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -434,6 +434,15 @@ Returns [code]true[/code] if the input keycode corresponds to a Unicode character. </description> </method> + <method name="is_process_running" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="pid" type="int" /> + <description> + Returns [code]true[/code] if the child process ID ([code]pid[/code]) is still running or [code]false[/code] if it has terminated. + Must be a valid ID generated from [method create_process]. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. + </description> + </method> <method name="is_stdout_verbose" qualifiers="const"> <return type="bool" /> <description> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index f7a3be48cf..42844794b0 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -157,7 +157,7 @@ <description> Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below. - A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. + A signal can only be connected once to a [Callable]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the callable's target is destroyed in the game's lifecycle, the connection will be lost. [b]Examples with recommended syntax:[/b] Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#. @@ -245,7 +245,7 @@ } [/csharp] [/codeblocks] - While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will throw a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will throw a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. + While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will print a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. [b]Parameter bindings and passing:[/b] For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a [code]binds[/code] [Array] to [method Object.connect] or [method Signal.connect], or use the recommended [method Callable.bind] method to create a new callable from an existing one, with the given parameter binds. One can also pass additional parameters when emitting the signal with [method emit_signal]. The examples below show the relationship between those two types of parameters. @@ -297,7 +297,7 @@ <argument index="1" name="callable" type="Callable" /> <description> Disconnects a [code]signal[/code] from a given [code]callable[/code]. - If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. + If you try to disconnect a connection that does not exist, the method will print an error. Use [method is_connected] to ensure that the connection exists. </description> </method> <method name="emit_signal" qualifiers="vararg"> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index 1bb26045d9..fff30e0dc0 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -7,6 +7,7 @@ Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> <members> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 3b8e481519..bcaf38fd06 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -69,7 +69,7 @@ [/codeblocks] The debugger calls the callable to get the value of custom monitor. The callable must return a number. Callables are called with arguments supplied in argument array. - [b]Note:[/b] It throws an error if given id is already present. + [b]Note:[/b] It prints an error if given id is already present. </description> </method> <method name="get_custom_monitor"> @@ -77,7 +77,7 @@ <argument index="0" name="id" type="StringName" /> <description> Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. - [b]Note:[/b] It throws an error if the given id is absent. + [b]Note:[/b] It prints an error if the given id is absent. </description> </method> <method name="get_custom_monitor_names"> @@ -119,7 +119,7 @@ <argument index="0" name="id" type="StringName" /> <description> Removes the custom monitor with given id. - [b]Note:[/b] It throws an error if the given id is already absent. + [b]Note:[/b] It prints an error if the given id is already absent. </description> </method> </methods> diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 3e85074e41..716eaaeeba 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -12,7 +12,7 @@ </tutorials> <members> <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> - Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky. + The amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible for your given sky settings, as higher amounts may add fuzziness to the sky. </member> <member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1"> Sets the exposure of the sky. Higher exposure values make the entire sky brighter. diff --git a/doc/classes/PlaceholderCubemap.xml b/doc/classes/PlaceholderCubemap.xml new file mode 100644 index 0000000000..3617c6ac2c --- /dev/null +++ b/doc/classes/PlaceholderCubemap.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderCubemap" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderCubemapArray.xml b/doc/classes/PlaceholderCubemapArray.xml new file mode 100644 index 0000000000..1fcf1e7795 --- /dev/null +++ b/doc/classes/PlaceholderCubemapArray.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderCubemapArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderMaterial.xml b/doc/classes/PlaceholderMaterial.xml new file mode 100644 index 0000000000..c66641d81c --- /dev/null +++ b/doc/classes/PlaceholderMaterial.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderMesh.xml b/doc/classes/PlaceholderMesh.xml new file mode 100644 index 0000000000..cc688816b6 --- /dev/null +++ b/doc/classes/PlaceholderMesh.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> + </member> + </members> +</class> diff --git a/doc/classes/PlaceholderTexture2D.xml b/doc/classes/PlaceholderTexture2D.xml new file mode 100644 index 0000000000..76e575265b --- /dev/null +++ b/doc/classes/PlaceholderTexture2D.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> + </member> + </members> +</class> diff --git a/doc/classes/PlaceholderTexture2DArray.xml b/doc/classes/PlaceholderTexture2DArray.xml new file mode 100644 index 0000000000..a502e5d334 --- /dev/null +++ b/doc/classes/PlaceholderTexture2DArray.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTexture2DArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderTexture3D.xml b/doc/classes/PlaceholderTexture3D.xml new file mode 100644 index 0000000000..d31e538307 --- /dev/null +++ b/doc/classes/PlaceholderTexture3D.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="size" type="Vector3i" setter="set_size" getter="get_size" default="Vector3i(1, 1, 1)"> + </member> + </members> +</class> diff --git a/doc/classes/PlaceholderTextureLayered.xml b/doc/classes/PlaceholderTextureLayered.xml new file mode 100644 index 0000000000..39af08473a --- /dev/null +++ b/doc/classes/PlaceholderTextureLayered.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> + </member> + <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(1, 1)"> + </member> + </members> +</class> diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 10c2b11a9a..a7bfa43c52 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -12,7 +12,7 @@ <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5"> Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. </member> - <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)"> Size of the prism. </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index bf33232406..88283bcf24 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -11,6 +11,9 @@ <tutorials> </tutorials> <members> + <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> + The amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible for your given sky settings, as higher amounts may add fuzziness to the sky. + </member> <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.2, 0.169, 0.133, 1)"> Color of the ground at the bottom. Blends with [member ground_horizon_color]. </member> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 5bb83c8ffd..b8f26f75c9 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1252,6 +1252,13 @@ Returns the id of the test texture. Creates one if none exists. </description> </method> + <method name="get_video_adapter_api_version" qualifiers="const"> + <return type="String" /> + <description> + Returns the version of the graphics video adapter [i]currently in use[/i] (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> <method name="get_video_adapter_name" qualifiers="const"> <return type="String" /> <description> @@ -4159,16 +4166,17 @@ Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. </constant> <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> - Output color as they came in. + Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. </constant> <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> - Use the Reinhard tonemapper. + Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull. </constant> <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> - Use the filmic tonemapper. + Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant ENV_TONE_MAPPER_REINHARD]. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> - Use the ACES tonemapper. + Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC]. + [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x. </constant> <constant name="ENV_SSR_ROUGHNESS_QUALITY_DISABLED" value="0" enum="EnvironmentSSRRoughnessQuality"> Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index ddff766b17..970f5125cd 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -91,6 +91,7 @@ <return type="Node" /> <argument index="0" name="group" type="StringName" /> <description> + Returns the first node in the specified group, or [code]null[/code] if the group is empty or does not exist. </description> </method> <method name="get_frame" qualifiers="const"> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 95255ed79f..658793c4c0 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -9,6 +9,7 @@ Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <methods> <method name="ensure_control_visible"> diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index d0549d6b52..28c9704626 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -9,7 +9,7 @@ <tutorials> </tutorials> <members> - <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> + <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> Full height of the sphere. </member> <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false"> @@ -19,7 +19,7 @@ <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> Number of radial segments on the sphere. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5"> Radius of sphere. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" default="32"> diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml index b2fcd46731..f2bc65f8df 100644 --- a/doc/classes/SplitContainer.xml +++ b/doc/classes/SplitContainer.xml @@ -7,6 +7,7 @@ Container for splitting two [Control]s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <methods> <method name="clamp_split_offset"> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 9733fa3a26..41b02b6dc9 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -75,6 +75,11 @@ <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> The size of one pixel's width on the sprite to scale it in 3D. </member> + <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> + Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects. + [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false"> If [code]true[/code], the [Light3D] in the [Environment] has effects on the sprite. </member> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 011b716dfc..10b5f730ad 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -9,6 +9,7 @@ [b]Note:[/b] The drawing of the clickable tabs themselves is handled by this node. Adding [TabBar]s as children is not needed. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <methods> <method name="get_current_tab_control" qualifiers="const"> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 809992b58f..10ccad973f 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -113,7 +113,7 @@ <argument index="0" name="source_from" type="int" /> <argument index="1" name="coords_from" type="Vector2i" /> <description> - Returns the coodinate-level proxy for the given identifiers. The returned array contains the two proxie's target identifiers (source ID and atlas coords ID). + Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the TileSet has no proxy for the given identifiers, returns an empty Array. </description> </method> diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml index d3aac5fa00..5fc85c869b 100644 --- a/doc/classes/Time.xml +++ b/doc/classes/Time.xml @@ -43,7 +43,7 @@ Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). </description> </method> - <method name="get_datetime_dict_from_string" qualifiers="const"> + <method name="get_datetime_dict_from_datetime_string" qualifiers="const"> <return type="Dictionary" /> <argument index="0" name="datetime" type="String" /> <argument index="1" name="weekday" type="bool" /> @@ -68,7 +68,7 @@ The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. </description> </method> - <method name="get_datetime_string_from_dict" qualifiers="const"> + <method name="get_datetime_string_from_datetime_dict" qualifiers="const"> <return type="String" /> <argument index="0" name="datetime" type="Dictionary" /> <argument index="1" name="use_space" type="bool" /> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 3ad21ee809..8c2a5aa6d9 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -139,16 +139,16 @@ </method> <method name="rotated" qualifiers="const"> <return type="Transform2D" /> - <argument index="0" name="phi" type="float" /> + <argument index="0" name="angle" type="float" /> <description> - Rotates the transform by the given angle (in radians), using matrix multiplication. + Returns a copy of the transform rotated by the given [code]angle[/code] (in radians), using matrix multiplication. </description> </method> <method name="scaled" qualifiers="const"> <return type="Transform2D" /> <argument index="0" name="scale" type="Vector2" /> <description> - Scales the transform by the given scale factor, using matrix multiplication. + Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication. </description> </method> <method name="set_rotation"> @@ -176,7 +176,7 @@ <return type="Transform2D" /> <argument index="0" name="offset" type="Vector2" /> <description> - Translates the transform by the given offset, relative to the transform's basis vectors. + 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. </description> </method> diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 5a72dc223c..afd11b6c77 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -94,16 +94,16 @@ <method name="rotated" qualifiers="const"> <return type="Transform3D" /> <argument index="0" name="axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="1" name="angle" type="float" /> <description> - Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis 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), using matrix multiplication. The [code]axis[/code] must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> <return type="Transform3D" /> <argument index="0" name="scale" type="Vector3" /> <description> - Scales basis and origin of the transform by the given scale factor, using matrix multiplication. + Returns a copy of the transform with its basis and origin scaled by the given [code]scale[/code] factor, using matrix multiplication. </description> </method> <method name="sphere_interpolate_with" qualifiers="const"> @@ -118,7 +118,7 @@ <return type="Transform3D" /> <argument index="0" name="offset" type="Vector3" /> <description> - Translates the transform by the given offset, relative to the transform's basis vectors. + 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. </description> </method> diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml index 05fcbe967a..ddc544dc97 100644 --- a/doc/classes/TubeTrailMesh.xml +++ b/doc/classes/TubeTrailMesh.xml @@ -11,7 +11,7 @@ </member> <member name="radial_steps" type="int" setter="set_radial_steps" getter="get_radial_steps" default="8"> </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5"> </member> <member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2"> </member> diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index 4821791f50..a345668f91 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -7,6 +7,7 @@ Vertical box container. See [BoxContainer]. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <theme_items> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 32b7637c7e..b933fb2805 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -7,6 +7,7 @@ Vertical split container. See [SplitContainer]. This goes from top to bottom. </description> <tutorials> + <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> </tutorials> <theme_items> <theme_item name="autohide" data_type="constant" type="int" default="1"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index f9ef126658..6ccc0fc6a6 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -278,9 +278,9 @@ </method> <method name="rotated" qualifiers="const"> <return type="Vector2" /> - <argument index="0" name="phi" type="float" /> + <argument index="0" name="angle" type="float" /> <description> - Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad]. + Returns the vector rotated by [code]angle[/code] (in radians). See also [method @GlobalScope.deg2rad]. </description> </method> <method name="round" qualifiers="const"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 18204943fd..d907ceb52b 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -258,10 +258,10 @@ </method> <method name="rotated" qualifiers="const"> <return type="Vector3" /> - <argument index="0" name="by_axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> <description> - Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector. + Rotates this vector around a given axis by [code]angle[/code] (in radians). The axis must be a normalized vector. </description> </method> <method name="round" qualifiers="const"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index ce466b2d0f..148c6d7064 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -75,17 +75,12 @@ <return type="ViewportTexture" /> <description> Returns the viewport's texture. - [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example: - [codeblocks] - [gdscript] - var img = get_viewport().get_texture().get_image() - img.flip_y() - [/gdscript] - [csharp] - Image img = GetViewport().GetTexture().GetImage(); - img.FlipY(); - [/csharp] - [/codeblocks] + [b]Note:[/b] When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. [method Node._ready]. To make sure the texture you get is correct, you can await [signal RenderingServer.frame_post_draw] signal. + [codeblock] + func _ready(): + await RenderingServer.frame_post_draw + $Viewport.get_texture().get_image().save_png("user://Screenshot.png") + [/codeblock] </description> </method> <method name="get_viewport_rid" qualifiers="const"> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index 4a73b1662e..6116e0df68 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -24,7 +24,13 @@ return vec3(max3, max3, max3); [/codeblock] </constant> - <constant name="FUNC_SEPIA" value="1" enum="Function"> + <constant name="FUNC_HSV2RGB" value="1" enum="Function"> + Converts HSV vector to RGB equivalent. + </constant> + <constant name="FUNC_RGB2HSV" value="2" enum="Function"> + Converts RGB vector to HSV equivalent. + </constant> + <constant name="FUNC_SEPIA" value="3" enum="Function"> Applies sepia tone effect using the following formula: [codeblock] vec3 c = input; @@ -34,7 +40,7 @@ return vec3(r, g, b); [/codeblock] </constant> - <constant name="FUNC_MAX" value="2" enum="Function"> + <constant name="FUNC_MAX" value="4" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index dc6628a9af..bc4e12c0b3 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -26,100 +26,94 @@ <constant name="FUNC_RECIPROCAL" value="3" enum="Function"> Returns [code]1/vector[/code]. </constant> - <constant name="FUNC_RGB2HSV" value="4" enum="Function"> - Converts RGB vector to HSV equivalent. - </constant> - <constant name="FUNC_HSV2RGB" value="5" enum="Function"> - Converts HSV vector to RGB equivalent. - </constant> - <constant name="FUNC_ABS" value="6" enum="Function"> + <constant name="FUNC_ABS" value="4" enum="Function"> Returns the absolute value of the parameter. </constant> - <constant name="FUNC_ACOS" value="7" enum="Function"> + <constant name="FUNC_ACOS" value="5" enum="Function"> Returns the arc-cosine of the parameter. </constant> - <constant name="FUNC_ACOSH" value="8" enum="Function"> + <constant name="FUNC_ACOSH" value="6" enum="Function"> Returns the inverse hyperbolic cosine of the parameter. </constant> - <constant name="FUNC_ASIN" value="9" enum="Function"> + <constant name="FUNC_ASIN" value="7" enum="Function"> Returns the arc-sine of the parameter. </constant> - <constant name="FUNC_ASINH" value="10" enum="Function"> + <constant name="FUNC_ASINH" value="8" enum="Function"> Returns the inverse hyperbolic sine of the parameter. </constant> - <constant name="FUNC_ATAN" value="11" enum="Function"> + <constant name="FUNC_ATAN" value="9" enum="Function"> Returns the arc-tangent of the parameter. </constant> - <constant name="FUNC_ATANH" value="12" enum="Function"> + <constant name="FUNC_ATANH" value="10" enum="Function"> Returns the inverse hyperbolic tangent of the parameter. </constant> - <constant name="FUNC_CEIL" value="13" enum="Function"> + <constant name="FUNC_CEIL" value="11" enum="Function"> Finds the nearest integer that is greater than or equal to the parameter. </constant> - <constant name="FUNC_COS" value="14" enum="Function"> + <constant name="FUNC_COS" value="12" enum="Function"> Returns the cosine of the parameter. </constant> - <constant name="FUNC_COSH" value="15" enum="Function"> + <constant name="FUNC_COSH" value="13" enum="Function"> Returns the hyperbolic cosine of the parameter. </constant> - <constant name="FUNC_DEGREES" value="16" enum="Function"> + <constant name="FUNC_DEGREES" value="14" enum="Function"> Converts a quantity in radians to degrees. </constant> - <constant name="FUNC_EXP" value="17" enum="Function"> + <constant name="FUNC_EXP" value="15" enum="Function"> Base-e Exponential. </constant> - <constant name="FUNC_EXP2" value="18" enum="Function"> + <constant name="FUNC_EXP2" value="16" enum="Function"> Base-2 Exponential. </constant> - <constant name="FUNC_FLOOR" value="19" enum="Function"> + <constant name="FUNC_FLOOR" value="17" enum="Function"> Finds the nearest integer less than or equal to the parameter. </constant> - <constant name="FUNC_FRAC" value="20" enum="Function"> + <constant name="FUNC_FRAC" value="18" enum="Function"> Computes the fractional part of the argument. </constant> - <constant name="FUNC_INVERSE_SQRT" value="21" enum="Function"> + <constant name="FUNC_INVERSE_SQRT" value="19" enum="Function"> Returns the inverse of the square root of the parameter. </constant> - <constant name="FUNC_LOG" value="22" enum="Function"> + <constant name="FUNC_LOG" value="20" enum="Function"> Natural logarithm. </constant> - <constant name="FUNC_LOG2" value="23" enum="Function"> + <constant name="FUNC_LOG2" value="21" enum="Function"> Base-2 logarithm. </constant> - <constant name="FUNC_RADIANS" value="24" enum="Function"> + <constant name="FUNC_RADIANS" value="22" enum="Function"> Converts a quantity in degrees to radians. </constant> - <constant name="FUNC_ROUND" value="25" enum="Function"> + <constant name="FUNC_ROUND" value="23" enum="Function"> Finds the nearest integer to the parameter. </constant> - <constant name="FUNC_ROUNDEVEN" value="26" enum="Function"> + <constant name="FUNC_ROUNDEVEN" value="24" enum="Function"> Finds the nearest even integer to the parameter. </constant> - <constant name="FUNC_SIGN" value="27" enum="Function"> + <constant name="FUNC_SIGN" value="25" enum="Function"> Extracts the sign of the parameter, i.e. returns [code]-1[/code] if the parameter is negative, [code]1[/code] if it's positive and [code]0[/code] otherwise. </constant> - <constant name="FUNC_SIN" value="28" enum="Function"> + <constant name="FUNC_SIN" value="26" enum="Function"> Returns the sine of the parameter. </constant> - <constant name="FUNC_SINH" value="29" enum="Function"> + <constant name="FUNC_SINH" value="27" enum="Function"> Returns the hyperbolic sine of the parameter. </constant> - <constant name="FUNC_SQRT" value="30" enum="Function"> + <constant name="FUNC_SQRT" value="28" enum="Function"> Returns the square root of the parameter. </constant> - <constant name="FUNC_TAN" value="31" enum="Function"> + <constant name="FUNC_TAN" value="29" enum="Function"> Returns the tangent of the parameter. </constant> - <constant name="FUNC_TANH" value="32" enum="Function"> + <constant name="FUNC_TANH" value="30" enum="Function"> Returns the hyperbolic tangent of the parameter. </constant> - <constant name="FUNC_TRUNC" value="33" enum="Function"> + <constant name="FUNC_TRUNC" value="31" enum="Function"> Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. </constant> - <constant name="FUNC_ONEMINUS" value="34" enum="Function"> + <constant name="FUNC_ONEMINUS" value="32" enum="Function"> Returns [code]1.0 - vector[/code]. </constant> - <constant name="FUNC_MAX" value="35" enum="Function"> + <constant name="FUNC_MAX" value="33" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> |