diff options
Diffstat (limited to 'doc/classes')
237 files changed, 1895 insertions, 1626 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 552fc41318..fa118bec54 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1066,11 +1066,13 @@ <description> Returns the internal type of the given Variant object, using the [enum Variant.Type] values. [codeblock] - p = parse_json('["a", "b", "c"]') - if typeof(p) == TYPE_ARRAY: - print(p[0]) # Prints a + var json = JSON.new() + json.parse('["a", "b", "c"]') + var result = json.get_data() + if typeof(result) == TYPE_ARRAY: + print(result[0]) # Prints a else: - print("unexpected results") + print("Unexpected result") [/codeblock] </description> </method> @@ -1211,9 +1213,6 @@ <member name="InputMap" type="InputMap" setter="" getter=""> The [InputMap] singleton. </member> - <member name="JSON" type="JSON" setter="" getter=""> - The [JSON] singleton. - </member> <member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter=""> The [JavaClassWrapper] singleton. [b]Note:[/b] Only implemented on Android. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index af34a948f5..03607661df 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -257,13 +257,13 @@ </method> </methods> <members> - <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + <member name="end" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size. </member> - <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + <member name="position" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> Beginning corner. Typically has values lower than [member end]. </member> - <member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + <member name="size" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> Size from [member position] to [member end]. Typically, all components are positive. If the size is negative, you can use [method abs] to fix it. </member> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml index 9dde25028e..e179c97677 100644 --- a/doc/classes/AESContext.xml +++ b/doc/classes/AESContext.xml @@ -101,7 +101,7 @@ </argument> <argument index="1" name="key" type="PackedByteArray"> </argument> - <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray()"> </argument> <description> Start the AES context in the given [code]mode[/code]. A [code]key[/code] of either 16 or 32 bytes must always be provided, while an [code]iv[/code] (initialization vector) of exactly 16 bytes, is only needed when [code]mode[/code] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index d18419f163..7662e8368b 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -57,7 +57,7 @@ <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> The [SpriteFrames] resource containing the animation(s). </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The texture's drawing offset. </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 02203a3725..894e784397 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -213,9 +213,9 @@ </argument> <argument index="2" name="value" type="float"> </argument> - <argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)"> </argument> - <argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track. diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index abbc8cb2e6..1a6d2bd755 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -132,13 +132,13 @@ <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0"> Controls the interpolation between animations. See [enum BlendMode] constants. </member> - <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2( 1, 1 )"> + <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2(1, 1)"> The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]. </member> - <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2( -1, -1 )"> + <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2(-1, -1)"> The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]. </member> - <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0.1, 0.1 )"> + <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0.1, 0.1)"> Position increment to snap to when moving a point. </member> <member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default=""x""> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 8f87ce453f..a90e8647bb 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -17,7 +17,7 @@ </argument> <argument index="1" name="node" type="AnimationNode"> </argument> - <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later. @@ -107,7 +107,7 @@ </method> </methods> <members> - <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> + <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)"> The global offset of all sub-nodes. </member> </members> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index e08e288c59..8e070142c4 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -28,7 +28,7 @@ </argument> <argument index="1" name="node" type="AnimationNode"> </argument> - <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Adds a new node to the graph. The [code]position[/code] is used for display in the editor. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 7696f36009..8a94eee54c 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -275,7 +275,8 @@ <argument index="1" name="new_name" type="StringName"> </argument> <description> - If the currently being played animation changes, this signal will notify of such change. + Emitted when a queued animation plays after the previous animation was finished. See [method queue]. + [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree]. </description> </signal> <signal name="animation_finished"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 96333988f8..f52c810ad2 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -69,7 +69,7 @@ <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false"> If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]. </member> - <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2( 0, 1 )"> + <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2(0, 1)"> The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1"> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index a2724f3f23..cc31b6c203 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -67,7 +67,7 @@ <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false"> If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]. </member> - <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3( 0, -1, 0 )"> + <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3(0, -1, 0)"> The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index f8cbc942e6..1bbf9bcd93 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -66,7 +66,7 @@ </argument> <argument index="1" name="arrays" type="Array"> </argument> - <argument index="2" name="blend_shapes" type="Array" default="[ ]"> + <argument index="2" name="blend_shapes" type="Array" default="[]"> </argument> <argument index="3" name="lods" type="Dictionary" default="{ }"> @@ -221,7 +221,7 @@ <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 )"> + <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. </member> <member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh"> diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index 9865319419..b49c0e4278 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -18,10 +18,10 @@ <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false"> If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels. </member> - <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )"> + <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2(0, 0, 0, 0)"> The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin. </member> - <member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2( 0, 0, 0, 0 )"> + <member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2(0, 0, 0, 0)"> The AtlasTexture's used region. </member> </members> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index 917556fded..9c28a01650 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -13,23 +13,30 @@ </methods> <members> <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3"> + The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes. </member> <member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling" default="4"> + The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up. </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> - Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves). + The pitch scale to use. [code]1.0[/code] is the default pitch and plays sounds unaltered. [member pitch_scale] can range from [code]0.0[/code] (infinitely low pitch, inaudible) to [code]16[/code] (16 times higher than the initial pitch). </member> </members> <constants> <constant name="FFT_SIZE_256" value="0" enum="FFTSize"> + Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. </constant> <constant name="FFT_SIZE_512" value="1" enum="FFTSize"> + Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. </constant> <constant name="FFT_SIZE_1024" value="2" enum="FFTSize"> + Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. </constant> <constant name="FFT_SIZE_2048" value="3" enum="FFTSize"> + Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. </constant> <constant name="FFT_SIZE_4096" value="4" enum="FFTSize"> + Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. </constant> <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize"> Represents the size of the [enum FFTSize] enum. diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index 79a8932e25..10d29ff8ab 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -1,31 +1,43 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" version="4.0"> <brief_description> + Audio effect that can be used for real-time audio visualizations. </brief_description> <description> + This audio effect does not affect sound output, but can be used for real-time audio visualizations. + See also [AudioStreamGenerator] for procedurally generating sounds. </description> <tutorials> + <link title="https://godotengine.org/asset-library/asset/528">Audio Spectrum Demo</link> + <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link> </tutorials> <methods> </methods> <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0"> + The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory. </member> <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFTSize" default="2"> + The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes. </member> <member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos" default="0.01"> </member> </members> <constants> <constant name="FFT_SIZE_256" value="0" enum="FFTSize"> + Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. </constant> <constant name="FFT_SIZE_512" value="1" enum="FFTSize"> + Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. </constant> <constant name="FFT_SIZE_1024" value="2" enum="FFTSize"> + Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. </constant> <constant name="FFT_SIZE_2048" value="3" enum="FFTSize"> + Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. </constant> <constant name="FFT_SIZE_4096" value="4" enum="FFTSize"> + Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. </constant> <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize"> Represents the size of the [enum FFTSize] enum. diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index a273beb5af..8464bc8a85 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -1,18 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamGenerator" inherits="AudioStream" version="4.0"> <brief_description> + Audio stream that generates sounds procedurally. </brief_description> <description> + This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also [AudioStreamGeneratorPlayback]. + See also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis. + [b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDNative. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz. </description> <tutorials> <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> + <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link> </tutorials> <methods> </methods> <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5"> + The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up. </member> <member name="mix_rate" type="float" setter="set_mix_rate" getter="get_mix_rate" default="44100.0"> + The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality. + In games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code]. + According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality. </member> </members> <constants> diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index cd8e8735b6..503f72a048 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.0"> <brief_description> + Plays back audio generated using [AudioStreamGenerator]. </brief_description> <description> + This class is meant to be used with [AudioStreamGenerator] to play back the generated audio in real-time. </description> <tutorials> - <link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> + <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> + <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link> </tutorials> <methods> <method name="can_push_buffer" qualifiers="const"> @@ -14,18 +17,21 @@ <argument index="0" name="amount" type="int"> </argument> <description> + Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise. </description> </method> <method name="clear_buffer"> <return type="void"> </return> <description> + Clears the audio sample data buffer. </description> </method> <method name="get_frames_available" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of audio data frames left to play. If this returned number reaches [code]0[/code], the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking. </description> </method> <method name="get_skips" qualifiers="const"> @@ -40,6 +46,7 @@ <argument index="0" name="frames" type="PackedVector2Array"> </argument> <description> + Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript. </description> </method> <method name="push_frame"> @@ -48,6 +55,7 @@ <argument index="0" name="frame" type="Vector2"> </argument> <description> + Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript. </description> </method> </methods> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index c12e1bd05c..5a0e71a0f8 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -5,7 +5,7 @@ </brief_description> <description> AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped. - This class can also be used to store dynamically-generated PCM audio data. + This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation. </description> <tutorials> </tutorials> @@ -22,7 +22,7 @@ </method> </methods> <members> - <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )"> + <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()"> Contains the audio data in bytes. [b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. </member> @@ -39,7 +39,9 @@ The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> - The sample rate for mixing this audio. + The sample rate for mixing this audio. Higher values require more storage space, but result in better quality. + In games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code]. + According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality. </member> <member name="stereo" type="bool" setter="set_stereo" getter="is_stereo" default="false"> If [code]true[/code], audio is stereo. diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml index 9a70b8f20c..55ee573811 100644 --- a/doc/classes/BackBufferCopy.xml +++ b/doc/classes/BackBufferCopy.xml @@ -15,7 +15,7 @@ <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1"> Buffer mode. See [enum CopyMode] constants. </member> - <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -100, -100, 200, 200 )"> + <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2(-100, -100, 200, 200)"> The area covered by the BackBufferCopy. Only used if [member copy_mode] is [constant COPY_MODE_RECT]. </member> </members> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 49edb4c691..abe06bc7e1 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -72,7 +72,7 @@ </method> </methods> <members> - <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color( 1, 1, 1, 1 )"> + <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)"> The material's base color. </member> <member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> @@ -117,7 +117,7 @@ <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> - <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight" default="Color( 0, 0, 0, 1 )"> + <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight" default="Color(0, 0, 0, 1)"> The color used by the backlight effect. Represents the light passing through an object. </member> <member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> @@ -195,7 +195,7 @@ <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0"> Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. </member> - <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color( 0, 0, 0, 1 )"> + <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color(0, 0, 0, 1)"> The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> @@ -345,7 +345,7 @@ </member> <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0"> </member> - <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color( 1, 1, 1, 1 )"> + <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color(1, 1, 1, 1)"> </member> <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve" default="1.0"> </member> @@ -370,10 +370,10 @@ If [code]true[/code], render point size can be changed. [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size]. </member> - <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )"> + <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3(0, 0, 0)"> How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture. </member> - <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3( 1, 1, 1 )"> + <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3(1, 1, 1)"> How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function. </member> <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> @@ -385,10 +385,10 @@ <member name="uv1_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in world space rather than object local space. See also [member uv1_triplanar]. </member> - <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )"> + <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3(0, 0, 0)"> How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture. </member> - <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3( 1, 1, 1 )"> + <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3(1, 1, 1)"> How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function. </member> <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 14fca04672..bd1abe914d 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -155,6 +155,24 @@ <description> </description> </method> + <method name="operator *" qualifiers="operator"> + <return type="Basis"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + This operator multiplies all components of the [Basis], which scales it uniformly. + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Basis"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + This operator multiplies all components of the [Basis], which scales it uniformly. + </description> + </method> <method name="operator ==" qualifiers="operator"> <return type="bool"> </return> @@ -245,28 +263,28 @@ </method> </methods> <members> - <member name="x" type="Vector3" setter="" getter="" default="Vector3( 1, 0, 0 )"> + <member name="x" type="Vector3" setter="" getter="" default="Vector3(1, 0, 0)"> The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code]. </member> - <member name="y" type="Vector3" setter="" getter="" default="Vector3( 0, 1, 0 )"> + <member name="y" type="Vector3" setter="" getter="" default="Vector3(0, 1, 0)"> The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code]. </member> - <member name="z" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 1 )"> + <member name="z" type="Vector3" setter="" getter="" default="Vector3(0, 0, 1)"> The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code]. </member> </members> <constants> - <constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + <constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)"> The identity basis, with no rotation or scaling applied. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#. </constant> - <constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + <constant name="FLIP_X" value="Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)"> The basis that will flip something along the X axis when used in a transformation. </constant> - <constant name="FLIP_Y" value="Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )"> + <constant name="FLIP_Y" value="Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)"> The basis that will flip something along the Y axis when used in a transformation. </constant> - <constant name="FLIP_Z" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )"> + <constant name="FLIP_Z" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)"> The basis that will flip something along the Z axis when used in a transformation. </constant> </constants> diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index 93744ddad7..b8d5544d59 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -101,7 +101,7 @@ </method> </methods> <members> - <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest" default="Transform2D( 0, 0, 0, 0, 0, 0 )"> + <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest" default="Transform2D(0, 0, 0, 0, 0, 0)"> Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]. </member> </members> diff --git a/doc/classes/BoxMesh.xml b/doc/classes/BoxMesh.xml index 1404477b46..dda5e2f1e5 100644 --- a/doc/classes/BoxMesh.xml +++ b/doc/classes/BoxMesh.xml @@ -13,7 +13,7 @@ <methods> </methods> <members> - <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )"> + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> The box's width, height and depth. </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml index f5051413ce..5704de905b 100644 --- a/doc/classes/BoxShape3D.xml +++ b/doc/classes/BoxShape3D.xml @@ -14,7 +14,7 @@ <methods> </methods> <members> - <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )"> + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> The box's width, height and depth. </member> </members> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 51c35b15ce..c9078a4de5 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -116,22 +116,22 @@ <theme_item name="font" type="Font"> [Font] of the [Button]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [Button]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Text [Color] used when the [Button] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [Button] is being hovered. </theme_item> - <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [Button] is being hovered and pressed. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [Button]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [Button] is being pressed. </theme_item> <theme_item name="font_size" type="int"> @@ -143,19 +143,19 @@ <theme_item name="hseparation" type="int" default="2"> The horizontal space between [Button]'s icon and text. </theme_item> - <theme_item name="icon_disabled_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="icon_disabled_color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is disabled. </theme_item> - <theme_item name="icon_hover_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="icon_hover_color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is being hovered. </theme_item> - <theme_item name="icon_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="icon_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is being hovered and pressed. </theme_item> - <theme_item name="icon_normal_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="icon_normal_color" type="Color" default="Color(1, 1, 1, 1)"> Default icon modulate [Color] of the [Button]. </theme_item> - <theme_item name="icon_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="icon_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is being pressed. </theme_item> <theme_item name="normal" type="StyleBox"> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 9e70978db8..9620e9abd1 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -148,7 +148,7 @@ <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Animation speed randomness ratio. </member> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> @@ -163,7 +163,7 @@ <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Damping randomness ratio. </member> - <member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2( 1, 0 )"> + <member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)"> Unit vector specifying the particles' emission direction. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0"> @@ -199,7 +199,7 @@ <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 980 )"> + <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 980)"> Gravity applied to every particle. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 0512efa8c2..7509775d20 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -147,7 +147,7 @@ <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Animation speed randomness ratio. </member> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Unused for 3D particles. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> @@ -162,7 +162,7 @@ <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Damping randomness ratio. </member> - <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )"> + <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)"> Unit vector specifying the particles' emission direction. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles3D.DrawOrder" default="0"> @@ -171,13 +171,13 @@ <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. </member> - <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray( )"> + <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray()"> Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_normals" type="PackedVector3Array" setter="set_emission_normals" getter="get_emission_normals"> Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array( )"> + <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array()"> Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles3D.EmissionShape" default="0"> @@ -201,7 +201,7 @@ <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )"> + <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)"> Gravity applied to every particle. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml new file mode 100644 index 0000000000..8ac285c3df --- /dev/null +++ b/doc/classes/CallbackTweener.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CallbackTweener" inherits="Tweener" version="4.0"> + <brief_description> + Calls the specified method after optional delay. + </brief_description> + <description> + [CallbackTweener] is used to call a method in a tweening sequence. See [method Tween.tween_callback] for more usage information. + [b]Note:[/b] [method Tween.tween_callback] is the only correct way to create [CallbackTweener]. Any [CallbackTweener] created manually will not function correctly. + </description> + <tutorials> + </tutorials> + <methods> + <method name="set_delay"> + <return type="CallbackTweener"> + </return> + <argument index="0" name="delay" type="float"> + </argument> + <description> + Makes the callback call delayed by given time in seconds. Example: + [codeblock] + var tween = get_tree().create_tween() + tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds + [/codeblock] + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index d40567bdcb..bf1a9cc929 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -165,7 +165,7 @@ <member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000"> Top scroll limit in pixels. The camera stops moving when reaching this value. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The camera's offset, useful for looking around or camera shake animations. </member> <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1"> @@ -180,7 +180,7 @@ <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing" default="5.0"> Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code]. </member> - <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2( 1, 1 )"> + <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2(1, 1)"> The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2× zoom-in, and [code]Vector2(4, 4)[/code] for a 4× zoom-out. </member> </members> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 30f6c2b951..afba478a20 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -55,10 +55,19 @@ <argument index="0" name="world_point" type="Vector3"> </argument> <description> - Returns [code]true[/code] if the given position is behind the camera. + Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. [b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view. </description> </method> + <method name="is_position_in_frustum" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="world_point" type="Vector3"> + </argument> + <description> + Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. + </description> + </method> <method name="make_current"> <return type="void"> </return> @@ -200,7 +209,7 @@ - ~107.51 degrees in a 16:9 viewport - ~121.63 degrees in a 21:9 viewport </member> - <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )"> + <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2(0, 0)"> The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]. </member> <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 87b157db4e..d0950ae741 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -24,6 +24,21 @@ Overridable function called by the engine (if defined) to draw the canvas item. </description> </method> + <method name="draw_animation_slice"> + <return type="void"> + </return> + <argument index="0" name="animation_length" type="float"> + </argument> + <argument index="1" name="slice_begin" type="float"> + </argument> + <argument index="2" name="slice_end" type="float"> + </argument> + <argument index="3" name="offset" type="float" default="0.0"> + </argument> + <description> + Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. + </description> + </method> <method name="draw_arc"> <return type="void"> </return> @@ -60,11 +75,11 @@ </argument> <argument index="4" name="size" type="int" default="-1"> </argument> - <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="6" name="outline_size" type="int" default="0"> </argument> - <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )"> + <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> </argument> <description> Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character. @@ -90,7 +105,7 @@ </argument> <argument index="1" name="color" type="Color"> </argument> - <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> </argument> <argument index="3" name="texture" type="Texture2D" default="null"> </argument> @@ -98,6 +113,13 @@ Draws a colored polygon of any amount of points, convex or concave. </description> </method> + <method name="draw_end_animation"> + <return type="void"> + </return> + <description> + After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. + </description> + </method> <method name="draw_line"> <return type="void"> </return> @@ -120,9 +142,9 @@ </argument> <argument index="1" name="texture" type="Texture2D"> </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation. @@ -171,11 +193,11 @@ </argument> <argument index="6" name="size" type="int" default="-1"> </argument> - <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="8" name="outline_size" type="int" default="0"> </argument> - <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )"> + <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> </argument> <argument index="10" name="flags" type="int" default="51"> </argument> @@ -201,7 +223,7 @@ </argument> <argument index="1" name="colors" type="PackedColorArray"> </argument> - <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> </argument> <argument index="3" name="texture" type="Texture2D" default="null"> </argument> @@ -279,7 +301,7 @@ </argument> <argument index="1" name="rotation" type="float" default="0.0"> </argument> - <argument index="2" name="scale" type="Vector2" default="Vector2( 1, 1 )"> + <argument index="2" name="scale" type="Vector2" default="Vector2(1, 1)"> </argument> <description> Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. @@ -309,11 +331,11 @@ </argument> <argument index="5" name="size" type="int" default="-1"> </argument> - <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="7" name="outline_size" type="int" default="0"> </argument> - <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )"> + <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> </argument> <argument index="9" name="flags" type="int" default="3"> </argument> @@ -359,7 +381,7 @@ </argument> <argument index="1" name="position" type="Vector2"> </argument> - <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draws a texture at a given position. @@ -374,7 +396,7 @@ </argument> <argument index="2" name="tile" type="bool"> </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="transpose" type="bool" default="false"> </argument> @@ -391,7 +413,7 @@ </argument> <argument index="2" name="src_rect" type="Rect2"> </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="transpose" type="bool" default="false"> </argument> @@ -573,10 +595,10 @@ <member name="material" type="Material" setter="set_material" getter="get_material"> The material applied to textures on this [CanvasItem]. </member> - <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> The color applied to textures on this [CanvasItem]. </member> - <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color( 1, 1, 1, 1 )"> + <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color(1, 1, 1, 1)"> The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s. </member> <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false"> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 9d952cdba3..f4c04d7bca 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -33,7 +33,7 @@ <member name="layer" type="int" setter="set_layer" getter="get_layer" default="1"> Layer index for draw order. Lower values are drawn first. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The layer's base offset. </member> <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> @@ -42,10 +42,10 @@ <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> The layer's rotation in degrees. </member> - <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> + <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The layer's scale. </member> - <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)"> The layer's transform. </member> </members> diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml index 19f8912cd8..3540fa423f 100644 --- a/doc/classes/CanvasModulate.xml +++ b/doc/classes/CanvasModulate.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The tint color to apply. </member> </members> diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml index 0ca132746b..f7147d9f0b 100644 --- a/doc/classes/CanvasTexture.xml +++ b/doc/classes/CanvasTexture.xml @@ -13,7 +13,7 @@ </member> <member name="normal_texture" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture"> </member> - <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )"> + <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color(1, 1, 1, 1)"> </member> <member name="specular_shininess" type="float" setter="set_specular_shininess" getter="get_specular_shininess" default="1.0"> </member> diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index 7a6a18f532..1f63b530b1 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -13,7 +13,7 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)"> The color the character will be drawn with. </member> <member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0"> @@ -33,13 +33,13 @@ <member name="glyph_index" type="int" setter="set_glyph_index" getter="get_glyph_index" default="0"> Font specific glyph index. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The position offset the character will be drawn with (in pixels). </member> <member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false"> If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing. </member> - <member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )"> + <member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i(0, 0)"> Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. </member> <member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true"> diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 0e6ca073a7..fbe5c34d7d 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -107,7 +107,7 @@ <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. </member> - <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2( 0, 0 )"> + <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)"> Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. </member> <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> @@ -116,14 +116,14 @@ <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions. </member> - <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0, 0 )"> + <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0, 0)"> When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code]. </member> <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. </member> - <member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2( 0, -1 )"> + <member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2(0, -1)"> Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. </member> </members> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 790edfcad1..f6c3d68b3c 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -93,20 +93,20 @@ <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. </member> - <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3( 0, 0, 0 )"> + <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)"> Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. </member> <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3( 0, 0, 0 )"> + <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3(0, 0, 0)"> When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code]. </member> <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. </member> - <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3( 0, 1, 0 )"> + <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)"> Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. </member> </members> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 05e412e9da..90f3725172 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -35,22 +35,22 @@ <theme_item name="font" type="Font"> The [Font] to use for the [CheckBox] text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The [CheckBox] text's font color. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> The [CheckBox] text's font color when it's disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The [CheckBox] text's font color when it's hovered. </theme_item> - <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckBox] text's font color when it's hovered and pressed. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CheckBox]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckBox] text's font color when it's pressed. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 46e590a115..7fa7093b32 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -30,22 +30,22 @@ <theme_item name="font" type="Font"> The [Font] to use for the [CheckButton] text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The [CheckButton] text's font color. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> The [CheckButton] text's font color when it's disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The [CheckButton] text's font color when it's hovered. </theme_item> - <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckButton] text's font color when it's hovered and pressed. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CheckButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckButton] text's font color when it's pressed. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 860bdc7c8f..028781d313 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -9,7 +9,7 @@ <tutorials> </tutorials> <methods> - <method name="can_instance" qualifiers="const"> + <method name="can_instantiate" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="class" type="StringName"> @@ -187,7 +187,7 @@ Returns the parent class of [code]class[/code]. </description> </method> - <method name="instance" qualifiers="const"> + <method name="instantiate" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="class" type="StringName"> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 4076198df6..30fd47cdb6 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -45,7 +45,7 @@ </argument> <argument index="2" name="insert_text" type="String"> </argument> - <argument index="3" name="text_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="icon" type="Resource" default="null"> </argument> @@ -86,6 +86,15 @@ Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]. </description> </method> + <method name="can_fold_line" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. + </description> + </method> <method name="cancel_code_completion"> <return type="void"> </return> @@ -134,6 +143,36 @@ Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged. </description> </method> + <method name="do_indent"> + <return type="void"> + </return> + <description> + Perform an indent as if the user activated the "ui_text_indent" action. + </description> + </method> + <method name="do_unindent"> + <return type="void"> + </return> + <description> + Perform an unindent as if the user activated the "ui_text_unindent" action. + </description> + </method> + <method name="fold_all_lines"> + <return type="void"> + </return> + <description> + Folds all lines that are possible to be folded (see [method can_fold_line]). + </description> + </method> + <method name="fold_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Folds the given line, if possible (see [method can_fold_line]). + </description> + </method> <method name="get_bookmarked_lines" qualifiers="const"> <return type="Array"> </return> @@ -184,7 +223,7 @@ Gets the end key for a string or comment region index. </description> </method> - <method name="get_delimiter_end_postion" qualifiers="const"> + <method name="get_delimiter_end_position" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="line" type="int"> @@ -204,7 +243,7 @@ Gets the start key for a string or comment region index. </description> </method> - <method name="get_delimiter_start_postion" qualifiers="const"> + <method name="get_delimiter_start_position" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="line" type="int"> @@ -221,6 +260,13 @@ <description> </description> </method> + <method name="get_folded_lines" qualifiers="const"> + <return type="int[]"> + </return> + <description> + Return all lines that are current folded. + </description> + </method> <method name="get_text_for_code_completion" qualifiers="const"> <return type="String"> </return> @@ -246,6 +292,13 @@ Returns [code]true[/code] if string [code]start_key[/code] exists. </description> </method> + <method name="indent_lines"> + <return type="void"> + </return> + <description> + Indents selected lines, or in the case of no selection the caret line by one. + </description> + </method> <method name="is_in_comment" qualifiers="const"> <return type="int"> </return> @@ -292,6 +345,15 @@ <description> </description> </method> + <method name="is_line_folded" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Returns whether the line at the specified index is folded or not. + </description> + </method> <method name="remove_comment_delimiter"> <return type="void"> </return> @@ -376,6 +438,37 @@ <description> </description> </method> + <method name="toggle_foldable_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Toggle the folding of the code block at the given line. + </description> + </method> + <method name="unfold_all_lines"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="unfold_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Unfolds all lines that were previously folded. + </description> + </method> + <method name="unindent_lines"> + <return type="void"> + </return> + <description> + Unindents selected lines, or in the case of no selection the caret line by one. + </description> + </method> <method name="update_code_completion_options"> <return type="void"> </return> @@ -391,13 +484,13 @@ <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> Sets whether code completion is allowed. </member> - <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[ ]"> + <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[]"> Sets prefixes that will trigger code completion. </member> - <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[ ]"> + <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[]"> Sets the comment delimiters. All existing comment delimiters will be removed. </member> - <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[ ]"> + <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[]"> Sets the string delimiters. All existing string delimiters will be removed. </member> <member name="draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> @@ -410,8 +503,23 @@ </member> <member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false"> </member> + <member name="indent_automatic" type="bool" setter="set_auto_indent_enabled" getter="is_auto_indent_enabled" default="false"> + Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. + </member> + <member name="indent_automatic_prefixes" type="String[]" setter="set_auto_indent_prefixes" getter="get_auto_indent_prefixes" default="["(", ":", "[", "{"]"> + Prefixes to trigger an automatic indent. + </member> + <member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4"> + Size of tabs, if [code]indent_use_spaces[/code] is enabled the amount of spaces to use. + </member> + <member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false"> + Use spaces instead of tabs for indentation. + </member> <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" /> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[ ]" /> + <member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="true"> + Sets whether line folding is allowed. + </member> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[]" /> <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" /> <member name="zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false"> </member> @@ -452,69 +560,71 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> </theme_item> <theme_item name="bookmark" type="Texture2D"> </theme_item> - <theme_item name="bookmark_color" type="Color" default="Color( 0.5, 0.64, 1, 0.8 )"> + <theme_item name="bookmark_color" type="Color" default="Color(0.5, 0.64, 1, 0.8)"> </theme_item> - <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )"> + <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)"> </theme_item> <theme_item name="breakpoint" type="Texture2D"> </theme_item> - <theme_item name="breakpoint_color" type="Color" default="Color( 0.9, 0.29, 0.3, 1 )"> + <theme_item name="breakpoint_color" type="Color" default="Color(0.9, 0.29, 0.3, 1)"> </theme_item> <theme_item name="can_fold" type="Texture2D"> </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> - <theme_item name="caret_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> </theme_item> - <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> + <theme_item name="code_folding_color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)"> </theme_item> <theme_item name="completion" type="StyleBox"> </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )"> + <theme_item name="completion_background_color" type="Color" default="Color(0.17, 0.16, 0.2, 1)"> </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )"> + <theme_item name="completion_existing_color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)"> </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )"> + <theme_item name="completion_font_color" type="Color" default="Color(0.67, 0.67, 0.67, 1)"> </theme_item> <theme_item name="completion_lines" type="int" default="7"> </theme_item> <theme_item name="completion_max_width" type="int" default="50"> </theme_item> - <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="completion_scroll_color" type="Color" default="Color(1, 1, 1, 1)"> </theme_item> <theme_item name="completion_scroll_width" type="int" default="3"> </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )"> + <theme_item name="completion_selected_color" type="Color" default="Color(0.26, 0.26, 0.27, 1)"> </theme_item> - <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> + <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> </theme_item> <theme_item name="executing_line" type="Texture2D"> </theme_item> - <theme_item name="executing_line_color" type="Color" default="Color( 0.98, 0.89, 0.27, 1 )"> + <theme_item name="executing_line_color" type="Color" default="Color(0.98, 0.89, 0.27, 1)"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> <theme_item name="folded" type="Texture2D"> </theme_item> + <theme_item name="folded_eol_icon" type="Texture2D"> + </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CodeEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> <theme_item name="font_size" type="int"> Font size of the [CodeEdit]'s text. </theme_item> - <theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )"> + <theme_item name="line_number_color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)"> </theme_item> <theme_item name="line_spacing" type="int" default="4"> </theme_item> @@ -525,15 +635,15 @@ </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> - <theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )"> + <theme_item name="safe_line_number_color" type="Color" default="Color(0.67, 0.78, 0.67, 0.6)"> </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> </theme_item> <theme_item name="space" type="Texture2D"> </theme_item> <theme_item name="tab" type="Texture2D"> </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )"> + <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> </theme_item> </theme_items> </class> diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml index f078e4e5b0..0406c25ffd 100644 --- a/doc/classes/CodeHighlighter.xml +++ b/doc/classes/CodeHighlighter.xml @@ -149,7 +149,7 @@ <member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}"> Sets the color regions. All existing regions will be removed. The [Dictionary] key is the region start and end key, separated by a space. The value is the region color. </member> - <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )"> + <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color(0, 0, 0, 1)"> Sets color for functions. A function is a non-keyword string followed by a '('. </member> <member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}"> @@ -158,13 +158,13 @@ <member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}"> Sets the member keyword colors. All existing member keyword will be removed. The [Dictionary] key is the member keyword. The value is the member keyword color. </member> - <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )"> + <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color(0, 0, 0, 1)"> Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'. </member> - <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )"> + <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color(0, 0, 0, 1)"> Sets the color for numbers. </member> - <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )"> + <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color(0, 0, 0, 1)"> Sets the color for symbols. </member> </members> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index 242cdb8c80..4607ab3fbd 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -23,7 +23,7 @@ <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. </member> - <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()"> The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference. </member> </members> diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml index 38f4c5fe5c..cf0e55e712 100644 --- a/doc/classes/CollisionPolygon3D.xml +++ b/doc/classes/CollisionPolygon3D.xml @@ -20,7 +20,7 @@ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details. </member> - <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()"> Array of vertices which define the polygon. [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index ddff92e6fc..29c21b3213 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -139,9 +139,9 @@ <method name="clamp" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="min" type="Color" default="Color( 0, 0, 0, 0 )"> + <argument index="0" name="min" type="Color" default="Color(0, 0, 0, 0)"> </argument> - <argument index="1" name="max" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="1" name="max" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. @@ -575,442 +575,442 @@ </member> </members> <constants> - <constant name="ALICE_BLUE" value="Color( 0.94, 0.97, 1, 1 )"> + <constant name="ALICE_BLUE" value="Color(0.94, 0.97, 1, 1)"> Alice blue color. </constant> - <constant name="ANTIQUE_WHITE" value="Color( 0.98, 0.92, 0.84, 1 )"> + <constant name="ANTIQUE_WHITE" value="Color(0.98, 0.92, 0.84, 1)"> Antique white color. </constant> - <constant name="AQUA" value="Color( 0, 1, 1, 1 )"> + <constant name="AQUA" value="Color(0, 1, 1, 1)"> Aqua color. </constant> - <constant name="AQUAMARINE" value="Color( 0.5, 1, 0.83, 1 )"> + <constant name="AQUAMARINE" value="Color(0.5, 1, 0.83, 1)"> Aquamarine color. </constant> - <constant name="AZURE" value="Color( 0.94, 1, 1, 1 )"> + <constant name="AZURE" value="Color(0.94, 1, 1, 1)"> Azure color. </constant> - <constant name="BEIGE" value="Color( 0.96, 0.96, 0.86, 1 )"> + <constant name="BEIGE" value="Color(0.96, 0.96, 0.86, 1)"> Beige color. </constant> - <constant name="BISQUE" value="Color( 1, 0.89, 0.77, 1 )"> + <constant name="BISQUE" value="Color(1, 0.89, 0.77, 1)"> Bisque color. </constant> - <constant name="BLACK" value="Color( 0, 0, 0, 1 )"> + <constant name="BLACK" value="Color(0, 0, 0, 1)"> Black color. </constant> - <constant name="BLANCHED_ALMOND" value="Color( 1, 0.92, 0.8, 1 )"> + <constant name="BLANCHED_ALMOND" value="Color(1, 0.92, 0.8, 1)"> Blanched almond color. </constant> - <constant name="BLUE" value="Color( 0, 0, 1, 1 )"> + <constant name="BLUE" value="Color(0, 0, 1, 1)"> Blue color. </constant> - <constant name="BLUE_VIOLET" value="Color( 0.54, 0.17, 0.89, 1 )"> + <constant name="BLUE_VIOLET" value="Color(0.54, 0.17, 0.89, 1)"> Blue violet color. </constant> - <constant name="BROWN" value="Color( 0.65, 0.16, 0.16, 1 )"> + <constant name="BROWN" value="Color(0.65, 0.16, 0.16, 1)"> Brown color. </constant> - <constant name="BURLYWOOD" value="Color( 0.87, 0.72, 0.53, 1 )"> + <constant name="BURLYWOOD" value="Color(0.87, 0.72, 0.53, 1)"> Burlywood color. </constant> - <constant name="CADET_BLUE" value="Color( 0.37, 0.62, 0.63, 1 )"> + <constant name="CADET_BLUE" value="Color(0.37, 0.62, 0.63, 1)"> Cadet blue color. </constant> - <constant name="CHARTREUSE" value="Color( 0.5, 1, 0, 1 )"> + <constant name="CHARTREUSE" value="Color(0.5, 1, 0, 1)"> Chartreuse color. </constant> - <constant name="CHOCOLATE" value="Color( 0.82, 0.41, 0.12, 1 )"> + <constant name="CHOCOLATE" value="Color(0.82, 0.41, 0.12, 1)"> Chocolate color. </constant> - <constant name="CORAL" value="Color( 1, 0.5, 0.31, 1 )"> + <constant name="CORAL" value="Color(1, 0.5, 0.31, 1)"> Coral color. </constant> - <constant name="CORNFLOWER_BLUE" value="Color( 0.39, 0.58, 0.93, 1 )"> + <constant name="CORNFLOWER_BLUE" value="Color(0.39, 0.58, 0.93, 1)"> Cornflower blue color. </constant> - <constant name="CORNSILK" value="Color( 1, 0.97, 0.86, 1 )"> + <constant name="CORNSILK" value="Color(1, 0.97, 0.86, 1)"> Cornsilk color. </constant> - <constant name="CRIMSON" value="Color( 0.86, 0.08, 0.24, 1 )"> + <constant name="CRIMSON" value="Color(0.86, 0.08, 0.24, 1)"> Crimson color. </constant> - <constant name="CYAN" value="Color( 0, 1, 1, 1 )"> + <constant name="CYAN" value="Color(0, 1, 1, 1)"> Cyan color. </constant> - <constant name="DARK_BLUE" value="Color( 0, 0, 0.55, 1 )"> + <constant name="DARK_BLUE" value="Color(0, 0, 0.55, 1)"> Dark blue color. </constant> - <constant name="DARK_CYAN" value="Color( 0, 0.55, 0.55, 1 )"> + <constant name="DARK_CYAN" value="Color(0, 0.55, 0.55, 1)"> Dark cyan color. </constant> - <constant name="DARK_GOLDENROD" value="Color( 0.72, 0.53, 0.04, 1 )"> + <constant name="DARK_GOLDENROD" value="Color(0.72, 0.53, 0.04, 1)"> Dark goldenrod color. </constant> - <constant name="DARK_GRAY" value="Color( 0.66, 0.66, 0.66, 1 )"> + <constant name="DARK_GRAY" value="Color(0.66, 0.66, 0.66, 1)"> Dark gray color. </constant> - <constant name="DARK_GREEN" value="Color( 0, 0.39, 0, 1 )"> + <constant name="DARK_GREEN" value="Color(0, 0.39, 0, 1)"> Dark green color. </constant> - <constant name="DARK_KHAKI" value="Color( 0.74, 0.72, 0.42, 1 )"> + <constant name="DARK_KHAKI" value="Color(0.74, 0.72, 0.42, 1)"> Dark khaki color. </constant> - <constant name="DARK_MAGENTA" value="Color( 0.55, 0, 0.55, 1 )"> + <constant name="DARK_MAGENTA" value="Color(0.55, 0, 0.55, 1)"> Dark magenta color. </constant> - <constant name="DARK_OLIVE_GREEN" value="Color( 0.33, 0.42, 0.18, 1 )"> + <constant name="DARK_OLIVE_GREEN" value="Color(0.33, 0.42, 0.18, 1)"> Dark olive green color. </constant> - <constant name="DARK_ORANGE" value="Color( 1, 0.55, 0, 1 )"> + <constant name="DARK_ORANGE" value="Color(1, 0.55, 0, 1)"> Dark orange color. </constant> - <constant name="DARK_ORCHID" value="Color( 0.6, 0.2, 0.8, 1 )"> + <constant name="DARK_ORCHID" value="Color(0.6, 0.2, 0.8, 1)"> Dark orchid color. </constant> - <constant name="DARK_RED" value="Color( 0.55, 0, 0, 1 )"> + <constant name="DARK_RED" value="Color(0.55, 0, 0, 1)"> Dark red color. </constant> - <constant name="DARK_SALMON" value="Color( 0.91, 0.59, 0.48, 1 )"> + <constant name="DARK_SALMON" value="Color(0.91, 0.59, 0.48, 1)"> Dark salmon color. </constant> - <constant name="DARK_SEA_GREEN" value="Color( 0.56, 0.74, 0.56, 1 )"> + <constant name="DARK_SEA_GREEN" value="Color(0.56, 0.74, 0.56, 1)"> Dark sea green color. </constant> - <constant name="DARK_SLATE_BLUE" value="Color( 0.28, 0.24, 0.55, 1 )"> + <constant name="DARK_SLATE_BLUE" value="Color(0.28, 0.24, 0.55, 1)"> Dark slate blue color. </constant> - <constant name="DARK_SLATE_GRAY" value="Color( 0.18, 0.31, 0.31, 1 )"> + <constant name="DARK_SLATE_GRAY" value="Color(0.18, 0.31, 0.31, 1)"> Dark slate gray color. </constant> - <constant name="DARK_TURQUOISE" value="Color( 0, 0.81, 0.82, 1 )"> + <constant name="DARK_TURQUOISE" value="Color(0, 0.81, 0.82, 1)"> Dark turquoise color. </constant> - <constant name="DARK_VIOLET" value="Color( 0.58, 0, 0.83, 1 )"> + <constant name="DARK_VIOLET" value="Color(0.58, 0, 0.83, 1)"> Dark violet color. </constant> - <constant name="DEEP_PINK" value="Color( 1, 0.08, 0.58, 1 )"> + <constant name="DEEP_PINK" value="Color(1, 0.08, 0.58, 1)"> Deep pink color. </constant> - <constant name="DEEP_SKY_BLUE" value="Color( 0, 0.75, 1, 1 )"> + <constant name="DEEP_SKY_BLUE" value="Color(0, 0.75, 1, 1)"> Deep sky blue color. </constant> - <constant name="DIM_GRAY" value="Color( 0.41, 0.41, 0.41, 1 )"> + <constant name="DIM_GRAY" value="Color(0.41, 0.41, 0.41, 1)"> Dim gray color. </constant> - <constant name="DODGER_BLUE" value="Color( 0.12, 0.56, 1, 1 )"> + <constant name="DODGER_BLUE" value="Color(0.12, 0.56, 1, 1)"> Dodger blue color. </constant> - <constant name="FIREBRICK" value="Color( 0.7, 0.13, 0.13, 1 )"> + <constant name="FIREBRICK" value="Color(0.7, 0.13, 0.13, 1)"> Firebrick color. </constant> - <constant name="FLORAL_WHITE" value="Color( 1, 0.98, 0.94, 1 )"> + <constant name="FLORAL_WHITE" value="Color(1, 0.98, 0.94, 1)"> Floral white color. </constant> - <constant name="FOREST_GREEN" value="Color( 0.13, 0.55, 0.13, 1 )"> + <constant name="FOREST_GREEN" value="Color(0.13, 0.55, 0.13, 1)"> Forest green color. </constant> - <constant name="FUCHSIA" value="Color( 1, 0, 1, 1 )"> + <constant name="FUCHSIA" value="Color(1, 0, 1, 1)"> Fuchsia color. </constant> - <constant name="GAINSBORO" value="Color( 0.86, 0.86, 0.86, 1 )"> + <constant name="GAINSBORO" value="Color(0.86, 0.86, 0.86, 1)"> Gainsboro color. </constant> - <constant name="GHOST_WHITE" value="Color( 0.97, 0.97, 1, 1 )"> + <constant name="GHOST_WHITE" value="Color(0.97, 0.97, 1, 1)"> Ghost white color. </constant> - <constant name="GOLD" value="Color( 1, 0.84, 0, 1 )"> + <constant name="GOLD" value="Color(1, 0.84, 0, 1)"> Gold color. </constant> - <constant name="GOLDENROD" value="Color( 0.85, 0.65, 0.13, 1 )"> + <constant name="GOLDENROD" value="Color(0.85, 0.65, 0.13, 1)"> Goldenrod color. </constant> - <constant name="GRAY" value="Color( 0.75, 0.75, 0.75, 1 )"> + <constant name="GRAY" value="Color(0.75, 0.75, 0.75, 1)"> Gray color. </constant> - <constant name="GREEN" value="Color( 0, 1, 0, 1 )"> + <constant name="GREEN" value="Color(0, 1, 0, 1)"> Green color. </constant> - <constant name="GREEN_YELLOW" value="Color( 0.68, 1, 0.18, 1 )"> + <constant name="GREEN_YELLOW" value="Color(0.68, 1, 0.18, 1)"> Green yellow color. </constant> - <constant name="HONEYDEW" value="Color( 0.94, 1, 0.94, 1 )"> + <constant name="HONEYDEW" value="Color(0.94, 1, 0.94, 1)"> Honeydew color. </constant> - <constant name="HOT_PINK" value="Color( 1, 0.41, 0.71, 1 )"> + <constant name="HOT_PINK" value="Color(1, 0.41, 0.71, 1)"> Hot pink color. </constant> - <constant name="INDIAN_RED" value="Color( 0.8, 0.36, 0.36, 1 )"> + <constant name="INDIAN_RED" value="Color(0.8, 0.36, 0.36, 1)"> Indian red color. </constant> - <constant name="INDIGO" value="Color( 0.29, 0, 0.51, 1 )"> + <constant name="INDIGO" value="Color(0.29, 0, 0.51, 1)"> Indigo color. </constant> - <constant name="IVORY" value="Color( 1, 1, 0.94, 1 )"> + <constant name="IVORY" value="Color(1, 1, 0.94, 1)"> Ivory color. </constant> - <constant name="KHAKI" value="Color( 0.94, 0.9, 0.55, 1 )"> + <constant name="KHAKI" value="Color(0.94, 0.9, 0.55, 1)"> Khaki color. </constant> - <constant name="LAVENDER" value="Color( 0.9, 0.9, 0.98, 1 )"> + <constant name="LAVENDER" value="Color(0.9, 0.9, 0.98, 1)"> Lavender color. </constant> - <constant name="LAVENDER_BLUSH" value="Color( 1, 0.94, 0.96, 1 )"> + <constant name="LAVENDER_BLUSH" value="Color(1, 0.94, 0.96, 1)"> Lavender blush color. </constant> - <constant name="LAWN_GREEN" value="Color( 0.49, 0.99, 0, 1 )"> + <constant name="LAWN_GREEN" value="Color(0.49, 0.99, 0, 1)"> Lawn green color. </constant> - <constant name="LEMON_CHIFFON" value="Color( 1, 0.98, 0.8, 1 )"> + <constant name="LEMON_CHIFFON" value="Color(1, 0.98, 0.8, 1)"> Lemon chiffon color. </constant> - <constant name="LIGHT_BLUE" value="Color( 0.68, 0.85, 0.9, 1 )"> + <constant name="LIGHT_BLUE" value="Color(0.68, 0.85, 0.9, 1)"> Light blue color. </constant> - <constant name="LIGHT_CORAL" value="Color( 0.94, 0.5, 0.5, 1 )"> + <constant name="LIGHT_CORAL" value="Color(0.94, 0.5, 0.5, 1)"> Light coral color. </constant> - <constant name="LIGHT_CYAN" value="Color( 0.88, 1, 1, 1 )"> + <constant name="LIGHT_CYAN" value="Color(0.88, 1, 1, 1)"> Light cyan color. </constant> - <constant name="LIGHT_GOLDENROD" value="Color( 0.98, 0.98, 0.82, 1 )"> + <constant name="LIGHT_GOLDENROD" value="Color(0.98, 0.98, 0.82, 1)"> Light goldenrod color. </constant> - <constant name="LIGHT_GRAY" value="Color( 0.83, 0.83, 0.83, 1 )"> + <constant name="LIGHT_GRAY" value="Color(0.83, 0.83, 0.83, 1)"> Light gray color. </constant> - <constant name="LIGHT_GREEN" value="Color( 0.56, 0.93, 0.56, 1 )"> + <constant name="LIGHT_GREEN" value="Color(0.56, 0.93, 0.56, 1)"> Light green color. </constant> - <constant name="LIGHT_PINK" value="Color( 1, 0.71, 0.76, 1 )"> + <constant name="LIGHT_PINK" value="Color(1, 0.71, 0.76, 1)"> Light pink color. </constant> - <constant name="LIGHT_SALMON" value="Color( 1, 0.63, 0.48, 1 )"> + <constant name="LIGHT_SALMON" value="Color(1, 0.63, 0.48, 1)"> Light salmon color. </constant> - <constant name="LIGHT_SEA_GREEN" value="Color( 0.13, 0.7, 0.67, 1 )"> + <constant name="LIGHT_SEA_GREEN" value="Color(0.13, 0.7, 0.67, 1)"> Light sea green color. </constant> - <constant name="LIGHT_SKY_BLUE" value="Color( 0.53, 0.81, 0.98, 1 )"> + <constant name="LIGHT_SKY_BLUE" value="Color(0.53, 0.81, 0.98, 1)"> Light sky blue color. </constant> - <constant name="LIGHT_SLATE_GRAY" value="Color( 0.47, 0.53, 0.6, 1 )"> + <constant name="LIGHT_SLATE_GRAY" value="Color(0.47, 0.53, 0.6, 1)"> Light slate gray color. </constant> - <constant name="LIGHT_STEEL_BLUE" value="Color( 0.69, 0.77, 0.87, 1 )"> + <constant name="LIGHT_STEEL_BLUE" value="Color(0.69, 0.77, 0.87, 1)"> Light steel blue color. </constant> - <constant name="LIGHT_YELLOW" value="Color( 1, 1, 0.88, 1 )"> + <constant name="LIGHT_YELLOW" value="Color(1, 1, 0.88, 1)"> Light yellow color. </constant> - <constant name="LIME" value="Color( 0, 1, 0, 1 )"> + <constant name="LIME" value="Color(0, 1, 0, 1)"> Lime color. </constant> - <constant name="LIME_GREEN" value="Color( 0.2, 0.8, 0.2, 1 )"> + <constant name="LIME_GREEN" value="Color(0.2, 0.8, 0.2, 1)"> Lime green color. </constant> - <constant name="LINEN" value="Color( 0.98, 0.94, 0.9, 1 )"> + <constant name="LINEN" value="Color(0.98, 0.94, 0.9, 1)"> Linen color. </constant> - <constant name="MAGENTA" value="Color( 1, 0, 1, 1 )"> + <constant name="MAGENTA" value="Color(1, 0, 1, 1)"> Magenta color. </constant> - <constant name="MAROON" value="Color( 0.69, 0.19, 0.38, 1 )"> + <constant name="MAROON" value="Color(0.69, 0.19, 0.38, 1)"> Maroon color. </constant> - <constant name="MEDIUM_AQUAMARINE" value="Color( 0.4, 0.8, 0.67, 1 )"> + <constant name="MEDIUM_AQUAMARINE" value="Color(0.4, 0.8, 0.67, 1)"> Medium aquamarine color. </constant> - <constant name="MEDIUM_BLUE" value="Color( 0, 0, 0.8, 1 )"> + <constant name="MEDIUM_BLUE" value="Color(0, 0, 0.8, 1)"> Medium blue color. </constant> - <constant name="MEDIUM_ORCHID" value="Color( 0.73, 0.33, 0.83, 1 )"> + <constant name="MEDIUM_ORCHID" value="Color(0.73, 0.33, 0.83, 1)"> Medium orchid color. </constant> - <constant name="MEDIUM_PURPLE" value="Color( 0.58, 0.44, 0.86, 1 )"> + <constant name="MEDIUM_PURPLE" value="Color(0.58, 0.44, 0.86, 1)"> Medium purple color. </constant> - <constant name="MEDIUM_SEA_GREEN" value="Color( 0.24, 0.7, 0.44, 1 )"> + <constant name="MEDIUM_SEA_GREEN" value="Color(0.24, 0.7, 0.44, 1)"> Medium sea green color. </constant> - <constant name="MEDIUM_SLATE_BLUE" value="Color( 0.48, 0.41, 0.93, 1 )"> + <constant name="MEDIUM_SLATE_BLUE" value="Color(0.48, 0.41, 0.93, 1)"> Medium slate blue color. </constant> - <constant name="MEDIUM_SPRING_GREEN" value="Color( 0, 0.98, 0.6, 1 )"> + <constant name="MEDIUM_SPRING_GREEN" value="Color(0, 0.98, 0.6, 1)"> Medium spring green color. </constant> - <constant name="MEDIUM_TURQUOISE" value="Color( 0.28, 0.82, 0.8, 1 )"> + <constant name="MEDIUM_TURQUOISE" value="Color(0.28, 0.82, 0.8, 1)"> Medium turquoise color. </constant> - <constant name="MEDIUM_VIOLET_RED" value="Color( 0.78, 0.08, 0.52, 1 )"> + <constant name="MEDIUM_VIOLET_RED" value="Color(0.78, 0.08, 0.52, 1)"> Medium violet red color. </constant> - <constant name="MIDNIGHT_BLUE" value="Color( 0.1, 0.1, 0.44, 1 )"> + <constant name="MIDNIGHT_BLUE" value="Color(0.1, 0.1, 0.44, 1)"> Midnight blue color. </constant> - <constant name="MINT_CREAM" value="Color( 0.96, 1, 0.98, 1 )"> + <constant name="MINT_CREAM" value="Color(0.96, 1, 0.98, 1)"> Mint cream color. </constant> - <constant name="MISTY_ROSE" value="Color( 1, 0.89, 0.88, 1 )"> + <constant name="MISTY_ROSE" value="Color(1, 0.89, 0.88, 1)"> Misty rose color. </constant> - <constant name="MOCCASIN" value="Color( 1, 0.89, 0.71, 1 )"> + <constant name="MOCCASIN" value="Color(1, 0.89, 0.71, 1)"> Moccasin color. </constant> - <constant name="NAVAJO_WHITE" value="Color( 1, 0.87, 0.68, 1 )"> + <constant name="NAVAJO_WHITE" value="Color(1, 0.87, 0.68, 1)"> Navajo white color. </constant> - <constant name="NAVY_BLUE" value="Color( 0, 0, 0.5, 1 )"> + <constant name="NAVY_BLUE" value="Color(0, 0, 0.5, 1)"> Navy blue color. </constant> - <constant name="OLD_LACE" value="Color( 0.99, 0.96, 0.9, 1 )"> + <constant name="OLD_LACE" value="Color(0.99, 0.96, 0.9, 1)"> Old lace color. </constant> - <constant name="OLIVE" value="Color( 0.5, 0.5, 0, 1 )"> + <constant name="OLIVE" value="Color(0.5, 0.5, 0, 1)"> Olive color. </constant> - <constant name="OLIVE_DRAB" value="Color( 0.42, 0.56, 0.14, 1 )"> + <constant name="OLIVE_DRAB" value="Color(0.42, 0.56, 0.14, 1)"> Olive drab color. </constant> - <constant name="ORANGE" value="Color( 1, 0.65, 0, 1 )"> + <constant name="ORANGE" value="Color(1, 0.65, 0, 1)"> Orange color. </constant> - <constant name="ORANGE_RED" value="Color( 1, 0.27, 0, 1 )"> + <constant name="ORANGE_RED" value="Color(1, 0.27, 0, 1)"> Orange red color. </constant> - <constant name="ORCHID" value="Color( 0.85, 0.44, 0.84, 1 )"> + <constant name="ORCHID" value="Color(0.85, 0.44, 0.84, 1)"> Orchid color. </constant> - <constant name="PALE_GOLDENROD" value="Color( 0.93, 0.91, 0.67, 1 )"> + <constant name="PALE_GOLDENROD" value="Color(0.93, 0.91, 0.67, 1)"> Pale goldenrod color. </constant> - <constant name="PALE_GREEN" value="Color( 0.6, 0.98, 0.6, 1 )"> + <constant name="PALE_GREEN" value="Color(0.6, 0.98, 0.6, 1)"> Pale green color. </constant> - <constant name="PALE_TURQUOISE" value="Color( 0.69, 0.93, 0.93, 1 )"> + <constant name="PALE_TURQUOISE" value="Color(0.69, 0.93, 0.93, 1)"> Pale turquoise color. </constant> - <constant name="PALE_VIOLET_RED" value="Color( 0.86, 0.44, 0.58, 1 )"> + <constant name="PALE_VIOLET_RED" value="Color(0.86, 0.44, 0.58, 1)"> Pale violet red color. </constant> - <constant name="PAPAYA_WHIP" value="Color( 1, 0.94, 0.84, 1 )"> + <constant name="PAPAYA_WHIP" value="Color(1, 0.94, 0.84, 1)"> Papaya whip color. </constant> - <constant name="PEACH_PUFF" value="Color( 1, 0.85, 0.73, 1 )"> + <constant name="PEACH_PUFF" value="Color(1, 0.85, 0.73, 1)"> Peach puff color. </constant> - <constant name="PERU" value="Color( 0.8, 0.52, 0.25, 1 )"> + <constant name="PERU" value="Color(0.8, 0.52, 0.25, 1)"> Peru color. </constant> - <constant name="PINK" value="Color( 1, 0.75, 0.8, 1 )"> + <constant name="PINK" value="Color(1, 0.75, 0.8, 1)"> Pink color. </constant> - <constant name="PLUM" value="Color( 0.87, 0.63, 0.87, 1 )"> + <constant name="PLUM" value="Color(0.87, 0.63, 0.87, 1)"> Plum color. </constant> - <constant name="POWDER_BLUE" value="Color( 0.69, 0.88, 0.9, 1 )"> + <constant name="POWDER_BLUE" value="Color(0.69, 0.88, 0.9, 1)"> Powder blue color. </constant> - <constant name="PURPLE" value="Color( 0.63, 0.13, 0.94, 1 )"> + <constant name="PURPLE" value="Color(0.63, 0.13, 0.94, 1)"> Purple color. </constant> - <constant name="REBECCA_PURPLE" value="Color( 0.4, 0.2, 0.6, 1 )"> + <constant name="REBECCA_PURPLE" value="Color(0.4, 0.2, 0.6, 1)"> Rebecca purple color. </constant> - <constant name="RED" value="Color( 1, 0, 0, 1 )"> + <constant name="RED" value="Color(1, 0, 0, 1)"> Red color. </constant> - <constant name="ROSY_BROWN" value="Color( 0.74, 0.56, 0.56, 1 )"> + <constant name="ROSY_BROWN" value="Color(0.74, 0.56, 0.56, 1)"> Rosy brown color. </constant> - <constant name="ROYAL_BLUE" value="Color( 0.25, 0.41, 0.88, 1 )"> + <constant name="ROYAL_BLUE" value="Color(0.25, 0.41, 0.88, 1)"> Royal blue color. </constant> - <constant name="SADDLE_BROWN" value="Color( 0.55, 0.27, 0.07, 1 )"> + <constant name="SADDLE_BROWN" value="Color(0.55, 0.27, 0.07, 1)"> Saddle brown color. </constant> - <constant name="SALMON" value="Color( 0.98, 0.5, 0.45, 1 )"> + <constant name="SALMON" value="Color(0.98, 0.5, 0.45, 1)"> Salmon color. </constant> - <constant name="SANDY_BROWN" value="Color( 0.96, 0.64, 0.38, 1 )"> + <constant name="SANDY_BROWN" value="Color(0.96, 0.64, 0.38, 1)"> Sandy brown color. </constant> - <constant name="SEA_GREEN" value="Color( 0.18, 0.55, 0.34, 1 )"> + <constant name="SEA_GREEN" value="Color(0.18, 0.55, 0.34, 1)"> Sea green color. </constant> - <constant name="SEASHELL" value="Color( 1, 0.96, 0.93, 1 )"> + <constant name="SEASHELL" value="Color(1, 0.96, 0.93, 1)"> Seashell color. </constant> - <constant name="SIENNA" value="Color( 0.63, 0.32, 0.18, 1 )"> + <constant name="SIENNA" value="Color(0.63, 0.32, 0.18, 1)"> Sienna color. </constant> - <constant name="SILVER" value="Color( 0.75, 0.75, 0.75, 1 )"> + <constant name="SILVER" value="Color(0.75, 0.75, 0.75, 1)"> Silver color. </constant> - <constant name="SKY_BLUE" value="Color( 0.53, 0.81, 0.92, 1 )"> + <constant name="SKY_BLUE" value="Color(0.53, 0.81, 0.92, 1)"> Sky blue color. </constant> - <constant name="SLATE_BLUE" value="Color( 0.42, 0.35, 0.8, 1 )"> + <constant name="SLATE_BLUE" value="Color(0.42, 0.35, 0.8, 1)"> Slate blue color. </constant> - <constant name="SLATE_GRAY" value="Color( 0.44, 0.5, 0.56, 1 )"> + <constant name="SLATE_GRAY" value="Color(0.44, 0.5, 0.56, 1)"> Slate gray color. </constant> - <constant name="SNOW" value="Color( 1, 0.98, 0.98, 1 )"> + <constant name="SNOW" value="Color(1, 0.98, 0.98, 1)"> Snow color. </constant> - <constant name="SPRING_GREEN" value="Color( 0, 1, 0.5, 1 )"> + <constant name="SPRING_GREEN" value="Color(0, 1, 0.5, 1)"> Spring green color. </constant> - <constant name="STEEL_BLUE" value="Color( 0.27, 0.51, 0.71, 1 )"> + <constant name="STEEL_BLUE" value="Color(0.27, 0.51, 0.71, 1)"> Steel blue color. </constant> - <constant name="TAN" value="Color( 0.82, 0.71, 0.55, 1 )"> + <constant name="TAN" value="Color(0.82, 0.71, 0.55, 1)"> Tan color. </constant> - <constant name="TEAL" value="Color( 0, 0.5, 0.5, 1 )"> + <constant name="TEAL" value="Color(0, 0.5, 0.5, 1)"> Teal color. </constant> - <constant name="THISTLE" value="Color( 0.85, 0.75, 0.85, 1 )"> + <constant name="THISTLE" value="Color(0.85, 0.75, 0.85, 1)"> Thistle color. </constant> - <constant name="TOMATO" value="Color( 1, 0.39, 0.28, 1 )"> + <constant name="TOMATO" value="Color(1, 0.39, 0.28, 1)"> Tomato color. </constant> - <constant name="TRANSPARENT" value="Color( 1, 1, 1, 0 )"> + <constant name="TRANSPARENT" value="Color(1, 1, 1, 0)"> Transparent color (white with zero alpha). </constant> - <constant name="TURQUOISE" value="Color( 0.25, 0.88, 0.82, 1 )"> + <constant name="TURQUOISE" value="Color(0.25, 0.88, 0.82, 1)"> Turquoise color. </constant> - <constant name="VIOLET" value="Color( 0.93, 0.51, 0.93, 1 )"> + <constant name="VIOLET" value="Color(0.93, 0.51, 0.93, 1)"> Violet color. </constant> - <constant name="WEB_GRAY" value="Color( 0.5, 0.5, 0.5, 1 )"> + <constant name="WEB_GRAY" value="Color(0.5, 0.5, 0.5, 1)"> Web gray color. </constant> - <constant name="WEB_GREEN" value="Color( 0, 0.5, 0, 1 )"> + <constant name="WEB_GREEN" value="Color(0, 0.5, 0, 1)"> Web green color. </constant> - <constant name="WEB_MAROON" value="Color( 0.5, 0, 0, 1 )"> + <constant name="WEB_MAROON" value="Color(0.5, 0, 0, 1)"> Web maroon color. </constant> - <constant name="WEB_PURPLE" value="Color( 0.5, 0, 0.5, 1 )"> + <constant name="WEB_PURPLE" value="Color(0.5, 0, 0.5, 1)"> Web purple color. </constant> - <constant name="WHEAT" value="Color( 0.96, 0.87, 0.7, 1 )"> + <constant name="WHEAT" value="Color(0.96, 0.87, 0.7, 1)"> Wheat color. </constant> - <constant name="WHITE" value="Color( 1, 1, 1, 1 )"> + <constant name="WHITE" value="Color(1, 1, 1, 1)"> White color. </constant> - <constant name="WHITE_SMOKE" value="Color( 0.96, 0.96, 0.96, 1 )"> + <constant name="WHITE_SMOKE" value="Color(0.96, 0.96, 0.96, 1)"> White smoke color. </constant> - <constant name="YELLOW" value="Color( 1, 1, 0, 1 )"> + <constant name="YELLOW" value="Color(1, 1, 0, 1)"> Yellow color. </constant> - <constant name="YELLOW_GREEN" value="Color( 0.6, 0.8, 0.2, 1 )"> + <constant name="YELLOW_GREEN" value="Color(0.6, 0.8, 0.2, 1)"> Yellow green color. </constant> </constants> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index fddfd27573..2111358ef4 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -38,7 +38,7 @@ </method> </methods> <members> - <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(1, 1, 1, 1)"> The currently selected color. </member> <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false"> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index e49027e61d..09b828366f 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -28,7 +28,7 @@ </method> </methods> <members> - <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 0, 0, 0, 1 )"> + <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(0, 0, 0, 1)"> The currently selected color. </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true"> @@ -70,19 +70,19 @@ <theme_item name="font" type="Font"> [Font] of the [ColorPickerButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)"> Default text [Color] of the [ColorPickerButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.3)"> Text [Color] used when the [ColorPickerButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [ColorPickerButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [ColorPickerButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(0.8, 0.8, 0.8, 1)"> Text [Color] used when the [ColorPickerButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index 09ba4c8b26..84955fed8a 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The fill color. [codeblocks] [gdscript] diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index 9999d086da..e6b2e1845d 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array( )"> + <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array()"> The array of points that make up the [ConcavePolygonShape2D]'s line segments. </member> </members> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 8b903d8dbc..76855fc19f 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -9,7 +9,7 @@ [section] some_key=42 string_example="Hello World3D!" - a_vector=Vector3( 1, 0, 2 ) + a_vector=Vector3(1, 0, 2) [/codeblock] The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. The following example shows how to parse an INI-style file from the system, read its contents and store new values in it: diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 9d8977cef1..0253ef21df 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -27,8 +27,8 @@ </method> </methods> <members> - <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i( 200, 70 )" /> - <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i( 200, 100 )" /> + <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i(200, 70)" /> + <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i(200, 100)" /> <member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Please Confirm..."" /> </members> <constants> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 33969cf4c3..9addd5965a 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -201,14 +201,14 @@ [codeblocks] [gdscript] func _make_custom_tooltip(for_text): - var tooltip = preload("res://SomeTooltipScene.tscn").instance() + var tooltip = preload("res://SomeTooltipScene.tscn").instantiate() tooltip.get_node("Label").text = for_text return tooltip [/gdscript] [csharp] public override Godot.Control _MakeCustomTooltip(String forText) { - Node tooltip = ResourceLoader.Load<PackedScene>("res://SomeTooltipScene.tscn").Instance(); + Node tooltip = ResourceLoader.Load<PackedScene>("res://SomeTooltipScene.tscn").Instantiate(); tooltip.GetNode<Label>("Label").Text = forText; return tooltip; } @@ -395,7 +395,7 @@ <method name="get_cursor_shape" qualifiers="const"> <return type="int" enum="Control.CursorShape"> </return> - <argument index="0" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="0" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape]. @@ -549,7 +549,7 @@ <method name="get_tooltip" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="at_position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="0" name="at_position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Returns the tooltip, which will appear when the cursor is resting over this control. See [member hint_tooltip]. @@ -1140,13 +1140,13 @@ <member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position"> The node's global position, relative to the world (usually to the top-left corner of the window). </member> - <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2( 0, 0 )"> + <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)"> The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. </member> - <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2( 0, 0 )"> + <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2(0, 0)"> By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle. </member> - <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2(0, 0)"> The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset]. </member> <member name="rect_rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> @@ -1155,12 +1155,12 @@ <member name="rect_rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. </member> - <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> + <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value. [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. - [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property. + [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property. </member> - <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )"> + <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. </member> <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" default="1"> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index 42951e2158..d53900e6c5 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -21,7 +21,7 @@ </method> </methods> <members> - <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )"> + <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()"> The polygon's list of vertices. Can be in either clockwise or counterclockwise order. </member> </members> diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml index e18d716255..a5c86526b0 100644 --- a/doc/classes/ConvexPolygonShape3D.xml +++ b/doc/classes/ConvexPolygonShape3D.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array( )"> + <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array()"> The list of 3D points forming the convex polygon shape. </member> </members> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index b33f3b4ffc..c9fcbd2892 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -15,9 +15,9 @@ </return> <argument index="0" name="position" type="Vector2"> </argument> - <argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="in" type="Vector2" default="Vector2(0, 0)"> </argument> - <argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="out" type="Vector2" default="Vector2(0, 0)"> </argument> <argument index="3" name="at_position" type="int" default="-1"> </argument> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index fcd150ad57..fdf96b4262 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -15,9 +15,9 @@ </return> <argument index="0" name="position" type="Vector3"> </argument> - <argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)"> </argument> - <argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <argument index="3" name="at_position" type="int" default="-1"> </argument> diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml index 3a81e98c3a..827fb5c10c 100644 --- a/doc/classes/CylinderMesh.xml +++ b/doc/classes/CylinderMesh.xml @@ -4,7 +4,7 @@ Class representing a cylindrical [PrimitiveMesh]. </brief_description> <description> - Class representing a cylindrical [PrimitiveMesh]. This class can be used to create cones by setting either the [member top_radius] or [member bottom_radius] properties to 0.0. + Class representing a cylindrical [PrimitiveMesh]. This class can be used to create cones by setting either the [member top_radius] or [member bottom_radius] properties to [code]0.0[/code]. </description> <tutorials> </tutorials> @@ -12,19 +12,19 @@ </methods> <members> <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="1.0"> - Bottom radius of the cylinder. + Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape. </member> <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> Full height of the cylinder. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> - Number of radial segments on the cylinder. + Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" default="4"> - Number of edge rings along the height of the cylinder. + Number of edge rings along the height of the cylinder. Changing [member rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [member rings] should be kept to its default value. </member> <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" default="1.0"> - Top radius of the cylinder. + Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape. </member> </members> <constants> diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml index 14c35ae6d3..e84cea7c30 100644 --- a/doc/classes/Decal.xml +++ b/doc/classes/Decal.xml @@ -79,13 +79,13 @@ <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0"> Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity. </member> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> Sets the size of the [AABB] used by the decal. The AABB goes from [code]-extents[/code] to [code]extents[/code]. </member> <member name="lower_fade" type="float" setter="set_lower_fade" getter="get_lower_fade" default="0.3"> Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. </member> - <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> Changes the [Color] of the Decal by multiplying it with this value. </member> <member name="normal_fade" type="float" setter="set_normal_fade" getter="get_normal_fade" default="0.0"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 6c1cd37beb..ef20174ee6 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -46,7 +46,7 @@ </argument> <argument index="1" name="flags" type="int"> </argument> - <argument index="2" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="2" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)"> </argument> <description> </description> @@ -64,7 +64,7 @@ </argument> <argument index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0"> </argument> - <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)"> </argument> <description> </description> @@ -436,7 +436,7 @@ </description> </method> <method name="mouse_get_button_state" qualifiers="const"> - <return type="int"> + <return type="int" enum="MouseButton"> </return> <description> </description> @@ -650,7 +650,7 @@ </return> <argument index="0" name="existing_text" type="String"> </argument> - <argument index="1" name="position" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="1" name="position" type="Rect2" default="Rect2i(0, 0, 0, 0)"> </argument> <argument index="2" name="multiline" type="bool" default="false"> </argument> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index dcc6d6ef12..221b5e44d6 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -115,7 +115,7 @@ </argument> <argument index="2" name="billboard" type="bool" default="false"> </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method _redraw]. @@ -143,7 +143,7 @@ </argument> <argument index="1" name="default_scale" type="float" default="1"> </argument> - <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Adds an unscaled billboard for visualization. Call this function during [method _redraw]. diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index 5551326533..41c94cbbc6 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -163,7 +163,7 @@ </argument> <argument index="2" name="on_top" type="bool" default="false"> </argument> - <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden. diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 0c0439e9d3..a02d318f70 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -404,7 +404,7 @@ </argument> <description> Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. - When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. + When given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. </description> diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml index 9daa3f16bc..90eca9072b 100644 --- a/doc/classes/EditorSceneImporterMesh.xml +++ b/doc/classes/EditorSceneImporterMesh.xml @@ -22,7 +22,7 @@ </argument> <argument index="1" name="arrays" type="Array"> </argument> - <argument index="2" name="blend_shapes" type="Array" default="[ ]"> + <argument index="2" name="blend_shapes" type="Array" default="[]"> </argument> <argument index="3" name="lods" type="Dictionary" default="{ }"> @@ -168,7 +168,7 @@ </method> </methods> <members> - <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"surfaces": [ ]}"> + <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"surfaces": []}"> </member> </members> <constants> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 1147b52102..c0a8407ece 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -171,6 +171,12 @@ </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> Controls how much physics 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 smoothing 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. + [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code]. + </member> + <member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true"> + If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting. + [b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default). + [b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor. </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/EngineDebugger.xml b/doc/classes/EngineDebugger.xml index 7db36b89d0..50ccb6b075 100644 --- a/doc/classes/EngineDebugger.xml +++ b/doc/classes/EngineDebugger.xml @@ -61,7 +61,7 @@ </argument> <argument index="1" name="enable" type="bool"> </argument> - <argument index="2" name="arguments" type="Array" default="[ ]"> + <argument index="2" name="arguments" type="Array" default="[]"> </argument> <description> Calls the [code]toggle[/code] callable of the profiler with given [code]name[/code] and [code]arguments[/code]. Enables/Disables the same profiler depending on [code]enable[/code] argument. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 878535a08d..ae87a62c84 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -55,13 +55,13 @@ <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> 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 )"> + <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color(0, 0, 0, 1)"> The ambient light's [Color]. </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> The ambient light's energy. The higher the value, the stronger the light. </member> - <member name="ambient_light_occlusion_color" type="Color" setter="set_ao_color" getter="get_ao_color" default="Color( 0, 0, 0, 1 )"> + <member name="ambient_light_occlusion_color" type="Color" setter="set_ao_color" getter="get_ao_color" default="Color(0, 0, 0, 1)"> </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. @@ -89,7 +89,7 @@ <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0"> 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 )"> + <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0, 0, 0, 1)"> The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode. </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> @@ -111,7 +111,7 @@ </member> <member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0"> </member> - <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color( 0.5, 0.6, 0.7, 1 )"> + <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)"> </member> <member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0"> </member> @@ -200,7 +200,7 @@ </member> <member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> </member> - <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> + <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3(0, 0, 0)"> </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. @@ -263,7 +263,7 @@ </member> <member name="volumetric_fog_length" type="float" setter="set_volumetric_fog_length" getter="get_volumetric_fog_length" default="64.0"> </member> - <member name="volumetric_fog_light" type="Color" setter="set_volumetric_fog_light" getter="get_volumetric_fog_light" default="Color( 0, 0, 0, 1 )"> + <member name="volumetric_fog_light" type="Color" setter="set_volumetric_fog_light" getter="get_volumetric_fog_light" default="Color(0, 0, 0, 1)"> </member> <member name="volumetric_fog_light_energy" type="float" setter="set_volumetric_fog_light_energy" getter="get_volumetric_fog_light_energy" default="1.0"> </member> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index e41de4c4ed..640b45dca4 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -12,9 +12,9 @@ var expression = Expression.new() func _ready(): - $LineEdit.connect("text_entered", self, "_on_text_entered") + $LineEdit.connect("text_submitted", self, "_on_text_submitted") - func _on_text_entered(command): + func _on_text_submitted(command): var error = expression.parse(command) if error != OK: print(expression.get_error_text()) @@ -28,7 +28,7 @@ public override void _Ready() { - GetNode("LineEdit").Connect("text_entered", this, nameof(OnTextEntered)); + GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered)); } private void OnTextEntered(string command) @@ -54,7 +54,7 @@ <method name="execute"> <return type="Variant"> </return> - <argument index="0" name="inputs" type="Array" default="[ ]"> + <argument index="0" name="inputs" type="Array" default="[]"> </argument> <argument index="1" name="base_instance" type="Object" default="null"> </argument> @@ -84,7 +84,7 @@ </return> <argument index="0" name="expression" type="String"> </argument> - <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray( )"> + <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray()"> </argument> <description> Parses the expression and returns an [enum Error] code. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 966be0a981..8ccee1c82e 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -72,7 +72,7 @@ <member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4"> The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]. </member> - <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )"> + <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray()"> The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. </member> <member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true"> @@ -139,16 +139,16 @@ <theme_item name="file" type="Texture2D"> Custom icon for files. </theme_item> - <theme_item name="file_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="file_icon_modulate" type="Color" default="Color(1, 1, 1, 1)"> The color modulation applied to the file icon. </theme_item> - <theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )"> + <theme_item name="files_disabled" type="Color" default="Color(0, 0, 0, 0.7)"> The color tint for disabled files (when the [FileDialog] is used in open folder mode). </theme_item> <theme_item name="folder" type="Texture2D"> Custom icon for folders. </theme_item> - <theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="folder_icon_modulate" type="Color" default="Color(1, 1, 1, 1)"> The color modulation applied to the folder icon. </theme_item> <theme_item name="forward_folder" type="Texture2D"> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 20d5b6ce9b..186bfbb931 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -85,11 +85,11 @@ </argument> <argument index="4" name="size" type="int" default="-1"> </argument> - <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="6" name="outline_size" type="int" default="0"> </argument> - <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )"> + <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> </argument> <description> Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. @@ -113,11 +113,11 @@ </argument> <argument index="6" name="size" type="int" default="-1"> </argument> - <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="8" name="outline_size" type="int" default="0"> </argument> - <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )"> + <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> </argument> <argument index="10" name="flags" type="int" default="51"> </argument> @@ -141,11 +141,11 @@ </argument> <argument index="5" name="size" type="int" default="-1"> </argument> - <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="7" name="outline_size" type="int" default="0"> </argument> - <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )"> + <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> </argument> <argument index="9" name="flags" type="int" default="3"> </argument> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index e426c8fb36..0a2fb03750 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -61,7 +61,7 @@ </argument> <argument index="3" name="index" type="int"> </argument> - <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. @@ -82,7 +82,7 @@ </argument> <argument index="4" name="index" type="int"> </argument> - <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn. diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index ebd6d2b92c..8684a7f41a 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -80,7 +80,7 @@ </member> <member name="trail_sections" type="int" setter="set_trail_sections" getter="get_trail_sections" default="8"> </member> - <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )"> + <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2(-100, -100, 200, 200)"> The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the [b]Particles → Generate Visibility Rect[/b] editor tool. </member> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 47bdd9d745..55e9b33aa8 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -132,7 +132,7 @@ </member> <member name="transform_align" type="int" setter="set_transform_align" getter="get_transform_align" enum="GPUParticles3D.TransformAlign" default="0"> </member> - <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )"> + <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB(-4, -4, -4, 8, 8, 8)"> The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool. </member> diff --git a/doc/classes/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesAttractorBox.xml index 68616f9bbd..49e6111c29 100644 --- a/doc/classes/GPUParticlesAttractorBox.xml +++ b/doc/classes/GPUParticlesAttractorBox.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> </members> <constants> diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField.xml index cf5e375ea3..7364a4b09f 100644 --- a/doc/classes/GPUParticlesAttractorVectorField.xml +++ b/doc/classes/GPUParticlesAttractorVectorField.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> </member> diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesCollisionBox.xml index 17fc124c41..58de18556e 100644 --- a/doc/classes/GPUParticlesCollisionBox.xml +++ b/doc/classes/GPUParticlesCollisionBox.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> </members> <constants> diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField.xml index c6987515a9..0ddddda8e4 100644 --- a/doc/classes/GPUParticlesCollisionHeightField.xml +++ b/doc/classes/GPUParticlesCollisionHeightField.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_mode" getter="is_follow_camera_mode_enabled" default="false"> </member> diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF.xml index c3cbe4b1c6..7ef6f5f3cd 100644 --- a/doc/classes/GPUParticlesCollisionSDF.xml +++ b/doc/classes/GPUParticlesCollisionSDF.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF.Resolution" default="2"> </member> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index b2c3bfc3ed..667ca2dacf 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -52,25 +52,21 @@ </member> <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0"> </member> - <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0"> - The GeometryInstance3D's max LOD distance. - [b]Note:[/b] This property currently has no effect. + <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override"> + The material override for the whole geometry. + If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. </member> - <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" default="0.0"> - The GeometryInstance3D's max LOD margin. - [b]Note:[/b] This property currently has no effect. + <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0"> + Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check. </member> - <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" default="0.0"> - The GeometryInstance3D's min LOD distance. - [b]Note:[/b] This property currently has no effect. + <member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin" default="0.0"> + Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount. </member> - <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" default="0.0"> - The GeometryInstance3D's min LOD margin. - [b]Note:[/b] This property currently has no effect. + <member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end" default="0.0"> + Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check.. </member> - <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override"> - The material override for the whole geometry. - If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. + <member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin" default="0.0"> + Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount. </member> </members> <constants> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 28c647a1c3..1f1f266c59 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -87,10 +87,10 @@ </method> </methods> <members> - <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )"> + <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)"> Gradient's colors returned as a [PackedColorArray]. </member> - <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )"> + <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array(0, 1)"> Gradient's offsets returned as a [PackedFloat32Array]. </member> </members> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index b4536c0589..65701b3a6a 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -187,16 +187,19 @@ <member name="minimap_opacity" type="float" setter="set_minimap_opacity" getter="get_minimap_opacity" default="0.65"> The opacity of the minimap rectangle. </member> - <member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2( 240, 160 )"> + <member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2(240, 160)"> The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false"> If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end. </member> - <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs" default="Vector2( 0, 0 )"> + <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs" default="Vector2(0, 0)"> The scroll offset. </member> + <member name="show_zoom_label" type="bool" setter="set_show_zoom_label" getter="is_showing_zoom_label" default="false"> + If [code]true[/code], makes a label with the current zoom level visible. The zoom value is displayed in percents. + </member> <member name="snap_distance" type="int" setter="set_snap" getter="get_snap" default="20"> The snapping distance in pixels. </member> @@ -206,6 +209,15 @@ <member name="zoom" type="float" setter="set_zoom" getter="get_zoom" default="1.0"> The current zoom value. </member> + <member name="zoom_max" type="float" setter="set_zoom_max" getter="get_zoom_max" default="2.0736"> + The upper zoom limit. + </member> + <member name="zoom_min" type="float" setter="set_zoom_min" getter="get_zoom_min" default="0.232568"> + The lower zoom limit. + </member> + <member name="zoom_step" type="float" setter="set_zoom_step" getter="get_zoom_step" default="1.2"> + The step of each zoom level. + </member> </members> <signals> <signal name="begin_node_move"> @@ -317,7 +329,7 @@ <constants> </constants> <theme_items> - <theme_item name="activity" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="activity" type="Color" default="Color(1, 1, 1, 1)"> </theme_item> <theme_item name="bezier_len_neg" type="int" default="160"> </theme_item> @@ -326,10 +338,10 @@ <theme_item name="bg" type="StyleBox"> The background drawn under the grid. </theme_item> - <theme_item name="grid_major" type="Color" default="Color( 1, 1, 1, 0.2 )"> + <theme_item name="grid_major" type="Color" default="Color(1, 1, 1, 0.2)"> Color of major grid lines. </theme_item> - <theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )"> + <theme_item name="grid_minor" type="Color" default="Color(1, 1, 1, 0.05)"> Color of minor grid lines. </theme_item> <theme_item name="minimap" type="Texture2D"> @@ -349,10 +361,10 @@ <theme_item name="reset" type="Texture2D"> The icon for the zoom reset button. </theme_item> - <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> + <theme_item name="selection_fill" type="Color" default="Color(1, 1, 1, 0.3)"> The fill color of the selection rectangle. </theme_item> - <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> + <theme_item name="selection_stroke" type="Color" default="Color(1, 1, 1, 0.8)"> The outline color of the selection rectangle. </theme_item> <theme_item name="snap" type="Texture2D"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 82ba45f11a..84eda7fcea 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -285,7 +285,7 @@ <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="position_offset" type="Vector2" setter="set_position_offset" getter="get_position_offset" default="Vector2( 0, 0 )"> + <member name="position_offset" type="Vector2" setter="set_position_offset" getter="get_position_offset" default="Vector2(0, 0)"> The offset of the GraphNode, relative to the scroll offset of the [GraphEdit]. [b]Note:[/b] You cannot use position offset directly, as [GraphEdit] is a [Container]. </member> @@ -365,7 +365,7 @@ <theme_item name="close" type="Texture2D"> The icon for the close button, visible when [member show_close] is enabled. </theme_item> - <theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="close_color" type="Color" default="Color(0, 0, 0, 1)"> The color modulation applied to the close button icon. </theme_item> <theme_item name="close_offset" type="int" default="18"> @@ -396,7 +396,7 @@ <theme_item name="resizer" type="Texture2D"> The icon used for resizer, visible when [member resizable] is enabled. </theme_item> - <theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="resizer_color" type="Color" default="Color(0, 0, 0, 1)"> The color modulation applied to the resizer icon. </theme_item> <theme_item name="selectedframe" type="StyleBox"> @@ -405,7 +405,7 @@ <theme_item name="separation" type="int" default="1"> The vertical distance between ports. </theme_item> - <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)"> Color of the title text. </theme_item> <theme_item name="title_font" type="Font"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 25667d8f79..908e355db3 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -192,7 +192,7 @@ </return> <argument index="0" name="url" type="String"> </argument> - <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )"> + <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()"> </argument> <argument index="2" name="ssl_validate_domain" type="bool" default="true"> </argument> @@ -211,13 +211,13 @@ </return> <argument index="0" name="url" type="String"> </argument> - <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )"> + <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()"> </argument> <argument index="2" name="ssl_validate_domain" type="bool" default="true"> </argument> <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0"> </argument> - <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()"> </argument> <description> Creates request on the underlying [HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml index f6f2a27891..9a9d3bf8f4 100644 --- a/doc/classes/HeightMapShape3D.xml +++ b/doc/classes/HeightMapShape3D.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 0, 0, 0, 0 )"> + <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array(0, 0, 0, 0)"> Height map data, pool array must be of [member map_width] * [member map_depth] size. </member> <member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 91a07f66e0..167b90ea73 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -560,7 +560,7 @@ </method> </methods> <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PackedByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> + <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PackedByteArray(),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> Holds all the image's color data in a given format. See [enum Format] constants. </member> </members> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index ebfd32c5fb..b970070659 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -123,7 +123,7 @@ </return> <argument index="0" name="device" type="int"> </argument> - <argument index="1" name="axis" type="int"> + <argument index="1" name="axis" type="int" enum="JoyAxis"> </argument> <description> Returns the current value of the joypad axis at given index (see [enum JoyAxis]). @@ -252,7 +252,7 @@ </return> <argument index="0" name="device" type="int"> </argument> - <argument index="1" name="button" type="int"> + <argument index="1" name="button" type="int" enum="JoyButton"> </argument> <description> Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]). @@ -279,7 +279,7 @@ <method name="is_mouse_button_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="button" type="int"> + <argument index="0" name="button" type="int" enum="MouseButton"> </argument> <description> Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton]. @@ -341,7 +341,7 @@ </argument> <argument index="1" name="shape" type="int" enum="Input.CursorShape" default="0"> </argument> - <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 28c4773f51..c28c4c4282 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -90,20 +90,23 @@ Returns [code]true[/code] if this input event is an echo event (only for events of type [InputEventKey]). </description> </method> - <method name="is_pressed" qualifiers="const"> + <method name="is_match" qualifiers="const"> <return type="bool"> </return> + <argument index="0" name="event" type="InputEvent"> + </argument> + <argument index="1" name="exact_match" type="bool" default="true"> + </argument> <description> - Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + Returns [code]true[/code] if the specified [code]event[/code] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> - <method name="shortcut_match" qualifiers="const"> + <method name="is_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="event" type="InputEvent"> - </argument> <description> - Returns [code]true[/code] if the given input event is checking for the same key ([InputEventKey]), button ([InputEventJoypadButton]) or action ([InputEventAction]). + Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. </description> </method> <method name="xformed_by" qualifiers="const"> @@ -111,7 +114,7 @@ </return> <argument index="0" name="xform" type="Transform2D"> </argument> - <argument index="1" name="local_ofs" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Returns a copy of the given input event which has been offset by [code]local_ofs[/code] and transformed by [code]xform[/code]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture]. diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml index 861ec026cd..fbde318ada 100644 --- a/doc/classes/InputEventGesture.xml +++ b/doc/classes/InputEventGesture.xml @@ -10,7 +10,7 @@ <methods> </methods> <members> - <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture. </member> </members> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index b1f4836f6e..f9afe42a7a 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> + <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="JoyButton" default="0"> Button identifier. One of the [enum JoyButton] button constants. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index 39fdb14016..398b9eb6f6 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="axis" type="int" setter="set_axis" getter="get_axis" default="0"> + <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="JoyAxis" default="0"> Axis identifier. Use one of the [enum JoyAxis] axis constants. </member> <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0"> diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml index 13bb9d8b85..afc9d476da 100644 --- a/doc/classes/InputEventMIDI.xml +++ b/doc/classes/InputEventMIDI.xml @@ -17,7 +17,7 @@ </member> <member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0"> </member> - <member name="message" type="int" setter="set_message" getter="get_message" default="0"> + <member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0"> </member> <member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0"> </member> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index e54c3224da..b8043118b7 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -15,10 +15,10 @@ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0"> The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. </member> - <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2( 0, 0 )"> + <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)"> The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse. </member> </members> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index be71b42567..7a6c7410ef 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> + <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0"> The mouse button identifier, one of the [enum MouseButton] button or button wheel constants. </member> <member name="double_click" type="bool" setter="set_double_click" getter="is_double_click" default="false"> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 0f9e71adb4..881d74ac7b 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -17,14 +17,14 @@ <member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0"> Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code]. </member> - <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )"> + <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)"> The mouse position relative to the previous position (position at the last frame). [b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse. </member> - <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )"> + <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2(0, 0)"> The mouse speed in pixels per second. </member> - <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2( 0, 0 )"> + <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2(0, 0)"> Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes. </member> </members> diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml index 83161cd163..ffb1901dad 100644 --- a/doc/classes/InputEventPanGesture.xml +++ b/doc/classes/InputEventPanGesture.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2( 0, 0 )"> + <member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2(0, 0)"> </member> </members> <constants> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index d69f175be8..079ac03f45 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -15,13 +15,13 @@ <member name="index" type="int" setter="set_index" getter="get_index" default="0"> The drag event index in the case of a multi-drag event. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The drag position. </member> - <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )"> + <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)"> The drag position relative to its start position. </member> - <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )"> + <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2(0, 0)"> The drag speed. </member> </members> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index f497f2fecc..7aa5f62b05 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -16,7 +16,7 @@ <member name="index" type="int" setter="set_index" getter="get_index" default="0"> The touch index in the case of a multi-touch event. One index = one finger. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The touch position. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index defd23afb1..934764b461 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -4,7 +4,7 @@ Placeholder for the root [Node] of a [PackedScene]. </brief_description> <description> - Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively. + Turning on the option [b]Load As Placeholder[/b] for an instantiated scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively. The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. </description> <tutorials> diff --git a/doc/classes/IntervalTweener.xml b/doc/classes/IntervalTweener.xml new file mode 100644 index 0000000000..1c59003c70 --- /dev/null +++ b/doc/classes/IntervalTweener.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="IntervalTweener" inherits="Tweener" version="4.0"> + <brief_description> + Creates an idle interval in a [Tween] animation. + </brief_description> + <description> + [IntervalTweener] is used to make delays in a tweening sequence. See [method Tween.tween_interval] for more usage information. + [b]Note:[/b] [method Tween.tween_interval] is the only correct way to create [IntervalTweener]. Any [IntervalTweener] created manually will not function correctly. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 0020cbf242..c639e0b88e 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -484,7 +484,7 @@ The width all columns will be adjusted to. A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. </member> - <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2( 0, 0 )"> + <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2(0, 0)"> The size all icons will be adjusted to. If either X or Y component is not greater than zero, icon size won't be affected. </member> @@ -593,19 +593,19 @@ <theme_item name="font" type="Font"> [Font] of the item's text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.63, 0.63, 0.63, 1)"> Default text [Color] of the item. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the item. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the item is selected. </theme_item> <theme_item name="font_size" type="int"> Font size of the item's text. </theme_item> - <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )"> + <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)"> [Color] of the guideline. The guideline is a line drawn between each row of items. </theme_item> <theme_item name="hseparation" type="int" default="4"> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index 7baff7aa39..b95aaed143 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -1,45 +1,88 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="JSON" inherits="Object" version="4.0"> +<class name="JSON" inherits="RefCounted" version="4.0"> <brief_description> - Helper class for parsing JSON data. + Helper class for creating and parsing JSON data. </brief_description> <description> - Helper class for parsing JSON data. For usage example and other important hints, see [JSONParseResult]. + The [JSON] enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network. + [method stringify] is used to convert any data type into a JSON string. + [method parse] is used to convert any existing JSON data into a [Variant] that can be used within Godot. If successfully parsed, use [method get_data] to retrieve the [Variant], and use [code]typeof[/code] to check if the Variant's type is what you expect. JSON Objects are converted into a [Dictionary], but JSON data can be used to store [Array]s, numbers, [String]s and even just a boolean. + [b]Example[/b] + [codeblock] + var data_to_send = ["a", "b", "c"] + var json = JSON.new() + var json_string = json.stringify(data_to_send) + # Save data + # ... + # Retrieve data + var error = json.parse(json_string) + if error == OK: + var data_received = json.get_data() + if typeof(data_received) == TYPE_ARRAY: + print(data_received) # Prints array + else: + print("Unexpected data") + else: + print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) + [/codeblock] </description> <tutorials> </tutorials> <methods> + <method name="get_data" qualifiers="const"> + <return type="Variant"> + </return> + <description> + Returns the [Variant] containing the data of a successful [method parse]. + [b]Note:[/b] It will return [code]Null[/code] if the last call to parse was unsuccessful or [method parse] has not yet been called. + </description> + </method> + <method name="get_error_line" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns [code]0[/code] if the last call to [method parse] was successful, or the line number where the parse failed. + </description> + </method> + <method name="get_error_message" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns an empty string if the last call to [method parse] was successful, or the error message if it failed. + </description> + </method> <method name="parse"> - <return type="JSONParseResult"> + <return type="int" enum="Error"> </return> - <argument index="0" name="json" type="String"> + <argument index="0" name="json_string" type="String"> </argument> <description> - Parses a JSON-encoded string and returns a [JSONParseResult] containing the result. + Attempts to parse the [code]json_string[/code] provided. + Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure. </description> </method> - <method name="print"> + <method name="stringify"> <return type="String"> </return> - <argument index="0" name="value" type="Variant"> + <argument index="0" name="data" type="Variant"> </argument> <argument index="1" name="indent" type="String" default=""""> </argument> - <argument index="2" name="sort_keys" type="bool" default="false"> + <argument index="2" name="sort_keys" type="bool" default="true"> </argument> <argument index="3" name="full_precision" type="bool" default="false"> </argument> <description> Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types. - [b]Note:[/b] If [code]full_precision[/code] is true, when printing floats, the unreliable digits are printed in addition to the reliable digits to guarantee exact decoding. - Use [code]indent[/code] parameter to pretty print the output. + [b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. + Use [code]indent[/code] parameter to pretty stringify the output. [b]Example output:[/b] [codeblock] - ## JSON.print(my_dictionary) + ## JSON.stringify(my_dictionary) {"name":"my_dictionary","version":"1.0.0","entities":[{"name":"entity_0","value":"value_0"},{"name":"entity_1","value":"value_1"}]} - ## JSON.print(my_dictionary, "\t") + ## JSON.stringify(my_dictionary, "\t") { "name": "my_dictionary", "version": "1.0.0", diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml deleted file mode 100644 index 7311343b68..0000000000 --- a/doc/classes/JSONParseResult.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="JSONParseResult" inherits="RefCounted" version="4.0"> - <brief_description> - Data class wrapper for decoded JSON. - </brief_description> - <description> - Returned by [method JSON.parse], [JSONParseResult] contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with [code]if json_result.error == OK[/code]. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> - The error type if the JSON source was not successfully parsed. See the [enum Error] constants. - </member> - <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1"> - The line number where the error occurred if the JSON source was not successfully parsed. - </member> - <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default=""""> - The error message if the JSON source was not successfully parsed. See the [enum Error] constants. - </member> - <member name="result" type="Variant" setter="set_result" getter="get_result"> - A [Variant] containing the parsed JSON. Use [method @GlobalScope.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned. - [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types. - [b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements: - [codeblocks] - [gdscript] - var p = JSON.parse('["hello", "world", "!"]') - if typeof(p.result) == TYPE_ARRAY: - print(p.result[0]) # Prints "hello" - else: - push_error("Unexpected results.") - [/gdscript] - [csharp] - JSONParseResult p = JSON.Parse("[\"hello\"], \"world\", \"!\"]"); - if (p.Result is Godot.Collections.Array) - { - GD.Print((p.Result as Godot.Collections.Array)[0]); // Prints "hello" - } - else - { - GD.PushError("Unexpected results."); - } - [/csharp] - [/codeblocks] - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/JSONParser.xml b/doc/classes/JSONParser.xml deleted file mode 100644 index 991629f255..0000000000 --- a/doc/classes/JSONParser.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="JSONParser" inherits="RefCounted" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="decode_data"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="data" type="Variant"> - </argument> - <argument index="1" name="indent" type="String" default=""""> - </argument> - <argument index="2" name="sort_keys" type="bool" default="true"> - </argument> - <description> - </description> - </method> - <method name="get_data" qualifiers="const"> - <return type="Variant"> - </return> - <description> - </description> - </method> - <method name="get_error_line" qualifiers="const"> - <return type="int"> - </return> - <description> - </description> - </method> - <method name="get_error_text" qualifiers="const"> - <return type="String"> - </return> - <description> - </description> - </method> - <method name="get_string" qualifiers="const"> - <return type="String"> - </return> - <description> - </description> - </method> - <method name="parse_string"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="json_string" type="String"> - </argument> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 5480d7d55f..d7999f1aa0 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -21,28 +21,31 @@ <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. </member> + <member name="collider_rid" type="RID" setter="" getter="get_collider_rid"> + The colliding body's [RID] used by the [PhysicsServer2D]. + </member> <member name="collider_shape" type="Object" setter="" getter="get_collider_shape"> The colliding body's shape. </member> <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0"> The colliding shape's index. See [CollisionObject2D]. </member> - <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )"> + <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)"> The colliding object's velocity. </member> <member name="local_shape" type="Object" setter="" getter="get_local_shape"> The moving object's colliding shape. </member> - <member name="normal" type="Vector2" setter="" getter="get_normal" default="Vector2( 0, 0 )"> + <member name="normal" type="Vector2" setter="" getter="get_normal" default="Vector2(0, 0)"> The colliding body's shape's normal at the point of collision. </member> - <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2(0, 0)"> The point of collision, in global coordinates. </member> - <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2( 0, 0 )"> + <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2(0, 0)"> The moving object's remaining movement vector. </member> - <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2( 0, 0 )"> + <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)"> The distance the moving object traveled before collision. </member> </members> diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml index 329efab474..abdb5b4f4e 100644 --- a/doc/classes/KinematicCollision3D.xml +++ b/doc/classes/KinematicCollision3D.xml @@ -21,28 +21,31 @@ <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. </member> + <member name="collider_rid" type="RID" setter="" getter="get_collider_rid"> + The colliding body's [RID] used by the [PhysicsServer3D]. + </member> <member name="collider_shape" type="Object" setter="" getter="get_collider_shape"> The colliding body's shape. </member> <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0"> The colliding shape's index. See [CollisionObject3D]. </member> - <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3( 0, 0, 0 )"> + <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)"> The colliding object's velocity. </member> <member name="local_shape" type="Object" setter="" getter="get_local_shape"> The moving object's colliding shape. </member> - <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3( 0, 0, 0 )"> + <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3(0, 0, 0)"> The colliding body's shape's normal at the point of collision. </member> - <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )"> + <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3(0, 0, 0)"> The point of collision, in global coordinates. </member> - <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )"> + <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)"> The moving object's remaining movement vector. </member> - <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3( 0, 0, 0 )"> + <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)"> The distance the moving object traveled before collision. </member> </members> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 76b9686393..ee59f0c85a 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -98,7 +98,7 @@ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]"> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> Set additional options for BiDi override. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> @@ -147,13 +147,13 @@ <theme_item name="font" type="Font"> [Font] used for the [Label]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)"> Default text [Color] of the [Label]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of [Font]'s outline. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)"> [Color] of the text's shadow effect. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index f6698352ab..0e71f29b58 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -30,7 +30,7 @@ <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="Light2D.BlendMode" default="0"> The Light2D's blend mode. See [enum BlendMode] constants for values. </member> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The Light2D's [Color]. </member> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false"> @@ -57,7 +57,7 @@ <member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min" default="-1024"> Minimum [code]z[/code] value of objects that are affected by the Light2D. </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0 )"> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0)"> [Color] of shadows cast by the Light2D. </member> <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled" default="false"> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index 42b9ed8ab4..815d20223d 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -4,7 +4,7 @@ Provides a base class for different kinds of light nodes. </brief_description> <description> - Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting. + Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting. </description> <tutorials> <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> @@ -42,7 +42,7 @@ <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="1"> The light's bake mode. See [enum BakeMode]. </member> - <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy]. </member> <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> @@ -72,7 +72,7 @@ <member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0"> Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolution shadow maps. A high value can impact performance, make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )"> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 1)"> The color of shadows cast by this light. </member> <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false"> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index dec5d60cbb..587d5833b9 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -74,7 +74,7 @@ <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0"> Controls the style of the line's first point. Use [enum LineCapMode] constants. </member> - <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 1, 1, 1, 1 )"> + <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color(1, 1, 1, 1)"> The line's color. Will not be used if a gradient is set. </member> <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0"> @@ -86,7 +86,7 @@ <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode" default="0"> The style for the points between the start and the end. </member> - <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )"> + <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()"> The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors. </member> <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8"> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 7adf19632e..f1e7c5f6e1 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -221,7 +221,7 @@ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]"> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> Set additional options for BiDi override. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> @@ -248,7 +248,7 @@ Emitted when the text changes. </description> </signal> - <signal name="text_entered"> + <signal name="text_submitted"> <argument index="0" name="new_text" type="String"> </argument> <description> @@ -359,16 +359,16 @@ </constant> </constants> <theme_items> - <theme_item name="caret_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="caret_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Color of the [LineEdit]'s caret (text cursor). </theme_item> <theme_item name="clear" type="Texture2D"> 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 )"> + <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 )"> + <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="focus" type="StyleBox"> @@ -377,19 +377,19 @@ <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 )"> + <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_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [LineEdit]. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> Font color for selected text (inside the selection rectangle). </theme_item> <theme_item name="font_size" type="int"> Font size of the [LineEdit]'s text. </theme_item> - <theme_item name="font_uneditable_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + <theme_item name="font_uneditable_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> Font color when editing is disabled. </theme_item> <theme_item name="minimum_character_width" type="int" default="4"> @@ -404,7 +404,7 @@ <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 )"> + <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> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml index 58caf1b1de..434e6fba8e 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/LineShape2D.xml @@ -14,8 +14,8 @@ <member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0"> The line's distance from the origin. </member> - <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, 1 )"> - The line's normal. + <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, -1)"> + The line's normal. Defaults to [code]Vector2.UP[/code]. </member> </members> <constants> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 6e2f4399b3..51b20cd04d 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -47,7 +47,7 @@ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]"> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> Set additional options for BiDi override. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> @@ -78,16 +78,16 @@ <theme_item name="font" type="Font"> [Font] of the [LinkButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [LinkButton]. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [LinkButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [LinkButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [LinkButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 7cbf9d3dfe..3b37853d70 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -56,19 +56,19 @@ <theme_item name="font" type="Font"> [Font] of the [MenuButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [MenuButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 1, 1, 1, 0.3 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(1, 1, 1, 0.3)"> Text [Color] used when the [MenuButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [MenuButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [MenuButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [MenuButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index ed7c39d4d9..3bbdfbe62e 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -106,7 +106,7 @@ </method> </methods> <members> - <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i( 0, 0 )"> + <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i(0, 0)"> Sets a hint to be used for lightmap resolution. </member> </members> diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index b5ab296bd0..7c4e75793e 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -4,7 +4,7 @@ Node that instances meshes into a scenario. </brief_description> <description> - MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead. + MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead. </description> <tutorials> <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml index bcc9adf90f..57f2397874 100644 --- a/doc/classes/MeshTexture.xml +++ b/doc/classes/MeshTexture.xml @@ -14,7 +14,7 @@ <member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture"> Sets the base texture that the Mesh will use to draw. </member> - <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2( 0, 0 )"> + <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2(0, 0)"> Sets the size of the image, needed for reference. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml new file mode 100644 index 0000000000..42b91abf93 --- /dev/null +++ b/doc/classes/MethodTweener.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MethodTweener" inherits="Tweener" version="4.0"> + <brief_description> + Interpolates an abstract value and supplies it to a method called over time. + </brief_description> + <description> + [MethodTweener] is similar to a combination of [CallbackTweener] and [PropertyTweener]. It calls a method providing an interpolated value as a paramater. See [method Tween.tween_method] for more usage information. + [b]Note:[/b] [method Tween.tween_method] is the only correct way to create [MethodTweener]. Any [MethodTweener] created manually will not function correctly. + </description> + <tutorials> + </tutorials> + <methods> + <method name="set_delay"> + <return type="MethodTweener"> + </return> + <argument index="0" name="delay" type="float"> + </argument> + <description> + Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay. + </description> + </method> + <method name="set_ease"> + <return type="MethodTweener"> + </return> + <argument index="0" name="ease" type="int" enum="Tween.EaseType"> + </argument> + <description> + Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener. + </description> + </method> + <method name="set_trans"> + <return type="MethodTweener"> + </return> + <argument index="0" name="trans" type="int" enum="Tween.TransitionType"> + </argument> + <description> + Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 02628f4960..7151e58c5f 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -105,7 +105,7 @@ </method> </methods> <members> - <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )"> + <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array()"> </member> <member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array"> </member> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index d6de0ef4cf..5d59f994d3 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -53,7 +53,7 @@ <member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture. </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 1300351e47..21f3f1fcc0 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -5,13 +5,13 @@ </brief_description> <description> Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names. - A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. + A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the [constant NOTIFICATION_ENTER_TREE] notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's. Once all nodes have been added in the scene tree, they receive the [constant NOTIFICATION_READY] notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes. This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree). [b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] (in seconds) is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it. - To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. + To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children. [b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree]. [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. @@ -128,7 +128,7 @@ </argument> <description> Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. - If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type. + If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type. [b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example: [codeblocks] [gdscript] @@ -159,7 +159,7 @@ </argument> <description> Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it. - If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type. + If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type. Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. </description> </method> @@ -182,6 +182,16 @@ Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. </description> </method> + <method name="create_tween"> + <return type="Tween"> + </return> + <description> + Creates a new [Tween] and binds it to this node. This is equivalent of doing: + [codeblock] + get_tree().create_tween().bind_node(self) + [/codeblock] + </description> + </method> <method name="duplicate" qualifiers="const"> <return type="Node"> </return> @@ -568,7 +578,7 @@ </return> <argument index="0" name="method" type="StringName"> </argument> - <argument index="1" name="args" type="Array" default="[ ]"> + <argument index="1" name="args" type="Array" default="[]"> </argument> <argument index="2" name="parent_first" type="bool" default="false"> </argument> @@ -795,7 +805,7 @@ The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one. </member> <member name="filename" type="String" setter="set_filename" getter="get_filename"> - When a scene is instanced from a file, its topmost node contains the filename from which it was loaded. + When a scene is instantiated from a file, its topmost node contains the filename from which it was loaded. </member> <member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer"> The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree). @@ -874,7 +884,7 @@ Notification received when a node is unparented (parent removed it from the list of children). </constant> <constant name="NOTIFICATION_INSTANCED" value="20"> - Notification received when the node is instanced. + Notification received when the node is instantiated. </constant> <constant name="NOTIFICATION_DRAG_BEGIN" value="21"> Notification received when a drag begins. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 8ca945418c..cc99abf9cb 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -131,7 +131,7 @@ <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform"> Global [Transform2D]. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> Position, relative to the node's parent. </member> <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> @@ -140,7 +140,7 @@ <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> Rotation in degrees, relative to the node's parent. </member> - <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> + <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale. Unscaled value: [code](1, 1)[/code]. </member> <member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0"> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index a6237708c6..2dc8659d5d 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -20,7 +20,7 @@ Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. </description> </method> - <method name="get_parent_spatial" qualifiers="const"> + <method name="get_parent_node_3d" qualifiers="const"> <return type="Node3D"> </return> <description> @@ -103,7 +103,7 @@ </return> <argument index="0" name="target" type="Vector3"> </argument> - <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )"> + <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)"> </argument> <description> Rotates itself so that the local -Z axis points towards the [code]target[/code] position. @@ -118,7 +118,7 @@ </argument> <argument index="1" name="target" type="Vector3"> </argument> - <argument index="2" name="up" type="Vector3" default="Vector3( 0, 1, 0 )"> + <argument index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)"> </argument> <description> Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. @@ -291,25 +291,28 @@ <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform"> World3D space (global) [Transform3D] of this node. </member> - <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3( 0, 0, 0 )"> + <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)"> Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code]. </member> <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation"> Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> - <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3( 0, 0, 0 )"> + <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3(0, 0, 0)"> Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). </member> - <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )"> + <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)"> Scale part of the local transformation. </member> <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. </member> - <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> Local space [Transform3D] of this node, with respect to the parent node. </member> + <member name="visibility_parent" type="NodePath" setter="set_visibility_parent" getter="get_visibility_parent" default="NodePath("")"> + Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependant instances will not take the hidden node or its ancestors into account. + </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). </member> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index bfcd5b1beb..a9396306f4 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -94,7 +94,7 @@ </argument> <argument index="1" name="arguments" type="PackedStringArray"> </argument> - <argument index="2" name="output" type="Array" default="[ ]"> + <argument index="2" name="output" type="Array" default="[]"> </argument> <argument index="3" name="read_stderr" type="bool" default="false"> </argument> @@ -136,6 +136,14 @@ Returns the keycode of the given string (e.g. "Escape"). </description> </method> + <method name="get_cache_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. + Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. + </description> + </method> <method name="get_cmdline_args"> <return type="PackedStringArray"> </return> @@ -167,6 +175,14 @@ [/codeblocks] </description> </method> + <method name="get_config_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. + Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. + </description> + </method> <method name="get_connected_midi_inputs"> <return type="PackedStringArray"> </return> @@ -176,6 +192,14 @@ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> + <method name="get_data_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. + Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. + </description> + </method> <method name="get_environment" qualifiers="const"> <return type="String"> </return> @@ -310,6 +334,7 @@ On macOS, this is [code]~/Library/Application Support/Godot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set. On Windows, this is [code]%APPDATA%\Godot\app_userdata\[project_name][/code], or [code]%APPDATA%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%APPDATA%[/code] expands to [code]%USERPROFILE%\AppData\Roaming[/code]. If the project name is empty, [code]user://[/code] falls back to [code]res://[/code]. + Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user data directory. </description> </method> <method name="has_environment" qualifiers="const"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index f5dcd6bcdc..cdf76a3a59 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -92,7 +92,7 @@ </return> <argument index="0" name="signal" type="String"> </argument> - <argument index="1" name="arguments" type="Array" default="[ ]"> + <argument index="1" name="arguments" type="Array" default="[]"> </argument> <description> Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. @@ -173,7 +173,7 @@ </argument> <argument index="1" name="callable" type="Callable"> </argument> - <argument index="2" name="binds" type="Array" default="[ ]"> + <argument index="2" name="binds" type="Array" default="[]"> </argument> <argument index="3" name="flags" type="int" default="0"> </argument> diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml index fc676c2b49..501c4a3ccf 100644 --- a/doc/classes/Occluder3D.xml +++ b/doc/classes/Occluder3D.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array( )"> + <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()"> </member> - <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array( )"> + <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()"> </member> </members> <constants> diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index 8a59ef5cb4..28d3ed433a 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -17,7 +17,7 @@ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0"> The culling mode to use. </member> - <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()"> A [Vector2] array with the index for polygon's vertices positions. [b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference. </member> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 52da08c02f..4c03c59f8b 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -250,19 +250,19 @@ <theme_item name="font" type="Font"> [Font] of the [OptionButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [OptionButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Text [Color] used when the [OptionButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [OptionButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [OptionButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [OptionButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index 296f9d3373..f72db514f0 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -23,7 +23,7 @@ </method> </methods> <members> - <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray( )"> + <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray()"> </member> </members> <constants> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 1d9be7f165..f39cae8be5 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -11,13 +11,13 @@ [codeblocks] [gdscript] # Use load() instead of preload() if the path isn't known at compile-time. - var scene = preload("res://scene.tscn").instance() + var scene = preload("res://scene.tscn").instantiate() # Add the node as a child of the node the script is attached to. add_child(scene) [/gdscript] [csharp] // C# has no preload, so you have to always use ResourceLoader.Load<PackedScene>(). - var scene = ResourceLoader.Load<PackedScene>("res://scene.tscn").Instance(); + var scene = ResourceLoader.Load<PackedScene>("res://scene.tscn").Instantiate(); // Add the node as a child of the node the script is attached to. AddChild(scene); [/csharp] @@ -76,7 +76,7 @@ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> <methods> - <method name="can_instance" qualifiers="const"> + <method name="can_instantiate" qualifiers="const"> <return type="bool"> </return> <description> @@ -90,7 +90,7 @@ Returns the [code]SceneState[/code] representing the scene file contents. </description> </method> - <method name="instance" qualifiers="const"> + <method name="instantiate" qualifiers="const"> <return type="Node"> </return> <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0"> @@ -110,21 +110,21 @@ </method> </methods> <members> - <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{"conn_count": 0,"conns": PackedInt32Array( ),"editable_instances": [ ],"names": PackedStringArray( ),"node_count": 0,"node_paths": [ ],"nodes": PackedInt32Array( ),"variants": [ ],"version": 2}"> + <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{"conn_count": 0,"conns": PackedInt32Array(),"editable_instances": [],"names": PackedStringArray(),"node_count": 0,"node_paths": [],"nodes": PackedInt32Array(),"variants": [],"version": 2}"> A dictionary representation of the scene contents. Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. </member> </members> <constants> <constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState"> - If passed to [method instance], blocks edits to the scene state. + If passed to [method instantiate], blocks edits to the scene state. </constant> <constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState"> - If passed to [method instance], provides local scene resources to the local scene. + If passed to [method instantiate], provides local scene resources to the local scene. [b]Note:[/b] Only available in editor builds. </constant> <constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState"> - If passed to [method instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. + If passed to [method instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state. [b]Note:[/b] Only available in editor builds. </constant> </constants> diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index 3b730fc4d4..b8097343f4 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -12,22 +12,22 @@ </methods> <members> <member name="layer" type="int" setter="set_layer" getter="get_layer" override="true" default="-100" /> - <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2( 0, 0 )"> + <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2(0, 0)"> The base position offset for all [ParallaxLayer] children. </member> - <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale" default="Vector2( 1, 1 )"> + <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale" default="Vector2(1, 1)"> The base motion scale for all [ParallaxLayer] children. </member> <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom" default="false"> If [code]true[/code], elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. </member> - <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" default="Vector2( 0, 0 )"> + <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" default="Vector2(0, 0)"> Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. </member> - <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" default="Vector2( 0, 0 )"> + <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" default="Vector2(0, 0)"> Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work. </member> - <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2( 0, 0 )"> + <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2(0, 0)"> The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present. </member> </members> diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml index 7210bee11c..6b1e013851 100644 --- a/doc/classes/ParallaxLayer.xml +++ b/doc/classes/ParallaxLayer.xml @@ -13,13 +13,13 @@ <methods> </methods> <members> - <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )"> + <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2(0, 0)"> The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored. </member> - <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )"> + <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2(0, 0)"> The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]. </member> - <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2( 1, 1 )"> + <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2(1, 1)"> Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll. </member> </members> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 3c364b621a..e8fde21032 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -141,7 +141,7 @@ </member> <member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false"> </member> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. </member> <member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp"> @@ -156,7 +156,7 @@ <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Damping randomness ratio. </member> - <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )"> + <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)"> Unit vector specifying the particles' emission direction. </member> <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> @@ -183,7 +183,7 @@ <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> Amount of [member spread] along the Y axis. </member> - <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )"> + <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)"> Gravity applied to every particle. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 9e9c5063ae..b6013fa83e 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -20,7 +20,7 @@ </argument> <argument index="1" name="callable" type="Callable"> </argument> - <argument index="2" name="arguments" type="Array" default="[ ]"> + <argument index="2" name="arguments" type="Array" default="[]"> </argument> <description> Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". @@ -157,13 +157,13 @@ Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. </constant> <constant name="OBJECT_COUNT" value="6" enum="Monitor"> - Number of objects currently instanced (including nodes). + Number of objects currently instantiated (including nodes). </constant> <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> Number of resources currently used. </constant> <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> - Number of nodes currently instanced in the scene tree. This also includes the root node. + Number of nodes currently instantiated in the scene tree. This also includes the root node. </constant> <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 5d15590a3f..736b44ee1c 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -20,7 +20,7 @@ </return> <argument index="0" name="impulse" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> </description> @@ -48,7 +48,7 @@ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> Damps the body's rotation if greater than [code]0[/code]. </member> - <member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> Sets the body's transform. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> @@ -63,13 +63,13 @@ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> - <member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> Sets the joint's transform. </member> <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation"> Sets the joint's rotation in radians. </member> - <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3( 0, 0, 0 )"> + <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3(0, 0, 0)"> Sets the joint's rotation in degrees. </member> <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone3D.JointType" default="0"> diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 381371b973..20ab998d35 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -19,13 +19,13 @@ <member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1"> Sets the exposure of the sky. Higher exposure values make the entire sky brighter. </member> - <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color( 1, 1, 1, 1 )"> + <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(1, 1, 1, 1)"> Modulates the [Color] on the bottom half of the sky to represent the ground. </member> <member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005"> Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon. </member> - <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color( 0.36, 0.56, 0.82, 1 )"> + <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.36, 0.56, 0.82, 1)"> Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets. </member> <member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8"> @@ -37,7 +37,7 @@ <member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0"> Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. </member> - <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color( 0.056, 0.14, 0.3, 1 )"> + <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.056, 0.14, 0.3, 1)"> Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset. </member> <member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0"> diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index 66ff16a3ce..65cb3e7f38 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -24,7 +24,7 @@ </return> <argument index="0" name="force" type="Vector2"> </argument> - <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -53,7 +53,7 @@ </return> <argument index="0" name="impulse" type="Vector2"> </argument> - <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index 7cb3a56338..85feeef86e 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -12,7 +12,7 @@ <method name="add_central_force"> <return type="void"> </return> - <argument index="0" name="force" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Adds a constant directional force without affecting rotation. @@ -24,7 +24,7 @@ </return> <argument index="0" name="force" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -42,7 +42,7 @@ <method name="apply_central_impulse"> <return type="void"> </return> - <argument index="0" name="impulse" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Applies a single directional impulse without affecting rotation. @@ -54,7 +54,7 @@ </return> <argument index="0" name="impulse" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index b6f95305ed..6c8c957e5d 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -56,7 +56,7 @@ </argument> <argument index="1" name="max_results" type="int" default="32"> </argument> - <argument index="2" name="exclude" type="Array" default="[ ]"> + <argument index="2" name="exclude" type="Array" default="[]"> </argument> <argument index="3" name="collision_layer" type="int" default="2147483647"> </argument> @@ -84,7 +84,7 @@ </argument> <argument index="2" name="max_results" type="int" default="32"> </argument> - <argument index="3" name="exclude" type="Array" default="[ ]"> + <argument index="3" name="exclude" type="Array" default="[]"> </argument> <argument index="4" name="collision_layer" type="int" default="2147483647"> </argument> @@ -102,7 +102,7 @@ </argument> <argument index="1" name="to" type="Vector2"> </argument> - <argument index="2" name="exclude" type="Array" default="[ ]"> + <argument index="2" name="exclude" type="Array" default="[]"> </argument> <argument index="3" name="collision_layer" type="int" default="2147483647"> </argument> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index 243d071c56..a69b6f07fd 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -57,7 +57,7 @@ </argument> <argument index="1" name="to" type="Vector3"> </argument> - <argument index="2" name="exclude" type="Array" default="[ ]"> + <argument index="2" name="exclude" type="Array" default="[]"> </argument> <argument index="3" name="collision_mask" type="int" default="2147483647"> </argument> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 4c2abcb087..33cd61eb9c 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -16,7 +16,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -333,7 +333,7 @@ </argument> <argument index="1" name="force" type="Vector2"> </argument> - <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. @@ -346,7 +346,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -381,7 +381,7 @@ </argument> <argument index="1" name="impulse" type="Vector2"> </argument> - <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 2972d5155c..aa1f7597ea 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -16,7 +16,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform3D" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -325,7 +325,7 @@ </argument> <argument index="1" name="force" type="Vector3"> </argument> - <argument index="2" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> </description> @@ -337,7 +337,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform3D" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -372,7 +372,7 @@ </argument> <argument index="1" name="impulse" type="Vector3"> </argument> - <argument index="2" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code]. diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 92bd9b136a..321a713e26 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -20,13 +20,13 @@ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> + <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The collision margin for the shape. </member> - <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2( 0, 0 )"> + <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)"> The motion of the shape being queried for. </member> <member name="shape" type="Resource" setter="set_shape" getter="get_shape"> @@ -63,7 +63,7 @@ [/csharp] [/codeblocks] </member> - <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)"> The queried shape's transform matrix. </member> </members> diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 087c52a650..52916a8418 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -20,7 +20,7 @@ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> + <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> @@ -60,7 +60,7 @@ [/csharp] [/codeblocks] </member> - <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> The queried shape's transform matrix. </member> </members> diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml index 2744aa17a1..da04ffa86a 100644 --- a/doc/classes/PhysicsTestMotionResult2D.xml +++ b/doc/classes/PhysicsTestMotionResult2D.xml @@ -17,15 +17,15 @@ </member> <member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0"> </member> - <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )"> + <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)"> </member> - <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2( 0, 0 )"> + <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2(0, 0)"> </member> - <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2( 0, 0 )"> + <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2(0, 0)"> </member> - <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2( 0, 0 )"> + <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2(0, 0)"> </member> - <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2( 0, 0 )"> + <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2(0, 0)"> </member> </members> <constants> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 2342f00631..cca5793fc7 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -204,7 +204,7 @@ The distance from the origin to the plane, in the direction of [member normal]. This value is typically non-negative. In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property. </member> - <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + <member name="normal" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> The normal of the plane, which must be normalized. In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property. </member> @@ -219,13 +219,13 @@ </member> </members> <constants> - <constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )"> + <constant name="PLANE_YZ" value="Plane(1, 0, 0, 0)"> A plane that extends in the Y and Z axes (normal vector points +X). </constant> - <constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )"> + <constant name="PLANE_XZ" value="Plane(0, 1, 0, 0)"> A plane that extends in the X and Z axes (normal vector points +Y). </constant> - <constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )"> + <constant name="PLANE_XY" value="Plane(0, 0, 1, 0)"> A plane that extends in the X and Y axes (normal vector points +Z). </constant> </constants> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index 333d687e91..c95ba29ea2 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 2, 2 )"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(2, 2)"> Size of the generated plane. </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> diff --git a/doc/classes/PointLight2D.xml b/doc/classes/PointLight2D.xml index 9337bc8351..a7207a3c80 100644 --- a/doc/classes/PointLight2D.xml +++ b/doc/classes/PointLight2D.xml @@ -12,7 +12,7 @@ <member name="height" type="float" setter="set_height" getter="get_height" default="0.0"> The height of the light. Used with 2D normal mapping. </member> - <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)"> The offset of the light's [member texture]. </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 3aca83658d..c33a1424a7 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -88,9 +88,9 @@ <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> If [code]true[/code], polygon edges will be anti-aliased. </member> - <member name="bones" type="Array" setter="_set_bones" getter="_get_bones" default="[ ]"> + <member name="bones" type="Array" setter="_set_bones" getter="_get_bones" default="[]"> </member> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code]. </member> <member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count" default="0"> @@ -101,21 +101,21 @@ <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false"> If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The offset applied to each vertex. </member> - <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()"> The polygon's list of vertices. The final point will be connected to the first. [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference. </member> - <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]"> + <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[]"> </member> <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath("")"> </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. </member> - <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> + <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)"> Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. </member> <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation"> @@ -124,13 +124,13 @@ <member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees" default="0.0"> The texture's rotation in degrees. </member> - <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )"> + <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2(1, 1)"> Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. </member> - <member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array( )"> + <member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array()"> Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code]. </member> - <member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray( )"> + <member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray()"> Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. </member> </members> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 418785222e..e448d18d73 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -717,22 +717,22 @@ <theme_item name="font" type="Font"> [Font] used for the menu items. </theme_item> - <theme_item name="font_accelerator_color" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )"> + <theme_item name="font_accelerator_color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)"> The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The default text [Color] for menu items' names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)"> [Color] used for disabled menu items' text. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> [Color] used for the hovered text. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the menu item. </theme_item> - <theme_item name="font_separator_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_separator_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> [Color] used for labeled separators' text. See [method add_separator]. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 3892633654..ca41c367c8 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -30,7 +30,7 @@ </method> </methods> <members> - <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> + <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. </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index b2e1fdd3f0..0e66281fd1 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -14,7 +14,7 @@ <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5"> Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. </member> - <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )"> + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> Size of the prism. </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index d3e1dbca27..c598a2c266 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -13,7 +13,7 @@ <methods> </methods> <members> - <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color( 0.12, 0.12, 0.13, 1 )"> + <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.12, 0.12, 0.13, 1)"> Color of the ground at the bottom. Blends with [member ground_horizon_color]. </member> <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02"> @@ -22,7 +22,7 @@ <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0"> Amount of energy contribution from the ground. </member> - <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color( 0.37, 0.33, 0.31, 1 )"> + <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.37, 0.33, 0.31, 1)"> Color of the ground at the horizon. Blends with [member ground_bottom_color]. </member> <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09"> @@ -31,10 +31,10 @@ <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0"> Amount of energy contribution from the sky. </member> - <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color( 0.55, 0.69, 0.81, 1 )"> + <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.55, 0.69, 0.81, 1)"> Color of the sky at the horizon. Blends with [member sky_top_color]. </member> - <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color( 0.35, 0.46, 0.71, 1 )"> + <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.35, 0.46, 0.71, 1)"> Color of the sky at the top. Blends with [member sky_horizon_color]. </member> <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0"> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 160b61c720..c33f6f636d 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -29,13 +29,13 @@ <theme_item name="font" type="Font"> Font used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The color of the text. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [ProgressBar]. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 1)"> The color of the text's shadow. </theme_item> <theme_item name="font_size" type="int"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 360ccc597e..1847a316e1 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -226,7 +226,7 @@ </method> </methods> <members> - <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.14, 0.14, 0.14, 1 )"> + <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color(0.14, 0.14, 0.14, 1)"> Background color for the boot splash. </member> <member name="application/boot_splash/fullsize" type="bool" setter="" getter="" default="true"> @@ -266,10 +266,12 @@ Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon]. </member> <member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false"> - If [code]true[/code], disables printing to standard error in an exported build. + If [code]true[/code], disables printing to standard error. If [code]true[/code], this also hides error and warning messages printed by [method @GlobalScope.push_error] and [method @GlobalScope.push_warning]. See also [member application/run/disable_stdout]. + Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false"> - If [code]true[/code], disables printing to standard output in an exported build. + If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] command line argument. See also [member application/run/disable_stderr]. + Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false"> If [code]true[/code], flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging. @@ -309,7 +311,7 @@ If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. </member> <member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100"> - Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system. + The mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system. </member> <member name="audio/driver/output_latency" type="int" setter="" getter="" default="15"> Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. @@ -461,7 +463,7 @@ <member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack in visual scripting, to avoid infinite recursion. </member> - <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color( 1, 0.2, 0.1, 0.8 )"> + <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)"> Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. </member> <member name="debug/shapes/collision/draw_2d_outlines" type="bool" setter="" getter="" default="true"> @@ -470,22 +472,22 @@ <member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000"> Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu. </member> - <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.42 )"> + <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color(0, 0.6, 0.7, 0.42)"> Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. </member> - <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color( 1, 0.7, 0.1, 0.4 )"> + <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color(1, 0.7, 0.1, 0.4)"> Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu. </member> - <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color( 0.1, 1, 0.7, 0.4 )"> + <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)"> Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu. </member> <member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default=""""> Custom image for the mouse cursor (limited to 256×256). </member> - <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> + <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="" default="Vector2(0, 0)"> Hotspot for the custom mouse cursor image. </member> - <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2( 10, 10 )"> + <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2(10, 10)"> Position offset for tooltips, relative to the mouse cursor's hotspot. </member> <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false"> @@ -551,7 +553,7 @@ prime-run %command% [/codeblock] </member> - <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "gdshader" )"> + <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray("gd", "gdshader")"> Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> <member name="editor/script/templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> @@ -739,6 +741,8 @@ If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection. [b]Note:[/b] Currently, this is only implemented in [TextEdit], not [LineEdit]. </member> + <member name="input/ui_text_submit" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_undo" type="Dictionary" setter="" getter=""> @@ -1220,7 +1224,7 @@ [/csharp] [/codeblocks] </member> - <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> + <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2(0, 1)"> The default gravity direction in 2D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: [codeblocks] @@ -1272,7 +1276,7 @@ [/csharp] [/codeblocks] </member> - <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )"> + <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3(0, -1, 0)"> The default gravity direction in 3D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: [codeblocks] @@ -1311,7 +1315,8 @@ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead. </member> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> - Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS. + Controls how much physics 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 smoothing 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. + [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0[/code]. [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. </member> <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> @@ -1363,7 +1368,7 @@ <member name="rendering/driver/threads/thread_model" type="int" setter="" getter="" default="1"> Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. </member> - <member name="rendering/environment/defaults/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> + <member name="rendering/environment/defaults/default_clear_color" type="Color" setter="" getter="" default="Color(0.3, 0.3, 0.3, 1)"> Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. </member> <member name="rendering/environment/defaults/default_environment" type="String" setter="" getter="" default=""""> @@ -1615,9 +1620,6 @@ <member name="rendering/xr/enabled" type="bool" setter="" getter="" default="false"> If [code]true[/code], XR support is enabled in Godot, this ensures required shaders are compiled. </member> - <member name="world/2d/cell_size" type="int" setter="" getter="" default="100"> - Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses (in pixels). - </member> </members> <constants> </constants> diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml new file mode 100644 index 0000000000..1e77bb33c6 --- /dev/null +++ b/doc/classes/PropertyTweener.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PropertyTweener" inherits="Tweener" version="4.0"> + <brief_description> + Interpolates an [Object]'s property over time. + </brief_description> + <description> + [PropertyTweener] is used to interpolate a property in an object. See [method Tween.tween_property] for more usage information. + [b]Note:[/b] [method Tween.tween_property] is the only correct way to create [PropertyTweener]. Any [PropertyTweener] created manually will not function correctly. + </description> + <tutorials> + </tutorials> + <methods> + <method name="as_relative"> + <return type="PropertyTweener"> + </return> + <description> + When called, the final value will be used as a relative value instead. Example: + [codeblock] + var tween = get_tree().create_tween() + tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right + [/codeblock] + </description> + </method> + <method name="from"> + <return type="PropertyTweener"> + </return> + <argument index="0" name="value" type="Variant"> + </argument> + <description> + Sets a custom initial value to the [PropertyTweener]. Example: + [codeblock] + var tween = get_tree().create_tween() + tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100) #this will move the node from position (100, 100) to (200, 100) + [/codeblock] + </description> + </method> + <method name="from_current"> + <return type="PropertyTweener"> + </return> + <description> + Makes the [PropertyTweener] use the current property value (i.e. at the time of creating this [PropertyTweener]) as a starting point. This is equivalent of using [method from] with the current value. These two calls will do the same: + [codeblock] + tween.tween_property(self, "position", Vector2(200, 100), 1).from(position) + tween.tween_property(self, "position", Vector2(200, 100), 1).from_current() + [/codeblock] + </description> + </method> + <method name="set_delay"> + <return type="PropertyTweener"> + </return> + <argument index="0" name="delay" type="float"> + </argument> + <description> + Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay. + </description> + </method> + <method name="set_ease"> + <return type="PropertyTweener"> + </return> + <argument index="0" name="ease" type="int" enum="Tween.EaseType"> + </argument> + <description> + Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener. + </description> + </method> + <method name="set_trans"> + <return type="PropertyTweener"> + </return> + <argument index="0" name="trans" type="int" enum="Tween.TransitionType"> + </argument> + <description> + Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml index 512d55c9a0..22e397b832 100644 --- a/doc/classes/ProximityGroup3D.xml +++ b/doc/classes/ProximityGroup3D.xml @@ -23,7 +23,7 @@ <members> <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup3D.DispatchMode" default="0"> </member> - <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3( 1, 1, 1 )"> + <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3(1, 1, 1)"> </member> <member name="group_name" type="String" setter="set_group_name" getter="get_group_name" default=""""> </member> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 24a3d76ee2..94d638888c 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -13,7 +13,7 @@ <methods> </methods> <members> - <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 1, 1 )"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> Size on the X and Y axes. </member> </members> diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 678fb0d44d..660204ee7d 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -83,6 +83,16 @@ Constructs a quaternion defined by the given values. </description> </method> + <method name="angle_to" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="to" type="Quaternion"> + </argument> + <description> + Returns the angle between this quaternion and [code]to[/code]. This is the magnitude of the angle you would need to rotate by to get from one to the other. + [b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably. + </description> + </method> <method name="cubic_slerp" qualifiers="const"> <return type="Quaternion"> </return> @@ -301,7 +311,7 @@ </member> </members> <constants> - <constant name="IDENTITY" value="Quaternion( 0, 0, 0, 1 )"> + <constant name="IDENTITY" value="Quaternion(0, 0, 0, 1)"> The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change. </constant> </constants> diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml index 1424a0d653..b672a053c7 100644 --- a/doc/classes/RDPipelineColorBlendState.xml +++ b/doc/classes/RDPipelineColorBlendState.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[ ]"> + <member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[]"> </member> - <member name="blend_constant" type="Color" setter="set_blend_constant" getter="get_blend_constant" default="Color( 0, 0, 0, 1 )"> + <member name="blend_constant" type="Color" setter="set_blend_constant" getter="get_blend_constant" default="Color(0, 0, 0, 1)"> </member> <member name="enable_logic_op" type="bool" setter="set_enable_logic_op" getter="get_enable_logic_op" default="false"> </member> diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml index 8c90f02301..b4345f1f8b 100644 --- a/doc/classes/RDPipelineMultisampleState.xml +++ b/doc/classes/RDPipelineMultisampleState.xml @@ -19,7 +19,7 @@ </member> <member name="sample_count" type="int" setter="set_sample_count" getter="get_sample_count" enum="RenderingDevice.TextureSamples" default="0"> </member> - <member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[ ]"> + <member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[]"> </member> </members> <constants> diff --git a/doc/classes/RDShaderBytecode.xml b/doc/classes/RDShaderBytecode.xml index 7a3501004e..20bf9bdd72 100644 --- a/doc/classes/RDShaderBytecode.xml +++ b/doc/classes/RDShaderBytecode.xml @@ -45,15 +45,15 @@ </method> </methods> <members> - <member name="bytecode_compute" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )"> + <member name="bytecode_compute" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()"> </member> - <member name="bytecode_fragment" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )"> + <member name="bytecode_fragment" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()"> </member> - <member name="bytecode_tesselation_control" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )"> + <member name="bytecode_tesselation_control" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()"> </member> - <member name="bytecode_tesselation_evaluation" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )"> + <member name="bytecode_tesselation_evaluation" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()"> </member> - <member name="bytecode_vertex" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )"> + <member name="bytecode_vertex" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()"> </member> <member name="compile_error_compute" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default=""""> </member> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index e30d7df63f..14b67b46df 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -138,7 +138,7 @@ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true"> If [code]true[/code], the parent node will be excluded from collision detection. </member> - <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2( 0, 50 )"> + <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)"> The ray's destination point, relative to the RayCast's [code]position[/code]. </member> </members> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 443890438f..98c8c96403 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -136,7 +136,7 @@ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color( 0, 0, 0, 1 )"> + <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)"> The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something. If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used. </member> @@ -149,7 +149,7 @@ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true"> If [code]true[/code], collisions will be ignored for this RayCast3D's immediate parent. </member> - <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3( 0, -1, 0 )"> + <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)"> The ray's destination point, relative to the RayCast's [code]position[/code]. </member> </members> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 352a18e326..627c488b01 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -214,13 +214,13 @@ </method> </methods> <members> - <member name="end" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> + <member name="end" type="Vector2" setter="" getter="" default="Vector2(0, 0)"> Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size. </member> - <member name="position" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="" getter="" default="Vector2(0, 0)"> Beginning corner. Typically has values lower than [member end]. </member> - <member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> + <member name="size" type="Vector2" setter="" getter="" default="Vector2(0, 0)"> Size from [member position] to [member end]. Typically, all components are positive. If the size is negative, you can use [method abs] to fix it. </member> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index 84bef9b406..67d148084f 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -193,13 +193,13 @@ </method> </methods> <members> - <member name="end" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> + <member name="end" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)"> Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size. </member> - <member name="position" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> + <member name="position" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)"> Beginning corner. Typically has values lower than [member end]. </member> - <member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> + <member name="size" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)"> Size from [member position] to [member end]. Typically, all components are positive. If the size is negative, you can use [method abs] to fix it. </member> diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml index 8e37fbad6f..f2795ae4a1 100644 --- a/doc/classes/RectangleShape2D.xml +++ b/doc/classes/RectangleShape2D.xml @@ -13,7 +13,7 @@ <methods> </methods> <members> - <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 20, 20 )"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(20, 20)"> The rectangle's width and height. </member> </members> diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml index 1a3fbbdfc5..df9a6f0a46 100644 --- a/doc/classes/ReferenceRect.xml +++ b/doc/classes/ReferenceRect.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color( 1, 0, 0, 1 )"> + <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color(1, 0, 0, 1)"> Sets the border [Color] of the [ReferenceRect]. </member> <member name="border_width" type="float" setter="set_border_width" getter="get_border_width" default="1.0"> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 13df17cd22..1d32a8b509 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -13,7 +13,7 @@ <methods> </methods> <members> - <member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color( 0, 0, 0, 1 )"> + <member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color(0, 0, 0, 1)"> </member> <member name="ambient_color_energy" type="float" setter="set_ambient_color_energy" getter="get_ambient_color_energy" default="1.0"> </member> @@ -28,7 +28,7 @@ <member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false"> If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode]. </member> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them. </member> <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0"> @@ -42,7 +42,7 @@ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> Sets the max distance away from the probe an object can be before it is culled. </member> - <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3( 0, 0, 0 )"> + <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3(0, 0, 0)"> Sets the origin offset to be used when this reflection probe is in box project mode. </member> <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0"> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 841d2bde72..dc56e6fd5d 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -196,15 +196,15 @@ </argument> <argument index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction"> </argument> - <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray( )"> + <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()"> </argument> <argument index="6" name="clear_depth" type="float" default="1.0"> </argument> <argument index="7" name="clear_stencil" type="int" default="0"> </argument> - <argument index="8" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="8" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)"> </argument> - <argument index="9" name="storage_textures" type="Array" default="[ ]"> + <argument index="9" name="storage_textures" type="Array" default="[]"> </argument> <description> </description> @@ -214,7 +214,7 @@ </return> <argument index="0" name="screen" type="int" default="0"> </argument> - <argument index="1" name="clear_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <argument index="1" name="clear_color" type="Color" default="Color(0, 0, 0, 1)"> </argument> <description> </description> @@ -234,15 +234,15 @@ </argument> <argument index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction"> </argument> - <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray( )"> + <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()"> </argument> <argument index="7" name="clear_depth" type="float" default="1.0"> </argument> <argument index="8" name="clear_stencil" type="int" default="0"> </argument> - <argument index="9" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="9" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)"> </argument> - <argument index="10" name="storage_textures" type="RID[]" default="[ ]"> + <argument index="10" name="storage_textures" type="RID[]" default="[]"> </argument> <description> </description> @@ -316,7 +316,7 @@ </return> <argument index="0" name="draw_list" type="int"> </argument> - <argument index="1" name="rect" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="1" name="rect" type="Rect2" default="Rect2i(0, 0, 0, 0)"> </argument> <description> </description> @@ -488,7 +488,7 @@ </argument> <argument index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat"> </argument> - <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()"> </argument> <argument index="3" name="use_restart_indices" type="bool" default="false"> </argument> @@ -606,7 +606,7 @@ </return> <argument index="0" name="size_bytes" type="int"> </argument> - <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()"> </argument> <argument index="2" name="usage" type="int" default="0"> </argument> @@ -632,7 +632,7 @@ </argument> <argument index="1" name="format" type="int" enum="RenderingDevice.DataFormat"> </argument> - <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()"> </argument> <description> </description> @@ -690,7 +690,7 @@ </argument> <argument index="1" name="view" type="RDTextureView"> </argument> - <argument index="2" name="data" type="PackedByteArray[]" default="[ ]"> + <argument index="2" name="data" type="PackedByteArray[]" default="[]"> </argument> <description> </description> @@ -788,7 +788,7 @@ </return> <argument index="0" name="size_bytes" type="int"> </argument> - <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()"> </argument> <description> </description> @@ -818,7 +818,7 @@ </return> <argument index="0" name="size_bytes" type="int"> </argument> - <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )"> + <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()"> </argument> <argument index="2" name="use_as_storage" type="bool" default="false"> </argument> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index ba19176788..44e0202307 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -620,7 +620,7 @@ </argument> <argument index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0"> </argument> - <argument index="6" name="ao_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <argument index="6" name="ao_color" type="Color" default="Color(0, 0, 0, 1)"> </argument> <description> </description> @@ -1175,17 +1175,6 @@ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> - <method name="instance_geometry_set_as_instance_lod"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="as_lod_of_instance" type="RID"> - </argument> - <description> - Not implemented in Godot 3.x. - </description> - </method> <method name="instance_geometry_set_cast_shadows_setting"> <return type="void"> </return> @@ -1197,45 +1186,45 @@ Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow]. </description> </method> - <method name="instance_geometry_set_draw_range"> + <method name="instance_geometry_set_flag"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> - <argument index="3" name="min_margin" type="float"> + <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags"> </argument> - <argument index="4" name="max_margin" type="float"> + <argument index="2" name="enabled" type="bool"> </argument> <description> - Not implemented in Godot 3.x. + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> - <method name="instance_geometry_set_flag"> + <method name="instance_geometry_set_material_override"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags"> - </argument> - <argument index="2" name="enabled" type="bool"> + <argument index="1" name="material" type="RID"> </argument> <description> - Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. </description> </method> - <method name="instance_geometry_set_material_override"> + <method name="instance_geometry_set_visibility_range"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="material" type="RID"> + <argument index="1" name="min" type="float"> + </argument> + <argument index="2" name="max" type="float"> + </argument> + <argument index="3" name="min_margin" type="float"> + </argument> + <argument index="4" name="max_margin" type="float"> </argument> <description> - Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. + Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties. </description> </method> <method name="instance_set_base"> @@ -1341,6 +1330,17 @@ Sets the world space transform of the instance. Equivalent to [member Node3D.transform]. </description> </method> + <method name="instance_set_visibility_parent"> + <return type="void"> + </return> + <argument index="0" name="instance" type="RID"> + </argument> + <argument index="1" name="parent" type="RID"> + </argument> + <description> + Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent]. + </description> + </method> <method name="instance_set_visible"> <return type="void"> </return> @@ -2725,7 +2725,7 @@ </return> <argument index="0" name="viewport" type="RID"> </argument> - <argument index="1" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )"> + <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)"> </argument> <argument index="2" name="screen" type="int" default="0"> </argument> @@ -3702,7 +3702,7 @@ </constant> <constant name="INSTANCE_OCCLUDER" value="11" enum="InstanceType"> </constant> - <constant name="INSTANCE_MAX" value="12" enum="InstanceType"> + <constant name="INSTANCE_MAX" value="13" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. </constant> <constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 6edb3b1a11..c8800a3c25 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -4,7 +4,7 @@ Base class for all resources. </brief_description> <description> - Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. + Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instantiated from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. [b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed. </description> <tutorials> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index c81b21333f..682d7b97f3 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -84,7 +84,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="progress" type="Array" default="[ ]"> + <argument index="1" name="progress" type="Array" default="[]"> </argument> <description> Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 7ca70f5a7a..38884a027f 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -24,7 +24,7 @@ </argument> <argument index="2" name="height" type="int" default="0"> </argument> - <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="inline_align" type="int" enum="VAlign" default="0"> </argument> @@ -170,6 +170,15 @@ Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods. </description> </method> + <method name="push_bgcolor"> + <return type="void"> + </return> + <argument index="0" name="bgcolor" type="Color"> + </argument> + <description> + Adds a [code][bgcolor][/code] tag to the tag stack. + </description> + </method> <method name="push_bold"> <return type="void"> </return> @@ -209,18 +218,27 @@ </argument> <argument index="2" name="size" type="int"> </argument> - <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2( 0, 0, 0, 0 )"> + <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)"> </argument> - <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="5" name="outline_size" type="int" default="0"> </argument> - <argument index="6" name="outline_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)"> </argument> <description> Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. </description> </method> + <method name="push_fgcolor"> + <return type="void"> + </return> + <argument index="0" name="fgcolor" type="Color"> + </argument> + <description> + Adds a [code][fgcolor][/code] tag to the tag stack. + </description> + </method> <method name="push_font"> <return type="void"> </return> @@ -450,7 +468,7 @@ The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. [b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. </member> - <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]"> + <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[]"> The currently installed custom effects. This is an array of [RichTextEffect]s. To add a custom effect, it's more convenient to use [method install_effect]. </member> @@ -484,7 +502,7 @@ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]"> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> Set additional options for BiDi override. </member> <member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size" default="4"> @@ -592,11 +610,15 @@ </constant> <constant name="ITEM_RAINBOW" value="20" enum="ItemType"> </constant> - <constant name="ITEM_META" value="21" enum="ItemType"> + <constant name="ITEM_BGCOLOR" value="21" enum="ItemType"> + </constant> + <constant name="ITEM_FGCOLOR" value="22" enum="ItemType"> + </constant> + <constant name="ITEM_META" value="23" enum="ItemType"> </constant> - <constant name="ITEM_DROPCAP" value="22" enum="ItemType"> + <constant name="ITEM_DROPCAP" value="24" enum="ItemType"> </constant> - <constant name="ITEM_CUSTOMFX" value="23" enum="ItemType"> + <constant name="ITEM_CUSTOMFX" value="25" enum="ItemType"> </constant> </constants> <theme_items> @@ -612,19 +634,19 @@ <theme_item name="bold_italics_font_size" type="int"> The font size used for bold italics text. </theme_item> - <theme_item name="default_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="default_color" type="Color" default="Color(1, 1, 1, 1)"> The default text color. </theme_item> <theme_item name="focus" type="StyleBox"> The background The background used when the [RichTextLabel] is focused. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The default tint of text outline. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> The color of selected text, used when [member selection_enabled] is [code]true[/code]. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)"> The color of the font's shadow. </theme_item> <theme_item name="italics_font" type="Font"> @@ -654,7 +676,7 @@ <theme_item name="outline_size" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> + <theme_item name="selection_color" type="Color" default="Color(0.1, 0.1, 1, 0.8)"> The color of the selection box. </theme_item> <theme_item name="shadow_as_outline" type="int" default="0"> @@ -666,16 +688,16 @@ <theme_item name="shadow_offset_y" type="int" default="1"> The vertical offset of the font's shadow. </theme_item> - <theme_item name="table_border" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="table_border" type="Color" default="Color(0, 0, 0, 0)"> The default cell border color. </theme_item> - <theme_item name="table_even_row_bg" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="table_even_row_bg" type="Color" default="Color(0, 0, 0, 0)"> The default background color for even rows. </theme_item> <theme_item name="table_hseparation" type="int" default="3"> The horizontal separation of elements in a table. </theme_item> - <theme_item name="table_odd_row_bg" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="table_odd_row_bg" type="Color" default="Color(0, 0, 0, 0)"> The default background color for odd rows. </theme_item> <theme_item name="table_vseparation" type="int" default="3"> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 237317daf1..64573b7282 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -39,7 +39,7 @@ </return> <argument index="0" name="force" type="Vector2"> </argument> - <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -57,7 +57,7 @@ <method name="apply_central_impulse"> <return type="void"> </return> - <argument index="0" name="impulse" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Applies a directional impulse without affecting rotation. @@ -68,7 +68,7 @@ </return> <argument index="0" name="impulse" type="Vector2"> </argument> - <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> </argument> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. @@ -109,7 +109,7 @@ <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0"> The body's rotational velocity. </member> - <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2( 0, 0 )"> + <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2(0, 0)"> The body's total applied force. </member> <member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0"> @@ -142,7 +142,7 @@ Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b]. See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping. </member> - <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2( 0, 0 )"> + <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)"> The body's linear velocity. </member> <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index e3349169ff..fb2b9690a3 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -40,7 +40,7 @@ </return> <argument index="0" name="force" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Adds a constant directional force (i.e. acceleration). @@ -71,7 +71,7 @@ </return> <argument index="0" name="impulse" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> </argument> <description> Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. @@ -116,7 +116,7 @@ Damps RigidBody3D's rotational forces. See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. </member> - <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )"> + <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)"> RigidBody3D's rotational velocity. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> @@ -143,7 +143,7 @@ The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden. See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping. </member> - <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3( 0, 0, 0 )"> + <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)"> The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. </member> <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index f9e0ef76b9..6d804cc697 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -95,7 +95,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods. + Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods. </description> </method> <method name="get_node_instance" qualifiers="const"> @@ -199,14 +199,14 @@ </methods> <constants> <constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState"> - If passed to [method PackedScene.instance], blocks edits to the scene state. + If passed to [method PackedScene.instantiate], blocks edits to the scene state. </constant> <constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState"> - If passed to [method PackedScene.instance], provides inherited scene resources to the local scene. + If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene. [b]Note:[/b] Only available in editor builds. </constant> <constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState"> - If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. + If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state. [b]Note:[/b] Only available in editor builds. </constant> </constants> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 7a15153fc2..d327e8cbca 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -90,6 +90,13 @@ The timer will be automatically freed after its time elapses. </description> </method> + <method name="create_tween"> + <return type="Tween"> + </return> + <description> + Creates and returns a new [Tween]. + </description> + </method> <method name="get_first_node_in_group"> <return type="Node"> </return> @@ -135,6 +142,13 @@ Returns a list of all nodes assigned to the given group. </description> </method> + <method name="get_processed_tweens"> + <return type="Array"> + </return> + <description> + Returns an array of currently exising [Tween]s in the [SceneTree] (both running and paused). + </description> + </method> <method name="get_rpc_sender_id" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 56272760bd..e7527d73e2 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -11,11 +11,11 @@ <link title="Scripting">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting.html</link> </tutorials> <methods> - <method name="can_instance" qualifiers="const"> + <method name="can_instantiate" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the script can be instanced. + Returns [code]true[/code] if the script can be instantiated. </description> </method> <method name="get_base_script" qualifiers="const"> diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml index 31c0f7f1f3..341c5e9d20 100644 --- a/doc/classes/SegmentShape2D.xml +++ b/doc/classes/SegmentShape2D.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2( 0, 0 )"> + <member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2(0, 0)"> The segment's first point position. </member> - <member name="b" type="Vector2" setter="set_b" getter="get_b" default="Vector2( 0, 10 )"> + <member name="b" type="Vector2" setter="set_b" getter="get_b" default="Vector2(0, 10)"> The segment's second point position. </member> </members> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 84efc974c0..1fd70a43fd 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -40,7 +40,7 @@ </return> <argument index="0" name="callable" type="Callable"> </argument> - <argument index="1" name="binds" type="Array" default="[ ]"> + <argument index="1" name="binds" type="Array" default="[]"> </argument> <argument index="2" name="flags" type="int" default="0"> </argument> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index d8b35ad272..136f2f0a63 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -171,7 +171,7 @@ <method name="physical_bones_start_simulation"> <return type="void"> </return> - <argument index="0" name="bones" type="StringName[]" default="[ ]"> + <argument index="0" name="bones" type="StringName[]" default="[]"> </argument> <description> Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index dccc45d0ec..138ebe4411 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -38,7 +38,7 @@ <members> <member name="interpolation" type="float" setter="set_interpolation" getter="get_interpolation" default="1.0"> </member> - <member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3( 0, 0, 0 )"> + <member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3(0, 0, 0)"> </member> <member name="max_iterations" type="int" setter="set_max_iterations" getter="get_max_iterations" default="10"> </member> @@ -48,7 +48,7 @@ </member> <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&"""> </member> - <member name="target" type="Transform3D" setter="set_target_transform" getter="get_target_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="target" type="Transform3D" setter="set_target_transform" getter="get_target_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> </member> <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> </member> diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml index 7f8cf2d4d9..ae46acd0d0 100644 --- a/doc/classes/SkeletonModification2DJiggle.xml +++ b/doc/classes/SkeletonModification2DJiggle.xml @@ -208,7 +208,7 @@ <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75"> The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied. </member> - <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 6 )"> + <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 6)"> The default amount of gravity applied to the Jiggle joints, if they are not overriden. </member> <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0"> diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml index d8aaf09a8e..2547727097 100644 --- a/doc/classes/SkeletonModification2DPhysicalBones.xml +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -40,7 +40,7 @@ <method name="start_simulation"> <return type="void"> </return> - <argument index="0" name="bones" type="StringName[]" default="[ ]"> + <argument index="0" name="bones" type="StringName[]" default="[]"> </argument> <description> Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world. @@ -50,7 +50,7 @@ <method name="stop_simulation"> <return type="void"> </return> - <argument index="0" name="bones" type="StringName[]" default="[ ]"> + <argument index="0" name="bones" type="StringName[]" default="[]"> </argument> <description> Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world. diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index c320adb1be..b419b003bf 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -64,13 +64,13 @@ <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> - <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i( 0, 0 )"> + <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i(0, 0)"> Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The texture's drawing offset. </member> <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false"> @@ -79,7 +79,7 @@ <member name="region_filter_clip_enabled" type="bool" setter="set_region_filter_clip_enabled" getter="is_region_filter_clip_enabled" default="false"> If [code]true[/code], the outermost pixels get blurred out. [member region_enabled] must be [code]true[/code]. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 8c4b9e7d10..f7f2ff0de1 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -14,7 +14,7 @@ <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> - <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i( 0, 0 )"> + <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i(0, 0)"> Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> @@ -23,7 +23,7 @@ <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false"> If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 06b9c2b042..3168e2d848 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -66,10 +66,10 @@ <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> If [code]true[/code], texture is flipped vertically. </member> - <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The texture's drawing offset. </member> <member name="opacity" type="float" setter="set_opacity" getter="get_opacity" default="1.0"> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 298339d5fc..85915a53fe 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -18,7 +18,7 @@ <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0"> The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. </member> - <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )"> + <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2(0, 0)"> The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. </member> <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml index 5ffbb71522..f83d440f10 100644 --- a/doc/classes/StaticBody3D.xml +++ b/doc/classes/StaticBody3D.xml @@ -18,10 +18,10 @@ <methods> </methods> <members> - <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )"> + <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3(0, 0, 0)"> The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. </member> - <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )"> + <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3(0, 0, 0)"> The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. </member> <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 41cef9fb55..03a150b90f 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -49,7 +49,7 @@ </method> </methods> <members> - <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray( )"> + <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray()"> </member> </members> <constants> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index d0c5f0ea86..3bf05e7c92 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -352,7 +352,7 @@ Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit. </description> </method> - <method name="is_valid_integer" qualifiers="const"> + <method name="is_valid_int" qualifiers="const"> <return type="bool"> </return> <description> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index d66ae210ec..9e02fb57c3 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -156,13 +156,13 @@ <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" default="1"> This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. </member> - <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0.6, 0.6, 0.6, 1 )"> + <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0.6, 0.6, 0.6, 1)"> The background color of the stylebox. </member> <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend" default="false"> If [code]true[/code], the border will fade into the background color. </member> - <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color( 0.8, 0.8, 0.8, 1 )"> + <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color(0.8, 0.8, 0.8, 1)"> Sets the color of the border. </member> <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width" default="0"> @@ -209,10 +209,10 @@ <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> Expands the stylebox outside of the control rect on the top edge. Useful in combination with [member border_width_top] to draw a border outside the control rect. </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0.6 )"> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0.6)"> The color of the shadow. This has no effect if [member shadow_size] is lower than 1. </member> - <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2( 0, 0 )"> + <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(0, 0)"> The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox. </member> <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="0"> diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index 4a2dbf60e4..850c656720 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)"> The line's color. </member> <member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0"> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index f4a1f1f01d..be14048126 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -116,10 +116,10 @@ A higher value means more of the source texture is considered to be part of the top border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative. </member> - <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> Modulates the color of the texture when this style box is drawn. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index f54f22d6fa..9c5610e2c7 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -25,10 +25,10 @@ <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2"> The update mode when the sub-viewport is used as a render target. </member> - <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 512, 512 )"> + <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(512, 512)"> The width and height of the sub-viewport. </member> - <member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i( 0, 0 )"> + <member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i(0, 0)"> The 2D size override of the sub-viewport. If either the width or height is [code]0[/code], the override is disabled. </member> <member name="size_2d_override_stretch" type="bool" setter="set_size_2d_override_stretch" getter="is_size_2d_override_stretch_enabled" default="false"> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 56b47f4a24..22d1b52479 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -45,15 +45,15 @@ </return> <argument index="0" name="vertices" type="PackedVector3Array"> </argument> - <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> + <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> </argument> - <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )"> + <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray()"> </argument> - <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )"> + <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array()"> </argument> - <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )"> + <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array()"> </argument> - <argument index="5" name="tangents" type="Array" default="[ ]"> + <argument index="5" name="tangents" type="Array" default="[]"> </argument> <description> Inserts a triangle fan made of array data into [Mesh] being constructed. diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index ddf6b465a4..3f24509ec7 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -198,19 +198,19 @@ <theme_item name="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Font color of disabled tabs. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the tab name. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Font color of the currently selected tab. </theme_item> <theme_item name="font_size" type="int"> Font size of the tab names. </theme_item> - <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + <theme_item name="font_unselected_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Font color of the other, unselected tabs. </theme_item> <theme_item name="icon_separation" type="int" default="4"> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index d784585e20..aff104c922 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -362,19 +362,19 @@ <theme_item name="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Font color of disabled tabs. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the tab name. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Font color of the currently selected tab. </theme_item> <theme_item name="font_size" type="int"> Font size of the tab names. </theme_item> - <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + <theme_item name="font_unselected_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Font color of the other, unselected tabs. </theme_item> <theme_item name="hseparation" type="int" default="4"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 74811318dc..6a3c124c60 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -10,6 +10,12 @@ <tutorials> </tutorials> <methods> + <method name="_backspace" qualifiers="virtual"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="add_gutter"> <return type="void"> </return> @@ -18,13 +24,10 @@ <description> </description> </method> - <method name="can_fold" qualifiers="const"> - <return type="bool"> + <method name="backspace"> + <return type="void"> </return> - <argument index="0" name="line" type="int"> - </argument> <description> - Returns if the given line is foldable, that is, it has indented lines right below it. </description> </method> <method name="center_viewport_to_cursor"> @@ -95,7 +98,7 @@ <description> Moves the cursor at the specified [code]line[/code] index. If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. - If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. + If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden. </description> </method> <method name="cut"> @@ -105,34 +108,32 @@ Cut's the current selection. </description> </method> - <method name="deselect"> + <method name="delete_selection"> <return type="void"> </return> <description> - Deselects the current selection. </description> </method> - <method name="fold_all_lines"> + <method name="deselect"> <return type="void"> </return> <description> - Folds all lines that are possible to be folded (see [method can_fold]). + Deselects the current selection. </description> </method> - <method name="fold_line"> - <return type="void"> + <method name="get_caret_draw_pos" qualifiers="const"> + <return type="Vector2"> </return> - <argument index="0" name="line" type="int"> - </argument> <description> - Folds the given line, if possible (see [method can_fold]). + Gets the caret pixel draw poistion. </description> </method> - <method name="get_caret_draw_pos" qualifiers="const"> - <return type="Vector2"> + <method name="get_first_non_whitespace_column" qualifiers="const"> + <return type="int"> </return> + <argument index="0" name="line" type="int"> + </argument> <description> - Gets the caret pixel draw poistion. </description> </method> <method name="get_gutter_count" qualifiers="const"> @@ -165,6 +166,14 @@ <description> </description> </method> + <method name="get_indent_level" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + </description> + </method> <method name="get_line" qualifiers="const"> <return type="String"> </return> @@ -299,6 +308,12 @@ Returns the selection end line. </description> </method> + <method name="get_tab_size" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="get_visible_line_count" qualifiers="const"> <return type="int"> </return> @@ -329,15 +344,6 @@ Returns [code]true[/code] if the caret is visible on the screen. </description> </method> - <method name="is_folded" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <description> - Returns whether the line at the specified index is folded or not. - </description> - </method> <method name="is_gutter_clickable" qualifiers="const"> <return type="bool"> </return> @@ -372,15 +378,6 @@ <description> </description> </method> - <method name="is_line_hidden" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <description> - Returns whether the line at the specified index is hidden or not. - </description> - </method> <method name="is_selection_active" qualifiers="const"> <return type="bool"> </return> @@ -397,6 +394,16 @@ Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes. </description> </method> + <method name="merge_gutters"> + <return type="void"> + </return> + <argument index="0" name="from_line" type="int"> + </argument> + <argument index="1" name="to_line" type="int"> + </argument> + <description> + </description> + </method> <method name="paste"> <return type="void"> </return> @@ -560,17 +567,6 @@ Sets the text for a specific line. </description> </method> - <method name="set_line_as_hidden"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <description> - If [code]true[/code], hides the line of the specified index. - </description> - </method> <method name="set_line_background_color"> <return type="void"> </return> @@ -665,13 +661,12 @@ <description> </description> </method> - <method name="toggle_fold_line"> + <method name="set_tab_size"> <return type="void"> </return> - <argument index="0" name="line" type="int"> + <argument index="0" name="size" type="int"> </argument> <description> - Toggle the folding of the code block at the given line. </description> </method> <method name="undo"> @@ -681,22 +676,6 @@ Perform undo operation. </description> </method> - <method name="unfold_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <description> - Unfolds the given line, if folded. - </description> - </method> - <method name="unhide_all_lines"> - <return type="void"> - </return> - <description> - Unhide all lines that were previously set to hidden by [method set_line_as_hidden]. - </description> - </method> </methods> <members> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> @@ -730,9 +709,6 @@ If [code]true[/code], the "tab" character will have a visible representation. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> - <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled" default="false"> - If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible. - </member> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false"> If [code]true[/code], all occurrences of the selected text will be highlighted. </member> @@ -774,7 +750,7 @@ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]"> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> Set additional options for BiDi override. </member> <member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter"> @@ -963,18 +939,16 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> Sets the background [Color] of this [TextEdit]. </theme_item> - <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )"> - </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)"> </theme_item> - <theme_item name="caret_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> - <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> + <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> </theme_item> - <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> + <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. </theme_item> <theme_item name="focus" type="StyleBox"> @@ -982,15 +956,15 @@ <theme_item name="font" type="Font"> Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Sets the font [Color]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [TextEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> <theme_item name="font_size" type="int"> @@ -1008,7 +982,7 @@ <theme_item name="read_only" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Sets the highlight [Color] of text selections. </theme_item> <theme_item name="space" type="Texture2D"> @@ -1017,7 +991,7 @@ <theme_item name="tab" type="Texture2D"> Sets a custom [Texture2D] for tab text characters. </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )"> + <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. </theme_item> </theme_items> diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index ddbae0e977..318c3be794 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -56,7 +56,7 @@ </argument> <argument index="1" name="pos" type="Vector2"> </argument> - <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -71,7 +71,7 @@ </argument> <argument index="2" name="outline_size" type="int" default="1"> </argument> - <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index e9afe47ee8..d67a9bcb85 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -63,9 +63,9 @@ </argument> <argument index="1" name="pos" type="Vector2"> </argument> - <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> - <argument index="3" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="dc_color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -78,7 +78,7 @@ </argument> <argument index="1" name="pos" type="Vector2"> </argument> - <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -93,7 +93,7 @@ </argument> <argument index="2" name="outline_size" type="int" default="1"> </argument> - <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw drop cap outline into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -108,7 +108,7 @@ </argument> <argument index="2" name="line" type="int"> </argument> - <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -125,7 +125,7 @@ </argument> <argument index="3" name="outline_size" type="int" default="1"> </argument> - <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw outline of the single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -140,9 +140,9 @@ </argument> <argument index="2" name="outline_size" type="int" default="1"> </argument> - <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> - <argument index="4" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="4" name="dc_color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. @@ -344,7 +344,7 @@ </argument> <argument index="2" name="size" type="int"> </argument> - <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2( 0, 0, 0, 0 )"> + <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)"> </argument> <argument index="4" name="opentype_features" type="Dictionary" default="{ }"> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 9a96d8699c..c943946ab3 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -149,7 +149,7 @@ </argument> <argument index="4" name="index" type="int"> </argument> - <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. @@ -171,7 +171,7 @@ </argument> <argument index="5" name="index" type="int"> </argument> - <argument index="6" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. @@ -788,7 +788,7 @@ </argument> <argument index="4" name="clip_r" type="float" default="-1"> </argument> - <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). @@ -809,7 +809,7 @@ </argument> <argument index="5" name="outline_size" type="int" default="1"> </argument> - <argument index="6" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <description> Draw the outline of the shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index c33f32c9e4..35b719ae48 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -19,7 +19,7 @@ </argument> <argument index="1" name="position" type="Vector2"> </argument> - <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="3" name="transpose" type="bool" default="false"> </argument> @@ -36,7 +36,7 @@ </argument> <argument index="2" name="tile" type="bool"> </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="transpose" type="bool" default="false"> </argument> @@ -53,7 +53,7 @@ </argument> <argument index="2" name="src_rect" type="Rect2"> </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="transpose" type="bool" default="false"> </argument> diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml index b40759578f..59cde536ad 100644 --- a/doc/classes/TextureProgressBar.xml +++ b/doc/classes/TextureProgressBar.xml @@ -36,7 +36,7 @@ <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" default="false"> If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member fill_mode], this setting will enable stretching. </member> - <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" default="Vector2( 0, 0 )"> + <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" default="Vector2(0, 0)"> Offsets [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. </member> <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees" default="360.0"> @@ -68,13 +68,13 @@ <member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture"> [Texture2D] that draws under the progress bar. The bar's background. </member> - <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color( 1, 1, 1, 1 )"> + <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color(1, 1, 1, 1)"> Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node. </member> - <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress" default="Color( 1, 1, 1, 1 )"> + <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress" default="Color(1, 1, 1, 1)"> Multiplies the color of the bar's [code]texture_progress[/code] texture. </member> - <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under" default="Color( 1, 1, 1, 1 )"> + <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under" default="Color(1, 1, 1, 1)"> Multiplies the color of the bar's [code]texture_under[/code] texture. </member> </members> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml index efcbdf2e95..1f0f807a08 100644 --- a/doc/classes/TileData.xml +++ b/doc/classes/TileData.xml @@ -219,13 +219,13 @@ </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false"> </member> - <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)"> </member> <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0"> </member> <member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1"> </member> - <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i( 0, 0 )"> + <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i(0, 0)"> </member> <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false"> </member> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 93d5dd8037..5a4068ec86 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -103,7 +103,7 @@ </argument> <argument index="1" name="source_id" type="int" default="-1"> </argument> - <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)"> </argument> <argument index="3" name="alternative_tile" type="int" default="-1"> </argument> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 2015b1f1cd..7d8b589f78 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -287,9 +287,9 @@ </member> <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0"> </member> - <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i( 16, 16 )"> + <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)"> </member> - <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2( 0, 0 )"> + <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2(0, 0)"> </member> <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false"> </member> diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index a7a304ca27..8482c356d7 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -12,9 +12,9 @@ </return> <argument index="0" name="atlas_coords" type="Vector2i"> </argument> - <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)"> </argument> - <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )"> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)"> </argument> <description> </description> @@ -40,7 +40,7 @@ </return> <argument index="0" name="atlas_coords" type="Vector2i"> </argument> - <argument index="1" name="size" type="Vector2i" default="Vector2i( 1, 1 )"> + <argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)"> </argument> <description> </description> @@ -154,9 +154,9 @@ </return> <argument index="0" name="atlas_coords" type="Vector2i"> </argument> - <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)"> </argument> - <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )"> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)"> </argument> <description> </description> @@ -193,13 +193,13 @@ </method> </methods> <members> - <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i( 0, 0 )"> + <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i(0, 0)"> </member> - <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i( 0, 0 )"> + <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i(0, 0)"> </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> - <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i( 16, 16 )"> + <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)"> </member> </members> <constants> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 0dbf95376a..4f9b59c188 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -132,7 +132,7 @@ <method name="looking_at" qualifiers="const"> <return type="Transform2D"> </return> - <argument index="0" name="target" type="Vector2" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <argument index="0" name="target" type="Vector2" default="Transform2D(1, 0, 0, 1, 0, 0)"> </argument> <description> Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position. @@ -148,9 +148,17 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector2Array"> + <return type="Vector2"> </return> - <argument index="0" name="right" type="PackedVector2Array"> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Rect2"> + </return> + <argument index="0" name="right" type="Rect2"> </argument> <description> </description> @@ -164,19 +172,29 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Rect2"> + <return type="PackedVector2Array"> </return> - <argument index="0" name="right" type="Rect2"> + <argument index="0" name="right" type="PackedVector2Array"> </argument> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> + <return type="Transform2D"> </return> - <argument index="0" name="right" type="Vector2"> + <argument index="0" name="right" type="float"> + </argument> + <description> + This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly. + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Transform2D"> + </return> + <argument index="0" name="right" type="int"> </argument> <description> + This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -241,24 +259,24 @@ </method> </methods> <members> - <member name="origin" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> + <member name="origin" type="Vector2" setter="" getter="" default="Vector2(0, 0)"> The origin vector (column 2, the third column). Equivalent to array index [code]2[/code]. The origin vector represents translation. </member> - <member name="x" type="Vector2" setter="" getter="" default="Vector2( 1, 0 )"> + <member name="x" type="Vector2" setter="" getter="" default="Vector2(1, 0)"> The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code]. </member> - <member name="y" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> + <member name="y" type="Vector2" setter="" getter="" default="Vector2(0, 1)"> The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code]. </member> </members> <constants> - <constant name="IDENTITY" value="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <constant name="IDENTITY" value="Transform2D(1, 0, 0, 1, 0, 0)"> The identity [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. </constant> - <constant name="FLIP_X" value="Transform2D( -1, 0, 0, 1, 0, 0 )"> + <constant name="FLIP_X" value="Transform2D(-1, 0, 0, 1, 0, 0)"> The [Transform2D] that will flip something along the X axis. </constant> - <constant name="FLIP_Y" value="Transform2D( 1, 0, 0, -1, 0, 0 )"> + <constant name="FLIP_Y" value="Transform2D(1, 0, 0, -1, 0, 0)"> The [Transform2D] that will flip something along the Y axis. </constant> </constants> diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 0d49255523..5410cbced7 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -97,7 +97,7 @@ </return> <argument index="0" name="target" type="Vector3"> </argument> - <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )"> + <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)"> </argument> <description> Returns a copy of the transform rotated such that its -Z axis points towards the [code]target[/code] position. @@ -145,6 +145,24 @@ <description> </description> </method> + <method name="operator *" qualifiers="operator"> + <return type="Transform3D"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly. + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Transform3D"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly. + </description> + </method> <method name="operator ==" qualifiers="operator"> <return type="bool"> </return> @@ -192,24 +210,24 @@ </method> </methods> <members> - <member name="basis" type="Basis" setter="" getter="" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + <member name="basis" type="Basis" setter="" getter="" default="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)"> The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> - <member name="origin" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + <member name="origin" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code]. </member> </members> <constants> - <constant name="IDENTITY" value="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <constant name="IDENTITY" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> [Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. </constant> - <constant name="FLIP_X" value="Transform3D( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <constant name="FLIP_X" value="Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> [Transform3D] with mirroring applied perpendicular to the YZ plane. </constant> - <constant name="FLIP_Y" value="Transform3D( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )"> + <constant name="FLIP_Y" value="Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)"> [Transform3D] with mirroring applied perpendicular to the XZ plane. </constant> - <constant name="FLIP_Z" value="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )"> + <constant name="FLIP_Z" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)"> [Transform3D] with mirroring applied perpendicular to the XY plane. </constant> </constants> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index fe83bf9c2d..6a65d4ff7d 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -533,7 +533,7 @@ <theme_item name="checked" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> - <theme_item name="children_hl_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + <theme_item name="children_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The [Color] of the relationship lines between the selected [TreeItem] and its children. </theme_item> <theme_item name="children_hl_line_width" type="int" default="1"> @@ -548,7 +548,7 @@ <theme_item name="custom_button" type="StyleBox"> Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. </theme_item> - <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="custom_button_font_highlight" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> <theme_item name="custom_button_hover" type="StyleBox"> @@ -563,25 +563,25 @@ <theme_item name="draw_relationship_lines" type="int" default="0"> Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy. </theme_item> - <theme_item name="drop_position_color" type="Color" default="Color( 1, 0.3, 0.2, 1 )"> + <theme_item name="drop_position_color" type="Color" default="Color(1, 0.3, 0.2, 1)"> [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. </theme_item> <theme_item name="font" type="Font"> [Font] of the item's text. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Default text [Color] of the item. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the item. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the item is selected. </theme_item> <theme_item name="font_size" type="int"> Font size of the item's text. </theme_item> - <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )"> + <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)"> [Color] of the guideline. </theme_item> <theme_item name="hseparation" type="int" default="4"> @@ -593,7 +593,7 @@ <theme_item name="outline_size" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="parent_hl_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + <theme_item name="parent_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The [Color] of the relationship lines between the selected [TreeItem] and its parents. </theme_item> <theme_item name="parent_hl_line_margin" type="int" default="0"> @@ -602,7 +602,7 @@ <theme_item name="parent_hl_line_width" type="int" default="1"> The width of the relationship lines between the selected [TreeItem] and its parents. </theme_item> - <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + <theme_item name="relationship_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The default [Color] of the relationship lines. </theme_item> <theme_item name="relationship_line_width" type="int" default="1"> @@ -623,7 +623,7 @@ <theme_item name="selected_focus" type="StyleBox"> [StyleBox] for the selected items, used when the [Tree] is being focused. </theme_item> - <theme_item name="title_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="title_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the title button. </theme_item> <theme_item name="title_button_font" type="Font"> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 00cca40093..ed193b9f7e 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -1,453 +1,398 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Tween" inherits="Node" version="4.0"> +<class name="Tween" inherits="RefCounted" version="4.0"> <brief_description> - Smoothly animates a node's properties over time. + Lightweight object used for general-purpose animation via script, using [Tweener]s. </brief_description> <description> - Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them. - [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node. - Here is a brief usage example that makes a 2D node move smoothly between two positions: - [codeblocks] - [gdscript] - var tween = get_node("Tween") - tween.interpolate_property($Node2D, "position", - Vector2(0, 0), Vector2(100, 100), 1, - Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) - tween.start() - [/gdscript] - [csharp] - var tween = GetNode<Tween>("Tween"); - tween.InterpolateProperty(GetNode<Node2D>("Node2D"), "position", - new Vector2(0, 0), new Vector2(100, 100), 1, - Tween.TransitionType.Linear, Tween.EaseType.InOut); - tween.Start(); - [/csharp] - [/codeblocks] - Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (e.g. [code]position:x[/code]), where it would only apply to that particular component. - Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best. + Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them. + [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween]; it would be difficult to do the same thing with an [AnimationPlayer] node. Tweens are also more light-weight than [AnimationPlayer], so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped [CallbackTweener] with a delay. + A [Tween] can be created by using either [method SceneTree.create_tween] or [method Node.create_tween]. [Tween]s created manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be used for tweening values, but you can do manual interpolation with [method interpolate_value]. + A [Tween] animation is composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this: + [codeblock] + var tween = get_tree().create_tween() + tween.tween_property($Sprite, "modulate", Color.red, 1) + tween.tween_property($Sprite, "scale", Vector2(), 1) + tween.tween_callback($Sprite.queue_free) + [/codeblock] + This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information. + When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do: + [codeblock] + var tween = get_tree().create_tween() + tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE) + tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE) + tween.tween_callback($Sprite.queue_free) + [/codeblock] + Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition: + [codeblock] + var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC) + tween.tween_property($Sprite, "modulate", Color.red, 1) + tween.tween_property($Sprite, "scale", Vector2(), 1) + tween.tween_callback($Sprite.queue_free) + [/codeblock] + Another interesting use for [Tween]s is animating arbitrary set of objects: + [codeblock] + var tween = create_tween() + for sprite in get_children(): + tween.tween_property(sprite, "position", Vector2(), 1) + [/codeblock] + In the example above, all children of a node are moved one after another to position (0, 0). + Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url] + [b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it was created. </description> <tutorials> </tutorials> <methods> - <method name="follow_method"> - <return type="void"> + <method name="bind_node"> + <return type="Tween"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <argument index="2" name="initial_val" type="Variant"> - </argument> - <argument index="3" name="target" type="Object"> - </argument> - <argument index="4" name="target_method" type="StringName"> - </argument> - <argument index="5" name="duration" type="float"> - </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> - </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> - </argument> - <argument index="8" name="delay" type="float" default="0"> + <argument index="0" name="node" type="Node"> </argument> <description> - Follows [code]method[/code] of [code]object[/code] and applies the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are called with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. + Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node. + For a shorter way to create and bind a [Tween], you can use [method Node.create_tween]. </description> </method> - <method name="follow_property"> - <return type="void"> + <method name="chain"> + <return type="Tween"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="NodePath"> - </argument> - <argument index="2" name="initial_val" type="Variant"> - </argument> - <argument index="3" name="target" type="Object"> - </argument> - <argument index="4" name="target_property" type="NodePath"> - </argument> - <argument index="5" name="duration" type="float"> - </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> - </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> - </argument> - <argument index="8" name="delay" type="float" default="0"> - </argument> <description> - Follows [code]property[/code] of [code]object[/code] and applies it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. + Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code]. + [codeblock] + var tween = create_tween().set_parallel(true) + tween.tween_property(...) + tween.tween_property(...) #will run parallelly with above + tween.chain().tween_property(...) #will run after two above are finished + [/codeblock] </description> </method> - <method name="get_runtime" qualifiers="const"> - <return type="float"> + <method name="custom_step"> + <return type="bool"> </return> + <argument index="0" name="delta" type="float"> + </argument> <description> - Returns the total time needed for all tweens to end. If you have two tweens, one lasting 10 seconds and the other 20 seconds, it would return 20 seconds, as by that time all tweens would have finished. + Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually. + Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished. + [b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset. + [b]Note:[/b] [method custom_step] will process only one step of the [Tween]. If the [code]delta[/code] is greater than the remaining time, the excessive time will not have any effect. </description> </method> - <method name="interpolate_callback"> - <return type="void"> + <method name="interpolate_value"> + <return type="Variant"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="duration" type="float"> + <argument index="0" name="trans_type" type="Variant"> </argument> - <argument index="2" name="callback" type="String"> + <argument index="1" name="ease_type" type="Variant"> </argument> - <argument index="3" name="arg1" type="Variant" default="null"> + <argument index="2" name="elapsed_time" type="float"> </argument> - <argument index="4" name="arg2" type="Variant" default="null"> + <argument index="3" name="initial_value" type="float"> </argument> - <argument index="5" name="arg3" type="Variant" default="null"> + <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType"> </argument> - <argument index="6" name="arg4" type="Variant" default="null"> - </argument> - <argument index="7" name="arg5" type="Variant" default="null"> + <argument index="5" name="duration" type="int" enum="Tween.EaseType"> </argument> <description> - Calls [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback. + This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing. + [code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value. + [code]initial_value[/code] is the starting value of the interpolation. + [code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code]. + [code]duration[/code] is the total time of the interpolation. </description> </method> - <method name="interpolate_deferred_callback"> - <return type="void"> + <method name="is_running"> + <return type="bool"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="duration" type="float"> - </argument> - <argument index="2" name="callback" type="String"> - </argument> - <argument index="3" name="arg1" type="Variant" default="null"> - </argument> - <argument index="4" name="arg2" type="Variant" default="null"> - </argument> - <argument index="5" name="arg3" type="Variant" default="null"> - </argument> - <argument index="6" name="arg4" type="Variant" default="null"> - </argument> - <argument index="7" name="arg5" type="Variant" default="null"> - </argument> <description> - Calls [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [method Object.call_deferred]). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback. + Returns whether the [Tween] is currently running, i.e. it wasn't paused and it's not finished. </description> </method> - <method name="interpolate_method"> - <return type="void"> + <method name="is_valid"> + <return type="bool"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <argument index="2" name="initial_val" type="Variant"> - </argument> - <argument index="3" name="final_val" type="Variant"> - </argument> - <argument index="4" name="duration" type="float"> - </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> - </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> - </argument> - <argument index="7" name="delay" type="float" default="0"> - </argument> <description> - Animates [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are called with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. + Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). [Tween] might become invalid when it has finished tweening or was killed, also when created with [code]Tween.new()[/code]. Invalid [Tween] can't have [Tweener]s appended, because it can't animate them. You can however still use [method interpolate_value]. </description> </method> - <method name="interpolate_property"> + <method name="kill"> <return type="void"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="NodePath"> - </argument> - <argument index="2" name="initial_val" type="Variant"> - </argument> - <argument index="3" name="final_val" type="Variant"> - </argument> - <argument index="4" name="duration" type="float"> - </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> - </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> - </argument> - <argument index="7" name="delay" type="float" default="0"> - </argument> <description> - Animates [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Setting the initial value to [code]null[/code] uses the current value of the property. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. + Aborts all tweening operations and invalidates the [Tween]. </description> </method> - <method name="is_active" qualifiers="const"> - <return type="bool"> + <method name="parallel"> + <return type="Tween"> </return> <description> - Returns [code]true[/code] if any tweens are currently running. - [b]Note:[/b] This method doesn't consider tweens that have ended. + Makes the next [Tweener] run parallely to the previous one. Example: + [codeblock] + var tween = create_tween() + tween.tween_property(...) + tween.parallel().tween_property(...) + tween.parallel().tween_property(...) + [/codeblock] + All [Tweener]s in the example will run at the same time. + You can make the [Tween] parallel by default by using [method set_parallel]. </description> </method> - <method name="remove"> + <method name="pause"> <return type="void"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="StringName" default=""""> - </argument> <description> - Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified. + Pauses the tweening. The animation can be resumed by using [method play]. </description> </method> - <method name="remove_all"> + <method name="play"> <return type="void"> </return> <description> - Stops animation and removes all tweens. + Resumes a paused or stopped [Tween]. </description> </method> - <method name="reset"> - <return type="void"> + <method name="set_ease"> + <return type="Tween"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="StringName" default=""""> + <argument index="0" name="ease" type="int" enum="Tween.EaseType"> </argument> <description> - Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified. + Sets the default ease type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween]. </description> </method> - <method name="reset_all"> - <return type="void"> + <method name="set_loops"> + <return type="Tween"> </return> + <argument index="0" name="loops" type="int" default="0"> + </argument> <description> - Resets all tweens to their initial values (the ones given, not those before the tween). + Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice. + Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible). </description> </method> - <method name="resume"> - <return type="void"> + <method name="set_parallel"> + <return type="Tween"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="StringName" default=""""> + <argument index="0" name="parallel" type="bool" default="true"> </argument> <description> - Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified. + If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after this method will by default run simultanously, as opposed to sequentially. </description> </method> - <method name="resume_all"> - <return type="void"> + <method name="set_pause_mode"> + <return type="Tween"> </return> + <argument index="0" name="mode" type="int" enum="Tween.TweenPauseMode"> + </argument> <description> - Continues animating all stopped tweens. + Determines the behavior of the [Tween] when the [SceneTree] is paused. Check [enum TweenPauseMode] for options. + Default value is [constant TWEEN_PAUSE_BOUND]. </description> </method> - <method name="seek"> - <return type="void"> + <method name="set_process_mode"> + <return type="Tween"> </return> - <argument index="0" name="time" type="float"> + <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode"> </argument> <description> - Sets the interpolation to the given [code]time[/code] in seconds. + Determines whether the [Tween] should run during idle frame (see [method Node._process]) or physics frame (see [method Node._physics_process]. + Default value is [constant TWEEN_PROCESS_IDLE]. </description> </method> - <method name="set_active"> - <return type="void"> + <method name="set_speed_scale"> + <return type="Tween"> </return> - <argument index="0" name="active" type="bool"> + <argument index="0" name="speed" type="float"> </argument> <description> - Activates/deactivates the tween. See also [method stop_all] and [method resume_all]. + Scales the speed of tweening. This affects all [Tweener]s and their delays. </description> </method> - <method name="start"> - <return type="void"> + <method name="set_trans"> + <return type="Tween"> </return> + <argument index="0" name="trans" type="int" enum="Tween.TransitionType"> + </argument> <description> - Starts the tween. You can define animations both before and after this. + Sets the default transition type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween]. </description> </method> <method name="stop"> <return type="void"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="StringName" default=""""> - </argument> <description> - Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified. + Stops the tweening and resets the [Tween] to its initial state. This will not remove any appended [Tweener]s. </description> </method> - <method name="stop_all"> - <return type="void"> + <method name="tween_callback"> + <return type="CallbackTweener"> </return> + <argument index="0" name="callback" type="Callable"> + </argument> <description> - Stops animating all tweens. + Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call. + Example: object that keeps shooting every 1 second. + [codeblock] + var tween = get_tree().create_tween().set_loops() + tween.tween_callback(shoot).set_delay(1) + [/codeblock] + Example: turning a sprite red and then blue, with 2 second delay. + [codeblock] + var tween = get_tree().create_tween() + tween.tween_callback($Sprite.set_modulate.bind(Color.red)).set_delay(2) + tween.tween_callback($Sprite.set_modulate.bind(Color.blue)).set_delay(2) + [/codeblock] </description> </method> - <method name="targeting_method"> - <return type="void"> + <method name="tween_interval"> + <return type="IntervalTweener"> </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <argument index="2" name="initial" type="Object"> - </argument> - <argument index="3" name="initial_method" type="StringName"> - </argument> - <argument index="4" name="final_val" type="Variant"> + <argument index="0" name="time" type="float"> </argument> - <argument index="5" name="duration" type="float"> + <description> + Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds. + Example: creating an interval in code execution. + [codeblock] + #... some code + var tween = create_tween() + tween.tween_interval(2) + await tween.finished + #... more code + [/codeblock] + Example: creating an object that moves back and forth and jumps every few seconds. + [codeblock] + var tween = create_tween().set_loops() + tween.tween_property("position:x", 200, 1).as_relative() + tween.tween_callback(jump) + tween.tween_interval(2) + tween.tween_property("position:x", -200, 1).as_relative() + tween.tween_callback(jump) + tween.tween_interval(2) + [/codeblock] + </description> + </method> + <method name="tween_method"> + <return type="MethodTweener"> + </return> + <argument index="0" name="method" type="Callable"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> + <argument index="1" name="from" type="float"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> + <argument index="2" name="to" type="float"> </argument> - <argument index="8" name="delay" type="float" default="0"> + <argument index="3" name="duration" type="float"> </argument> <description> - Animates [code]method[/code] of [code]object[/code] from the value returned by [code]initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. + Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening. + Example: making a 3D object look from one point to another point. + [codeblock] + var tween = create_tween() + tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) #the look_at() method takes up vector as second argument + [/codeblock] + Example: setting a text of a [Label], using an intermediate method and after a delay. + [codeblock] + func _ready(): + var tween = create_tween() + tween.tween_method(set_label_text, 0, 10, 1).set_delay(1) + + func set_label_text(value: int): + $Label.text = "Counting " + str(value) + [/codeblock] </description> </method> - <method name="targeting_property"> - <return type="void"> + <method name="tween_property"> + <return type="PropertyTweener"> </return> <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="property" type="NodePath"> </argument> - <argument index="2" name="initial" type="Object"> - </argument> - <argument index="3" name="initial_val" type="NodePath"> - </argument> - <argument index="4" name="final_val" type="Variant"> + <argument index="2" name="final_val" type="Variant"> </argument> - <argument index="5" name="duration" type="float"> + <argument index="3" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> - </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> - </argument> - <argument index="8" name="delay" type="float" default="0"> - </argument> - <description> - Animates [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. - </description> - </method> - <method name="tell" qualifiers="const"> - <return type="float"> - </return> <description> - Returns the current time of the tween. + Creates and appends a [PropertyTweener]. This method tweens a [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is a value at the time the tweening of the [PropertyTweener] start. For example: + [codeblock] + var tween = create_tween() + tween.tween_property($Sprite, "position", Vector2(100, 200) + tween.tween_property($Sprite, "position", Vector2(200, 300) + [/codeblock] + will move the sprite to position (100, 200) and then to (200, 300). If you use [method PropertyTweener.from] or [method PropertyTweener.from_current], the starting position will be overwritten by the given value instead. See other methods in [PropertyTweener] to see how the tweening can be tweaked further. + [b]Note:[/b] You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component. + Example: moving object twice from the same position, with different transition types. + [codeblock] + var tween = create_tween() + tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().set_trans(Tween.TRANS_SINE) + tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().from_current().set_trans(Tween.TRANS_EXPO) + [/codeblock] </description> </method> </methods> - <members> - <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode" default="1"> - The tween's animation process thread. See [enum TweenProcessMode]. - </member> - <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> - The tween's speed multiplier. For example, set it to [code]1.0[/code] for normal speed, [code]2.0[/code] for two times normal speed, or [code]0.5[/code] for half of the normal speed. A value of [code]0[/code] pauses the animation, but see also [method set_active] or [method stop_all] for this. - </member> - <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat" default="false"> - If [code]true[/code], the tween loops. - </member> - </members> <signals> - <signal name="tween_all_completed"> + <signal name="finished"> <description> - Emitted when all processes in a tween end. + Emitted when the [Tween] has finished all tweening. Never emitted when the [Tween] is set to infinite looping (see [method set_loops]). + [b]Note:[/b] The [Tween] is removed (invalidated) after this signal is emitted, but it doesn't happen immediately, but on the next processing frame. Calling [method stop] inside the signal callback will preserve the [Tween]. </description> </signal> - <signal name="tween_completed"> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="NodePath"> + <signal name="loop_finished"> + <argument index="0" name="loop_count" type="int"> </argument> <description> - Emitted when a tween ends. + Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after final loop, use [signal finished] instead for this case. </description> </signal> - <signal name="tween_started"> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="NodePath"> + <signal name="step_finished"> + <argument index="0" name="idx" type="int"> </argument> <description> - Emitted when a tween starts. - </description> - </signal> - <signal name="tween_step"> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="key" type="NodePath"> - </argument> - <argument index="2" name="elapsed" type="float"> - </argument> - <argument index="3" name="value" type="Object"> - </argument> - <description> - Emitted at each step of the animation. + Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running parallelly. </description> </signal> </signals> <constants> <constant name="TWEEN_PROCESS_PHYSICS" value="0" enum="TweenProcessMode"> - The tween updates with the [code]_physics_process[/code] callback. + The [Tween] updates during physics frame. </constant> <constant name="TWEEN_PROCESS_IDLE" value="1" enum="TweenProcessMode"> - The tween updates with the [code]_process[/code] callback. + The [Tween] updates during idle + </constant> + <constant name="TWEEN_PAUSE_BOUND" value="0" enum="TweenPauseMode"> + </constant> + <constant name="TWEEN_PAUSE_STOP" value="1" enum="TweenPauseMode"> + </constant> + <constant name="TWEEN_PAUSE_PROCESS" value="2" enum="TweenPauseMode"> </constant> <constant name="TRANS_LINEAR" value="0" enum="TransitionType"> - The animation is interpolated linearly. </constant> <constant name="TRANS_SINE" value="1" enum="TransitionType"> - The animation is interpolated using a sine function. </constant> <constant name="TRANS_QUINT" value="2" enum="TransitionType"> - The animation is interpolated with a quintic (to the power of 5) function. </constant> <constant name="TRANS_QUART" value="3" enum="TransitionType"> - The animation is interpolated with a quartic (to the power of 4) function. </constant> <constant name="TRANS_QUAD" value="4" enum="TransitionType"> - The animation is interpolated with a quadratic (to the power of 2) function. </constant> <constant name="TRANS_EXPO" value="5" enum="TransitionType"> - The animation is interpolated with an exponential (to the power of x) function. </constant> <constant name="TRANS_ELASTIC" value="6" enum="TransitionType"> - The animation is interpolated with elasticity, wiggling around the edges. </constant> <constant name="TRANS_CUBIC" value="7" enum="TransitionType"> - The animation is interpolated with a cubic (to the power of 3) function. </constant> <constant name="TRANS_CIRC" value="8" enum="TransitionType"> - The animation is interpolated with a function using square roots. </constant> <constant name="TRANS_BOUNCE" value="9" enum="TransitionType"> - The animation is interpolated by bouncing at the end. </constant> <constant name="TRANS_BACK" value="10" enum="TransitionType"> - The animation is interpolated backing out at ends. </constant> <constant name="EASE_IN" value="0" enum="EaseType"> - The interpolation starts slowly and speeds up towards the end. </constant> <constant name="EASE_OUT" value="1" enum="EaseType"> - The interpolation starts quickly and slows down towards the end. </constant> <constant name="EASE_IN_OUT" value="2" enum="EaseType"> - A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends. </constant> <constant name="EASE_OUT_IN" value="3" enum="EaseType"> - A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends. </constant> </constants> </class> diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml new file mode 100644 index 0000000000..5cd502ced9 --- /dev/null +++ b/doc/classes/Tweener.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Tweener" inherits="RefCounted" version="4.0"> + <brief_description> + Abstract class for all Tweeners used by [Tween]. + </brief_description> + <description> + Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A [Tweener] can't be created manually, you need to use a dedicated method from [Tween] or [Node]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <signals> + <signal name="finished"> + <description> + Emited when the [Tweener] has just finished its job. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 1390a5e45b..07d09c31dc 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -513,25 +513,25 @@ <constant name="AXIS_Y" value="1"> Enumerated value for the Y axis. </constant> - <constant name="ZERO" value="Vector2( 0, 0 )"> + <constant name="ZERO" value="Vector2(0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. </constant> - <constant name="ONE" value="Vector2( 1, 1 )"> + <constant name="ONE" value="Vector2(1, 1)"> One vector, a vector with all components set to [code]1[/code]. </constant> - <constant name="INF" value="Vector2( inf, inf )"> + <constant name="INF" value="Vector2(inf, inf)"> Infinity vector, a vector with all components set to [constant @GDScript.INF]. </constant> - <constant name="LEFT" value="Vector2( -1, 0 )"> + <constant name="LEFT" value="Vector2(-1, 0)"> Left unit vector. Represents the direction of left. </constant> - <constant name="RIGHT" value="Vector2( 1, 0 )"> + <constant name="RIGHT" value="Vector2(1, 0)"> Right unit vector. Represents the direction of right. </constant> - <constant name="UP" value="Vector2( 0, -1 )"> + <constant name="UP" value="Vector2(0, -1)"> Up unit vector. Y is down in 2D, so this vector points -Y. </constant> - <constant name="DOWN" value="Vector2( 0, 1 )"> + <constant name="DOWN" value="Vector2(0, 1)"> Down unit vector. Y is down in 2D, so this vector points +Y. </constant> </constants> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 6efb52b712..930ec944ba 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -246,22 +246,22 @@ <constant name="AXIS_Y" value="1"> Enumerated value for the Y axis. </constant> - <constant name="ZERO" value="Vector2i( 0, 0 )"> + <constant name="ZERO" value="Vector2i(0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. </constant> - <constant name="ONE" value="Vector2i( 1, 1 )"> + <constant name="ONE" value="Vector2i(1, 1)"> One vector, a vector with all components set to [code]1[/code]. </constant> - <constant name="LEFT" value="Vector2i( -1, 0 )"> + <constant name="LEFT" value="Vector2i(-1, 0)"> Left unit vector. Represents the direction of left. </constant> - <constant name="RIGHT" value="Vector2i( 1, 0 )"> + <constant name="RIGHT" value="Vector2i(1, 0)"> Right unit vector. Represents the direction of right. </constant> - <constant name="UP" value="Vector2i( 0, -1 )"> + <constant name="UP" value="Vector2i(0, -1)"> Up unit vector. Y is down in 2D, so this vector points -Y. </constant> - <constant name="DOWN" value="Vector2i( 0, 1 )"> + <constant name="DOWN" value="Vector2i(0, 1)"> Down unit vector. Y is down in 2D, so this vector points +Y. </constant> </constants> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index b6effd441b..eb1fd5f098 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -173,7 +173,7 @@ <return type="Vector3"> </return> <description> - Returns the inverse of the vector. This is the same as [code]Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )[/code]. + Returns the inverse of the vector. This is the same as [code]Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z)[/code]. </description> </method> <method name="is_equal_approx" qualifiers="const"> @@ -556,31 +556,31 @@ <constant name="AXIS_Z" value="2"> Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis]. </constant> - <constant name="ZERO" value="Vector3( 0, 0, 0 )"> + <constant name="ZERO" value="Vector3(0, 0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. </constant> - <constant name="ONE" value="Vector3( 1, 1, 1 )"> + <constant name="ONE" value="Vector3(1, 1, 1)"> One vector, a vector with all components set to [code]1[/code]. </constant> - <constant name="INF" value="Vector3( inf, inf, inf )"> + <constant name="INF" value="Vector3(inf, inf, inf)"> Infinity vector, a vector with all components set to [constant @GDScript.INF]. </constant> - <constant name="LEFT" value="Vector3( -1, 0, 0 )"> + <constant name="LEFT" value="Vector3(-1, 0, 0)"> Left unit vector. Represents the local direction of left, and the global direction of west. </constant> - <constant name="RIGHT" value="Vector3( 1, 0, 0 )"> + <constant name="RIGHT" value="Vector3(1, 0, 0)"> Right unit vector. Represents the local direction of right, and the global direction of east. </constant> - <constant name="UP" value="Vector3( 0, 1, 0 )"> + <constant name="UP" value="Vector3(0, 1, 0)"> Up unit vector. </constant> - <constant name="DOWN" value="Vector3( 0, -1, 0 )"> + <constant name="DOWN" value="Vector3(0, -1, 0)"> Down unit vector. </constant> - <constant name="FORWARD" value="Vector3( 0, 0, -1 )"> + <constant name="FORWARD" value="Vector3(0, 0, -1)"> Forward unit vector. Represents the local direction of forward, and the global direction of north. </constant> - <constant name="BACK" value="Vector3( 0, 0, 1 )"> + <constant name="BACK" value="Vector3(0, 0, 1)"> Back unit vector. Represents the local direction of back, and the global direction of south. </constant> </constants> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 6e8a34b692..8b45a62afa 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -260,28 +260,28 @@ <constant name="AXIS_Z" value="2"> Enumerated value for the Z axis. </constant> - <constant name="ZERO" value="Vector3i( 0, 0, 0 )"> + <constant name="ZERO" value="Vector3i(0, 0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. </constant> - <constant name="ONE" value="Vector3i( 1, 1, 1 )"> + <constant name="ONE" value="Vector3i(1, 1, 1)"> One vector, a vector with all components set to [code]1[/code]. </constant> - <constant name="LEFT" value="Vector3i( -1, 0, 0 )"> + <constant name="LEFT" value="Vector3i(-1, 0, 0)"> Left unit vector. Represents the local direction of left, and the global direction of west. </constant> - <constant name="RIGHT" value="Vector3i( 1, 0, 0 )"> + <constant name="RIGHT" value="Vector3i(1, 0, 0)"> Right unit vector. Represents the local direction of right, and the global direction of east. </constant> - <constant name="UP" value="Vector3i( 0, 1, 0 )"> + <constant name="UP" value="Vector3i(0, 1, 0)"> Up unit vector. </constant> - <constant name="DOWN" value="Vector3i( 0, -1, 0 )"> + <constant name="DOWN" value="Vector3i(0, -1, 0)"> Down unit vector. </constant> - <constant name="FORWARD" value="Vector3i( 0, 0, -1 )"> + <constant name="FORWARD" value="Vector3i(0, 0, -1)"> Forward unit vector. Represents the local direction of forward, and the global direction of north. </constant> - <constant name="BACK" value="Vector3i( 0, 0, 1 )"> + <constant name="BACK" value="Vector3i(0, 0, 1)"> Back unit vector. Represents the local direction of back, and the global direction of south. </constant> </constants> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 96d63b27ad..292be34a0d 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -179,13 +179,6 @@ <description> </description> </method> - <method name="update_worlds"> - <return type="void"> - </return> - <description> - Forces update of the 2D and 3D worlds. - </description> - </method> <method name="warp_mouse"> <return type="void"> </return> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml deleted file mode 100644 index 02fe7a7cd0..0000000000 --- a/doc/classes/VisibilityEnabler2D.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" version="4.0"> - <brief_description> - Enables certain nodes only when approximately visible. - </brief_description> - <description> - The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself. - If you just want to receive notifications, use [VisibilityNotifier2D] instead. - [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. - [b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization. - </description> - <tutorials> - </tutorials> - <methods> - <method name="is_enabler_enabled" qualifiers="const"> - <return type="bool"> - </return> - <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"> - <return type="void"> - </return> - <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - Sets active state of the enabler identified by given [enum Enabler] constant. - </description> - </method> - </methods> - <members> - <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> - If [code]true[/code], [RigidBody2D] nodes will be paused. - </member> - <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> - If [code]true[/code], [AnimatedSprite2D] nodes will be paused. - </member> - <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> - If [code]true[/code], [AnimationPlayer] nodes will be paused. - </member> - <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> - If [code]true[/code], [GPUParticles2D] nodes will be paused. - </member> - <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false"> - If [code]true[/code], the parent's [method Node._physics_process] will be stopped. - </member> - <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false"> - If [code]true[/code], the parent's [method Node._process] will be stopped. - </member> - </members> - <constants> - <constant name="ENABLER_PAUSE_ANIMATIONS" value="0" enum="Enabler"> - This enabler will pause [AnimationPlayer] nodes. - </constant> - <constant name="ENABLER_FREEZE_BODIES" value="1" enum="Enabler"> - This enabler will freeze [RigidBody2D] nodes. - </constant> - <constant name="ENABLER_PAUSE_PARTICLES" value="2" enum="Enabler"> - This enabler will stop [GPUParticles2D] nodes. - </constant> - <constant name="ENABLER_PARENT_PROCESS" value="3" enum="Enabler"> - This enabler will stop the parent's _process function. - </constant> - <constant name="ENABLER_PARENT_PHYSICS_PROCESS" value="4" enum="Enabler"> - 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 [AnimatedSprite2D] nodes animations. - </constant> - <constant name="ENABLER_MAX" value="6" enum="Enabler"> - Represents the size of the [enum Enabler] enum. - </constant> - </constants> -</class> diff --git a/doc/classes/VisibilityEnabler3D.xml b/doc/classes/VisibilityEnabler3D.xml deleted file mode 100644 index d78ebb55f2..0000000000 --- a/doc/classes/VisibilityEnabler3D.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityEnabler3D" inherits="VisibilityNotifier3D" version="4.0"> - <brief_description> - Enables certain nodes only when approximately visible. - </brief_description> - <description> - The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself. - If you just want to receive notifications, use [VisibilityNotifier3D] instead. - [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. - [b]Note:[/b] VisibilityEnabler3D will not affect nodes added after scene initialization. - </description> - <tutorials> - </tutorials> - <methods> - <method name="is_enabler_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="enabler" type="int" enum="VisibilityEnabler3D.Enabler"> - </argument> - <description> - Returns whether the enabler identified by given [enum Enabler] constant is active. - </description> - </method> - <method name="set_enabler"> - <return type="void"> - </return> - <argument index="0" name="enabler" type="int" enum="VisibilityEnabler3D.Enabler"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - Sets active state of the enabler identified by given [enum Enabler] constant. - </description> - </method> - </methods> - <members> - <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> - If [code]true[/code], [RigidBody3D] nodes will be paused. - </member> - <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> - If [code]true[/code], [AnimationPlayer] nodes will be paused. - </member> - </members> - <constants> - <constant name="ENABLER_PAUSE_ANIMATIONS" value="0" enum="Enabler"> - This enabler will pause [AnimationPlayer] nodes. - </constant> - <constant name="ENABLER_FREEZE_BODIES" value="1" enum="Enabler"> - This enabler will freeze [RigidBody3D] nodes. - </constant> - <constant name="ENABLER_MAX" value="2" enum="Enabler"> - Represents the size of the [enum Enabler] enum. - </constant> - </constants> -</class> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml deleted file mode 100644 index 761438b77e..0000000000 --- a/doc/classes/VisibilityNotifier2D.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityNotifier2D" inherits="Node2D" version="4.0"> - <brief_description> - Detects approximately when the node is visible on screen. - </brief_description> - <description> - The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. - If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler2D] instead. - [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. - </description> - <tutorials> - <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> - </tutorials> - <methods> - <method name="is_on_screen" qualifiers="const"> - <return type="bool"> - </return> - <description> - If [code]true[/code], the bounding rectangle is on the screen. - [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. - </description> - </method> - </methods> - <members> - <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -10, -10, 20, 20 )"> - The VisibilityNotifier2D's bounding rectangle. - </member> - </members> - <signals> - <signal name="screen_entered"> - <description> - Emitted when the VisibilityNotifier2D enters the screen. - </description> - </signal> - <signal name="screen_exited"> - <description> - Emitted when the VisibilityNotifier2D exits the screen. - </description> - </signal> - <signal name="viewport_entered"> - <argument index="0" name="viewport" type="Viewport"> - </argument> - <description> - Emitted when the VisibilityNotifier2D enters a [Viewport]'s view. - </description> - </signal> - <signal name="viewport_exited"> - <argument index="0" name="viewport" type="Viewport"> - </argument> - <description> - Emitted when the VisibilityNotifier2D exits a [Viewport]'s view. - </description> - </signal> - </signals> - <constants> - </constants> -</class> diff --git a/doc/classes/VisibilityNotifier3D.xml b/doc/classes/VisibilityNotifier3D.xml deleted file mode 100644 index e5d3116612..0000000000 --- a/doc/classes/VisibilityNotifier3D.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityNotifier3D" inherits="Node3D" version="4.0"> - <brief_description> - Detects approximately when the node is visible on screen. - </brief_description> - <description> - The VisibilityNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view. - If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler3D] instead. - [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. - </description> - <tutorials> - </tutorials> - <methods> - <method name="is_on_screen" qualifiers="const"> - <return type="bool"> - </return> - <description> - If [code]true[/code], the bounding box is on the screen. - [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. - </description> - </method> - </methods> - <members> - <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB( -1, -1, -1, 2, 2, 2 )"> - The VisibilityNotifier3D's bounding box. - </member> - </members> - <signals> - <signal name="camera_entered"> - <argument index="0" name="camera" type="Camera3D"> - </argument> - <description> - Emitted when the VisibilityNotifier3D enters a [Camera3D]'s view. - </description> - </signal> - <signal name="camera_exited"> - <argument index="0" name="camera" type="Camera3D"> - </argument> - <description> - Emitted when the VisibilityNotifier3D exits a [Camera3D]'s view. - </description> - </signal> - <signal name="screen_entered"> - <description> - Emitted when the VisibilityNotifier3D enters the screen. - </description> - </signal> - <signal name="screen_exited"> - <description> - Emitted when the VisibilityNotifier3D exits the screen. - </description> - </signal> - </signals> - <constants> - </constants> -</class> diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml new file mode 100644 index 0000000000..c6ae8227d2 --- /dev/null +++ b/doc/classes/VisibleOnScreenEnabler2D.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0"> + </member> + <member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath("..")"> + </member> + </members> + <constants> + <constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode"> + </constant> + <constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode"> + </constant> + <constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode"> + </constant> + </constants> +</class> diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml new file mode 100644 index 0000000000..3205d6b415 --- /dev/null +++ b/doc/classes/VisibleOnScreenEnabler3D.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisibleOnScreenEnabler3D" inherits="VisibleOnScreenNotifier3D" version="4.0"> + <brief_description> + Enables certain nodes only when approximately visible. + </brief_description> + <description> + The VisibleOnScreenEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself. + If you just want to receive notifications, use [VisibleOnScreenNotifier3D] instead. + [b]Note:[/b] VisibleOnScreenEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. + [b]Note:[/b] VisibleOnScreenEnabler3D will not affect nodes added after scene initialization. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler3D.EnableMode" default="0"> + </member> + <member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath("..")"> + </member> + </members> + <constants> + <constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode"> + </constant> + <constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode"> + </constant> + <constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode"> + </constant> + </constants> +</class> diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml new file mode 100644 index 0000000000..daad200ca8 --- /dev/null +++ b/doc/classes/VisibleOnScreenNotifier2D.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisibleOnScreenNotifier2D" inherits="Node2D" version="4.0"> + <brief_description> + Detects when the node extents are visible on screen. + </brief_description> + <description> + The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. + If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler2D] instead. + </description> + <tutorials> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + </tutorials> + <methods> + <method name="is_on_screen" qualifiers="const"> + <return type="bool"> + </return> + <description> + If [code]true[/code], the bounding rectangle is on the screen. + [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. + </description> + </method> + </methods> + <members> + <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2(-10, -10, 20, 20)"> + The VisibleOnScreenNotifier2D's bounding rectangle. + </member> + </members> + <signals> + <signal name="screen_entered"> + <description> + Emitted when the VisibleOnScreenNotifier2D enters the screen. + </description> + </signal> + <signal name="screen_exited"> + <description> + Emitted when the VisibleOnScreenNotifier2D exits the screen. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml new file mode 100644 index 0000000000..85ff324fbf --- /dev/null +++ b/doc/classes/VisibleOnScreenNotifier3D.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" version="4.0"> + <brief_description> + Detects approximately when the node is visible on screen. + </brief_description> + <description> + The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view. + If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler3D] instead. + [b]Note:[/b] VisibleOnScreenNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="is_on_screen" qualifiers="const"> + <return type="bool"> + </return> + <description> + If [code]true[/code], the bounding box is on the screen. + [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. + </description> + </method> + </methods> + <members> + <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(-1, -1, -1, 2, 2, 2)"> + The VisibleOnScreenNotifier3D's bounding box. + </member> + </members> + <signals> + <signal name="screen_entered"> + <description> + Emitted when the VisibleOnScreenNotifier3D enters the screen. + </description> + </signal> + <signal name="screen_exited"> + <description> + Emitted when the VisibleOnScreenNotifier3D exits the screen. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 775ac88eff..19b4acd8f1 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -206,7 +206,7 @@ </method> </methods> <members> - <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> + <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)"> The offset vector of the whole graph. </member> <member name="version" type="String" setter="set_version" getter="get_version" default=""""> diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml index 8644013ef2..fa1a11c488 100644 --- a/doc/classes/VisualShaderNodeColorConstant.xml +++ b/doc/classes/VisualShaderNodeColorConstant.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color( 1, 1, 1, 1 )"> + <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color(1, 1, 1, 1)"> A [Color] constant which represents a state of this node. </member> </members> diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml index 90ef381b76..bdaf301f09 100644 --- a/doc/classes/VisualShaderNodeColorUniform.xml +++ b/doc/classes/VisualShaderNodeColorUniform.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color( 1, 1, 1, 1 )"> + <member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color(1, 1, 1, 1)"> A default value to be assigned within the shader. </member> <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml index 9f827a96cc..9052f6854b 100644 --- a/doc/classes/VisualShaderNodeResizableBase.xml +++ b/doc/classes/VisualShaderNodeResizableBase.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node in the visual shader graph. </member> </members> diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index 550ed829c9..30178752d0 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> A [Transform3D] constant which represents the state of this node. </member> </members> diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index 1f1cc4b630..2f7818ec8a 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> A default value to be assigned within the shader. </member> <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml index b01bb514fe..28c3d22345 100644 --- a/doc/classes/VisualShaderNodeVec3Constant.xml +++ b/doc/classes/VisualShaderNodeVec3Constant.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3( 0, 0, 0 )"> + <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3(0, 0, 0)"> A [Vector3] constant which represents the state of this node. </member> </members> diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml index cd1500f5a1..215e2cfbea 100644 --- a/doc/classes/VisualShaderNodeVec3Uniform.xml +++ b/doc/classes/VisualShaderNodeVec3Uniform.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3( 0, 0, 0 )"> + <member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3(0, 0, 0)"> A default value to be assigned within the shader. </member> <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml index fa5035349e..5b395becb7 100644 --- a/doc/classes/VoxelGI.xml +++ b/doc/classes/VoxelGI.xml @@ -36,7 +36,7 @@ <member name="data" type="VoxelGIData" setter="set_probe_data" getter="get_probe_data"> The [VoxelGIData] resource that holds the data for this [VoxelGI]. </member> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)"> The size of the area covered by the [VoxelGI]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting. </member> <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="VoxelGI.Subdiv" default="1"> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 9c320747d1..6ae5a5f449 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -218,7 +218,7 @@ <method name="popup"> <return type="void"> </return> - <argument index="0" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)"> </argument> <description> </description> @@ -226,7 +226,7 @@ <method name="popup_centered"> <return type="void"> </return> - <argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )"> + <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)"> </argument> <description> </description> @@ -234,7 +234,7 @@ <method name="popup_centered_clamped"> <return type="void"> </return> - <argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )"> + <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)"> </argument> <argument index="1" name="fallback_ratio" type="float" default="0.75"> </argument> @@ -322,21 +322,21 @@ </member> <member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0"> </member> - <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i( 0, 0 )"> + <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)"> </member> <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> </member> <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> </member> - <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i( 0, 0 )"> + <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)"> </member> - <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i( 0, 0 )"> + <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)"> </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0"> </member> - <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i( 0, 0 )"> + <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)"> </member> - <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 100, 100 )"> + <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(100, 100)"> </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> @@ -472,7 +472,7 @@ </theme_item> <theme_item name="scaleborder_size" type="int" default="4"> </theme_item> - <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> <theme_item name="title_font" type="Font"> </theme_item> @@ -481,7 +481,7 @@ </theme_item> <theme_item name="title_height" type="int" default="20"> </theme_item> - <theme_item name="title_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="title_outline_modulate" type="Color" default="Color(1, 1, 1, 1)"> The color of the title outline. </theme_item> <theme_item name="title_outline_size" type="int" default="0"> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index c1cf639ec0..6aa2db00b4 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -5,7 +5,7 @@ </brief_description> <description> The [WorldEnvironment] node is used to configure the default [Environment] for the scene. - The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. + The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instantiated in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. </description> <tutorials> diff --git a/doc/classes/WorldMarginShape3D.xml b/doc/classes/WorldMarginShape3D.xml index a91447056b..9a26f254f1 100644 --- a/doc/classes/WorldMarginShape3D.xml +++ b/doc/classes/WorldMarginShape3D.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )"> + <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane(0, 1, 0, 0)"> The [Plane] used by the [WorldMarginShape3D] for collision. </member> </members> |