diff options
Diffstat (limited to 'doc/classes')
61 files changed, 421 insertions, 118 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 2d330fc935..c192cee1fe 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -331,17 +331,18 @@ <argument index="1" name="func" type="String"> </argument> <description> - Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. + Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. [codeblock] class MyCustomSorter: - static func sort(a, b): + static func sort_ascending(a, b): if a[0] < b[0]: return true return false var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] - my_items.sort_custom(MyCustomSorter, "sort") + my_items.sort_custom(MyCustomSorter, "sort_ascending") + print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]] [/codeblock] </description> </method> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 62ff0edbd2..e3e9c38419 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -23,6 +23,7 @@ The [code]MeshInstance[/code] is ready to be added to the SceneTree to be shown. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link> </tutorials> <methods> <method name="add_blend_shape"> @@ -185,6 +186,7 @@ </methods> <members> <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1"> + Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 89fc18476b..0eadf27c4d 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -21,6 +21,7 @@ <return type="AudioStreamPlayback"> </return> <description> + Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer]. </description> </method> <method name="play"> @@ -69,6 +70,7 @@ The [AudioStream] object to be played. </member> <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> + If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code]. </member> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Volume of sound, in dB. diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 4734aff770..ec3b7872b7 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -21,6 +21,7 @@ <return type="AudioStreamPlayback"> </return> <description> + Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]. </description> </method> <method name="play"> @@ -75,6 +76,7 @@ The [AudioStream] object to be played. </member> <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> + If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code]. </member> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Base volume without dampening. diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index a73f96d082..5e12e06650 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -21,6 +21,7 @@ <return type="AudioStreamPlayback"> </return> <description> + Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D]. </description> </method> <method name="play"> @@ -99,6 +100,7 @@ The [AudioStream] object to be played. </member> <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> + If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code]. </member> <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0"> Base sound level unaffected by dampening, in dB. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 21f46efe84..0128e7b220 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -112,6 +112,7 @@ The state of buttons are disabled. </constant> <constant name="DRAW_HOVER_PRESSED" value="4" enum="DrawMode"> + The state of buttons are both hovered and pressed. </constant> <constant name="ACTION_MODE_BUTTON_PRESS" value="0" enum="ActionMode"> Require just a press to consider the button clicked. diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index e68b0feb2d..cef0ee7587 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -367,5 +367,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index c8dbffb4cb..dac00051a9 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -360,5 +360,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 8372d15324..54d917c931 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -42,6 +42,7 @@ <argument index="7" name="antialiased" type="bool" default="false"> </argument> <description> + Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. </description> </method> <method name="draw_char"> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index b9ec9480cf..bbc2e44dc0 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -44,6 +44,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code]. </description> </method> <method name="get_shape_owners"> @@ -199,6 +200,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> + Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code] to [code]margin[/code] pixels. </description> </method> <method name="shape_owner_set_transform"> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index e8c78fb6bf..37116b096a 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -43,10 +43,12 @@ </signal> <signal name="picker_created"> <description> + Emitted when the [ColorPicker] is created (the button is pressed for the first time). </description> </signal> <signal name="popup_closed"> <description> + Emitted when the [ColorPicker] is closed. </description> </signal> </signals> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 75d5a72fb1..d309015453 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -504,7 +504,7 @@ <description> Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. - [b]Node:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. + [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. </description> </method> <method name="has_shader_override" qualifiers="const"> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index bce7895973..bb2c443618 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -22,6 +22,7 @@ key.save("user://generated.key") cert.save("user://generated.crt") [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 8c825c9e1c..8feb7d4809 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -6,6 +6,7 @@ <description> The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 754fafadbe..91256359fb 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -5,6 +5,7 @@ </brief_description> <description> Directory type. It is used to manage directories and their content (not restricted to the project folder). + When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking. Here is an example on how to iterate through the files of a directory: [codeblock] func dir_contents(path): diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 187e13d7bd..53ddde0e4a 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -41,7 +41,7 @@ <return type="int"> </return> <description> - Returns the total number of frames drawn. + Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_idle_frames]. </description> </method> <method name="get_frames_per_second" qualifiers="const"> @@ -51,6 +51,13 @@ Returns the frames per second of the running game. </description> </method> + <method name="get_idle_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of frames passed since engine initialization which is advanced on each [b]idle frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn]. + </description> + </method> <method name="get_license_info" qualifiers="const"> <return type="Dictionary"> </return> @@ -72,6 +79,13 @@ Returns the main loop object (see [MainLoop] and [SceneTree]). </description> </method> + <method name="get_physics_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. + </description> + </method> <method name="get_physics_interpolation_fraction" qualifiers="const"> <return type="float"> </return> @@ -85,6 +99,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments. </description> </method> <method name="get_version_info" qualifiers="const"> @@ -116,6 +131,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope. </description> </method> <method name="is_in_physics_frame" qualifiers="const"> @@ -134,6 +150,7 @@ The number of fixed iterations per second (for fixed process and physics). </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> + Controls how much physic ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. </member> <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 1feccec501..702ea0a999 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -21,6 +21,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise. </description> </method> <method name="set_glow_level"> @@ -31,132 +32,133 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables or disables the glow level at index [code]idx[/code]. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. </description> </method> </methods> <members> <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0"> - Global brightness value of the rendered scene (default value is 1). + The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> - Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. + Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0"> - Global contrast value of the rendered scene (default value is 1). + The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> - Enables the [code]adjustment_*[/code] options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. + If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> - Global color saturation value of the rendered scene (default value is 1). + 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 )"> - [Color] of the ambient light. + The ambient light's [Color]. </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> - Energy of the ambient light. The higher the value, the stronger the light. + The ambient light's energy. The higher the value, the stronger the light. </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 0 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 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false"> - Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. + 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. </member> <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> - Maximum luminance value for the auto exposure. + The maximum luminance value for the auto exposure. </member> <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05"> - Minimum luminance value for the auto exposure. + The minimum luminance value for the auto exposure. </member> <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4"> - Scale of the auto exposure effect. Affects the intensity of auto exposure. + The scale of the auto exposure effect. Affects the intensity of auto exposure. </member> <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5"> - Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. + The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1"> - The id of the camera feed to show in the background. + The ID of the camera feed to show in the background. </member> <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0"> - Maximum layer id (if using Layer background mode). + The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. </member> <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )"> - Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). + The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant BG_COLOR_SKY] background modes). </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> - Power of light emitted by the background. + The power of the light emitted by the background. </member> <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> - Defines the mode of background. + The background mode. See [enum BGMode] for possible values. </member> <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> - [Sky] resource defined as background. + The [Sky] resource defined as background. </member> <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> - [Sky] resource's custom field of view. + The [Sky] resource's custom field of view. </member> <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> - [Sky] resource's rotation expressed as a [Basis]. + The [Sky] resource's rotation expressed as a [Basis]. </member> <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as Euler angles in radians. + The [Sky] resource's rotation expressed as Euler angles in radians. </member> <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as Euler angles in degrees. + The [Sky] resource's rotation expressed as Euler angles in degrees. </member> <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1"> - Amount of far blur. + The amount of far blur for the depth-of-field effect. </member> <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> - Distance from the camera where the far blur effect affects the rendering. + The distance from the camera where the far blur effect affects the rendering. </member> <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> - Enables the far blur effect. + If [code]true[/code], enables the depth-of-field far blur effect. </member> <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the far blur quality. + The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> - Transition between no-blur area and far blur. + The length of the transition between the no-blur area and far blur. </member> <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1"> - Amount of near blur. + The amount of near blur for the depth-of-field effect. </member> <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> Distance from the camera where the near blur effect affects the rendering. </member> <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> - Enables the near blur effect. + If [code]true[/code], enables the depth-of-field near blur effect. </member> <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the near blur quality. + The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> - Transition between near blur and no-blur area. + The length of the transition between the near blur and no-blur area. </member> <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )"> - Fog's [Color]. + The fog's [Color]. </member> <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0"> - Fog's depth starting distance from the camera. + The fog's depth starting distance from the camera. </member> <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0"> - Value defining the fog depth intensity. + The fog depth's intensity curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true"> - Enables the fog depth. + If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). </member> <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="100.0"> - Fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. + The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> - Enables the fog. Needs [member fog_height_enabled] and/or [member fog_depth_enabled] to actually display fog. + If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog. </member> <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0"> - Value defining the fog height intensity. + The height fog's intensity. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false"> - Enables the fog height. + If [code]true[/code], the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader. </member> <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="0.0"> The Y coordinate where the height fog will be the most intense. If this value is greater than [member fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom. @@ -165,131 +167,151 @@ The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top. </member> <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0"> - Amount of sun that affects the fog rendering. + The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene. </member> <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )"> - Sun [Color]. + The depth fog's [Color] when looking towards the sun. </member> <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0"> - Amount of light that the fog transmits. + The intensity of the fog light transmittance effect. Amount of light that the fog transmits. </member> <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false"> - Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. + Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life. </member> <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false"> - Smooths out blockiness created by sampling higher levels. + Smooths out the blockiness created by sampling higher levels, at the cost of performance. + [b]Note:[/b] When using the GLES2 renderer, this is only available if the GPU supports the [code]GL_EXT_gpu_shader4[/code] extension. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> - Glow blending mode. + The glow blending mode. </member> <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0"> - Bloom value (global glow). + The bloom's intensity. If set to a value higher than [code]0[/code], this will make glow visible in areas darker than the [member glow_hdr_threshold]. </member> <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false"> - Enables glow rendering. + If [code]true[/code], the glow effect is enabled. </member> <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0"> + The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. </member> <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" default="2.0"> - Bleed scale of the HDR glow. + The bleed scale of the HDR glow. </member> <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0"> - Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. + The lower threshold of the HDR glow. When using the GLES2 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"> - Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. + The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. </member> <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - First level of glow (most local). + If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry). </member> <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Second level of glow. + If [code]true[/code], the 2th level of glow is enabled. </member> <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Third level of glow. + If [code]true[/code], the 3th level of glow is enabled. </member> <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Fourth level of glow. + If [code]true[/code], the 4th level of glow is enabled. </member> <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Fifth level of glow. + If [code]true[/code], the 5th level of glow is enabled. </member> <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Sixth level of glow. + If [code]true[/code], the 6th level of glow is enabled. </member> <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Seventh level of glow (most global). + If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest). </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> - Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. + The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> + The depth tolerance for screen-space reflections. </member> <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false"> + If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. </member> <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> + The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). </member> <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0"> + The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. </member> <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64"> + The maximum number of steps for screen-space reflections. Higher values are slower. </member> <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" default="true"> + If [code]true[/code], screen-space reflections will take the material roughness into account. </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. </member> <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01"> + The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion. </member> <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3"> + The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values. </member> <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )"> + The screen-space ambient occlusion color. </member> <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0"> + The screen-space ambient occlusion edge sharpness. </member> <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false"> + If [code]true[/code], the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues. </member> <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0"> + The primary screen-space ambient occlusion intensity. See also [member ssao_radius]. </member> <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0"> + The secondary screen-space ambient occlusion intensity. See also [member ssao_radius2]. </member> <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0"> + The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light. </member> <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1"> + The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower. </member> <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0"> + The primary screen-space ambient occlusion radius. </member> <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0"> + The secondary screen-space ambient occlusion radius. If set to a value higher than [code]0[/code], enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance). </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> - Default exposure for tonemap. + The default exposure used for tonemapping. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> - Tonemapping mode. + 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"> - White reference value for tonemap. + The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. </member> </members> <constants> <constant name="BG_KEEP" value="5" enum="BGMode"> - Keep on screen every pixel drawn in the background. + Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. </constant> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> - Clear the background using the project's clear color. + Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color]. </constant> <constant name="BG_COLOR" value="1" enum="BGMode"> - Clear the background using a custom clear color. + Clears the background using a custom clear color. </constant> <constant name="BG_SKY" value="2" enum="BGMode"> - Display a user-defined sky in the background. + Displays a user-defined sky in the background. </constant> <constant name="BG_COLOR_SKY" value="3" enum="BGMode"> - Clear the background using a custom clear color and allows defining a sky for shading and reflection. + Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than [constant BG_SKY] and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera). </constant> <constant name="BG_CANVAS" value="4" enum="BGMode"> - Display a [CanvasLayer] in the background. + Displays a [CanvasLayer] in the background. </constant> <constant name="BG_CAMERA_FEED" value="6" enum="BGMode"> - Display a camera feed in the background. + Displays a camera feed in the background. </constant> <constant name="BG_MAX" value="7" enum="BGMode"> Represents the size of the [enum BGMode] enum. @@ -301,10 +323,10 @@ Screen glow blending mode. Increases brightness, used frequently with bloom. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="GlowBlendMode"> - Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. + Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode"> - Replace glow blending mode. Replaces all pixels' color by the glow value. + Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> Linear tonemapper operator. Reads the linear data and passes it on unmodified. @@ -319,27 +341,34 @@ Academy Color Encoding System tonemapper operator. </constant> <constant name="DOF_BLUR_QUALITY_LOW" value="0" enum="DOFBlurQuality"> - Low depth-of-field blur quality. + Low depth-of-field blur quality (fastest). </constant> <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1" enum="DOFBlurQuality"> Medium depth-of-field blur quality. </constant> <constant name="DOF_BLUR_QUALITY_HIGH" value="2" enum="DOFBlurQuality"> - High depth-of-field blur quality. + High depth-of-field blur quality (slowest). </constant> <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur"> + No blur for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_BLUR_1x1" value="1" enum="SSAOBlur"> + 1×1 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_2x2" value="2" enum="SSAOBlur"> + 2×2 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur"> + 3×3 blur for the screen-space ambient occlusion effect (slowest). </constant> <constant name="SSAO_QUALITY_LOW" value="0" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (slowest). </constant> </constants> </class> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index f7de79913c..e751a07082 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -91,6 +91,7 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the font has an outline. </description> </method> <method name="is_distance_field_hint" qualifiers="const"> diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 3824baa4dc..dbc06f7c4f 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Geometry" inherits="Object" category="Core" version="3.2"> <brief_description> + Helper node to calculate generic geometry operations. </brief_description> <description> + Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. </description> <tutorials> </tutorials> diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index 02f2c27043..980815e5fd 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -15,6 +15,7 @@ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags"> </argument> <description> + Returns the [enum GeometryInstance.Flags] that have been set for this object. </description> </method> <method name="set_custom_aabb"> @@ -34,6 +35,7 @@ <argument index="1" name="value" type="bool"> </argument> <description> + Sets the [enum GeometryInstance.Flags] specified. See [enum GeometryInstance.Flags] for options. </description> </method> </methods> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 3041a7cb7f..802134d3b6 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -160,6 +160,7 @@ <argument index="4" name="amount" type="float"> </argument> <description> + Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property. </description> </method> <method name="set_selected"> @@ -194,12 +195,12 @@ <signals> <signal name="_begin_node_move"> <description> - Signal sent at the beginning of a GraphNode movement. + Emitted at the beginning of a GraphNode movement. </description> </signal> <signal name="_end_node_move"> <description> - Signal sent at the end of a GraphNode movement. + Emitted at the end of a GraphNode movement. </description> </signal> <signal name="connection_from_empty"> @@ -210,7 +211,7 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from input port into empty space of the graph. + Emitted when user dragging connection from input port into empty space of the graph. </description> </signal> <signal name="connection_request"> @@ -223,7 +224,7 @@ <argument index="3" name="to_slot" type="int"> </argument> <description> - Signal sent to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. + Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. </description> </signal> <signal name="connection_to_empty"> @@ -234,17 +235,17 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from output port into empty space of the graph. + Emitted when user dragging connection from output port into empty space of the graph. </description> </signal> <signal name="copy_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + C[/code]. + Emitted when the user presses [code]Ctrl + C[/code]. </description> </signal> <signal name="delete_nodes_request"> <description> - Signal sent when a GraphNode is attempted to be removed from the GraphEdit. + Emitted when a GraphNode is attempted to be removed from the GraphEdit. </description> </signal> <signal name="disconnection_request"> @@ -274,7 +275,7 @@ </signal> <signal name="paste_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + V[/code]. + Emitted when the user presses [code]Ctrl + V[/code]. </description> </signal> <signal name="popup_request"> @@ -288,6 +289,7 @@ <argument index="0" name="ofs" type="Vector2"> </argument> <description> + Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. </description> </signal> </signals> @@ -316,6 +318,10 @@ </theme_item> <theme_item name="reset" type="Texture"> </theme_item> + <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> + </theme_item> + <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> + </theme_item> <theme_item name="snap" type="Texture"> </theme_item> </theme_items> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 77b3eb1ca0..8fda9c20a5 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -170,12 +170,12 @@ <argument index="8" name="custom_right" type="Texture" default="null"> </argument> <description> - Sets properties of the slot with id [code]idx[/code]. + Sets properties of the slot with ID [code]idx[/code]. If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected. [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. - [b]Note:[/b] this method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. + [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. </description> </method> </methods> @@ -188,20 +188,27 @@ [b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container]. </member> <member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0"> + Sets the overlay shown above the GraphNode. See [enum Overlay]. </member> <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false"> + If [code]true[/code], the user can resize the GraphNode. + [b]Note:[/b] Dragging the handle will only trigger the [signal resize_request] signal, the GraphNode needs to be resized manually. </member> <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false"> + If [code]true[/code], the GraphNode is selected. </member> <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false"> + If [code]true[/code], the close button will be visible. + [b]Note:[/b] Pressing it will only trigger the [signal close_request] signal, the GraphNode needs to be removed manually. </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> + The text displayed in the GraphNode's title bar. </member> </members> <signals> <signal name="close_request"> <description> - Signal sent on closing the GraphNode. + Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]). </description> </signal> <signal name="dragged"> @@ -210,32 +217,36 @@ <argument index="1" name="to" type="Vector2"> </argument> <description> - Signal sent when the GraphNode is dragged. + Emitted when the GraphNode is dragged. </description> </signal> <signal name="offset_changed"> <description> - Signal sent when the GraphNode is moved. + Emitted when the GraphNode is moved. </description> </signal> <signal name="raise_request"> <description> - Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. + Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. </description> </signal> <signal name="resize_request"> <argument index="0" name="new_minsize" type="Vector2"> </argument> <description> + Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> </signals> <constants> <constant name="OVERLAY_DISABLED" value="0" enum="Overlay"> + No overlay is shown. </constant> <constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay"> + Show overlay set in the [code]breakpoint[/code] theme property. </constant> <constant name="OVERLAY_POSITION" value="2" enum="Overlay"> + Show overlay set in the [code]position[/code] theme property. </constant> </constants> <theme_items> diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index 14ace8bc76..90f14dd344 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -4,7 +4,7 @@ Horizontal scroll bar. </brief_description> <description> - Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max). + Horizontal version of [ScrollBar], which goes from left (min) to right (max). </description> <tutorials> </tutorials> @@ -14,22 +14,31 @@ </constants> <theme_items> <theme_item name="decrement" type="Texture"> + Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="decrement_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the decrement button. </theme_item> <theme_item name="grabber" type="StyleBox"> + Used as texture for the grabber, the draggable element representing current scroll. </theme_item> <theme_item name="grabber_highlight" type="StyleBox"> + Used when the mouse hovers over the grabber. </theme_item> <theme_item name="grabber_pressed" type="StyleBox"> + Used when the grabber is being dragged. </theme_item> <theme_item name="increment" type="Texture"> + Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="increment_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the increment button. </theme_item> <theme_item name="scroll" type="StyleBox"> + Used as background of this [ScrollBar]. </theme_item> <theme_item name="scroll_focus" type="StyleBox"> + Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> </class> diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index 802b186ef3..8a20eb99b8 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -27,6 +27,7 @@ # Print the result as hex string and array. printt(res.hex_encode(), Array(res)) [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 0303585120..612b9ed3f5 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -71,6 +71,7 @@ <argument index="0" name="bump_scale" type="float" default="1.0"> </argument> <description> + Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel. </description> </method> <method name="clear_mipmaps"> @@ -165,7 +166,7 @@ <return type="int" enum="Image.AlphaMode"> </return> <description> - Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are below a certain threshold or the maximum value. Returns [constant ALPHA_NONE] if no data for alpha values is found. + Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="expand_x2_hq2x"> @@ -405,6 +406,7 @@ <return type="Image"> </return> <description> + Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. </description> </method> <method name="save_exr" qualifiers="const"> @@ -502,8 +504,10 @@ The maximal height allowed for [Image] resources. </constant> <constant name="FORMAT_L8" value="0" enum="Format"> + Texture format with a single 8-bit depth representing luminance. </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> + OpenGL texture format with two values, luminance and alpha each stored with 8 bits. </constant> <constant name="FORMAT_R8" value="2" enum="Format"> OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8. @@ -643,26 +647,37 @@ Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. </constant> <constant name="ALPHA_NONE" value="0" enum="AlphaMode"> + Image does not have alpha. </constant> <constant name="ALPHA_BIT" value="1" enum="AlphaMode"> + Image stores alpha in a single bit. </constant> <constant name="ALPHA_BLEND" value="2" enum="AlphaMode"> + Image uses alpha. </constant> <constant name="COMPRESS_S3TC" value="0" enum="CompressMode"> + Use S3TC compression. </constant> <constant name="COMPRESS_PVRTC2" value="1" enum="CompressMode"> + Use PVRTC2 compression. </constant> <constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode"> + Use PVRTC4 compression. </constant> <constant name="COMPRESS_ETC" value="3" enum="CompressMode"> + Use ETC compression. </constant> <constant name="COMPRESS_ETC2" value="4" enum="CompressMode"> + Use ETC2 compression. </constant> <constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource"> + Source texture (before compression) is a regular texture. Default for all textures. </constant> <constant name="COMPRESS_SOURCE_SRGB" value="1" enum="CompressSource"> + Source texture (before compression) is in sRGB space. </constant> <constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource"> + Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). </constant> </constants> </class> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 6bbb402b15..5b83f943cf 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -60,6 +60,7 @@ <argument index="1" name="deadzone" type="float"> </argument> <description> + Sets a deadzone value for the action. </description> </method> <method name="add_action"> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 164932749f..c32264221d 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -21,11 +21,18 @@ Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. </description> </method> + <method name="get_floor_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> <method name="get_floor_velocity" qualifiers="const"> <return type="Vector3"> </return> <description> - Returns the velocity of the floor. Only updates when calling [method move_and_slide]. + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> @@ -86,7 +93,7 @@ </return> <argument index="0" name="linear_velocity" type="Vector3"> </argument> - <argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <argument index="2" name="stop_on_slope" type="bool" default="false"> </argument> @@ -99,7 +106,7 @@ <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code]. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. @@ -114,7 +121,7 @@ </argument> <argument index="1" name="snap" type="Vector3"> </argument> - <argument index="2" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 99a83765eb..6a3b3dabb1 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -13,11 +13,18 @@ <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> </tutorials> <methods> + <method name="get_floor_normal" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> <method name="get_floor_velocity" qualifiers="const"> <return type="Vector2"> </return> <description> - Returns the velocity of the floor. Only updates when calling [method move_and_slide]. + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> @@ -84,7 +91,7 @@ </return> <argument index="0" name="linear_velocity" type="Vector2"> </argument> - <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> </argument> <argument index="2" name="stop_on_slope" type="bool" default="false"> </argument> @@ -97,7 +104,7 @@ <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. @@ -112,7 +119,7 @@ </argument> <argument index="1" name="snap" type="Vector2"> </argument> - <argument index="2" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> </argument> <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index 6ef7c2652d..ae5bba4f06 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -16,6 +16,7 @@ <argument index="0" name="param" type="int" enum="Light.Param"> </argument> <description> + Returns the value of the specified [enum Light.Param] parameter. </description> </method> <method name="set_param"> @@ -26,6 +27,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the value of the specified [enum Light.Param] parameter. </description> </method> </methods> @@ -67,38 +69,54 @@ If [code]true[/code], the light will cast shadows. </member> <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false"> + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]. </member> </members> <constants> <constant name="PARAM_ENERGY" value="0" enum="Param"> + Constant for accessing [member light_energy]. </constant> <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param"> + Constant for accessing [member light_indirect_energy]. </constant> <constant name="PARAM_SPECULAR" value="2" enum="Param"> + Constant for accessing [member light_specular]. </constant> <constant name="PARAM_RANGE" value="3" enum="Param"> + Constant for accessing [member OmniLight.omni_range] or [member SpotLight.spot_range]. </constant> <constant name="PARAM_ATTENUATION" value="4" enum="Param"> + Constant for accessing [member OmniLight.omni_attenuation] or [member SpotLight.spot_attenuation]. </constant> <constant name="PARAM_SPOT_ANGLE" value="5" enum="Param"> + Constant for accessing [member SpotLight.spot_angle]. </constant> <constant name="PARAM_SPOT_ATTENUATION" value="6" enum="Param"> + Constant for accessing [member SpotLight.spot_angle_attenuation]. </constant> <constant name="PARAM_CONTACT_SHADOW_SIZE" value="7" enum="Param"> + Constant for accessing [member shadow_contact]. </constant> <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_max_distance]. </constant> <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_1]. </constant> <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_2]. </constant> <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_3]. </constant> <constant name="PARAM_SHADOW_NORMAL_BIAS" value="12" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_normal_bias]. </constant> <constant name="PARAM_SHADOW_BIAS" value="13" enum="Param"> + Constant for accessing [member shadow_bias]. </constant> <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale]. </constant> <constant name="PARAM_MAX" value="15" enum="Param"> Represents the size of the [enum Param] enum. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 78459d2839..31cfc15649 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -96,7 +96,7 @@ The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false"> - If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty. + If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty, which can be used to clear the text quickly. </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> If [code]true[/code], the context menu will appear when right-clicked. @@ -128,14 +128,21 @@ The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character. </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> + If [code]false[/code], it's impossible to select the text using mouse nor keyboard. </member> <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> + If [code]false[/code], using shortcuts will be disabled. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [LineEdit]. </member> </members> <signals> + <signal name="text_change_rejected"> + <description> + Emitted when trying to append text that would overflow the [member max_length]. + </description> + </signal> <signal name="text_changed"> <argument index="0" name="new_text" type="String"> </argument> @@ -192,30 +199,43 @@ </constants> <theme_items> <theme_item name="clear" type="Texture"> + Texture for the clear button. See [member clear_button_enabled]. </theme_item> <theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Color used as default tint for the clear button. </theme_item> <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Color used for the clear button when it's pressed. </theme_item> <theme_item name="cursor_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Color of the [LineEdit]'s visual cursor (caret). </theme_item> <theme_item name="focus" type="StyleBox"> + Background used when [LineEdit] has GUI focus. </theme_item> <theme_item name="font" type="Font"> + Font used for the text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default font color. </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> + Font color for selected text (inside the selection rectangle). </theme_item> <theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + Font color when editing is disabled. </theme_item> <theme_item name="minimum_spaces" type="int" default="12"> + Minimum horizontal space for the text (not counting the clear button and content margins). </theme_item> <theme_item name="normal" type="StyleBox"> + Default background for the [LineEdit]. </theme_item> <theme_item name="read_only" type="StyleBox"> + Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). </theme_item> <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + Color of the selection rectangle. </theme_item> </theme_items> </class> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 9457800825..606c898a35 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -69,6 +69,7 @@ <argument index="1" name="meta" type="Variant"> </argument> <description> + Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar). </description> </method> <method name="_idle" qualifiers="virtual"> @@ -174,7 +175,7 @@ <argument index="1" name="granted" type="bool"> </argument> <description> - Emitted when an user responds to permission request. + Emitted when a user responds to a permission request. </description> </signal> </signals> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index d4804930e1..2dd3ce5529 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -103,6 +103,7 @@ </methods> <members> <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )"> + Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit]. </member> </members> <constants> @@ -128,52 +129,76 @@ Render array as triangle fans. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + Mesh array contains vertices. All meshes require a vertex array so this should always be present. </constant> <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + Mesh array contains normals. </constant> <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + Mesh array contains tangents. </constant> <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + Mesh array contains colors. </constant> <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + Mesh array contains UVs. </constant> <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + Mesh array contains second UV. </constant> <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> + Mesh array contains bones. </constant> <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat"> + Mesh array contains bone weights. </constant> <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> + Mesh array uses indices. </constant> <constant name="ARRAY_COMPRESS_BASE" value="9" enum="ArrayFormat"> + Used internally to calculate other [code]ARRAY_COMPRESS_*[/code] enum values. Do not use. </constant> <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat"> + Flag used to mark a compressed (half float) vertex array. </constant> <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> + Flag used to mark a compressed (half float) normal array. </constant> <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat"> + Flag used to mark a compressed (half float) tangent array. </constant> <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat"> + Flag used to mark a compressed (half float) color array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat"> + Flag used to mark a compressed (half float) UV coordinates array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> + Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> + Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> + Flag used to mark that the array contains 2D vertices. </constant> <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat"> + Flag used to mark that the array uses 16-bit bones instead of 8-bit. </constant> <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat"> + Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly. </constant> <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> Array of vertices. diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index a4d2bb4295..c7cddf5977 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -66,6 +66,7 @@ [NodePath] to the [Skeleton] associated with the instance. </member> <member name="skin" type="Skin" setter="set_skin" getter="get_skin"> + Sets the skin to be used by this instance. </member> </members> <constants> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 4b38b9aa96..7f1466ccf6 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -25,6 +25,7 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the [member texture] is changed. </description> </signal> </signals> diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml index 16f16fdc8b..7dcfd2808d 100644 --- a/doc/classes/MultiMeshInstance.xml +++ b/doc/classes/MultiMeshInstance.xml @@ -10,6 +10,7 @@ <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> + <link>http://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index 8509986c3c..0c6f1a4a62 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -25,6 +25,7 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the [member texture] is changed. </description> </signal> </signals> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 221a3c22c1..7a7973684d 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -15,6 +15,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the margin identified by the given [enum Margin] constant. </description> </method> <method name="set_patch_margin"> @@ -25,6 +26,7 @@ <argument index="1" name="value" type="int"> </argument> <description> + Sets the size of the margin identified by the given [enum Margin] constant to [code]value[/code] in pixels. </description> </method> </methods> @@ -61,7 +63,7 @@ <signals> <signal name="texture_changed"> <description> - Fired when the node's texture changes. + Emitted when the node's texture changes. </description> </signal> </signals> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 71d0c1a6fe..2c44a3dfb0 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -613,9 +613,9 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the build is a debug build. - Returns [code]true[/code] when running in the editor. - Returns [code]false[/code] if the build is a release build. + Returns [code]true[/code] if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor. + Returns [code]false[/code] if the Godot binary used to run the project is a [i]release[/i] export template. + To check whether the Godot binary used to run the project is an export template (debug or release), use [code]OS.has_feature("standalone")[/code] instead. </description> </method> <method name="is_ok_left_and_cancel_right" qualifiers="const"> @@ -939,6 +939,8 @@ </member> <member name="vsync_via_compositor" type="bool" setter="set_vsync_via_compositor" getter="is_vsync_via_compositor_enabled" default="false"> If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode. + [b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. + [b]Note:[/b] This property is only implemented on Windows. </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false"> If [code]true[/code], removes the window frame. diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index 7189826385..646c2d3166 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -33,8 +33,10 @@ Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. </constant> <constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail"> + Use more detail vertically when computing the shadow. </constant> <constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail"> + Use more detail horizontally when computing the shadow. </constant> </constants> </class> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 187ad1688d..1f23649b75 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -321,5 +321,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml index 867f042cd2..83c348f6be 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PoolByteArray.xml @@ -78,6 +78,11 @@ <return type="String"> </return> <description> + Returns a hexadecimal representation of this array as a [String]. + [codeblock] + var array = PoolByteArray([11, 46, 255]) + print(array.hex_encode()) # Prints: 0b2eff + [/codeblock] </description> </method> <method name="insert"> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index c920b52df6..89039eebda 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -521,6 +521,7 @@ <argument index="1" name="state" type="int"> </argument> <description> + Sets the state of an multistate item. See [method add_multistate_item] for details. </description> </method> <method name="set_item_shortcut"> @@ -595,6 +596,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Cycle to the next state of an multistate item. See [method add_multistate_item] for details. </description> </method> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 126f11a4ed..221214409f 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -321,6 +321,9 @@ <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. </member> + <member name="debug/gdscript/warnings/standalone_ternary" type="bool" setter="" getter="" default="true"> + If [code]true[/code], enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement. + </member> <member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false"> If [code]true[/code], all warnings will be reported as if they were errors. </member> @@ -439,6 +442,7 @@ </member> <member name="display/window/vsync/vsync_via_compositor" type="bool" setter="" getter="" default="false"> If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.) + [b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. </member> <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> </member> diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 3d0fa9a0d5..2991d76bec 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -24,6 +24,8 @@ </argument> <argument index="2" name="built_in_enabled" type="bool" default="true"> </argument> + <argument index="3" name="load_enabled" type="bool" default="true"> + </argument> <description> Prefills required fields to configure the ScriptCreateDialog for use. </description> diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml index ea30b9d48c..e4ace8e8ae 100644 --- a/doc/classes/ScrollBar.xml +++ b/doc/classes/ScrollBar.xml @@ -12,6 +12,7 @@ </methods> <members> <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0"> + Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused. </member> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" /> <member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.0" /> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index ef355c4417..0f39b703ca 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -25,6 +25,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. </description> </method> <method name="property_get_revert"> @@ -33,6 +34,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the default value of the material property with given [code]name[/code]. </description> </method> <method name="set_shader_param"> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index bda0b1192d..dfa14fc512 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -19,6 +19,13 @@ <tutorials> </tutorials> <methods> + <method name="apply"> + <return type="void"> + </return> + <description> + Applies the current value of this [SpinBox]. + </description> + </method> <method name="get_line_edit"> <return type="LineEdit"> </return> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index f28192519e..2f2075074c 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -170,6 +170,7 @@ </methods> <members> <member name="frames" type="Array" setter="_set_frames" getter="_get_frames"> + Compatibility property, always equals to an empty array. </member> </members> <constants> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index b34d8d1b25..eea44ef93d 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -38,6 +38,7 @@ </argument> <description> Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code]. + [b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions. </description> </method> <method name="disconnect_from_stream"> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index 1d873ef0b1..1a11904792 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -17,18 +17,22 @@ <argument index="1" name="rect" type="Rect2"> </argument> <description> + Draws this stylebox using a [CanvasItem] with given [RID]. + You can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node. </description> </method> <method name="get_center_size" qualifiers="const"> <return type="Vector2"> </return> <description> + Returns the size of this [StyleBox] without the margins. </description> </method> <method name="get_current_item_drawn" qualifiers="const"> <return type="CanvasItem"> </return> <description> + Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment. </description> </method> <method name="get_default_margin" qualifiers="const"> @@ -37,6 +41,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the default value of the specified [enum Margin]. </description> </method> <method name="get_margin" qualifiers="const"> @@ -45,7 +50,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> - Returns the content margin offset for the specified margin. + Returns the content margin offset for the specified [enum Margin]. Positive values reduce size inwards, unlike [Control]'s margin values. </description> </method> @@ -71,6 +76,7 @@ <argument index="1" name="offset" type="float"> </argument> <description> + Sets the default value of the specified [enum Margin] to given [code]offset[/code] in pixels. </description> </method> <method name="test_mask" qualifiers="const"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 75fceac500..3deed63ae7 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -437,6 +437,12 @@ <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> + <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> + The current horizontal scroll value. + </member> + <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> + The current vertical scroll value. + </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> </member> <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index c11a48137f..aac55710fe 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Texture3D" inherits="TextureLayered" category="Core" version="3.2"> <brief_description> + Texture with 3 dimensions. </brief_description> <description> + Texture3D is a 3-dimensional texture that has a width, height, and depth. </description> <tutorials> </tutorials> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 25e40d4c1f..e56ea2325e 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -50,10 +50,13 @@ </methods> <constants> <constant name="PRIORITY_LOW" value="0" enum="Priority"> + A thread running with lower priority than normally. </constant> <constant name="PRIORITY_NORMAL" value="1" enum="Priority"> + A thread with a standard priority. </constant> <constant name="PRIORITY_HIGH" value="2" enum="Priority"> + A thread running with higher priority than normally. </constant> </constants> </class> diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index 6240178b82..add695ef2c 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.2"> <brief_description> - Vertical version of [ScrollBar], which goes from top (min) to bottom (max). + Vertical scroll bar. </brief_description> <description> + Vertical version of [ScrollBar], which goes from top (min) to bottom (max). </description> <tutorials> </tutorials> @@ -17,22 +18,31 @@ </constants> <theme_items> <theme_item name="decrement" type="Texture"> + Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="decrement_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the decrement button. </theme_item> <theme_item name="grabber" type="StyleBox"> + Used as texture for the grabber, the draggable element representing current scroll. </theme_item> <theme_item name="grabber_highlight" type="StyleBox"> + Used when the mouse hovers over the grabber. </theme_item> <theme_item name="grabber_pressed" type="StyleBox"> + Used when the grabber is being dragged. </theme_item> <theme_item name="increment" type="Texture"> + Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="increment_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the increment button. </theme_item> <theme_item name="scroll" type="StyleBox"> + Used as background of this [ScrollBar]. </theme_item> <theme_item name="scroll_focus" type="StyleBox"> + Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> </class> diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index e3c7d05fce..8636d9c8d2 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -15,6 +15,7 @@ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler"> </argument> <description> + Returns whether the enabler identified by given [enum Enabler] constant is active. </description> </method> <method name="set_enabler"> @@ -25,6 +26,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Sets active state of the enabler identified by given [enum Enabler] constant. </description> </method> </methods> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index 96f6a42cdf..095a377ccb 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -15,6 +15,7 @@ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler"> </argument> <description> + Returns whether the enabler identified by given [enum Enabler] constant is active. </description> </method> <method name="set_enabler"> @@ -25,6 +26,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Sets active state of the enabler identified by given [enum Enabler] constant. </description> </method> </methods> @@ -65,6 +67,7 @@ This enabler will stop the parent's _physics_process function. </constant> <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5" enum="Enabler"> + This enabler will stop [AnimatedSprite] nodes animations. </constant> <constant name="ENABLER_MAX" value="6" enum="Enabler"> Represents the size of the [enum Enabler] enum. diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml index 7576bf7ad8..692e051674 100644 --- a/doc/classes/VisualInstance.xml +++ b/doc/classes/VisualInstance.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualInstance" inherits="Spatial" category="Core" version="3.2"> <brief_description> + Parent of all visual 3D nodes. </brief_description> <description> + The VisualInstance is used to connect a resource to a visual representation. All visual 3D nodes inherit from the VisualInstance. In general, you should not access the VisualInstance properties directly as they are accessed and managed by the nodes that inherit from VisualInstance. VisualInstance is the node representation of the [VisualServer] instance. </description> <tutorials> </tutorials> @@ -18,12 +20,14 @@ <return type="RID"> </return> <description> + Returns the RID of the resource associated with this VisualInstance. For example, if the Node is a [MeshInstance], this will return the RID of the associated [Mesh]. </description> </method> <method name="get_instance" qualifiers="const"> <return type="RID"> </return> <description> + Returns the RID of this instance. This RID is the same as the RID returned by [method VisualServer.instance_create]. This RID is needed if you want to call [VisualServer] functions directly on this VisualInstance. </description> </method> <method name="get_layer_mask_bit" qualifiers="const"> @@ -32,6 +36,7 @@ <argument index="0" name="layer" type="int"> </argument> <description> + Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. </description> </method> <method name="get_transformed_aabb" qualifiers="const"> @@ -48,8 +53,7 @@ <argument index="0" name="base" type="RID"> </argument> <description> - Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood. - It is recommended to only use [method set_base] if you know what you're doing. + Sets the resource that is instantiated by this VisualInstance, which changes how the engine handles the VisualInstance under the hood. Equivalent to [method VisualServer.instance_set_base]. </description> </method> <method name="set_layer_mask_bit"> @@ -60,6 +64,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables a particular layer in [member layers]. </description> </method> </methods> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 6b66721237..c00710ade9 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -2045,7 +2045,7 @@ <argument index="2" name="lightmap" type="RID"> </argument> <description> - Sets the lightmap to use with this instance. + Sets the lightmap to use with this instance. </description> </method> <method name="instance_set_visible"> @@ -3371,7 +3371,7 @@ <description> Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions. Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - The scenario is the 3D world that all the visual instances exist in. + The scenario is the 3D world that all the visual instances exist in. </description> </method> <method name="scenario_set_debug"> @@ -4857,10 +4857,10 @@ Use the filmic tonemapper. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> - Use the ACES tonemapper. + Use the ACES tonemapper. </constant> <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> - Lowest quality of screen space ambient occlusion. + Lowest quality of screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> Medium quality screen space ambient occlusion. @@ -4872,7 +4872,7 @@ Disables the blur set for SSAO. Will make SSAO look noisier. </constant> <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> - Perform a 1x1 blur on the SSAO output. + Perform a 1x1 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> Performs a 2x2 blur on the SSAO output. diff --git a/doc/classes/VisualShaderNodeFresnel.xml b/doc/classes/VisualShaderNodeFresnel.xml index f79ae04abf..b71f5c6f37 100644 --- a/doc/classes/VisualShaderNodeFresnel.xml +++ b/doc/classes/VisualShaderNodeFresnel.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, false, 3, 1.0 ]" /> + <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 2, false, 3, 1.0 ]" /> </members> <constants> </constants> diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index 50e9e4e0d4..5f3e91c4e6 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -6,6 +6,7 @@ <description> The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream]. + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 533963b460..ba6a932d4f 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -4,7 +4,38 @@ Boolean built-in type. </brief_description> <description> - Boolean built-in type. + Boolean is a built-in type. It can represent any data type that is either a true or false value. You can think of it as an switch with on or off (1 or 0) setting . It's often used as part of programming logic in condition statements like [code]if[/code] statements. + [b]Note:[/b] In a code below [code]if can_shoot[/code] is equivalent of [code]if can_shoot == true[/code]. It is good practice to follow the natural spoken language structure when possible. Use [code]if can_shoot[/code] rather than [code]if can_shoot == true[/code] and use [code]if not can_shoot[/code] rather than [code]if can_shoot == false[/code]. + [codeblock] + var can_shoot = true + + func shoot(): + if can_shoot: + # Perform shooting actions here. + [/codeblock] + The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code]. + [b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed. + [codeblock] + var can_shoot = true + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + [/codeblock] + The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again. + [codeblock] + var can_shoot = true + onready var cool_down = $CoolDownTimer + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + can_shoot = false + cool_down.start() + + func _on_CoolDownTimer_timeout(): + can_shoot = true + [/codeblock] </description> <tutorials> </tutorials> |