diff options
Diffstat (limited to 'doc/base/classes.xml')
-rw-r--r-- | doc/base/classes.xml | 1107 |
1 files changed, 844 insertions, 263 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index e04ccc724d..90ca2e5b79 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -31,6 +31,7 @@ <argument index="1" name="alpha" type="float"> </argument> <description> + Make a color from color name (color_names.inc) and alpha ranging from 0 to 1. </description> </method> <method name="abs"> @@ -113,6 +114,7 @@ <argument index="0" name="ascii" type="int"> </argument> <description> + Returns a character as String of the given ASCII code. </description> </method> <method name="clamp"> @@ -309,6 +311,10 @@ <argument index="2" name="value" type="float"> </argument> <description> + Returns a normalized value considering the given range. + [codeblock] + inverse_lerp(3, 5, 4) # return 0.5 + [/codeblock] </description> </method> <method name="is_inf"> @@ -335,6 +341,7 @@ <argument index="0" name="var" type="Variant"> </argument> <description> + Returns the length of the given Variant if applicable. It will return character count of a String, element count of an Array, etc. </description> </method> <method name="lerp"> @@ -551,6 +558,10 @@ <argument index="4" name="ostop" type="float"> </argument> <description> + Maps a value from range [istart, istop] to [ostart, ostop]. + [codeblock] + range_lerp(75, 0, 100, -1, 1) # returns 0.5 + [/codeblock] </description> </method> <method name="round"> @@ -667,6 +678,11 @@ <argument index="0" name="type" type="String"> </argument> <description> + Returns whether the given class is exist in [ClassDB]. + [codeblock] + type_exists("Sprite") # returns true + type_exists("Variant") # returns false + [/codeblock] </description> </method> <method name="typeof"> @@ -753,6 +769,7 @@ </methods> <members> <member name="ARVRServer" type="ARVRServer" setter="" getter="" brief=""> + [ARVRServer] singleton </member> <member name="AudioServer" type="AudioServer" setter="" getter="" brief=""> [AudioServer] singleton @@ -1944,18 +1961,25 @@ Variable is of type [Array]. </constant> <constant name="TYPE_RAW_ARRAY" value="20"> + Variable is of type [PoolByteArray]. </constant> <constant name="TYPE_INT_ARRAY" value="21"> + Variable is of type [PoolIntArray]. </constant> <constant name="TYPE_REAL_ARRAY" value="22"> + Variable is of type [PoolRealArray]. </constant> <constant name="TYPE_STRING_ARRAY" value="23"> + Variable is of type [PoolStringArray]. </constant> <constant name="TYPE_VECTOR2_ARRAY" value="24"> + Variable is of type [PoolVector2Array]. </constant> <constant name="TYPE_VECTOR3_ARRAY" value="25"> + Variable is of type [PoolVector3Array]. </constant> <constant name="TYPE_COLOR_ARRAY" value="26"> + Variable is of type [PoolColorArray]. </constant> <constant name="TYPE_MAX" value="27"> </constant> @@ -3477,6 +3501,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the update mode of a value track. </description> </method> <method name="value_track_set_update_mode"> @@ -3487,6 +3512,7 @@ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> </argument> <description> + Set the update mode (UPDATE_*) of a value track. </description> </method> </methods> @@ -3510,10 +3536,13 @@ Cubic interpolation. </constant> <constant name="UPDATE_CONTINUOUS" value="0"> + Update between keyframes. </constant> <constant name="UPDATE_DISCRETE" value="1"> + Update at the keyframes and hold the value. </constant> <constant name="UPDATE_TRIGGER" value="2"> + Update at the keyframes. </constant> </constants> </class> @@ -3551,6 +3580,7 @@ <argument index="0" name="anim_from" type="String"> </argument> <description> + Return the name of the next animation in the queue. </description> </method> <method name="animation_set_next"> @@ -3561,6 +3591,7 @@ <argument index="1" name="anim_to" type="String"> </argument> <description> + Set the name of an animation that will be played after. </description> </method> <method name="clear_caches"> @@ -3933,6 +3964,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns an animation given its name. </description> </method> <method name="animation_node_get_master_animation" qualifiers="const"> @@ -3986,6 +4018,7 @@ <argument index="2" name="dst_input_idx" type="int"> </argument> <description> + Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot. </description> </method> <method name="blend2_node_get_amount" qualifiers="const"> @@ -3994,6 +4027,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns the blend amount of a Blend2 node given its name. </description> </method> <method name="blend2_node_set_amount"> @@ -4004,6 +4038,7 @@ <argument index="1" name="blend" type="float"> </argument> <description> + Sets the blend amount of a Blend2 node given its name and value. </description> </method> <method name="blend2_node_set_filter_path"> @@ -4024,6 +4059,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns the blend amount of a Blend3 node given its name. </description> </method> <method name="blend3_node_set_amount"> @@ -4034,6 +4070,7 @@ <argument index="1" name="blend" type="float"> </argument> <description> + Sets the blend amount of a Blend3 node given its name and value. </description> </method> <method name="blend4_node_get_amount" qualifiers="const"> @@ -4042,6 +4079,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns the blend amount of a Blend4 node given its name. </description> </method> <method name="blend4_node_set_amount"> @@ -4052,6 +4090,7 @@ <argument index="1" name="blend" type="Vector2"> </argument> <description> + Sets the blend amount of a Blend4 node given its name and value. </description> </method> <method name="connect_nodes"> @@ -4064,6 +4103,7 @@ <argument index="2" name="dst_input_idx" type="int"> </argument> <description> + Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot. </description> </method> <method name="disconnect_nodes"> @@ -4074,12 +4114,14 @@ <argument index="1" name="dst_input_idx" type="int"> </argument> <description> + Disconnects nodes connected to [code]id[/code] at the specified input slot. </description> </method> <method name="get_animation_process_mode" qualifiers="const"> <return type="int" enum="AnimationTreePlayer.AnimationProcessMode"> </return> <description> + Returns playback process mode of this AnimationTreePlayer. </description> </method> <method name="get_base_path" qualifiers="const"> @@ -4098,12 +4140,14 @@ <return type="PoolStringArray"> </return> <description> + Returns a PoolStringArray containing the name of all nodes. </description> </method> <method name="is_active" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether this AnimationTreePlayer is active. </description> </method> <method name="mix_node_get_amount" qualifiers="const"> @@ -4112,6 +4156,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns mix amount of a Mix node given its name. </description> </method> <method name="mix_node_set_amount"> @@ -4122,6 +4167,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets mix amount of a Mix node given its name and value. </description> </method> <method name="node_exists" qualifiers="const"> @@ -4159,6 +4205,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns position of a node in the graph given its name. </description> </method> <method name="node_get_type" qualifiers="const"> @@ -4189,6 +4236,7 @@ <argument index="1" name="screen_pos" type="Vector2"> </argument> <description> + Sets position of a node in the graph given its name and position. </description> </method> <method name="oneshot_node_get_autorestart_delay" qualifiers="const"> @@ -4197,6 +4245,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns autostart delay of a OneShot node given its name. </description> </method> <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const"> @@ -4205,6 +4254,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns autostart random delay of a OneShot node given its name. </description> </method> <method name="oneshot_node_get_fadein_time" qualifiers="const"> @@ -4213,6 +4263,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns fade in time of a OneShot node given its name. </description> </method> <method name="oneshot_node_get_fadeout_time" qualifiers="const"> @@ -4221,6 +4272,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns fade out time of a OneShot node given its name. </description> </method> <method name="oneshot_node_has_autorestart" qualifiers="const"> @@ -4229,6 +4281,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns whether a OneShot node will auto restart given its name. </description> </method> <method name="oneshot_node_is_active" qualifiers="const"> @@ -4237,6 +4290,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns whether a OneShot node is active given its name. </description> </method> <method name="oneshot_node_set_autorestart"> @@ -4247,6 +4301,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets autorestart property of a OneShot node given its name and value. </description> </method> <method name="oneshot_node_set_autorestart_delay"> @@ -4257,6 +4312,7 @@ <argument index="1" name="delay_sec" type="float"> </argument> <description> + Sets autorestart delay of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_autorestart_random_delay"> @@ -4267,6 +4323,7 @@ <argument index="1" name="rand_sec" type="float"> </argument> <description> + Sets autorestart random delay of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_fadein_time"> @@ -4277,6 +4334,7 @@ <argument index="1" name="time_sec" type="float"> </argument> <description> + Sets fade in time of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_fadeout_time"> @@ -4287,6 +4345,7 @@ <argument index="1" name="time_sec" type="float"> </argument> <description> + Sets fade out time of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_filter_path"> @@ -4307,6 +4366,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Starts a OneShot node given its name. </description> </method> <method name="oneshot_node_stop"> @@ -4315,6 +4375,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Stops a OneShot node given its name. </description> </method> <method name="recompute_caches"> @@ -4335,6 +4396,7 @@ <return type="void"> </return> <description> + Resets this AnimationTreePlayer. </description> </method> <method name="set_active"> @@ -4343,6 +4405,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> + Sets whether this AnimationTreePlayer is active. AnimationTreePlayer will start processing if set to active. </description> </method> <method name="set_animation_process_mode"> @@ -4351,6 +4414,7 @@ <argument index="0" name="mode" type="int" enum="AnimationTreePlayer.AnimationProcessMode"> </argument> <description> + Sets process mode (ANIMATION_PROCESS_*) of this AnimationTreePlayer. </description> </method> <method name="set_base_path"> @@ -4359,6 +4423,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> + Sets base path of this AnimationTreePlayer. </description> </method> <method name="set_master_player"> @@ -4375,6 +4440,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns time scale value of a TimeScale node given its name. </description> </method> <method name="timescale_node_set_scale"> @@ -4385,6 +4451,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets time scale value of a TimeScale node given its name and value. </description> </method> <method name="timeseek_node_seek"> @@ -4395,6 +4462,7 @@ <argument index="1" name="pos_sec" type="float"> </argument> <description> + Sets time seek value of a TimeSeek node given its name and value. </description> </method> <method name="transition_node_delete_input"> @@ -4490,24 +4558,34 @@ </members> <constants> <constant name="NODE_OUTPUT" value="0"> + Output node. </constant> <constant name="NODE_ANIMATION" value="1"> + Animation node. </constant> <constant name="NODE_ONESHOT" value="2"> + OneShot node. </constant> <constant name="NODE_MIX" value="3"> + Mix node. </constant> <constant name="NODE_BLEND2" value="4"> + Blend2 node. </constant> <constant name="NODE_BLEND3" value="5"> + Blend3 node. </constant> <constant name="NODE_BLEND4" value="6"> + Blend4 node. </constant> <constant name="NODE_TIMESCALE" value="7"> + TimeScale node. </constant> <constant name="NODE_TIMESEEK" value="8"> + TimeSeek node. </constant> <constant name="NODE_TRANSITION" value="9"> + Transition node. </constant> </constants> </class> @@ -5005,10 +5083,10 @@ </class> <class name="Area2D" inherits="CollisionObject2D" category="Core"> <brief_description> - General purpose area detection and influence for 2D physics. + 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range. </brief_description> <description> - General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass. + 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage. </description> <methods> <method name="get_angular_damp" qualifiers="const"> @@ -5037,14 +5115,14 @@ <argument index="0" name="bit" type="int"> </argument> <description> - Return an individual bit on the layer mask. + Return an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer. </description> </method> <method name="get_collision_mask" qualifiers="const"> <return type="int"> </return> <description> - Return the physics layers this area can scan for collisions. + Return the physics layers this area will scan to determine collisions. </description> </method> <method name="get_collision_mask_bit" qualifiers="const"> @@ -5053,7 +5131,7 @@ <argument index="0" name="bit" type="int"> </argument> <description> - Return an individual bit on the collision mask. + Return an individual bit on the collision mask. Describes whether this area will collide with others on the given layer. </description> </method> <method name="get_gravity" qualifiers="const"> @@ -5088,14 +5166,14 @@ <return type="Array"> </return> <description> - Return a list of the areas that are totally or partially inside this area. + Returns a list of the [Area2D]s that intersect with this area. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Return a list of the bodies ([PhysicsBody2D]) that are totally or partially inside this area. + Return a list of the [PhysicsBody2D]s that intersect with this area. </description> </method> <method name="get_priority" qualifiers="const"> @@ -5317,33 +5395,50 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief=""> + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="rate of spin loss"> + The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief=""> + <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief="name of audio bus"> + The name of the Area2D's audio bus. </member> - <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief=""> + <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief="Whether to override audio bus"> + If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code]. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="others-collide-with-this layers"> + The physics layer this Area2D is in. + Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief=""> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="this-collides-with-others layers"> + The physics layers this Area2D scans to determine collision detections. </member> - <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief=""> + <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief="internal gravity intensity"> + The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction. + This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). </member> - <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief=""> + <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief="gravity drop rate"> + The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. </member> - <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief=""> + <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief="is gravity a point?"> + If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code]. </member> - <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief=""> + <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief="gravity non-normalized vector or center-point"> + The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief=""> + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="rate of movement loss"> + The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. </member> - <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief=""> + <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief="others cannot detect this?"> + If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code]. </member> - <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief=""> + <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="this cannot detect others?"> + If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code]. </member> - <member name="priority" type="float" setter="set_priority" getter="get_priority" brief=""> + <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="(high) process before others (low)"> + The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first. </member> - <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area2D.SpaceOverride"> + <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="how to override gravity/damping" enum="Area2D.SpaceOverride"> + How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options. </member> </members> <signals> @@ -5429,6 +5524,11 @@ </signal> </signals> <constants> + <constant name="SPACE_OVERRIDE_DISABLED" value="0" enum="Area2D.SpaceOverride">This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them.</constant> + <constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="Area2D.SpaceOverride">This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.</constant> + <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="Area2D.SpaceOverride">This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.</constant> + <constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="Area2D.SpaceOverride">This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.</constant> + <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="Area2D.SpaceOverride">This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.</constant> </constants> </class> <class name="Array" category="Built-In Types"> @@ -5670,7 +5770,7 @@ <argument index="1" name="func" type="String"> </argument> <description> - Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. + Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. </description> </method> </methods> @@ -8947,8 +9047,10 @@ </class> <class name="BitMap" inherits="Resource" category="Core"> <brief_description> + Boolean matrix. </brief_description> <description> + A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. </description> <methods> <method name="create"> @@ -8957,6 +9059,7 @@ <argument index="0" name="size" type="Vector2"> </argument> <description> + Creates a bitmap with the specified size, filled with false. </description> </method> <method name="create_from_image_alpha"> @@ -8965,6 +9068,7 @@ <argument index="0" name="image" type="Image"> </argument> <description> + Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case. </description> </method> <method name="get_bit" qualifiers="const"> @@ -8973,18 +9077,21 @@ <argument index="0" name="pos" type="Vector2"> </argument> <description> + Returns bitmap's value at the specified position. </description> </method> <method name="get_size" qualifiers="const"> <return type="Vector2"> </return> <description> + Returns bitmap's dimensions. </description> </method> <method name="get_true_bit_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the amount of bitmap elements that are set to true. </description> </method> <method name="set_bit"> @@ -8995,6 +9102,7 @@ <argument index="1" name="bit" type="bool"> </argument> <description> + Sets the bitmap's element at the specified position, to the specified value. </description> </method> <method name="set_bit_rect"> @@ -9005,6 +9113,7 @@ <argument index="1" name="bit" type="bool"> </argument> <description> + Sets a rectangular portion of the bitmap to the specified value. </description> </method> </methods> @@ -9183,6 +9292,7 @@ <return type="String"> </return> <description> + Returns the name of the bone node attached to. </description> </method> <method name="set_bone_name"> @@ -9191,6 +9301,7 @@ <argument index="0" name="bone_name" type="String"> </argument> <description> + Changes the name of the bone node </description> </method> </methods> @@ -9292,35 +9403,30 @@ <return type="Texture"> </return> <description> - Return the button icon. </description> </method> <method name="get_clip_text" qualifiers="const"> <return type="bool"> </return> <description> - Return the state of the [i]clip_text[/i] property (see [method set_clip_text]) </description> </method> <method name="get_text" qualifiers="const"> <return type="String"> </return> <description> - Return the button text. </description> </method> <method name="get_text_align" qualifiers="const"> <return type="int" enum="Button.TextAlign"> </return> <description> - Return the text alignment policy. </description> </method> <method name="is_flat" qualifiers="const"> <return type="bool"> </return> <description> - Return the state of the [i]flat[/i] property (see [method set_flat]). </description> </method> <method name="set_button_icon"> @@ -9329,7 +9435,6 @@ <argument index="0" name="texture" type="Texture"> </argument> <description> - Set the icon that will be displayed next to the text inside the button area. </description> </method> <method name="set_clip_text"> @@ -9338,7 +9443,6 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set the [i]clip_text[/i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text. </description> </method> <method name="set_flat"> @@ -9347,7 +9451,6 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set the [i]flat[/i] property of a Button. Flat buttons don't display decoration unless hovered or pressed. </description> </method> <method name="set_text"> @@ -9356,7 +9459,6 @@ <argument index="0" name="text" type="String"> </argument> <description> - Set the button text, which will be displayed inside the button area. </description> </method> <method name="set_text_align"> @@ -9365,20 +9467,24 @@ <argument index="0" name="align" type="int" enum="Button.TextAlign"> </argument> <description> - Set the text alignment policy, using one of the ALIGN_* constants. </description> </method> </methods> <members> <member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="" enum="Button.TextAlign"> + Text alignment policy for the button's text, use one of the ALIGN_* constants. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" brief=""> + When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default. </member> - <member name="flat" type="bool" setter="set_flat" getter="is_flat" brief=""> + <member name="flat" type="bool" setter="set_flat" getter="is_flat" brief="button decoration mode"> + Flat buttons don't display decoration. </member> <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon" brief=""> + Button's icon, if text is present the icon will be placed before the text. </member> <member name="text" type="String" setter="set_text" getter="get_text" brief=""> + The button's text that will be displayed inside the button's area. </member> </members> <constants> @@ -9386,7 +9492,7 @@ Align the text to the left. </constant> <constant name="ALIGN_CENTER" value="1"> - Center the text. + Align the text to the center. </constant> <constant name="ALIGN_RIGHT" value="2"> Align the text to the right. @@ -10955,8 +11061,10 @@ </class> <class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Class representing a capsule-shaped [PrimitiveMesh]. </brief_description> <description> + Class representing a capsule-shaped [PrimitiveMesh]. </description> <methods> <method name="get_mid_height" qualifiers="const"> @@ -11018,12 +11126,16 @@ </methods> <members> <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" brief=""> + Height of the capsule mesh from the center point. Defaults to 1.0. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief=""> + Number of radial segments on the capsule mesh. Defaults to 64. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" brief=""> + Radius of the capsule mesh. Defaults to 1.0. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" brief=""> + Number of rings along the height of the capsule. Defaults to 8. </member> </members> <constants> @@ -12077,8 +12189,10 @@ </class> <class name="CollisionShape" inherits="Spatial" category="Core"> <brief_description> + Node that represents collision shape data in 3D space. </brief_description> <description> + Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape. </description> <methods> <method name="get_shape" qualifiers="const"> @@ -12097,6 +12211,7 @@ <return type="void"> </return> <description> + Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry. </description> </method> <method name="resource_changed"> @@ -12105,6 +12220,7 @@ <argument index="0" name="resource" type="Resource"> </argument> <description> + If this method exists within a script it will be called whenever the shape resource has been modified. </description> </method> <method name="set_disabled"> @@ -12126,8 +12242,10 @@ </methods> <members> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief=""> + A disabled collision shape has no effect in the world. </member> <member name="shape" type="Shape" setter="set_shape" getter="get_shape" brief=""> + The actual shape owned by this collision shape. </member> </members> <constants> @@ -12135,17 +12253,16 @@ </class> <class name="CollisionShape2D" inherits="Node2D" category="Core"> <brief_description> - Editor-only class for easy editing of shapes. + Node that represents collision shape data in 2D space. </brief_description> <description> - Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. + Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape. </description> <methods> <method name="get_shape" qualifiers="const"> <return type="Shape2D"> </return> <description> - Return this shape's [Shape2D]. </description> </method> <method name="is_disabled" qualifiers="const"> @@ -12182,16 +12299,18 @@ <argument index="0" name="shape" type="Shape2D"> </argument> <description> - Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property. </description> </method> </methods> <members> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief=""> + A disabled collision shape has no effect in the world. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" brief=""> + Sets whether this collision shape should only detect collision on one side (top or bottom). </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" brief=""> + The actual shape owned by this collision shape. </member> </members> <constants> @@ -12199,10 +12318,10 @@ </class> <class name="Color" category="Built-In Types"> <brief_description> - Color in RGBA format. + Color in RGBA format with some support for ARGB format. </brief_description> <description> - A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values > 1. + A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1. </description> <methods> <method name="Color"> @@ -12217,7 +12336,10 @@ <argument index="3" name="a" type="float"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from an RGBA profile using values between 0 and 1 (float). + [codeblock] + var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204) + [/codeblock] </description> </method> <method name="Color"> @@ -12230,7 +12352,10 @@ <argument index="2" name="b" type="float"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1. + [codeblock] + var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255) + [/codeblock] </description> </method> <method name="Color"> @@ -12239,7 +12364,10 @@ <argument index="0" name="from" type="int"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). + [codeblock] + var c = Color(274) # a color of an RGBA(0, 0, 1, 18) + [/codeblock] </description> </method> <method name="Color"> @@ -12248,7 +12376,19 @@ <argument index="0" name="from" type="String"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. + The following string formats are supported: + [code]"#ff00ff00"[/code] - ARGB format with '#' + [code]"ff00ff00"[/code] - ARGB format + [code]"#ff00ff"[/code] - RGB format with '#' + [code]"ff00ff"[/code] - RGB format + [codeblock] + # The following code creates the same color of an RGBA(178, 217, 10, 255) + var c1 = Color("#ffb2d90a") # ARGB format with '#' + var c2 = Color("ffb2d90a") # ARGB format + var c3 = Color("#b2d90a") # RGB format with '#' + var c4 = Color("b2d90a") # RGB format + [/codeblock] </description> </method> <method name="blend"> @@ -12257,28 +12397,46 @@ <argument index="0" name="over" type="Color"> </argument> <description> - Return a new color blended with anothor one. + Returns a new color resulting from blending this color over another color. If the color is opaque, the result would also be opaque. The other color could then take a range of values with different alpha values. + [codeblock] + var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% + var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50% + var blendedColor = bg.blend(fg) # Brown with alpha of 75% + [/codeblock] </description> </method> <method name="contrasted"> <return type="Color"> </return> <description> - Return the most contrasting color with this one. + Returns the most contrasting color. + [codeblock] + var c = Color(.3, .4, .9) + var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255) + [/codeblock] </description> </method> <method name="gray"> <return type="float"> </return> <description> - Convert the color to gray. + Returns the color's grayscale. + The gray is calculated by (r + g + b) / 3. + [codeblock] + var c = Color(0.2, 0.45, 0.82) + var gray = c.gray() # a value of 0.466667 + [/codeblock] </description> </method> <method name="inverted"> <return type="Color"> </return> <description> - Return the inverted color (1-r, 1-g, 1-b, 1-a). + Returns the inverted color (1-r, 1-g, 1-b, 1-a). + [codeblock] + var c = Color(.3, .4, .9) + var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255) + [/codeblock] </description> </method> <method name="linear_interpolate"> @@ -12289,21 +12447,36 @@ <argument index="1" name="t" type="float"> </argument> <description> - Return the linear interpolation with another color. + Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float). + [codeblock] + var c1 = Color(1.0, 0.0, 0.0) + var c2 = Color(0.0, 1.0, 0.0) + var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255) + [/codeblock] </description> </method> <method name="to_32"> <return type="int"> </return> <description> - Convert the color to a 32 its integer (each byte represents a RGBA). + Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). + [codeblock] + var c = Color(1, .5, .2) + print(str(c.to_32())) # prints 4294934323 + [/codeblock] + + [i]This is same as [method to_ARGB32] but may be changed later to support RGBA format instead[/i]. </description> </method> <method name="to_ARGB32"> <return type="int"> </return> <description> - Convert color to ARGB32, more compatible with DirectX. + Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). More compatible with DirectX. + [codeblock] + var c = Color(1, .5, .2) + print(str(c.to_32())) # prints 4294934323 + [/codeblock] </description> </method> <method name="to_html"> @@ -12312,7 +12485,13 @@ <argument index="0" name="with_alpha" type="bool" default="True"> </argument> <description> - Return the HTML hexadecimal color string. + Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). + Optionally flag 'false' to not include alpha in hexadecimal string. + [codeblock] + var c = Color(1, 1, 1, .5) + var s1 = c.to_html() # Results "7fffffff" + var s2 = c.to_html(false) # Results 'ffffff' + [/codeblock] </description> </method> </methods> @@ -12494,6 +12673,12 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Set new color to ColorRect. + + [codeblock] + var cr = get_node("colorrect_node") + cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red + [/codeblock] </description> </method> </methods> @@ -12541,14 +12726,21 @@ </class> <class name="ColorRect" inherits="Control" category="Core"> <brief_description> + Colored rect for canvas. </brief_description> <description> + An object that is represented on the canvas as a rect with color. [Color] is used to set or get color info for the rect. </description> <methods> <method name="get_frame_color" qualifiers="const"> <return type="Color"> </return> <description> + Return the color in RGBA format. + [codeblock] + var cr = get_node("colorrect_node") + var c = cr.get_frame_color() # Default color is white + [/codeblock] </description> </method> <method name="set_frame_color"> @@ -12557,6 +12749,11 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Set new color to ColorRect. + [codeblock] + var cr = get_node("colorrect_node") + cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red + [/codeblock] </description> </method> </methods> @@ -12856,23 +13053,23 @@ </class> <class name="Control" inherits="CanvasItem" category="Core"> <brief_description> - Control is the base node for all the GUI components. + Base node for all User Interface components. </brief_description> <description> - Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces. - Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, [Container] derived nodes can be used. + The base class Node for all User Interface components. Every UI node inherits from it. Any scene or portion of a scene tree composed of Control nodes is a User Interface. + Controls use anchors and margins to place themselves relative to their parent. They adapt automatically when their parent or the screen size changes. To build flexible UIs, use built-in [Container] nodes or create your own. Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range. - Input device events are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [method MainLoop._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event]. - Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with [method set_focus_mode]. Focus is lost when another control gains it, or the current focus owner is hidden. - It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling [method set_ignore_mouse] enables this function. - Finally, controls are skinned according to a [Theme]. Setting a [Theme] on a control will propagate all the skinning down the tree. Optionally, skinning can be overridden per each control by calling the add_*_override functions, or from the editor. + Godot sends Input events to the root node first, via [method Node._input]. The method distributes it through the node tree and delivers the input events to the node under the mouse cursor or on focus with the keyboard. To do so, it calls [method MainLoop._input_event]. No need to enable [method Node.set_process_input] on Controls to receive input events. Call [method accept_event] to ensure no other node receives the event, not even [method Node._unhandled_input]. + Only the one Control node in focus receives keyboard events. To do so, the Control must get the focus mode with [method set_focus_mode]. It loses focus when another Control gets it, or if the current Control in focus is hidden. + You'll sometimes want Controls to ignore mouse or touch events. For example, if you place an icon on top of a button. Call [method set_ignore_mouse] for that. + [Theme] resources change the Control's appearance. If you change the [Theme] on a parent Control node, it will propagate to all of its children. You can override parts of the theme on each Control with the add_*_override methods, like [method add_font_override]. You can also override the theme from the editor. </description> <methods> <method name="_get_minimum_size" qualifiers="virtual"> <return type="Vector2"> </return> <description> - Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + Returns the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. </description> </method> <method name="_gui_input" qualifiers="virtual"> @@ -12887,7 +13084,7 @@ <return type="void"> </return> <description> - Handles the event, no other control will receive it and it will not be sent to nodes waiting on [method Node._unhandled_input] or [method Node._unhandled_key_input]. + Marks the input event as handled. No other Control will receive it, and the input event will not propagate. Not even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. </description> </method> <method name="add_color_override"> @@ -13742,12 +13939,12 @@ <signals> <signal name="focus_entered"> <description> - Emitted when keyboard focus is gained. + Emitted when the node gains keyboard focus. </description> </signal> <signal name="focus_exited"> <description> - Emitted when the keyboard focus is lost. + Emitted when the node loses keyboard focus. </description> </signal> <signal name="gui_input"> @@ -13758,7 +13955,7 @@ </signal> <signal name="minimum_size_changed"> <description> - Emitted when the minimum size of the control changed. + Emitted when the node's minimum size changes. </description> </signal> <signal name="modal_closed"> @@ -13767,22 +13964,22 @@ </signal> <signal name="mouse_entered"> <description> - Emitted when the mouse enters the control area. + Emitted when the mouse enters the control's area. </description> </signal> <signal name="mouse_exited"> <description> - Emitted when the mouse left the control area. + Emitted when the mouse leaves the control's area. </description> </signal> <signal name="resized"> <description> - Emitted when the control changed size. + Emitted when the control changes size. </description> </signal> <signal name="size_flags_changed"> <description> - Emitted when the size flags changed. + Emitted when the size flags change. </description> </signal> </signals> @@ -14093,8 +14290,10 @@ </class> <class name="CubeMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Generate an axis-aligned cuboid [PrimitiveMesh]. </brief_description> <description> + Generate an axis-aligned cuboid [PrimitiveMesh]. </description> <methods> <method name="get_size" qualifiers="const"> @@ -14156,12 +14355,16 @@ </methods> <members> <member name="size" type="Vector3" setter="set_size" getter="get_size" brief=""> + Size of the cuboid mesh. Defaults to (2, 2, 2). </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief=""> + Number of extra edge loops inserted along the z-axis. Defaults to 0. </member> <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" brief=""> + Number of extra edge loops inserted along the y-axis. Defaults to 0. </member> <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief=""> + Number of extra edge loops inserted along the x-axis. Defaults to 0. </member> </members> <constants> @@ -14851,8 +15054,10 @@ </class> <class name="CylinderMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Class representing a cylindrical [PrimitiveMesh]. </brief_description> <description> + Class representing a cylindrical [PrimitiveMesh]. </description> <methods> <method name="get_bottom_radius" qualifiers="const"> @@ -14928,14 +15133,19 @@ </methods> <members> <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" brief=""> + Bottom radius of the cylinder. Defaults to 1.0. </member> <member name="height" type="float" setter="set_height" getter="get_height" brief=""> + Full height of the cylinder. Defaults to 2.0. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief=""> + Number of radial segments on the cylinder. Defaults to 64. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" brief=""> + Number of edge rings along the height of the cylinder. Defaults to 4. </member> <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" brief=""> + Top radius of the cylinder. Defaults to 1.0. </member> </members> <constants> @@ -19137,6 +19347,12 @@ <description> </description> </method> + <method name="is_singleton_gdnative" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_library_path"> <return type="void"> </return> @@ -19147,26 +19363,49 @@ <description> </description> </method> + <method name="set_singleton_gdnative"> + <return type="void"> + </return> + <argument index="0" name="singleton" type="bool"> + </argument> + <description> + </description> + </method> </methods> + <members> + <member name="singleton_gdnative" type="bool" setter="set_singleton_gdnative" getter="is_singleton_gdnative" brief=""> + </member> + </members> <constants> </constants> </class> <class name="GDScript" inherits="Script" category="Core"> <brief_description> + A script implemented in the GDScript programming language. </brief_description> <description> + A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it. + [method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. </description> <methods> <method name="get_as_byte_code" qualifiers="const"> <return type="PoolByteArray"> </return> <description> + Returns byte code for the script source code. </description> </method> <method name="new" qualifiers="vararg"> <return type="Object"> </return> <description> + Returns a new instance of the script. + For example: + [codeblock] + var MyClass = load("myclass.gd") + var instance = MyClass.new() + assert(instance.get_script() == MyClass) + [/codeblock] </description> </method> </methods> @@ -20365,8 +20604,10 @@ </class> <class name="GradientTexture" inherits="Texture" category="Core"> <brief_description> + Gradient filled texture. </brief_description> <description> + Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]). </description> <methods> <method name="get_gradient" qualifiers="const"> @@ -20394,8 +20635,10 @@ </methods> <members> <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief=""> + The [Gradient] that will be used to fill the texture. </member> <member name="width" type="int" setter="set_width" getter="get_width" brief=""> + The number of color samples that will be obtained from the [Gradient]. </member> </members> <constants> @@ -20807,7 +21050,7 @@ <description> </description> </method> - <method name="is_resizeable" qualifiers="const"> + <method name="is_resizable" qualifiers="const"> <return type="bool"> </return> <description> @@ -20862,10 +21105,10 @@ <description> </description> </method> - <method name="set_resizeable"> + <method name="set_resizable"> <return type="void"> </return> - <argument index="0" name="resizeable" type="bool"> + <argument index="0" name="resizable" type="bool"> </argument> <description> </description> @@ -20922,7 +21165,7 @@ </method> </methods> <members> - <member name="resizeable" type="bool" setter="set_resizeable" getter="is_resizeable" brief=""> + <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" brief=""> </member> <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" brief=""> </member> @@ -22009,7 +22252,7 @@ IP Protocol support functions. </brief_description> <description> - IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. + IP contains support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. </description> <methods> <method name="clear_cache"> @@ -22018,6 +22261,7 @@ <argument index="0" name="hostname" type="String" default=""""> </argument> <description> + Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed. </description> </method> <method name="erase_resolve_item"> @@ -22026,13 +22270,14 @@ <argument index="0" name="id" type="int"> </argument> <description> - Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen. + Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen. </description> </method> - <method name="get_local_addresses" qualifiers="const"> + <method name="get_local_addresses" qualifiers="const"> <return type="Array"> </return> <description> + Returns all of the user's current IPv4 and IPv6 addresses as an array. </description> </method> <method name="get_resolve_item_address" qualifiers="const"> @@ -22041,7 +22286,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). + Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> <method name="get_resolve_item_status" qualifiers="const"> @@ -22050,7 +22295,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Return the status of hostname queued for resolving, given its queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration. + Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id". </description> </method> <method name="resolve_hostname"> @@ -22061,7 +22306,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Resolve a given hostname, blocking. Resolved hostname is returned as an IPv4 or IPv6 depending on "ip_type". + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type". </description> </method> <method name="resolve_hostname_queue_item"> @@ -22072,7 +22317,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Create a queue item for resolving a given hostname to an IPv4 or IPv6 depending on "ip_type". The queue ID is returned, or RESOLVER_INVALID_ID on error. + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error. </description> </method> </methods> @@ -23153,6 +23398,7 @@ </class> <class name="InputEvent" inherits="Resource" category="Core"> <brief_description> + Generic input event </brief_description> <description> </description> @@ -23163,24 +23409,28 @@ <argument index="0" name="event" type="InputEvent"> </argument> <description> + Returns true if this input event matches the event passed. </description> </method> <method name="as_text" qualifiers="const"> <return type="String"> </return> <description> + Returns a [String] representation of the event. </description> </method> <method name="get_device" qualifiers="const"> <return type="int"> </return> <description> + Returns the id of the device that generated the event. </description> </method> <method name="get_id" qualifiers="const"> <return type="int"> </return> <description> + Returns the id of the event. </description> </method> <method name="is_action" qualifiers="const"> @@ -23189,7 +23439,7 @@ <argument index="0" name="action" type="String"> </argument> <description> - Return if this input event matches a pre-defined action, no matter the type. + Returns true if this input event matches a pre-defined action, no matter the type. </description> </method> <method name="is_action_pressed" qualifiers="const"> @@ -23198,7 +23448,7 @@ <argument index="0" name="action" type="String"> </argument> <description> - Return whether the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. + Returns true if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. </description> </method> <method name="is_action_released" qualifiers="const"> @@ -23207,7 +23457,7 @@ <argument index="0" name="action" type="String"> </argument> <description> - Return whether the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. + Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. </description> </method> <method name="is_action_type" qualifiers="const"> @@ -23220,14 +23470,14 @@ <return type="bool"> </return> <description> - Return if this input event is an echo event (only for events of type KEY, it will return false for other types). + Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types). </description> </method> <method name="is_pressed" qualifiers="const"> <return type="bool"> </return> <description> - Return if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. + Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. </description> </method> <method name="set_device"> @@ -24844,108 +25094,28 @@ Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <methods> - <method name="get_collision_collider" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_collider_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_collider_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_collider_shape" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_collider_shape_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_collider_velocity" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_count" qualifiers="const"> - <return type="int"> - </return> - <description> - </description> - </method> - <method name="get_collision_local_shape" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_normal" qualifiers="const"> + <method name="get_floor_velocity" qualifiers="const"> <return type="Vector3"> </return> - <argument index="0" name="collision" type="int"> - </argument> <description> </description> </method> - <method name="get_collision_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="collision" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_collision_remainder" qualifiers="const"> - <return type="Vector3"> + <method name="get_safe_margin" qualifiers="const"> + <return type="float"> </return> - <argument index="0" name="collision" type="int"> - </argument> <description> </description> </method> - <method name="get_collision_travel" qualifiers="const"> - <return type="Vector3"> + <method name="get_slide_collision"> + <return type="KinematicCollision"> </return> - <argument index="0" name="collision" type="int"> + <argument index="0" name="slide_idx" type="int"> </argument> <description> </description> </method> - <method name="get_floor_velocity" qualifiers="const"> - <return type="Vector3"> - </return> - <description> - </description> - </method> - <method name="get_safe_margin" qualifiers="const"> - <return type="float"> + <method name="get_slide_count" qualifiers="const"> + <return type="int"> </return> <description> </description> @@ -24968,22 +25138,12 @@ <description> </description> </method> - <method name="move"> - <return type="Dictionary"> + <method name="move_and_collide"> + <return type="KinematicCollision"> </return> <argument index="0" name="rel_vec" type="Vector3"> </argument> <description> - Move the body in the given direction, stopping if there is an obstacle. If as a result of a movement there will be any collision then informations about this collision will be in returned dictionary. Dictionary will contains those keys: - - "position" - collision position - - "normal" - collision normal - - "local_shape" - id of this kinematic body shape that took part in a collision - - "travel" - traveled movement before being stopped - - "remainder" - remaining movement before being stopped - - "collider_id" - id of the collider, it can be used when dealing with [PhysicsServer] - - "collider" - colliding body - - "collider_shape_index" - index of the colliding shape, inside collider body "collider_metadata" - If the body did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. Please note that this method is less user friendly than [method move_and_slide]. If you don't want to program each edge case manually, then it's recommended to use [method move_and_slide] instead. </description> </method> <method name="move_and_slide"> @@ -24995,7 +25155,7 @@ </argument> <argument index="2" name="slope_stop_min_velocity" type="float" default="0.05"> </argument> - <argument index="3" name="max_bounces" type="int" default="4"> + <argument index="3" name="max_slides" type="int" default="4"> </argument> <argument index="4" name="floor_max_angle" type="float" default="0.785398"> </argument> @@ -25224,6 +25384,106 @@ <constants> </constants> </class> +<class name="KinematicCollision" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="get_collider" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_collider_id" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_collider_metadata" qualifiers="const"> + <return type="Variant"> + </return> + <description> + </description> + </method> + <method name="get_collider_shape" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_collider_shape_index" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_collider_velocity" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_local_shape" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_position" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_remainder" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_travel" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + </methods> + <members> + <member name="collider" type="Object" setter="" getter="get_collider" brief=""> + </member> + <member name="collider_id" type="int" setter="" getter="get_collider_id" brief=""> + </member> + <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata" brief=""> + </member> + <member name="collider_shape" type="Object" setter="" getter="get_collider_shape" brief=""> + </member> + <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" brief=""> + </member> + <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" brief=""> + </member> + <member name="local_shape" type="Object" setter="" getter="get_local_shape" brief=""> + </member> + <member name="normal" type="Vector3" setter="" getter="get_normal" brief=""> + </member> + <member name="position" type="Vector3" setter="" getter="get_position" brief=""> + </member> + <member name="remainder" type="Vector3" setter="" getter="get_remainder" brief=""> + </member> + <member name="travel" type="Vector3" setter="" getter="get_travel" brief=""> + </member> + </members> + <constants> + </constants> +</class> <class name="Label" inherits="Control" category="Core"> <brief_description> Control that displays formatted text. @@ -26154,10 +26414,10 @@ </class> <class name="LightOccluder2D" inherits="Node2D" category="Core"> <brief_description> - Occludes light cast by a Light2D, thus casting shadows. + Occludes light cast by a Light2D, casting shadows. </brief_description> <description> - Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows. + Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed. </description> <methods> <method name="get_occluder_light_mask" qualifiers="const"> @@ -26195,8 +26455,10 @@ </methods> <members> <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief=""> + The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). </member> <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon" brief=""> + The [OccluderPolygon2D] used to compute the shadow. </member> </members> <constants> @@ -26204,8 +26466,10 @@ </class> <class name="Line2D" inherits="Node2D" category="Core"> <brief_description> + A 2D line. </brief_description> <description> + A line through several points in 2D space. </description> <methods> <method name="add_point"> @@ -26214,6 +26478,7 @@ <argument index="0" name="pos" type="Vector2"> </argument> <description> + Add a point at the x/y position in the supplied [Vector2] </description> </method> <method name="get_begin_cap_mode" qualifiers="const"> @@ -26302,6 +26567,7 @@ <argument index="0" name="i" type="int"> </argument> <description> + Remove the point at index 'i' from the line. </description> </method> <method name="set_begin_cap_mode"> @@ -26506,6 +26772,7 @@ <return type="int" enum="LineEdit.Align"> </return> <description> + Return the align mode of the [LineEdit]. </description> </method> <method name="get_cursor_pos" qualifiers="const"> @@ -26532,18 +26799,21 @@ <return type="PopupMenu"> </return> <description> + Return the [PopupMenu] of this [LineEdit]. </description> </method> <method name="get_placeholder" qualifiers="const"> <return type="String"> </return> <description> + Return the placeholder text. </description> </method> <method name="get_placeholder_alpha" qualifiers="const"> <return type="float"> </return> <description> + Return transparency of the placeholder text. </description> </method> <method name="get_text" qualifiers="const"> @@ -26573,6 +26843,7 @@ <argument index="0" name="option" type="int"> </argument> <description> + Execute a given action as defined in the MENU_* enum. </description> </method> <method name="select"> @@ -26583,6 +26854,12 @@ <argument index="1" name="to" type="int" default="-1"> </argument> <description> + Select the text inside [LineEdit] by the given character positions. [code]from[/code] is default to the beginning. [code]to[/code] is default to the end. + [codeblock] + select() # select all + select(5) # select from the fifth character to the end. + select(2, 5) # select from the second to the fifth character. + [/codeblock] </description> </method> <method name="select_all"> @@ -26598,6 +26875,7 @@ <argument index="0" name="align" type="int" enum="LineEdit.Align"> </argument> <description> + Set text alignment of the [LineEdit]. </description> </method> <method name="set_cursor_pos"> @@ -26641,6 +26919,7 @@ <argument index="0" name="text" type="String"> </argument> <description> + Set the placeholder text. </description> </method> <method name="set_placeholder_alpha"> @@ -26649,6 +26928,7 @@ <argument index="0" name="alpha" type="float"> </argument> <description> + Set transparency of the placeholder text. </description> </method> <method name="set_secret"> @@ -26712,24 +26992,34 @@ </signals> <constants> <constant name="ALIGN_LEFT" value="0"> + Align left. </constant> <constant name="ALIGN_CENTER" value="1"> + Align center. </constant> <constant name="ALIGN_RIGHT" value="2"> + Align right. </constant> <constant name="ALIGN_FILL" value="3"> + Align fill. </constant> <constant name="MENU_CUT" value="0"> + Cut (Copy and clear). </constant> <constant name="MENU_COPY" value="1"> + Copy the selected text. </constant> <constant name="MENU_PASTE" value="2"> + Paste the clipboard text over the selected text. </constant> <constant name="MENU_CLEAR" value="3"> + Clear the text. </constant> <constant name="MENU_SELECT_ALL" value="4"> + Select all text. </constant> <constant name="MENU_UNDO" value="5"> + Undo an action. </constant> <constant name="MENU_MAX" value="6"> </constant> @@ -26932,6 +27222,7 @@ <return type="void"> </return> <description> + Called before the program exits. </description> </method> <method name="_idle" qualifiers="virtual"> @@ -26940,12 +27231,14 @@ <argument index="0" name="delta" type="float"> </argument> <description> + Called each idle frame with time since last call as an only argument. </description> </method> <method name="_initialize" qualifiers="virtual"> <return type="void"> </return> <description> + Called once during initialization. </description> </method> <method name="_input_event" qualifiers="virtual"> @@ -27072,6 +27365,7 @@ <argument index="0" name="base64_str" type="String"> </argument> <description> + Return [PoolByteArray] of a given base64 encoded String. </description> </method> <method name="base64_to_utf8"> @@ -27080,6 +27374,7 @@ <argument index="0" name="base64_str" type="String"> </argument> <description> + Return utf8 String of a given base64 encoded String. </description> </method> <method name="base64_to_variant"> @@ -27088,6 +27383,7 @@ <argument index="0" name="base64_str" type="String"> </argument> <description> + Return [Variant] of a given base64 encoded String. </description> </method> <method name="raw_to_base64"> @@ -27096,6 +27392,7 @@ <argument index="0" name="array" type="PoolByteArray"> </argument> <description> + Return base64 encoded String of a given [PoolByteArray]. </description> </method> <method name="utf8_to_base64"> @@ -27104,6 +27401,7 @@ <argument index="0" name="utf8_str" type="String"> </argument> <description> + Return base64 encoded String of a given utf8 String. </description> </method> <method name="variant_to_base64"> @@ -27112,6 +27410,7 @@ <argument index="0" name="variant" type="Variant"> </argument> <description> + Return base64 encoded String of a given [Variant]. </description> </method> </methods> @@ -27191,6 +27490,7 @@ <signals> <signal name="about_to_show"> <description> + Emitted when [PopupMenu] of this MenuButton is about to show. </description> </signal> </signals> @@ -27727,6 +28027,14 @@ Create a new item in the library, supplied an id. </description> </method> + <method name="find_item_by_name" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> <method name="get_item_list" qualifiers="const"> <return type="PoolIntArray"> </return> @@ -28585,6 +28893,7 @@ <argument index="3" name="out_bandwidth" type="int" default="0"> </argument> <description> + Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code]. </description> </method> <method name="create_server"> @@ -28599,6 +28908,7 @@ <argument index="3" name="out_bandwidth" type="int" default="0"> </argument> <description> + Create server that listens to connections via [code]port[/code]. </description> </method> <method name="get_compression_mode" qualifiers="const"> @@ -28665,6 +28975,7 @@ <return type="bool"> </return> <description> + Return whether this [NetworkedMultiplayerPeer] is refusing new connections. </description> </method> <method name="poll"> @@ -28679,6 +28990,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + If [code]endable[/code] is true, this [NetworkedMultiplayerPeer] will refuse new connections. </description> </method> <method name="set_target_peer"> @@ -28701,26 +29013,31 @@ <signals> <signal name="connection_failed"> <description> + Emitted when failed to connect to server. </description> </signal> <signal name="connection_succeeded"> <description> + Emitted when successfully connected to server. </description> </signal> <signal name="peer_connected"> <argument index="0" name="id" type="int"> </argument> <description> + Emitted by the server when a client is connected. </description> </signal> <signal name="peer_disconnected"> <argument index="0" name="id" type="int"> </argument> <description> + Emitted by the server when a client is disconnected. </description> </signal> <signal name="server_disconnected"> <description> + Emitted by clients when server is disconnected. </description> </signal> </signals> @@ -29089,6 +29406,7 @@ <argument index="0" name="event" type="InputEvent"> </argument> <description> + Called when there is a change to input devices. Propagated through the node tree until a Node consumes it. </description> </method> <method name="_process" qualifiers="virtual"> @@ -29116,6 +29434,7 @@ <argument index="0" name="event" type="InputEvent"> </argument> <description> + Propagated to all nodes when the previous InputEvent is not consumed by any nodes. </description> </method> <method name="_unhandled_key_input" qualifiers="virtual"> @@ -29313,12 +29632,14 @@ <return type="int" enum="Node.PauseMode"> </return> <description> + Return the pause mode (PAUSE_MODE_*) of this Node. </description> </method> <method name="get_position_in_parent" qualifiers="const"> <return type="int"> </return> <description> + Return the order in the node tree branch, i.e. if called by the first child Node, return 0. </description> </method> <method name="get_process_delta_time" qualifiers="const"> @@ -29338,6 +29659,7 @@ <return type="SceneTree"> </return> <description> + Return a [SceneTree] that this node is inside. </description> </method> <method name="get_viewport" qualifiers="const"> @@ -29352,6 +29674,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> + Return whether the node that a given [NodePath] points too exists. </description> </method> <method name="has_node_and_resource" qualifiers="const"> @@ -29405,12 +29728,14 @@ <argument index="0" name="group" type="String"> </argument> <description> + Return whether this Node is in the specified group. </description> </method> <method name="is_inside_tree" qualifiers="const"> <return type="bool"> </return> <description> + Return whether this Node is inside a [SceneTree]. </description> </method> <method name="is_network_master" qualifiers="const"> @@ -29502,6 +29827,7 @@ <return type="void"> </return> <description> + Queues a node for deletion at the end of the current frame. When deleted, all of its children nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to know whether a node will be deleted at the end of the frame. </description> </method> <method name="raise"> @@ -29551,6 +29877,7 @@ <return type="void"> </return> <description> + Request that [code]_ready[/code] be called again. </description> </method> <method name="rpc" qualifiers="vararg"> @@ -29731,6 +30058,7 @@ <argument index="0" name="mode" type="int" enum="Node.PauseMode"> </argument> <description> + Set pause mode (PAUSE_MODE_*) of this Node. </description> </method> <method name="set_process"> @@ -29801,10 +30129,12 @@ </signal> <signal name="tree_entered"> <description> + Emitted when Node enters the tree. </description> </signal> <signal name="tree_exited"> <description> + Emitted when Node exits the tree. </description> </signal> </signals> @@ -29849,18 +30179,25 @@ <constant name="RPC_MODE_DISABLED" value="0"> </constant> <constant name="RPC_MODE_REMOTE" value="1"> + Call a method remotely. </constant> <constant name="RPC_MODE_SYNC" value="2"> + Call a method both remotely and locally. </constant> <constant name="RPC_MODE_MASTER" value="3"> + Call a method if the Node is Master. </constant> <constant name="RPC_MODE_SLAVE" value="4"> + Call a method if the Node is Slave. </constant> <constant name="PAUSE_MODE_INHERIT" value="0"> + Inherits pause mode from parent. For root node, it is equivalent to PAUSE_MODE_STOP. </constant> <constant name="PAUSE_MODE_STOP" value="1"> + Stop processing when SceneTree is paused. </constant> <constant name="PAUSE_MODE_PROCESS" value="2"> + Continue to process regardless of SceneTree pause state. </constant> <constant name="DUPLICATE_SIGNALS" value="1"> </constant> @@ -37842,8 +38179,10 @@ </class> <class name="PlaneMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Class representing a planar [PrimitiveMesh]. </brief_description> <description> + Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. </description> <methods> <method name="get_size" qualifiers="const"> @@ -37891,10 +38230,13 @@ </methods> <members> <member name="size" type="Vector2" setter="set_size" getter="get_size" brief=""> + Size of the generated plane. Defaults to (2.0, 2.0). </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief=""> + Number of subdivision along the z-axis. Defaults to 0. </member> <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief=""> + Number of subdivision along the x-axis. Defaults to 0. </member> </members> <constants> @@ -39552,8 +39894,10 @@ </class> <class name="PrimitiveMesh" inherits="Mesh" category="Core"> <brief_description> + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. </brief_description> <description> + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. </description> <methods> <method name="get_material" qualifiers="const"> @@ -39573,6 +39917,7 @@ </methods> <members> <member name="material" type="Material" setter="set_material" getter="get_material" brief=""> + The current [Material] of the primitive mesh. </member> </members> <constants> @@ -39580,8 +39925,10 @@ </class> <class name="PrismMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Class representing a prism-shaped [PrimitiveMesh]. </brief_description> <description> + Class representing a prism-shaped [PrimitiveMesh]. </description> <methods> <method name="get_left_to_right" qualifiers="const"> @@ -39657,14 +40004,19 @@ </methods> <members> <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" brief=""> + Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint). </member> <member name="size" type="Vector3" setter="set_size" getter="get_size" brief=""> + Size of the prism. Defaults to (2.0, 2.0, 2.0). </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief=""> + Number of added edge loops along the z-axis. Defaults to 0. </member> <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" brief=""> + Number of added edge loops along the y-axis. Defaults to 0. </member> <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief=""> + Number of added edge loops along the x-axis. Defaults to 0. </member> </members> <constants> @@ -40214,8 +40566,10 @@ </class> <class name="QuadMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Class representing a square mesh. </brief_description> <description> + Class representing a square mesh with size (2,2,0). Consider using a [PlaneMesh] if you require a differently sized plane. </description> <methods> </methods> @@ -40575,11 +40929,11 @@ Query the closest object intersecting a ray. </brief_description> <description> - A RayCast represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 3D space in order to find the closest object intersecting with the ray. + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray. - RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks. + RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. - Only enabled raycasts will be able to query the space and report collisions! + Only enabled raycasts will be able to query the space and report collisions. RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. </description> @@ -40590,7 +40944,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Adds a collision exception so the ray does not report collisions with the specified [code]node[/code]. + Adds a collision exception so the ray does not report collisions with the specified node. </description> </method> <method name="add_exception_rid"> @@ -40599,20 +40953,22 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Adds a collision exception so the ray does not report collisions with the specified [RID]. </description> </method> <method name="clear_exceptions"> <return type="void"> </return> <description> - Removes all collision exception for this ray. + Removes all collision exceptions for this ray. </description> </method> <method name="force_raycast_update"> <return type="void"> </return> <description> - Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work. + Updates the collision information for the ray. + Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_cast_to" qualifiers="const"> @@ -40626,14 +40982,24 @@ <return type="Object"> </return> <description> - Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Return the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast.is_colliding(): + var collider = RayCast.get_collider() + [/codeblock] </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int"> </return> <description> - Returns the collision shape of the closest object the ray is pointing to. + Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast.is_colliding(): + var shape = RayCast.get_collider_shape() + [/codeblock] </description> </method> <method name="get_collision_layer" qualifiers="const"> @@ -40647,14 +41013,14 @@ <return type="Vector3"> </return> <description> - Returns the normal of the intersecting object shape face containing the collision point. + Returns the normal of the intersecting object's shape at the collision point. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector3"> </return> <description> - Returns collision point. This point is in [b]global[/b] coordinate system. + Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. </description> </method> <method name="get_type_mask" qualifiers="const"> @@ -40675,7 +41041,7 @@ <return type="bool"> </return> <description> - Returns whether this raycast is enabled or not. + Returns whether the ray is enabled or not. </description> </method> <method name="remove_exception"> @@ -40684,7 +41050,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Removes a collision exception so the ray does report collisions with the specified [code]node[/code]. + Removes a collision exception so the ray does report collisions with the specified node. </description> </method> <method name="remove_exception_rid"> @@ -40693,6 +41059,7 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> <method name="set_cast_to"> @@ -40701,7 +41068,7 @@ <argument index="0" name="local_point" type="Vector3"> </argument> <description> - Sets to which point ray should be casted. This point is in [b]local[/b] coordinate system. + Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]. </description> </method> <method name="set_collision_layer"> @@ -40734,12 +41101,20 @@ </methods> <members> <member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to" brief=""> + The ray's destination point, relative to the RayCast's [code]position[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + The RayCast's collison layer(s). Only bodies in the same collision layer(s) will be detected. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief=""> + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. </member> <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief=""> + Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. + Example: + [codeblock] + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY + [/codeblock] </member> </members> <constants> @@ -40750,12 +41125,9 @@ Query the closest object intersecting a ray. </brief_description> <description> - A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray. - - RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks. - - Only enabled raycasts will be able to query the space and report collisions! - + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 2D space in order to find the closest object along the path of the ray. + RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. + Only enabled raycasts will be able to query the space and report collisions. RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. </description> <methods> @@ -40765,7 +41137,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Adds a collision exception so the ray does not report collisions with the specified [code]node[/code]. + Adds a collision exception so the ray does not report collisions with the specified node. </description> </method> <method name="add_exception_rid"> @@ -40774,20 +41146,21 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Adds a collision exception so the ray does not report collisions with the specified [RID]. </description> </method> <method name="clear_exceptions"> <return type="void"> </return> <description> - Removes all collision exception for this ray. + Removes all collision exceptions for this ray. </description> </method> <method name="force_raycast_update"> <return type="void"> </return> <description> - Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work. + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_cast_to" qualifiers="const"> @@ -40801,14 +41174,24 @@ <return type="Object"> </return> <description> - Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Returns the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast2D.is_colliding(): + var collider = RayCast2D.get_collider() + [/codeblock] </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int"> </return> <description> - Returns the collision shape of the closest object the ray is pointing to. + Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast2D.is_colliding(): + var shape = RayCast2D.get_collider_shape() + [/codeblock] </description> </method> <method name="get_collision_layer" qualifiers="const"> @@ -40822,14 +41205,14 @@ <return type="Vector2"> </return> <description> - Returns the normal of the intersecting object shape face containing the collision point. + Returns the normal of the intersecting object's shape at the collision point. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector2"> </return> <description> - Returns the collision point in which the ray intersects the closest object. This point is in [b]global[/b] coordinate system. + Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. </description> </method> <method name="get_exclude_parent_body" qualifiers="const"> @@ -40866,7 +41249,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Removes a collision exception so the ray does report collisions with the specified [code]node[/code]. + Removes a collision exception so the ray does report collisions with the specified node. </description> </method> <method name="remove_exception_rid"> @@ -40875,6 +41258,7 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> <method name="set_cast_to"> @@ -40925,14 +41309,23 @@ </methods> <members> <member name="cast_to" type="Vector2" setter="set_cast_to" getter="get_cast_to" brief=""> + The ray's destination point, relative to the RayCast's [code]position[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + The RayCast2D's collison layer(s). Only bodies in the same collision layer(s) will be detected. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief=""> + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. </member> <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" brief=""> + If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code]. </member> <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief=""> + Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. + Example: + [codeblock] + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY + [/codeblock] </member> </members> <constants> @@ -42738,6 +43131,8 @@ </theme_item> <theme_item name="mono_font" type="Font"> </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> <theme_item name="normal_font" type="Font"> </theme_item> <theme_item name="selection_color" type="Color"> @@ -43069,38 +43464,55 @@ </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief=""> + Dampens rotational forces of the Rigid body by the 'angular_damp' rate. </member> <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" brief=""> + The current rotational velocity of the Rigid body </member> <member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" brief="" enum="RigidBody.AxisLock"> + Locks the rotational forces to a particular axis, preventing rotations on other axes. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief=""> + Bounciness of the Rigid body. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" brief=""> + If true, the Rigid body will no longer calculate forces when there is no movement and will act as a static body. It will wake up when other forces are applied through other collisions or when the 'apply_impulse' method is used. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" brief=""> + If true, the Rigid body will emit signals when it collides with another Rigid body. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" brief=""> + The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. </member> <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" brief=""> + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. </member> <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" brief=""> + If true, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction" brief=""> + The body friction, from 0 (frictionless) to 1 (max friction). </member> <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" brief=""> + The 'gravity_scale' for this Rigid body will be multiplied by the global 3d gravity setting found in "Project > Project Settings > Physics > 3d". 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="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief=""> + The linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. </member> <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" brief=""> + The body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN 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" brief=""> + The body mass. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="RigidBody.Mode"> + The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" brief=""> + The current 'sleeping' state of the Rigid body. </member> <member name="weight" type="float" setter="set_weight" getter="get_weight" brief=""> + The body weight given standard earth-weight (gravity 9.8). </member> </members> <signals> @@ -44256,17 +44668,18 @@ </class> <class name="Script" inherits="Resource" category="Core"> <brief_description> - Base class for scripts. + A class stored as a resource. </brief_description> <description> - Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances. + A class stored as a resource. The script exends the functionality of all objects that instance it. + The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. </description> <methods> <method name="can_instance" qualifiers="const"> <return type="bool"> </return> <description> - Return true if this script can be instance (ie not a library). + Returns true if the script can be instanced. </description> </method> <method name="get_node_type" qualifiers="const"> @@ -44279,7 +44692,7 @@ <return type="String"> </return> <description> - Return the script source code (if available). + Returns the script source code, or an empty string if source code is not available. </description> </method> <method name="has_script_signal" qualifiers="const"> @@ -44288,13 +44701,14 @@ <argument index="0" name="signal_name" type="String"> </argument> <description> + Returns true if the script, or a base class, defines a signal with the given name. </description> </method> <method name="has_source_code" qualifiers="const"> <return type="bool"> </return> <description> - Return true if the script contains source code. + Returns true if the script contains non-empty source code. </description> </method> <method name="instance_has" qualifiers="const"> @@ -44303,21 +44717,24 @@ <argument index="0" name="base_object" type="Object"> </argument> <description> - Return true if a given object uses an instance of this script. + Returns true if 'base_object' is an instance of this script. </description> </method> <method name="is_tool" qualifiers="const"> <return type="bool"> </return> <description> + Returns true if the script is a tool script. A tool script can run in the editor. </description> </method> <method name="reload"> <return type="int" enum="Error"> </return> <argument index="0" name="keep_state" type="bool" default="false"> + If true, preserve existing script instances and subclasses. </argument> <description> + Reloads the script's class implementation. Returns an error code. </description> </method> <method name="set_source_code"> @@ -44326,7 +44743,7 @@ <argument index="0" name="source" type="String"> </argument> <description> - Set the script source code. + Sets the script source code. Does not reload the class implementation. </description> </method> </methods> @@ -45294,16 +45711,17 @@ </class> <class name="Spatial" inherits="Node" category="Core"> <brief_description> - Base class for all 3D nodes. + Most basic 3D game object, parent of all 3D related nodes. </brief_description> <description> - Spatial is the base for every type of 3D [Node]. It contains a 3D [Transform] which can be set or get as local or global. If a Spatial [Node] has Spatial children, their transforms will be relative to the parent. + Most basic 3D game object, with a 3D [Transform] and visibility settings. All 3D physics nodes and sprites inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project. </description> <methods> <method name="get_gizmo" qualifiers="const"> <return type="SpatialGizmo"> </return> <description> + Return the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. </description> </method> <method name="get_global_transform" qualifiers="const"> @@ -45357,6 +45775,7 @@ <return type="World"> </return> <description> + Return current [World] resource this Spatial node is registered to. </description> </method> <method name="global_rotate"> @@ -45367,6 +45786,7 @@ <argument index="1" name="radians" type="float"> </argument> <description> + Rotate current node along normal [Vector3] by angle in radians in Global space. </description> </method> <method name="global_translate"> @@ -45375,42 +45795,49 @@ <argument index="0" name="offset" type="Vector3"> </argument> <description> + Move current node by [Vector3] offset in Global space. </description> </method> <method name="hide"> <return type="void"> </return> <description> + Disable rendering of this node. Change Spatial Visible property to false. </description> </method> <method name="is_local_transform_notification_enabled" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether node sends notification that its local transformation changed. Spatial will not propagate this by default. </description> </method> <method name="is_set_as_toplevel" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether this node is set as Toplevel, ignoring its parent node transformations. </description> </method> <method name="is_transform_notification_enabled" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether node sends notification that its transformation changed. Spatial will not propagate this by default. </description> </method> <method name="is_visible" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether this node is set to be visible. </description> </method> <method name="is_visible_in_tree" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether this node is visible, taking into consideration that its parents visibility. </description> </method> <method name="look_at"> @@ -45421,6 +45848,7 @@ <argument index="1" name="up" type="Vector3"> </argument> <description> + Rotates itself to point into direction of target position. Operations take place in global space. </description> </method> <method name="look_at_from_pos"> @@ -45433,12 +45861,14 @@ <argument index="2" name="up" type="Vector3"> </argument> <description> + Moves itself to specified position and then rotates itself to point into direction of target position. Operations take place in global space. </description> </method> <method name="orthonormalize"> <return type="void"> </return> <description> + Reset this node transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D]. </description> </method> <method name="rotate"> @@ -45449,6 +45879,7 @@ <argument index="1" name="radians" type="float"> </argument> <description> + Rotates node in local space on given normal [Vector3] by angle in radians. </description> </method> <method name="rotate_x"> @@ -45457,6 +45888,7 @@ <argument index="0" name="radians" type="float"> </argument> <description> + Rotates node in local space on X axis by angle in radians. </description> </method> <method name="rotate_y"> @@ -45465,6 +45897,7 @@ <argument index="0" name="radians" type="float"> </argument> <description> + Rotates node in local space on Y axis by angle in radians. </description> </method> <method name="rotate_z"> @@ -45473,6 +45906,7 @@ <argument index="0" name="radians" type="float"> </argument> <description> + Rotates node in local space on Z axis by angle in radians. </description> </method> <method name="set_as_toplevel"> @@ -45481,6 +45915,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + Makes this node ignore its parents tranformations. Node tranformations are only in global space. </description> </method> <method name="set_gizmo"> @@ -45489,6 +45924,7 @@ <argument index="0" name="gizmo" type="SpatialGizmo"> </argument> <description> + Set [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. </description> </method> <method name="set_global_transform"> @@ -45497,13 +45933,14 @@ <argument index="0" name="global" type="Transform"> </argument> <description> - Set the transform globally, relative to worldspace. + Set the transform globally, relative to world space. </description> </method> <method name="set_identity"> <return type="void"> </return> <description> + Reset all tranformations for this node. Set its [Transform3D] to identity matrix. </description> </method> <method name="set_ignore_transform_notification"> @@ -45512,6 +45949,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> + Set whether this node ignores notification that its transformation changed. </description> </method> <method name="set_notify_local_transform"> @@ -45520,6 +45958,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + Set whether this node sends notification that its local transformation changed. Spatial will not propagate this by default. </description> </method> <method name="set_notify_transform"> @@ -45528,6 +45967,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + Set whether this node sends notification that its transformation changed. Spatial will not propagate this by default. </description> </method> <method name="set_rotation"> @@ -45554,6 +45994,7 @@ <argument index="0" name="scale" type="Vector3"> </argument> <description> + Set the scale. </description> </method> <method name="set_transform"> @@ -45585,6 +46026,7 @@ <return type="void"> </return> <description> + Enable rendering of this node. Change Spatial Visible property to false. </description> </method> <method name="to_global" qualifiers="const"> @@ -45593,6 +46035,7 @@ <argument index="0" name="local_point" type="Vector3"> </argument> <description> + Tranform [Vector3] from this node local space to world space. </description> </method> <method name="to_local" qualifiers="const"> @@ -45601,6 +46044,7 @@ <argument index="0" name="global_point" type="Vector3"> </argument> <description> + Tranform [Vector3] from world space to this node local space. </description> </method> <method name="translate"> @@ -45609,46 +46053,60 @@ <argument index="0" name="offset" type="Vector3"> </argument> <description> + Change node position by given offset [Vector3]. </description> </method> <method name="update_gizmo"> <return type="void"> </return> <description> + Update [SpatialGizmo] of this node. </description> </method> </methods> <members> <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform" brief=""> + World space (global) [Transform] of this node. </member> <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" brief=""> + Local euler rotation in radians of this node. </member> <member name="rotation_deg" type="Vector3" setter="set_rotation_deg" getter="get_rotation_deg" brief=""> + Local euler rotation in degrees of this node. </member> <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" brief=""> + Local scale of this node. </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" brief=""> + Local space [Transform] of this node. </member> <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" brief=""> + Local translation of this node. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" brief=""> + Visibility of this node. Toggles if this node is rendered. </member> </members> <signals> <signal name="visibility_changed"> <description> + Emitted when node visibility changed. </description> </signal> </signals> <constants> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum=""> - Spatial nodes receive this notification with their global transform changes. This means that either the current or a parent node changed its transform. + Spatial nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform. + In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true). </constant> <constant name="NOTIFICATION_ENTER_WORLD" value="41" enum=""> + Spatial nodes receive this notification when they are registered to new [World] resource. </constant> <constant name="NOTIFICATION_EXIT_WORLD" value="42" enum=""> + Spatial nodes receive this notification when they are unregistered from current [World] resource. </constant> <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43" enum=""> + Spatial nodes receive this notification when their visibility changes. </constant> </constants> </class> @@ -45908,6 +46366,12 @@ <description> </description> </method> + <method name="get_transmission" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> <method name="get_uv1_offset" qualifiers="const"> <return type="Vector3"> </return> @@ -46290,6 +46754,14 @@ <description> </description> </method> + <method name="set_transmission"> + <return type="void"> + </return> + <argument index="0" name="transmission" type="Color"> + </argument> + <description> + </description> + </method> <method name="set_uv1_offset"> <return type="void"> </return> @@ -46484,6 +46956,12 @@ </member> <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture" brief=""> </member> + <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission" brief=""> + </member> + <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature" brief=""> + </member> + <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture" brief=""> + </member> <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" brief=""> </member> <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" brief=""> @@ -46528,15 +47006,17 @@ </constant> <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10"> </constant> - <constant name="TEXTURE_REFRACTION" value="11"> + <constant name="TEXTURE_TRANSMISSION" value="11"> + </constant> + <constant name="TEXTURE_REFRACTION" value="12"> </constant> - <constant name="TEXTURE_DETAIL_MASK" value="12"> + <constant name="TEXTURE_DETAIL_MASK" value="13"> </constant> - <constant name="TEXTURE_DETAIL_ALBEDO" value="13"> + <constant name="TEXTURE_DETAIL_ALBEDO" value="14"> </constant> - <constant name="TEXTURE_DETAIL_NORMAL" value="14"> + <constant name="TEXTURE_DETAIL_NORMAL" value="15"> </constant> - <constant name="TEXTURE_MAX" value="15"> + <constant name="TEXTURE_MAX" value="16"> </constant> <constant name="DETAIL_UV_1" value="0"> </constant> @@ -46560,11 +47040,13 @@ </constant> <constant name="FEATURE_SUBSURACE_SCATTERING" value="8"> </constant> - <constant name="FEATURE_REFRACTION" value="9"> + <constant name="FEATURE_TRANSMISSION" value="9"> + </constant> + <constant name="FEATURE_REFRACTION" value="10"> </constant> - <constant name="FEATURE_DETAIL" value="10"> + <constant name="FEATURE_DETAIL" value="11"> </constant> - <constant name="FEATURE_MAX" value="11"> + <constant name="FEATURE_MAX" value="12"> </constant> <constant name="BLEND_MODE_MIX" value="0"> </constant> @@ -46616,7 +47098,7 @@ </constant> <constant name="DIFFUSE_LAMBERT" value="0"> </constant> - <constant name="DIFFUSE_HALF_LAMBERT" value="1"> + <constant name="DIFFUSE_LAMBERT_WRAP" value="1"> </constant> <constant name="DIFFUSE_OREN_NAYAR" value="2"> </constant> @@ -46702,8 +47184,10 @@ </class> <class name="SphereMesh" inherits="PrimitiveMesh" category="Core"> <brief_description> + Class representing a spherical [PrimitiveMesh]. </brief_description> <description> + Class representing a spherical [PrimitiveMesh]. </description> <methods> <method name="get_height" qualifiers="const"> @@ -46779,14 +47263,19 @@ </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height" brief=""> + Full height of the sphere. Defaults to 2.0. </member> <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" brief=""> + Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere the height and radius of the sphere have to equal. Defaults to false. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief=""> + Number of radial segments on the sphere. Defaults to 64. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" brief=""> + Radius of sphere. Defaults to 1.0. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" brief=""> + Number of segments along the height of the sphere. Defaults to 32. </member> </members> <constants> @@ -47786,12 +48275,16 @@ </methods> <members> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief=""> + The body bounciness. </member> <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" brief=""> + The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. </member> <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" brief=""> + The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction" brief=""> + The body friction, from 0 (frictionless) to 1 (full friction). </member> </members> <constants> @@ -49210,10 +49703,26 @@ </class> <class name="StyleBoxFlat" inherits="StyleBox" category="Core"> <brief_description> - Stylebox of a single color. + Customizable Stylebox with a given set of parameters. (no texture required) </brief_description> <description> - Stylebox of a single color. Displays the stylebox of a single color, alternatively a border with light/dark colors can be assigned. + This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + - Color + - Border width (individual width for each border) + - Rounded corners (individual radius for each corner) + - Shadow + About corner radius: + Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: + [codeblock] + height = 30 + corner_radius_top_left = 50 + corner_raidus_bottom_left = 100 + [/codeblock] + The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result: + [codeblock] + corner_radius_top_left: 10 + corner_raidus_bottom_left: 20 + [/codeblock] </description> <methods> <method name="get_aa_size" qualifiers="const"> @@ -49457,46 +49966,69 @@ </methods> <members> <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" brief=""> + Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticable when using rounded corners. </member> <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" brief=""> + 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" brief=""> + The background color of the stylebox. </member> <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend" brief=""> + When set to true, the border will fade into the background color. </member> <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" brief=""> + Sets the color of the border. </member> <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width" brief=""> + Border width for the bottom border. </member> <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width" brief=""> + Border width for the left border. </member> <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width" brief=""> + Border width for the right border. </member> <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width" brief=""> + Border width for the top border. </member> <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" brief=""> + This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account. + For corner radius smaller than 10: 4-5 should be enough + For corner radius smaller than 30: 8-12 should be enough ... </member> <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" brief=""> + The corner radius of the bottom left corner. When set to 0 the corner is not rounded. </member> <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius" brief=""> + The corner radius of the bottom right corner. When set to 0 the corner is not rounded. </member> <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius" brief=""> + The corner radius of the top left corner. When set to 0 the corner is not rounded. </member> <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius" brief=""> + The corner radius of the top right corner. When set to 0 the corner is not rounded. </member> <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief=""> + Toggels drawing of the inner part of the stylebox. </member> <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin" brief=""> + Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect. </member> <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin" brief=""> + Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect. </member> <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin" brief=""> + Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect. </member> <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" brief=""> + Expands the stylebox outside of the control rect on the top edge. Useful in combination with 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" brief=""> + The color of the shadow. (This has no effect when shadow_size < 1) </member> <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" brief=""> + The shadow size in pixels. </member> </members> <constants> @@ -51494,10 +52026,10 @@ </class> <class name="TextureRect" inherits="Control" category="Core"> <brief_description> - Control Frame that draws a texture. + Control that draws a texture. </brief_description> <description> - Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI. + Control that draws a texture. </description> <methods> <method name="get_stretch_mode" qualifiers="const"> @@ -51545,10 +52077,13 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="has_expand" brief=""> + If [code]true[/code] texture will expand to fit. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureRect.StretchMode"> + Stretch mode of the texture. Use STRETCH_* constants as value. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief=""> + The [Texture] resource for the node. </member> </members> <constants> @@ -51928,11 +52463,10 @@ </class> <class name="TileMap" inherits="Node2D" category="Core"> <brief_description> - Node for 2D tile-based games. + Node for 2D tile-based maps. </brief_description> <description> - Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps. - To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time. + Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. </description> <methods> <method name="clear"> @@ -52375,40 +52909,55 @@ </methods> <members> <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" brief=""> + The custom [Transform2D] to be applied to the TileMap's cells. </member> <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" brief="" enum="TileMap.HalfOffset"> + Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. </member> <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" brief=""> + The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. </member> <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" brief=""> + The TileMap's cell size. </member> <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" brief="" enum="TileMap.TileOrigin"> + Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. </member> <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" brief=""> + If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" brief=""> + Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. </member> <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" brief=""> + Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + The collision layer(s) for all colliders in the TileMap. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief=""> + The collision mask(s) for all colliders in the TileMap. </member> <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" brief=""> + If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="TileMap.Mode"> + The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. </member> <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief=""> + The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). </member> <member name="tile_data" type="PoolIntArray" setter="_set_tile_data" getter="_get_tile_data" brief=""> + A [PoolIntArray] containing </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset" brief=""> + The assigned [TileSet]. </member> </members> <signals> <signal name="settings_changed"> <description> - Signal indicating that a tilemap setting has changed. + Emitted when a tilemap setting has changed. </description> </signal> </signals> @@ -52813,10 +53362,10 @@ </class> <class name="Timer" inherits="Node" category="Core"> <brief_description> - A simple Timer node. + A countdown timer. </brief_description> <description> - Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop. + Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode. </description> <methods> <method name="get_time_left" qualifiers="const"> @@ -52916,47 +53465,58 @@ <return type="void"> </return> <description> - Start the timer. + Start the Timer. </description> </method> <method name="stop"> <return type="void"> </return> <description> - Stop (cancel) the timer. + Stop (cancel) the Timer. </description> </method> </methods> <members> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" brief=""> + If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" brief=""> + If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. </member> <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" brief="" enum="Timer.TimerProcessMode"> + Processing mode. Uses TIMER_PROCESS_* constants as value. </member> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief=""> + Wait time in seconds. </member> </members> <signals> <signal name="timeout"> <description> - Emitted when the time runs out. + Emitted when the Timer reaches 0. </description> </signal> </signals> <constants> <constant name="TIMER_PROCESS_FIXED" value="0"> - Update the timer at fixed intervals (framerate processing). + Update the Timer at fixed intervals (framerate processing). </constant> <constant name="TIMER_PROCESS_IDLE" value="1"> - Update the timer during the idle time at each frame. + Update the Timer during the idle time at each frame. </constant> </constants> </class> <class name="ToolButton" inherits="Button" category="Core"> <brief_description> + Flat button helper class. </brief_description> <description> + This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to: + + [codeblock] + var btn = Button.new() + btn.set_flat(true) + [/codeblock] </description> <methods> </methods> @@ -53161,10 +53721,10 @@ </class> <class name="Transform" category="Built-In Types"> <brief_description> - 3D Transformation. + 3D Transformation. 3x4 matrix. </brief_description> <description> - Transform is used to store translation, rotation and scaling transformations. It consists of a Basis "basis" and Vector3 "origin". Transform is used to represent transformations of objects in space, and as such, determine their position, orientation and scale. It is similar to a 3x4 matrix. + Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix. </description> <methods> <method name="Transform"> @@ -53179,7 +53739,7 @@ <argument index="3" name="origin" type="Vector3"> </argument> <description> - Construct the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled). + Construct the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> <method name="Transform"> @@ -53190,7 +53750,7 @@ <argument index="1" name="origin" type="Vector3"> </argument> <description> - Construct the Transform from a Basis and Vector3. + Construct the Transform from a [Basis] and [Vector3]. </description> </method> <method name="Transform"> @@ -53199,7 +53759,7 @@ <argument index="0" name="from" type="Transform2D"> </argument> <description> - Construct the Transform from a Transform2D. + Construct the Transform from a [Transform2D]. </description> </method> <method name="Transform"> @@ -53208,7 +53768,7 @@ <argument index="0" name="from" type="Quat"> </argument> <description> - Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0). + Construct the Transform from a [Quat]. The origin will be Vector3(0, 0, 0). </description> </method> <method name="Transform"> @@ -53217,7 +53777,7 @@ <argument index="0" name="from" type="Basis"> </argument> <description> - Construct the Transform from a Basis. The origin will be Vector3(0, 0, 0). + Construct the Transform from a [Basis]. The origin will be Vector3(0, 0, 0). </description> </method> <method name="affine_inverse"> @@ -53235,13 +53795,14 @@ <argument index="1" name="weight" type="float"> </argument> <description> + Interpolate to other Transform by weight amount (0-1). </description> </method> <method name="inverse"> <return type="Transform"> </return> <description> - Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling). + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). </description> </method> <method name="looking_at"> @@ -53288,7 +53849,7 @@ <argument index="0" name="ofs" type="Vector3"> </argument> <description> - Translate the transform by the specified displacement. + Translate the transform by the specified offset. </description> </method> <method name="xform"> @@ -53312,10 +53873,10 @@ </methods> <members> <member name="basis" type="Basis" setter="" getter="" brief=""> - 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 travelling with the object. + 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="" brief=""> - The origin of the transform. Which is the translation offset. + The translation offset of the transform. </member> </members> <constants> @@ -53323,10 +53884,10 @@ </class> <class name="Transform2D" category="Built-In Types"> <brief_description> - 3x2 Matrix for 2D transforms. + 2D Transformation. 3x2 matrix. </brief_description> <description> - 3x2 Matrix for 2D transforms. + Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix. </description> <methods> <method name="Transform2D"> @@ -53335,6 +53896,7 @@ <argument index="0" name="from" type="Transform"> </argument> <description> + Constructs the [Transform2D] from a 3D [Transform]. </description> </method> <method name="Transform2D"> @@ -53347,6 +53909,7 @@ <argument index="2" name="origin" type="Vector2"> </argument> <description> + Constructs the [Transform2D] from 3 [Vector2] consisting of rows x, y and origin. </description> </method> <method name="Transform2D"> @@ -53357,13 +53920,14 @@ <argument index="1" name="pos" type="Vector2"> </argument> <description> + Constructs the [Transform2D] from rotation angle in radians and position [Vector2]. </description> </method> <method name="affine_inverse"> <return type="Transform2D"> </return> <description> - Return the inverse of the matrix. + Returns the inverse of the matrix. </description> </method> <method name="basis_xform"> @@ -53372,6 +53936,7 @@ <argument index="0" name="v" type="var"> </argument> <description> + Transforms the given vector "v" by this transform basis (no translation). </description> </method> <method name="basis_xform_inv"> @@ -53380,12 +53945,14 @@ <argument index="0" name="v" type="var"> </argument> <description> + Inverse-transforms vector "v" by this transform basis (no translation). </description> </method> <method name="get_origin"> <return type="Vector2"> </return> <description> + Return the origin [Vector2] (translation). </description> </method> <method name="get_rotation"> @@ -53399,6 +53966,7 @@ <return type="Vector2"> </return> <description> + Return the scale. </description> </method> <method name="interpolate_with"> @@ -53409,18 +53977,21 @@ <argument index="1" name="weight" type="float"> </argument> <description> + Interpolate to other Transform2D by weight amount (0-1). </description> </method> <method name="inverse"> <return type="Transform2D"> </return> <description> + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). </description> </method> <method name="orthonormalized"> <return type="Transform2D"> </return> <description> + Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors. </description> </method> <method name="rotated"> @@ -53429,6 +54000,7 @@ <argument index="0" name="phi" type="float"> </argument> <description> + Rotate the transform by phi. </description> </method> <method name="scaled"> @@ -53437,6 +54009,7 @@ <argument index="0" name="scale" type="Vector2"> </argument> <description> + Scale the transform by the specified 2D scaling factors. </description> </method> <method name="translated"> @@ -53445,6 +54018,7 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> + Translate the transform by the specified offset. </description> </method> <method name="xform"> @@ -53453,6 +54027,7 @@ <argument index="0" name="v" type="var"> </argument> <description> + Transforms the given vector "v" by this transform. </description> </method> <method name="xform_inv"> @@ -53461,15 +54036,19 @@ <argument index="0" name="v" type="var"> </argument> <description> + Inverse-transforms the given vector "v" by this transform. </description> </method> </methods> <members> <member name="origin" type="Vector2" setter="" getter="" brief=""> + The translation offset of the transform. </member> <member name="x" type="Vector2" setter="" getter="" brief=""> + The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> <member name="y" type="Vector2" setter="" getter="" brief=""> + The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> </members> <constants> @@ -55342,8 +55921,10 @@ </class> <class name="Variant" category="Core"> <brief_description> + The most important data type in Godot. </brief_description> <description> + A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around. </description> <methods> </methods> |