diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 3 | ||||
-rw-r--r-- | doc/classes/AESContext.xml | 99 | ||||
-rw-r--r-- | doc/classes/Color.xml | 3 | ||||
-rw-r--r-- | doc/classes/Crypto.xml | 66 | ||||
-rw-r--r-- | doc/classes/CryptoKey.xml | 37 | ||||
-rw-r--r-- | doc/classes/EditorPlugin.xml | 2 | ||||
-rw-r--r-- | doc/classes/InputMap.xml | 18 | ||||
-rw-r--r-- | doc/classes/Joint2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/OS.xml | 18 | ||||
-rw-r--r-- | doc/classes/PhysicsMaterial.xml | 2 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 2 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 5 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 4 | ||||
-rw-r--r-- | doc/classes/Shape2D.xml | 11 | ||||
-rw-r--r-- | doc/classes/Skeleton3D.xml | 39 | ||||
-rw-r--r-- | doc/classes/String.xml | 2 | ||||
-rw-r--r-- | doc/classes/ToolButton.xml | 57 | ||||
-rw-r--r-- | doc/classes/Tween.xml | 2 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 3 | ||||
-rw-r--r-- | doc/classes/Vector2i.xml | 3 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 3 | ||||
-rw-r--r-- | doc/classes/Vector3i.xml | 3 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeSample3D.xml | 26 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeTexture2DArray.xml | 20 | ||||
-rw-r--r-- | doc/classes/bool.xml | 13 |
25 files changed, 343 insertions, 100 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 41811a48b1..9a28a0d085 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -33,6 +33,9 @@ <member name="Geometry3D" type="Geometry3D" setter="" getter=""> The [Geometry3D] singleton. </member> + <member name="GodotSharp" type="GodotSharp" setter="" getter=""> + The [GodotSharp] singleton. + </member> <member name="IP" type="IP" setter="" getter=""> The [IP] singleton. </member> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml new file mode 100644 index 0000000000..ab4d0e0bc3 --- /dev/null +++ b/doc/classes/AESContext.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AESContext" inherits="Reference" version="4.0"> + <brief_description> + Interface to low level AES encryption features. + </brief_description> + <description> + This class provides access to AES encryption/decryption of raw data. Both AES-ECB and AES-CBC mode are supported. + [codeblock] + extends Node + + var aes = AESContext.new() + + func _ready(): + var key = "My secret key!!!" # Key must be either 16 or 32 bytes. + var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed. + # Encrypt ECB + aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8()) + var encrypted = aes.update(data.to_utf8()) + aes.finish() + # Decrypt ECB + aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8()) + var decrypted = aes.update(encrypted) + aes.finish() + # Check ECB + assert(decrypted == data.to_utf8()) + + var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes. + # Encrypt CBC + aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8()) + encrypted = aes.update(data.to_utf8()) + aes.finish() + # Decrypt CBC + aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8()) + decrypted = aes.update(encrypted) + aes.finish() + # Check CBC + assert(decrypted == data.to_utf8()) + [/codeblock] + </description> + <tutorials> + </tutorials> + <methods> + <method name="finish"> + <return type="void"> + </return> + <description> + Close this AES context so it can be started again. See [method start]. + </description> + </method> + <method name="get_iv_state"> + <return type="PackedByteArray"> + </return> + <description> + Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this funciton. + Note: This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. + </description> + </method> + <method name="start"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="mode" type="int" enum="AESContext.Mode"> + </argument> + <argument index="1" name="key" type="PackedByteArray"> + </argument> + <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]. + </description> + </method> + <method name="update"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="src" type="PackedByteArray"> + </argument> + <description> + Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [code]src[/code]. See [method start] for mode of operation. + Note: The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed. + </description> + </method> + </methods> + <constants> + <constant name="MODE_ECB_ENCRYPT" value="0" enum="Mode"> + AES electronic codebook encryption mode. + </constant> + <constant name="MODE_ECB_DECRYPT" value="1" enum="Mode"> + AES electronic codebook decryption mode. + </constant> + <constant name="MODE_CBC_ENCRYPT" value="2" enum="Mode"> + AES cipher blocker chaining encryption mode. + </constant> + <constant name="MODE_CBC_DECRYPT" value="3" enum="Mode"> + AES cipher blocker chaining decryption mode. + </constant> + <constant name="MODE_MAX" value="4" enum="Mode"> + Maximum value for the mode enum. + </constant> + </constants> +</class> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index b35d4fb36a..17b474531e 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -5,8 +5,9 @@ </brief_description> <description> A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1. - You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. + You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8]. + [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index 10f1f18f0d..4edb3eda0a 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -5,7 +5,7 @@ </brief_description> <description> The Crypto class allows you to access some more advanced cryptographic functionalities in Godot. - For now, this includes generating cryptographically secure random bytes, and RSA keys and self-signed X509 certificates generation. More functionalities are planned for future releases. + For now, this includes generating cryptographically secure random bytes, RSA keys and self-signed X509 certificates generation, asymmetric key encryption/decryption, and signing/verification. [codeblock] extends Node @@ -21,12 +21,48 @@ # Save key and certificate in the user folder. key.save("user://generated.key") cert.save("user://generated.crt") + # Encryption + var data = "Some data" + var encrypted = crypto.encrypt(key, data.to_utf8()) + # Decryption + var decrypted = crypto.decrypt(key, encrypted) + # Signing + var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key) + # Verifying + var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) + # Checks + assert(verified) + assert(data.to_utf8() == decrypted) [/codeblock] [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> <methods> + <method name="decrypt"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="key" type="CryptoKey"> + </argument> + <argument index="1" name="ciphertext" type="PackedByteArray"> + </argument> + <description> + Decrypt the given [code]ciphertext[/code] with the provided private [code]key[/code]. + [b]Note[/b]: The maximum size of accepted ciphertext is limited by the key size. + </description> + </method> + <method name="encrypt"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="key" type="CryptoKey"> + </argument> + <argument index="1" name="plaintext" type="PackedByteArray"> + </argument> + <description> + Encrypt the given [code]plaintext[/code] with the provided public [code]key[/code]. + [b]Note[/b]: The maximum size of accepted plaintext is limited by the key size. + </description> + </method> <method name="generate_random_bytes"> <return type="PackedByteArray"> </return> @@ -68,6 +104,34 @@ [/codeblock] </description> </method> + <method name="sign"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> + </argument> + <argument index="1" name="hash" type="PackedByteArray"> + </argument> + <argument index="2" name="key" type="CryptoKey"> + </argument> + <description> + Sign a given [code]hash[/code] of type [code]hash_type[/code] with the provided private [code]key[/code]. + </description> + </method> + <method name="verify"> + <return type="bool"> + </return> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> + </argument> + <argument index="1" name="hash" type="PackedByteArray"> + </argument> + <argument index="2" name="signature" type="PackedByteArray"> + </argument> + <argument index="3" name="key" type="CryptoKey"> + </argument> + <description> + Verify that a given [code]signature[/code] for [code]hash[/code] of type [code]hash_type[/code] against the provided public [code]key[/code]. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index fe7f4b63f0..410c2262f9 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -11,13 +11,34 @@ <tutorials> </tutorials> <methods> + <method name="is_public_only" qualifiers="const"> + <return type="bool"> + </return> + <description> + Return [code]true[/code] if this CryptoKey only has the public part, and not the private one. + </description> + </method> <method name="load"> <return type="int" enum="Error"> </return> <argument index="0" name="path" type="String"> </argument> + <argument index="1" name="public_only" type="bool" default="false"> + </argument> + <description> + Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. + [b]Note[/b]: [code]path[/code] should should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. + </description> + </method> + <method name="load_from_string"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="string_key" type="String"> + </argument> + <argument index="1" name="public_only" type="bool" default="false"> + </argument> <description> - Loads a key from [code]path[/code] ("*.key" file). + Loads a key from the given [code]string[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. </description> </method> <method name="save"> @@ -25,8 +46,20 @@ </return> <argument index="0" name="path" type="String"> </argument> + <argument index="1" name="public_only" type="bool" default="false"> + </argument> + <description> + Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved. + [b]Note[/b]: [code]path[/code] should should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. + </description> + </method> + <method name="save_to_string"> + <return type="String"> + </return> + <argument index="0" name="public_only" type="bool" default="false"> + </argument> <description> - Saves a key to the given [code]path[/code] (should be a "*.key" file). + Returns a string containing the key in PEM format. If [code]public_only[/code] is [code]true[/code], only the public key will be included. </description> </method> </methods> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 19583fca28..2fa791a9df 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -22,7 +22,7 @@ </description> </method> <method name="add_control_to_bottom_panel"> - <return type="ToolButton"> + <return type="Button"> </return> <argument index="0" name="control" type="Control"> </argument> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index da93d7fb53..03212538c9 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -41,6 +41,15 @@ Removes all events from an action. </description> </method> + <method name="action_get_events"> + <return type="Array"> + </return> + <argument index="0" name="action" type="StringName"> + </argument> + <description> + Returns an array of [InputEvent]s associated with a given action. + </description> + </method> <method name="action_has_event"> <return type="bool"> </return> @@ -95,15 +104,6 @@ Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. </description> </method> - <method name="get_action_list"> - <return type="Array"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <description> - Returns an array of [InputEvent]s associated with a given action. - </description> - </method> <method name="get_actions"> <return type="Array"> </return> diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index fb0e184c26..b055293b9d 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -15,7 +15,7 @@ When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. </member> <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> - If [code]true[/code], [member node_a] and [member node_b] can collide. + If [code]true[/code], [member node_a] and [member node_b] can not collide. </member> <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> The first body attached to the joint. Must derive from [PhysicsBody2D]. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 03203e2ebb..105def21ca 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -205,7 +205,7 @@ <return type="String"> </return> <description> - Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"Haiku"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code]. + Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code]. </description> </method> <method name="get_process_id" qualifiers="const"> @@ -254,20 +254,6 @@ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. </description> </method> - <method name="get_system_time_msecs" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the epoch time of the operating system in milliseconds. - </description> - </method> - <method name="get_system_time_secs" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the epoch time of the operating system in seconds. - </description> - </method> <method name="get_tablet_driver_count" qualifiers="const"> <return type="int"> </return> @@ -325,7 +311,7 @@ </description> </method> <method name="get_unix_time" qualifiers="const"> - <return type="int"> + <return type="float"> </return> <description> Returns the current UNIX epoch timestamp. diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index 6410626496..0889c238dc 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -12,6 +12,7 @@ </methods> <members> <member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false"> + If [code]true[/code], subtracts the bounciness from the colliding object's bounciness instead of adding it. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). @@ -20,6 +21,7 @@ The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). </member> <member name="rough" type="bool" setter="set_rough" getter="is_rough" default="false"> + If [code]true[/code], the physics engine will use the friction of the object marked as "rough" when two objects collide. If [code]false[/code], the physics engine will use the lowest friction of all colliding objects instead. If [code]true[/code] for both colliding objects, the physics engine will use the highest friction. </member> </members> <constants> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 92e5b4a84f..7191492098 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -821,6 +821,8 @@ </member> <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false"> </member> + <member name="mono/project/auto_update_project" type="bool" setter="" getter="" default="true"> + </member> <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0"> </member> <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index d8be6d4bd7..8832c0ec4d 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -3009,6 +3009,11 @@ </description> </method> </methods> + <members> + <member name="render_loop_enabled" type="bool" setter="set_render_loop_enabled" getter="is_render_loop_enabled"> + If [code]false[/code], disables rendering completely, but the engine logic is still being processed. You can call [method force_draw] to draw a frame even with rendering disabled. + </member> + </members> <signals> <signal name="frame_post_draw"> <description> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index db036d7d88..d4eba77ffa 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -294,6 +294,10 @@ 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> + <member name="fit_content_height" type="bool" setter="set_fit_content_height" getter="is_fit_content_height_enabled" default="false"> + If [code]true[/code], the label's height will be automatically updated to fit its content. + [b]Note:[/b] This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions. + </member> <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. </member> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 9e913cb44d..5f41d05816 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -74,6 +74,17 @@ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). </description> </method> + <method name="draw"> + <return type="void"> + </return> + <argument index="0" name="canvas_item" type="RID"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [code]color[/code]. The exact drawing method is specific for each shape and cannot be configured. + </description> + </method> </methods> <members> <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0"> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 640cbe84f5..183fd5396f 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -31,6 +31,16 @@ [i]Deprecated soon.[/i] </description> </method> + <method name="bone_transform_to_world_transform"> + <return type="Transform"> + </return> + <argument index="0" name="bone_transform" type="Transform"> + </argument> + <description> + Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. + This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes. + </description> + </method> <method name="clear_bones"> <return type="void"> </return> @@ -42,6 +52,7 @@ <return type="void"> </return> <description> + Removes the global pose override on all bones in the skeleton. </description> </method> <method name="find_bone" qualifiers="const"> @@ -136,12 +147,14 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> + Returns whether the bone rest for the bone at [code]bone_idx[/code] is disabled. </description> </method> <method name="localize_rests"> <return type="void"> </return> <description> + Returns all bones in the skeleton to their rest poses. </description> </method> <method name="physical_bones_add_collision_exception"> @@ -150,6 +163,8 @@ <argument index="0" name="exception" type="RID"> </argument> <description> + Adds a collision exception to the physical bone. + Works just like the [RigidBody3D] node. </description> </method> <method name="physical_bones_remove_collision_exception"> @@ -158,6 +173,8 @@ <argument index="0" name="exception" type="RID"> </argument> <description> + Removes a collision exception to the physical bone. + Works just like the [RigidBody3D] node. </description> </method> <method name="physical_bones_start_simulation"> @@ -166,12 +183,15 @@ <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. + Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. </description> </method> <method name="physical_bones_stop_simulation"> <return type="void"> </return> <description> + Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating. </description> </method> <method name="register_skin"> @@ -180,6 +200,7 @@ <argument index="0" name="skin" type="Skin"> </argument> <description> + Binds the given Skin to the Skeleton. </description> </method> <method name="set_bone_custom_pose"> @@ -190,6 +211,8 @@ <argument index="1" name="custom_pose" type="Transform"> </argument> <description> + Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_disable_rest"> @@ -200,6 +223,7 @@ <argument index="1" name="disable" type="bool"> </argument> <description> + Disables the rest pose for the bone at [code]bone_idx[/code] if [code]true[/code], enables the bone rest if [code]false[/code]. </description> </method> <method name="set_bone_global_pose_override"> @@ -214,6 +238,9 @@ <argument index="3" name="persistent" type="bool" default="false"> </argument> <description> + Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. + [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_parent"> @@ -237,6 +264,7 @@ </argument> <description> Returns the pose transform for bone [code]bone_idx[/code]. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_rest"> @@ -267,6 +295,17 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> + Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of it's parent prior to being reset. + </description> + </method> + <method name="world_transform_to_bone_transform"> + <return type="Transform"> + </return> + <argument index="0" name="world_transform" type="Transform"> + </argument> + <description> + Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform. + This is useful for using setting bone poses using transforms from [Node3D]-based nodes. </description> </method> </methods> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 24d92b822a..6d9def7ccb 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -381,7 +381,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the string is empty. + Returns [code]true[/code] if the length of the string equals [code]0[/code]. </description> </method> <method name="ends_with"> diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml deleted file mode 100644 index f78627b163..0000000000 --- a/doc/classes/ToolButton.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ToolButton" inherits="Button" version="4.0"> - <brief_description> - Flat button helper class. - </brief_description> - <description> - This is a helper class to generate a flat [Button] (see [member Button.flat]), creating a [ToolButton] is equivalent to: - [codeblock] - var btn = Button.new() - btn.flat = true - [/codeblock] - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" /> - </members> - <constants> - </constants> - <theme_items> - <theme_item name="disabled" type="StyleBox"> - [StyleBox] used when the [ToolButton] is disabled. - </theme_item> - <theme_item name="focus" type="StyleBox"> - [StyleBox] used when the [ToolButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. - </theme_item> - <theme_item name="font" type="Font"> - [Font] of the [ToolButton]'s text. - </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> - Default text [Color] of the [ToolButton]. - </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )"> - Text [Color] used when the [ToolButton] is disabled. - </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> - Text [Color] used when the [ToolButton] is being hovered. - </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> - Text [Color] used when the [ToolButton] is being pressed. - </theme_item> - <theme_item name="hover" type="StyleBox"> - [StyleBox] used when the [ToolButton] is being hovered. - </theme_item> - <theme_item name="hseparation" type="int" default="3"> - The horizontal space between [ToolButton]'s icon and text. - </theme_item> - <theme_item name="normal" type="StyleBox"> - Default [StyleBox] for the [ToolButton]. - </theme_item> - <theme_item name="pressed" type="StyleBox"> - [StyleBox] used when the [ToolButton] is being pressed. - </theme_item> - </theme_items> -</class> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 1938a3facb..56ccaaf383 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -15,7 +15,7 @@ tween.start() [/codeblock] 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] (eg. [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 the where [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. + 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. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url] </description> <tutorials> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 64ebc1fa09..7f4a212679 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -5,7 +5,8 @@ </brief_description> <description> 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. - It uses floating point coordinates. + It uses floating-point coordinates. See [Vector2i] for its integer counterpart. + [b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 71c7aaa4e5..2f7ca985b2 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -5,7 +5,8 @@ </brief_description> <description> 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. - It uses integer coordinates. + It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. + [b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 29222bb4d1..0c861e5ee2 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -5,7 +5,8 @@ </brief_description> <description> 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. - It uses floating point coordinates. + It uses floating-point coordinates. See [Vector3i] for its integer counterpart. + [b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index c5aa3d0347..91d64ea609 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -5,7 +5,8 @@ </brief_description> <description> 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. - It uses integer coordinates. + It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. + [b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> diff --git a/doc/classes/VisualShaderNodeSample3D.xml b/doc/classes/VisualShaderNodeSample3D.xml new file mode 100644 index 0000000000..cf6933ab55 --- /dev/null +++ b/doc/classes/VisualShaderNodeSample3D.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeSample3D" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A base node for nodes which samples 3D textures in the visual shader graph. + </brief_description> + <description> + A virtual class, use the descendants instead. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeSample3D.Source" default="0"> + An input source type. + </member> + </members> + <constants> + <constant name="SOURCE_TEXTURE" value="0" enum="Source"> + Creates internal uniform and provides a way to assign it within node. + </constant> + <constant name="SOURCE_PORT" value="1" enum="Source"> + Use the uniform texture from sampler port. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeTexture2DArray.xml b/doc/classes/VisualShaderNodeTexture2DArray.xml new file mode 100644 index 0000000000..3c6d328ed0 --- /dev/null +++ b/doc/classes/VisualShaderNodeTexture2DArray.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeTexture2DArray" inherits="VisualShaderNodeSample3D" version="4.0"> + <brief_description> + A 2D texture uniform array to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]uniform sampler2DArray[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="texture_array" type="Texture2DArray" setter="set_texture_array" getter="get_texture_array"> + A source texture array. Used if [member VisualShaderNodeSample3D.source] is set to [constant VisualShaderNodeSample3D.SOURCE_TEXTURE]. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 4482a280b2..869fc14d40 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -4,14 +4,14 @@ Boolean built-in type. </brief_description> <description> - Boolean is a built-in type. It can represent any data type that is either a true or false value. You can think of it as an switch with on or off (1 or 0) setting. It's often used as part of programming logic in condition statements like [code]if[/code] statements. - [b]Note:[/b] In a code below [code]if can_shoot[/code] is equivalent of [code]if can_shoot == true[/code]. It is good practice to follow the natural spoken language structure when possible. Use [code]if can_shoot[/code] rather than [code]if can_shoot == true[/code] and use [code]if not can_shoot[/code] rather than [code]if can_shoot == false[/code]. + Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as an switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements. + Booleans can be directly used in [code]if[/code] statements. The code below demonstrates this on the [code]if can_shoot:[/code] line. You don't need to use [code]== true[/code], you only need [code]if can_shoot:[/code]. Similarly, use [code]if not can_shoot:[/code] rather than [code]== false[/code]. [codeblock] var can_shoot = true func shoot(): if can_shoot: - # Perform shooting actions here. + pass # Perform shooting actions here. [/codeblock] The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code]. [b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed. @@ -46,7 +46,7 @@ <argument index="0" name="from" type="int"> </argument> <description> - Cast an [int] value to a boolean value, this method will return [code]true[/code] if called with an integer value different to 0 and [code]false[/code] in other case. + Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. </description> </method> <method name="bool"> @@ -55,7 +55,7 @@ <argument index="0" name="from" type="float"> </argument> <description> - Cast a [float] value to a boolean value, this method will return [code]true[/code] if called with a floating-point value different to 0 and [code]false[/code] in other case. + Cast a [float] value to a boolean value, this method will return [code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] for all other floats. </description> </method> <method name="bool"> @@ -64,7 +64,8 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a boolean value, this method will return [code]true[/code] if called with a non-empty string and [code]false[/code] in other case. Examples: [code]bool("False")[/code] returns [code]true[/code], [code]bool("")[/code] returns [code]false[/code]. + Cast a [String] value to a boolean value, this method will return [code]false[/code] if [code]""[/code] is passed in, and [code]true[/code] for all non-empty strings. + Examples: [code]bool("False")[/code] returns [code]true[/code], [code]bool("")[/code] returns [code]false[/code]. </description> </method> </methods> |