diff options
Diffstat (limited to 'doc/classes')
33 files changed, 572 insertions, 387 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 0216d2ba35..f94eb7adef 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2504,7 +2504,7 @@ <constant name="TYPE_INT" value="2" enum="Variant.Type"> Variable is of type [int]. </constant> - <constant name="TYPE_REAL" value="3" enum="Variant.Type"> + <constant name="TYPE_FLOAT" value="3" enum="Variant.Type"> Variable is of type [float] (real). </constant> <constant name="TYPE_STRING" value="4" enum="Variant.Type"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index dc834474ad..ef33d7ea77 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -16,8 +16,8 @@ # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] - arrays.resize(ArrayMesh.ARRAY_MAX) - arrays[ArrayMesh.ARRAY_VERTEX] = vertices + arrays.resize(Mesh.ARRAY_MAX) + arrays[Mesh.ARRAY_VERTEX] = vertices # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) @@ -33,8 +33,8 @@ // Initialize the ArrayMesh. var arrMesh = new ArrayMesh(); var arrays = new Godot.Collections.Array(); - arrays.Resize((int)ArrayMesh.ArrayType.Max); - arrays[(int)ArrayMesh.ArrayType.Vertex] = vertices; + arrays.Resize((int)Mesh.ArrayType.Max); + arrays[(int)Mesh.ArrayType.Vertex] = vertices; // Create the Mesh. arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays); @@ -71,12 +71,12 @@ <argument index="3" name="lods" type="Dictionary" default="{ }"> </argument> - <argument index="4" name="compress_flags" type="int" default="31744"> + <argument index="4" name="compress_flags" type="int" default="0"> </argument> <description> Creates a new surface. Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. - The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used. + The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. </description> </method> @@ -209,77 +209,19 @@ </method> </methods> <members> - <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1"> - Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. + <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="ArrayMesh.BlendShapeMode" default="1"> + Sets the blend shape mode to one of [enum ArrayMesh.BlendShapeMode]. </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. </member> </members> <constants> - <constant name="NO_INDEX_ARRAY" value="-1"> - Default value used for index_array_len when no indices are present. + <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> - <constant name="ARRAY_WEIGHTS_SIZE" value="4"> - Amount of weights/bone indices per vertex (always 4). - </constant> - <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> - [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions. - </constant> - <constant name="ARRAY_NORMAL" value="1" enum="ArrayType"> - [PackedVector3Array] of vertex normals. - </constant> - <constant name="ARRAY_TANGENT" value="2" enum="ArrayType"> - [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. - </constant> - <constant name="ARRAY_COLOR" value="3" enum="ArrayType"> - [PackedColorArray] of vertex colors. - </constant> - <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType"> - [PackedVector2Array] for UV coordinates. - </constant> - <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> - [PackedVector2Array] for second UV coordinates. - </constant> - <constant name="ARRAY_BONES" value="6" enum="ArrayType"> - [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats. - </constant> - <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType"> - [PackedFloat32Array] of bone weights. Each element in groups of 4 floats. - </constant> - <constant name="ARRAY_INDEX" value="8" enum="ArrayType"> - [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. - For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. - </constant> - <constant name="ARRAY_MAX" value="9" enum="ArrayType"> - Represents the size of the [enum ArrayType] enum. - </constant> - <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> - Array format will include vertices (mandatory). - </constant> - <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> - Array format will include normals. - </constant> - <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> - Array format will include tangents. - </constant> - <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> - Array format will include a color array. - </constant> - <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> - Array format will include UVs. - </constant> - <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> - Array format will include another set of UVs. - </constant> - <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> - Array format will include bone indices. - </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat"> - Array format will include bone weights. - </constant> - <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> - Index array will be used. + <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> </constants> </class> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 877d3ca85a..4c9cd5702e 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -201,9 +201,9 @@ <method name="slerp"> <return type="Basis"> </return> - <argument index="0" name="b" type="Basis"> + <argument index="0" name="to" type="Basis"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix. diff --git a/doc/classes/CubeMesh.xml b/doc/classes/BoxMesh.xml index 1f64b4a21f..88d22ac899 100644 --- a/doc/classes/CubeMesh.xml +++ b/doc/classes/BoxMesh.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CubeMesh" inherits="PrimitiveMesh" version="4.0"> +<class name="BoxMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> - Generate an axis-aligned cuboid [PrimitiveMesh]. + Generate an axis-aligned box [PrimitiveMesh]. </brief_description> <description> - Generate an axis-aligned cuboid [PrimitiveMesh]. - The cube's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to [code]Vector3(3, 2, 1)[/code]. + Generate an axis-aligned box [PrimitiveMesh]. + The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to [code]Vector3(3, 2, 1)[/code]. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ </methods> <members> <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )"> - Size of the cuboid mesh. + Size of the box mesh. </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> Number of extra edge loops inserted along the Z axis. diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index fcf2feb3b9..aa9f99a31e 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -50,10 +50,10 @@ <method name="get_particle_flag" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags"> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags"> </argument> <description> - Returns the enabled state of the given flag (see [enum Flags] for options). + Returns the enabled state of the given flag (see [enum ParticleFlags] for options). </description> </method> <method name="restart"> @@ -99,12 +99,12 @@ <method name="set_particle_flag"> <return type="void"> </return> - <argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags"> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags"> </argument> <argument index="1" name="enable" type="bool"> </argument> <description> - Enables or disables the given flag (see [enum Flags] for options). + Enables or disables the given flag (see [enum ParticleFlags] for options). </description> </method> </methods> @@ -196,9 +196,6 @@ <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> - <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - Align Y axis of particle with the direction of its velocity. - </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> @@ -250,6 +247,9 @@ <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Orbital velocity randomness ratio. </member> + <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + Align Y axis of particle with the direction of its velocity. + </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> @@ -339,17 +339,17 @@ <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. </constant> - <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> - Use with [method set_particle_flag] to set [member flag_align_y]. + <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_align_y]. </constant> - <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> + <constant name="PARTICLE_FLAG_ROTATE_Y" value="1" enum="ParticleFlags"> Present for consistency with 3D particle nodes, not used in 2D. </constant> - <constant name="FLAG_DISABLE_Z" value="2" enum="Flags"> + <constant name="PARTICLE_FLAG_DISABLE_Z" value="2" enum="ParticleFlags"> Present for consistency with 3D particle nodes, not used in 2D. </constant> - <constant name="FLAG_MAX" value="3" enum="Flags"> - Represents the size of the [enum Flags] enum. + <constant name="PARTICLE_FLAG_MAX" value="3" enum="ParticleFlags"> + Represents the size of the [enum ParticleFlags] enum. </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> All particles will be emitted from a single point. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 07da066bd9..0512efa8c2 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -49,10 +49,10 @@ <method name="get_particle_flag" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="flag" type="int" enum="CPUParticles3D.Flags"> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags"> </argument> <description> - Returns the enabled state of the given flag (see [enum Flags] for options). + Returns the enabled state of the given particle flag (see [enum ParticleFlags] for options). </description> </method> <method name="restart"> @@ -98,12 +98,12 @@ <method name="set_particle_flag"> <return type="void"> </return> - <argument index="0" name="flag" type="int" enum="CPUParticles3D.Flags"> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags"> </argument> <argument index="1" name="enable" type="bool"> </argument> <description> - Enables or disables the given flag (see [enum Flags] for options). + Enables or disables the given particle flag (see [enum ParticleFlags] for options). </description> </method> </methods> @@ -195,15 +195,6 @@ <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. </member> - <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - Align Y axis of particle with the direction of its velocity. - </member> - <member name="flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - If [code]true[/code], particles will not move on the z axis. - </member> - <member name="flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - If [code]true[/code], particles rotate around Y axis by [member angle]. - </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. </member> @@ -254,7 +245,7 @@ </member> <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. - This property is only available when [member flag_disable_z] is [code]true[/code]. + This property is only available when [member particle_flag_disable_z] is [code]true[/code]. </member> <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's orbital velocity will vary along this [Curve]. @@ -262,6 +253,15 @@ <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> Orbital velocity randomness ratio. </member> + <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + Align Y axis of particle with the direction of its velocity. + </member> + <member name="particle_flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + If [code]true[/code], particles will not move on the Z axis. + </member> + <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + If [code]true[/code], particles rotate around Y axis by [member angle]. + </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> @@ -351,17 +351,17 @@ <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. </constant> - <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> - Use with [method set_particle_flag] to set [member flag_align_y]. + <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_align_y]. </constant> - <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> - Use with [method set_particle_flag] to set [member flag_rotate_y]. + <constant name="PARTICLE_FLAG_ROTATE_Y" value="1" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_rotate_y]. </constant> - <constant name="FLAG_DISABLE_Z" value="2" enum="Flags"> - Use with [method set_particle_flag] to set [member flag_disable_z]. + <constant name="PARTICLE_FLAG_DISABLE_Z" value="2" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_disable_z]. </constant> - <constant name="FLAG_MAX" value="3" enum="Flags"> - Represents the size of the [enum Flags] enum. + <constant name="PARTICLE_FLAG_MAX" value="3" enum="ParticleFlags"> + Represents the size of the [enum ParticleFlags] enum. </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> All particles will be emitted from a single point. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 9705a196ed..755fd7eea2 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -164,9 +164,9 @@ <method name="lerp"> <return type="Color"> </return> - <argument index="0" name="b" type="Color"> + <argument index="0" name="to" type="Color"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. @@ -255,6 +255,14 @@ <description> </description> </method> + <method name="operator -" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> <method name="operator /" qualifiers="operator"> <return type="Color"> </return> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index b3bbbae94f..1f6cb40cde 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -73,6 +73,18 @@ <tutorials> </tutorials> <methods> + <method name="constant_time_compare"> + <return type="bool"> + </return> + <argument index="0" name="trusted" type="PackedByteArray"> + </argument> + <argument index="1" name="received" type="PackedByteArray"> + </argument> + <description> + Compares two [PackedByteArray]s for equality without leaking timing information in order to prevent timing attacks. + See [url=https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy]this blog post[/url] for more information. + </description> + </method> <method name="decrypt"> <return type="PackedByteArray"> </return> @@ -147,6 +159,20 @@ [/codeblocks] </description> </method> + <method name="hmac_digest"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> + </argument> + <argument index="1" name="key" type="PackedByteArray"> + </argument> + <argument index="2" name="msg" type="PackedByteArray"> + </argument> + <description> + Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [code]msg[/code] using [code]key[/code]. The [code]hash_type[/code] parameter is the hashing algorithm that is used for the inner and outer hashes. + Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported. + </description> + </method> <method name="sign"> <return type="PackedByteArray"> </return> diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml new file mode 100644 index 0000000000..00d528ef8f --- /dev/null +++ b/doc/classes/HMACContext.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="HMACContext" inherits="Reference" version="4.0"> + <brief_description> + Used to create an HMAC for a message using a key. + </brief_description> + <description> + The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once. + [codeblocks] + [gdscript] + extends Node + var ctx = HMACContext.new() + + func _ready(): + var key = "supersecret".to_utf8() + var err = ctx.start(HashingContext.HASH_SHA256, key) + assert(err == OK) + var msg1 = "this is ".to_utf8() + var msg2 = "vewy vewy secret".to_utf8() + err = ctx.update(msg1) + assert(err == OK) + err = ctx.update(msg2) + assert(err == OK) + var hmac = ctx.finish() + print(hmac.hex_encode()) + + [/gdscript] + [csharp] + using Godot; + using System; + using System.Diagnostics; + + public class CryptoNode : Node + { + private HMACContext ctx = new HMACContext(); + public override void _Ready() + { + PackedByteArray key = String("supersecret").to_utf8(); + Error err = ctx.Start(HashingContext.HASH_SHA256, key); + GD.Assert(err == OK); + PackedByteArray msg1 = String("this is ").to_utf8(); + PackedByteArray msg2 = String("vewy vew secret").to_utf8(); + err = ctx.Update(msg1); + GD.Assert(err == OK); + err = ctx.Update(msg2); + GD.Assert(err == OK); + PackedByteArray hmac = ctx.Finish(); + GD.Print(hmac.HexEncode()); + } + } + + [/csharp] + [/codeblocks] + [b]Note:[/b] Not available in HTML5 exports. + </description> + <tutorials> + </tutorials> + <methods> + <method name="finish"> + <return type="PackedByteArray"> + </return> + <description> + Returns the resulting HMAC. If the HMAC failed, an empty [PackedByteArray] is returned. + </description> + </method> + <method name="start"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> + </argument> + <argument index="1" name="key" type="PackedByteArray"> + </argument> + <description> + Initializes the HMACContext. This method cannot be called again on the same HMACContext until [method finish] has been called. + </description> + </method> + <method name="update"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="data" type="PackedByteArray"> + </argument> + <description> + Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [code]data[/code] to the message, but cannot be called until [method start] has been called. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index 9f128e5942..550daf9225 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -12,12 +12,14 @@ <methods> </methods> <members> - <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1"> - 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"> The [OccluderPolygon2D] used to compute the shadow. </member> + <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1"> + The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). + </member> + <member name="sdf_collision" type="bool" setter="set_as_sdf_collision" getter="is_set_as_sdf_collision" default="true"> + </member> </members> <constants> </constants> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 4b8ab3a6cf..93384843de 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -39,6 +39,7 @@ </method> </methods> <members> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" /> <member name="language" type="String" setter="set_language" getter="get_language" default=""""> Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </member> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index ac371d1e7b..a002ce636b 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -31,6 +31,7 @@ <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" /> <member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" /> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" /> <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false"> If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one. </member> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 78db09feee..dff4b4f7ab 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -126,11 +126,63 @@ <constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType"> Render array as triangle strips. </constant> - <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> - Blend shapes are normalized. + <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> + [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions. + </constant> + <constant name="ARRAY_NORMAL" value="1" enum="ArrayType"> + [PackedVector3Array] of vertex normals. + </constant> + <constant name="ARRAY_TANGENT" value="2" enum="ArrayType"> + [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. + </constant> + <constant name="ARRAY_COLOR" value="3" enum="ArrayType"> + [PackedColorArray] of vertex colors. + </constant> + <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType"> + [PackedVector2Array] for UV coordinates. + </constant> + <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> + [PackedVector2Array] for second UV coordinates. + </constant> + <constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType"> + </constant> + <constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType"> + </constant> + <constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType"> + </constant> + <constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType"> + </constant> + <constant name="ARRAY_BONES" value="10" enum="ArrayType"> + [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element is a group of 4 numbers. + </constant> + <constant name="ARRAY_WEIGHTS" value="11" enum="ArrayType"> + [PackedFloat32Array] of bone weights. Each element in groups of 4 floats. + </constant> + <constant name="ARRAY_INDEX" value="12" enum="ArrayType"> + [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. + </constant> + <constant name="ARRAY_MAX" value="13" enum="ArrayType"> + Represents the size of the [enum ArrayType] enum. + </constant> + <constant name="ARRAY_CUSTOM_RGBA8_UNORM" value="0" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGBA8_SNORM" value="1" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RG_HALF" value="2" enum="ArrayCustomFormat"> </constant> - <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> - Blend shapes are relative to base weight. + <constant name="ARRAY_CUSTOM_RGBA_HALF" value="3" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_R_FLOAT" value="4" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RG_FLOAT" value="5" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGB_FLOAT" value="6" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGBA_FLOAT" value="7" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> + Represents the size of the [enum ArrayCustomFormat] enum. </constant> <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> Mesh array contains vertices. All meshes require a vertex array so this should always be present. @@ -150,68 +202,45 @@ <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> Mesh array contains second UV. </constant> - <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> - Mesh array contains bones. - </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat"> - Mesh array contains bone weights. - </constant> - <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> - Mesh array uses indices. - </constant> - <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> - Flag used to mark a compressed (half float) normal array. + <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat"> - Flag used to mark a compressed (half float) tangent array. + <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat"> - Flag used to mark a compressed (half float) color array. + <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat"> - Flag used to mark a compressed (half float) UV coordinates array. + <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> - Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. + <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> + Mesh array contains bones. </constant> - <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> - Flag used to mark a compressed index array. + <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat"> + Mesh array contains bone weights. </constant> - <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> - Flag used to mark that the array contains 2D vertices. + <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat"> + Mesh array uses indices. </constant> - <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat"> - Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. + <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat"> </constant> - <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> - Array of vertices. + <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> </constant> - <constant name="ARRAY_NORMAL" value="1" enum="ArrayType"> - Array of normals. + <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> </constant> - <constant name="ARRAY_TANGENT" value="2" enum="ArrayType"> - Array of tangents as an array of floats, 4 floats per tangent. + <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COLOR" value="3" enum="ArrayType"> - Array of colors. + <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> </constant> - <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType"> - Array of UV coordinates. + <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> </constant> - <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> - Array of second set of UV coordinates. + <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> </constant> - <constant name="ARRAY_BONES" value="6" enum="ArrayType"> - Array of bone data. + <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> </constant> - <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType"> - Array of weights. + <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> + Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_INDEX" value="8" enum="ArrayType"> - Array of indices. + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> </constant> - <constant name="ARRAY_MAX" value="9" enum="ArrayType"> - Represents the size of the [enum ArrayType] enum. + <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> </constant> </constants> </class> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index e107b1a108..db7a3187f0 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -10,7 +10,7 @@ [codeblocks] [gdscript] var mesh = ArrayMesh.new() - mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, CubeMesh.new().get_mesh_arrays()) + mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, BoxMesh.new().get_mesh_arrays()) var mdt = MeshDataTool.new() mdt.create_from_surface(mesh, 0) for i in range(mdt.get_vertex_count()): @@ -27,7 +27,7 @@ [/gdscript] [csharp] var mesh = new ArrayMesh(); - mesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, new CubeMesh().GetMeshArrays()); + mesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, new BoxMesh().GetMeshArrays()); var mdt = new MeshDataTool(); mdt.CreateFromSurface(mesh, 0); for (var i = 0; i < mdt.GetVertexCount(); i++) @@ -169,8 +169,8 @@ <return type="int"> </return> <description> - Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant ArrayMesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant ArrayMesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. - See [enum ArrayMesh.ArrayFormat] for a list of format flags. + Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant Mesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant Mesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. + See [enum Mesh.ArrayFormat] for a list of format flags. </description> </method> <method name="get_material" qualifiers="const"> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 77df6245e9..85058cb9d4 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -11,15 +11,6 @@ <tutorials> </tutorials> <methods> - <method name="get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags"> - </argument> - <description> - Returns [code]true[/code] if the specified flag is enabled. - </description> - </method> <method name="get_param" qualifiers="const"> <return type="float"> </return> @@ -47,15 +38,13 @@ Returns the [Texture2D] used by the specified parameter. </description> </method> - <method name="set_flag"> - <return type="void"> + <method name="get_particle_flag" qualifiers="const"> + <return type="bool"> </return> - <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags"> - </argument> - <argument index="1" name="enable" type="bool"> + <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags"> </argument> <description> - If [code]true[/code], enables the specified flag. See [enum Flags] for options. + Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options. </description> </method> <method name="set_param"> @@ -91,11 +80,22 @@ Sets the [Texture2D] for the specified [enum Parameter]. </description> </method> + <method name="set_particle_flag"> + <return type="void"> + </return> + <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + If [code]true[/code], enables the specified particle flag. See [enum ParticleFlags] for options. + </description> + </method> </methods> <members> <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> Initial rotation applied to each particle, in degrees. - Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. </member> <member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's rotation will be animated along this [CurveTexture]. @@ -105,7 +105,7 @@ </member> <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. </member> <member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's angular velocity will vary along this [CurveTexture]. @@ -180,15 +180,6 @@ <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE]. </member> - <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag" default="false"> - Align Y axis of particle with the direction of its velocity. - </member> - <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], particles will not move on the z axis. - </member> - <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], particles rotate around Y axis by [member angle]. - </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. </member> @@ -224,7 +215,7 @@ </member> <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - Only available when [member flag_disable_z] is [code]true[/code]. + Only available when [member particle_flag_disable_z] is [code]true[/code]. </member> <member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's orbital velocity will vary along this [CurveTexture]. @@ -232,6 +223,15 @@ <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> Orbital velocity randomness ratio. </member> + <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + Align Y axis of particle with the direction of its velocity. + </member> + <member name="particle_flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + If [code]true[/code], particles will not move on the z axis. + </member> + <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + If [code]true[/code], particles rotate around Y axis by [member angle]. + </member> <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> @@ -311,17 +311,17 @@ <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. </constant> - <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> - Use with [method set_flag] to set [member flag_align_y]. + <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_align_y]. </constant> - <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> - Use with [method set_flag] to set [member flag_rotate_y]. + <constant name="PARTICLE_FLAG_ROTATE_Y" value="1" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_rotate_y]. </constant> - <constant name="FLAG_DISABLE_Z" value="2" enum="Flags"> - Use with [method set_flag] to set [member flag_disable_z]. + <constant name="PARTICLE_FLAG_DISABLE_Z" value="2" enum="ParticleFlags"> + Use with [method set_particle_flag] to set [member particle_flag_disable_z]. </constant> - <constant name="FLAG_MAX" value="3" enum="Flags"> - Represents the size of the [enum Flags] enum. + <constant name="PARTICLE_FLAG_MAX" value="3" enum="ParticleFlags"> + Represents the size of the [enum ParticleFlags] enum. </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> All particles will be emitted from a single point. diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index bbaeca12da..4b55e7b781 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -29,8 +29,8 @@ <member name="offset" type="float" setter="set_offset" getter="get_offset" default="0.0"> The distance along the path in pixels. </member> - <member name="rotate" type="bool" setter="set_rotate" getter="is_rotating" default="true"> - If [code]true[/code], this node rotates to follow the path, making its descendants rotate. + <member name="rotates" type="bool" setter="set_rotates" getter="is_rotating" default="true"> + If [code]true[/code], this node rotates to follow the path, with the +X direction facing forward on the path. </member> <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset" default="0.0"> The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 0808e4a724..dcf24c1d32 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -117,9 +117,6 @@ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> - <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8"> - The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b]. - </member> </members> <constants> <constant name="JOINT_TYPE_NONE" value="0" enum="JointType"> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 7e9bccc1d7..25943f6d47 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -4,7 +4,7 @@ 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. Examples include [CapsuleMesh], [CubeMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh]. + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh]. </description> <tutorials> </tutorials> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index fa4ce9bc6d..eab06f633c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1084,6 +1084,10 @@ </member> <member name="rendering/quality/2d/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false"> </member> + <member name="rendering/quality/2d_sdf/oversize" type="int" setter="" getter="" default="1"> + </member> + <member name="rendering/quality/2d_sdf/scale" type="int" setter="" getter="" default="1"> + </member> <member name="rendering/quality/2d_shadow_atlas/size" type="int" setter="" getter="" default="2048"> </member> <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 5932a624f2..425e82c744 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -92,10 +92,10 @@ </argument> <argument index="2" name="post_b" type="Quat"> </argument> - <argument index="3" name="t" type="float"> + <argument index="3" name="weight" type="float"> </argument> <description> - Performs a cubic spherical interpolation between quaternions [code]preA[/code], this vector, [code]b[/code], and [code]postB[/code], by the given amount [code]t[/code]. + Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code]. </description> </method> <method name="dot"> @@ -218,6 +218,14 @@ <description> </description> </method> + <method name="operator -" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> <method name="operator /" qualifiers="operator"> <return type="Quat"> </return> @@ -253,9 +261,9 @@ <method name="slerp"> <return type="Quat"> </return> - <argument index="0" name="b" type="Quat"> + <argument index="0" name="to" type="Quat"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code]. @@ -265,9 +273,9 @@ <method name="slerpni"> <return type="Quat"> </return> - <argument index="0" name="b" type="Quat"> + <argument index="0" name="to" type="Quat"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees. diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml index 664d4cadff..e41ddff368 100644 --- a/doc/classes/RDTextureFormat.xml +++ b/doc/classes/RDTextureFormat.xml @@ -37,7 +37,7 @@ </member> <member name="samples" type="int" setter="set_samples" getter="get_samples" enum="RenderingDevice.TextureSamples" default="0"> </member> - <member name="type" type="int" setter="set_type" getter="get_type" enum="RenderingDevice.TextureType" default="1"> + <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="RenderingDevice.TextureType" default="1"> </member> <member name="usage_bits" type="int" setter="set_usage_bits" getter="get_usage_bits" default="0"> </member> diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml index e5bace32af..bc8a21e985 100644 --- a/doc/classes/RDUniform.xml +++ b/doc/classes/RDUniform.xml @@ -31,7 +31,7 @@ <members> <member name="binding" type="int" setter="set_binding" getter="get_binding" default="0"> </member> - <member name="type" type="int" setter="set_type" getter="get_type" enum="RenderingDevice.UniformType" default="3"> + <member name="uniform_type" type="int" setter="set_uniform_type" getter="get_uniform_type" enum="RenderingDevice.UniformType" default="3"> </member> </members> <constants> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 77a80cb8b6..74eb6a17e5 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -537,17 +537,6 @@ Sets the shape of the occluder polygon. </description> </method> - <method name="canvas_occluder_polygon_set_shape_as_lines"> - <return type="void"> - </return> - <argument index="0" name="occluder_polygon" type="RID"> - </argument> - <argument index="1" name="shape" type="PackedVector2Array"> - </argument> - <description> - Sets the shape of the occluder polygon as lines. - </description> - </method> <method name="canvas_set_item_mirroring"> <return type="void"> </return> @@ -1625,25 +1614,6 @@ Sets a shader material's shader. </description> </method> - <method name="mesh_add_surface_from_arrays"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType"> - </argument> - <argument index="2" name="arrays" type="Array"> - </argument> - <argument index="3" name="blend_shapes" type="Array" default="[ ]"> - </argument> - <argument index="4" name="lods" type="Dictionary" default="{ -}"> - </argument> - <argument index="5" name="compress_format" type="int" default="31744"> - </argument> - <description> - </description> - </method> <method name="mesh_clear"> <return type="void"> </return> @@ -1742,32 +1712,46 @@ Returns a mesh's surface's arrays for blend shapes. </description> </method> - <method name="mesh_surface_get_format_offset" qualifiers="const"> + <method name="mesh_surface_get_format_attribute_stride" qualifiers="const"> <return type="int"> </return> <argument index="0" name="format" type="int"> </argument> - <argument index="1" name="vertex_len" type="int"> + <argument index="1" name="vertex_count" type="int"> + </argument> + <description> + </description> + </method> + <method name="mesh_surface_get_format_offset" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="format" type="int"> </argument> - <argument index="2" name="index_len" type="int"> + <argument index="1" name="vertex_count" type="int"> </argument> - <argument index="3" name="array_index" type="int"> + <argument index="2" name="array_index" type="int"> </argument> <description> - Function is unused in Godot 3.x. </description> </method> - <method name="mesh_surface_get_format_stride" qualifiers="const"> + <method name="mesh_surface_get_format_skin_stride" qualifiers="const"> <return type="int"> </return> <argument index="0" name="format" type="int"> </argument> - <argument index="1" name="vertex_len" type="int"> + <argument index="1" name="vertex_count" type="int"> + </argument> + <description> + </description> + </method> + <method name="mesh_surface_get_format_vertex_stride" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="format" type="int"> </argument> - <argument index="2" name="index_len" type="int"> + <argument index="1" name="vertex_count" type="int"> </argument> <description> - Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_material" qualifiers="const"> @@ -3084,16 +3068,24 @@ <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> Array is an UV coordinates array for the second UV coordinates. </constant> - <constant name="ARRAY_BONES" value="6" enum="ArrayType"> + <constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType"> + </constant> + <constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType"> + </constant> + <constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType"> + </constant> + <constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType"> + </constant> + <constant name="ARRAY_BONES" value="10" enum="ArrayType"> Array contains bone information. </constant> - <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType"> + <constant name="ARRAY_WEIGHTS" value="11" enum="ArrayType"> Array is weight information. </constant> - <constant name="ARRAY_INDEX" value="8" enum="ArrayType"> + <constant name="ARRAY_INDEX" value="12" enum="ArrayType"> Array is index array. </constant> - <constant name="ARRAY_MAX" value="9" enum="ArrayType"> + <constant name="ARRAY_MAX" value="13" enum="ArrayType"> Represents the size of the [enum ArrayType] enum. </constant> <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> @@ -3114,40 +3106,45 @@ <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> Flag used to mark an UV coordinates array for the second UV coordinates. </constant> - <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> + </constant> + <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> + </constant> + <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> + </constant> + <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> + </constant> + <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> Flag used to mark a bone information array. </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat"> Flag used to mark a weights array. </constant> - <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat"> Flag used to mark an index array. </constant> - <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> - Flag used to mark a compressed (half float) normal array. + <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat"> + </constant> + <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat"> - Flag used to mark a compressed (half float) tangent array. + <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat"> - Flag used to mark a compressed (half float) color array. + <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat"> - Flag used to mark a compressed (half float) UV coordinates array. + <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> - Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. + <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> - Flag used to mark a compressed index array. + <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat"> - Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. + <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> </constant> - <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="1048576" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> + </constant> + <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> </constant> <constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType"> Primitive to draw consists of points. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 4faff95fd3..faf0d97766 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -329,9 +329,6 @@ The raw text of the label. When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]. </member> - <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> - Base text writing direction. - </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. </member> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 4f02cd00dd..82ffe86251 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -8,11 +8,11 @@ [codeblock] var st = SurfaceTool.new() st.begin(Mesh.PRIMITIVE_TRIANGLES) - st.add_color(Color(1, 0, 0)) - st.add_uv(Vector2(0, 0)) - st.add_vertex(Vector3(0, 0, 0)) + st.set_color(Color(1, 0, 0)) + st.set_uv(Vector2(0, 0)) + st.set_vertex(Vector3(0, 0, 0)) [/codeblock] - The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method add_uv] or [method add_color], then the last values would be used. + The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method set_uv] or [method set_color], then the last values would be used. Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation. @@ -22,25 +22,6 @@ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> - <method name="add_bones"> - <return type="void"> - </return> - <argument index="0" name="bones" type="PackedInt32Array"> - </argument> - <description> - Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. - </description> - </method> - <method name="add_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> - <description> - Specifies a [Color] for the next vertex to use. - [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible. - </description> - </method> <method name="add_index"> <return type="void"> </return> @@ -50,15 +31,6 @@ Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices. </description> </method> - <method name="add_normal"> - <return type="void"> - </return> - <argument index="0" name="normal" type="Vector3"> - </argument> - <description> - Specifies a normal for the next vertex to use. - </description> - </method> <method name="add_smooth_group"> <return type="void"> </return> @@ -68,15 +40,6 @@ Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation. </description> </method> - <method name="add_tangent"> - <return type="void"> - </return> - <argument index="0" name="tangent" type="Plane"> - </argument> - <description> - Specifies a tangent for the next vertex to use. - </description> - </method> <method name="add_triangle_fan"> <return type="void"> </return> @@ -97,24 +60,6 @@ Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> - <method name="add_uv"> - <return type="void"> - </return> - <argument index="0" name="uv" type="Vector2"> - </argument> - <description> - Specifies a set of UV coordinates to use for the next vertex. - </description> - </method> - <method name="add_uv2"> - <return type="void"> - </return> - <argument index="0" name="uv2" type="Vector2"> - </argument> - <description> - Specifies an optional second set of UV coordinates to use for the next vertex. - </description> - </method> <method name="add_vertex"> <return type="void"> </return> @@ -124,15 +69,6 @@ Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). </description> </method> - <method name="add_weights"> - <return type="void"> - </return> - <argument index="0" name="weights" type="PackedFloat32Array"> - </argument> - <description> - Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. - </description> - </method> <method name="append_from"> <return type="void"> </return> @@ -167,11 +103,11 @@ </return> <argument index="0" name="existing" type="ArrayMesh" default="null"> </argument> - <argument index="1" name="flags" type="int" default="31744"> + <argument index="1" name="flags" type="int" default="0"> </argument> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags. + [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat]. </description> </method> <method name="commit_to_arrays"> @@ -229,6 +165,20 @@ Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already. </description> </method> + <method name="get_custom_format" qualifiers="const"> + <return type="int" enum="SurfaceTool.CustomFormat"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_skin_weight_count" qualifiers="const"> + <return type="int" enum="SurfaceTool.SkinWeightCount"> + </return> + <description> + </description> + </method> <method name="index"> <return type="void"> </return> @@ -236,6 +186,45 @@ Shrinks the vertex array by creating an index array (avoids reusing vertices). </description> </method> + <method name="set_bones"> + <return type="void"> + </return> + <argument index="0" name="bones" type="PackedInt32Array"> + </argument> + <description> + Specifies an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. + </description> + </method> + <method name="set_color"> + <return type="void"> + </return> + <argument index="0" name="color" type="Color"> + </argument> + <description> + Specifies a [Color] for the next vertex to use. + [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible. + </description> + </method> + <method name="set_custom"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <argument index="1" name="custom" type="Color"> + </argument> + <description> + </description> + </method> + <method name="set_custom_format"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <argument index="1" name="format" type="int" enum="SurfaceTool.CustomFormat"> + </argument> + <description> + </description> + </method> <method name="set_material"> <return type="void"> </return> @@ -245,7 +234,82 @@ Sets [Material] to be used by the [Mesh] you are constructing. </description> </method> + <method name="set_normal"> + <return type="void"> + </return> + <argument index="0" name="normal" type="Vector3"> + </argument> + <description> + Specifies a normal for the next vertex to use. + </description> + </method> + <method name="set_skin_weight_count"> + <return type="void"> + </return> + <argument index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount"> + </argument> + <description> + </description> + </method> + <method name="set_tangent"> + <return type="void"> + </return> + <argument index="0" name="tangent" type="Plane"> + </argument> + <description> + Specifies a tangent for the next vertex to use. + </description> + </method> + <method name="set_uv"> + <return type="void"> + </return> + <argument index="0" name="uv" type="Vector2"> + </argument> + <description> + Specifies a set of UV coordinates to use for the next vertex. + </description> + </method> + <method name="set_uv2"> + <return type="void"> + </return> + <argument index="0" name="uv2" type="Vector2"> + </argument> + <description> + Specifies an optional second set of UV coordinates to use for the next vertex. + </description> + </method> + <method name="set_weights"> + <return type="void"> + </return> + <argument index="0" name="weights" type="PackedFloat32Array"> + </argument> + <description> + Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. + </description> + </method> </methods> <constants> + <constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat"> + </constant> + <constant name="CUSTOM_MAX" value="8" enum="CustomFormat"> + </constant> + <constant name="SKIN_4_WEIGHTS" value="0" enum="SkinWeightCount"> + </constant> + <constant name="SKIN_8_WEIGHTS" value="1" enum="SkinWeightCount"> + </constant> </constants> </class> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 43388bb7f1..9c34c63e2f 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1160,7 +1160,7 @@ <constant name="FEATURE_FONT_SYSTEM" value="32" enum="Feature"> TextServer supports loading system fonts. </constant> - <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature"> + <constant name="FEATURE_USE_SUPPORT_DATA" value="64" enum="Feature"> TextServer require external data file for some features. </constant> </constants> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index ff291663fa..406774cbfe 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -107,10 +107,10 @@ </return> <argument index="0" name="xform" type="Transform2D"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> - Returns a transform interpolated between this transform and another by a given weight (on the range of 0.0 to 1.0). + Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0). </description> </method> <method name="inverse"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index f99231de39..4e79560f3e 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -137,10 +137,10 @@ </argument> <argument index="2" name="post_b" type="Vector2"> </argument> - <argument index="3" name="t" type="float"> + <argument index="3" name="weight" type="float"> </argument> <description> - Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to"> @@ -224,9 +224,9 @@ <method name="lerp"> <return type="Vector2"> </return> - <argument index="0" name="with" type="Vector2"> + <argument index="0" name="to" type="Vector2"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. @@ -452,9 +452,9 @@ <method name="slerp"> <return type="Vector2"> </return> - <argument index="0" name="with" type="Vector2"> + <argument index="0" name="to" type="Vector2"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 6ba0d6ab8d..2c2b30a644 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -105,10 +105,10 @@ </argument> <argument index="2" name="post_b" type="Vector3"> </argument> - <argument index="3" name="t" type="float"> + <argument index="3" name="weight" type="float"> </argument> <description> - Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to"> @@ -199,12 +199,12 @@ <method name="lerp"> <return type="Vector3"> </return> - <argument index="0" name="b" type="Vector3"> + <argument index="0" name="to" type="Vector3"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> - Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="max_axis"> @@ -468,9 +468,9 @@ <method name="slerp"> <return type="Vector3"> </return> - <argument index="0" name="b" type="Vector3"> + <argument index="0" name="to" type="Vector3"> </argument> - <argument index="1" name="t" type="float"> + <argument index="1" name="weight" type="float"> </argument> <description> Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index 1125a1da94..90d0591949 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -26,7 +26,6 @@ <member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0"> The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated. </member> - <member name="weight" type="float" setter="set_weight" getter="get_weight" override="true" default="392.0" /> </members> <constants> </constants> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 85dc5e8fd8..e2cf848f45 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -234,6 +234,10 @@ <member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0"> Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. </member> + <member name="sdf_oversize" type="int" setter="set_sdf_oversize" getter="get_sdf_oversize" enum="Viewport.SDFOversize" default="1"> + </member> + <member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1"> + </member> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> The subdivision amount of the first quadrant on the shadow atlas. </member> @@ -428,5 +432,23 @@ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="3" enum="DefaultCanvasItemTextureRepeat"> Max value for [enum DefaultCanvasItemTextureRepeat] enum. </constant> + <constant name="SDF_OVERSIZE_100_PERCENT" value="0" enum="SDFOversize"> + </constant> + <constant name="SDF_OVERSIZE_120_PERCENT" value="1" enum="SDFOversize"> + </constant> + <constant name="SDF_OVERSIZE_150_PERCENT" value="2" enum="SDFOversize"> + </constant> + <constant name="SDF_OVERSIZE_200_PERCENT" value="3" enum="SDFOversize"> + </constant> + <constant name="SDF_OVERSIZE_MAX" value="4" enum="SDFOversize"> + </constant> + <constant name="SDF_SCALE_100_PERCENT" value="0" enum="SDFScale"> + </constant> + <constant name="SDF_SCALE_50_PERCENT" value="1" enum="SDFScale"> + </constant> + <constant name="SDF_SCALE_25_PERCENT" value="2" enum="SDFScale"> + </constant> + <constant name="SDF_SCALE_MAX" value="3" enum="SDFScale"> + </constant> </constants> </class> diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml index 0b57c9478f..5ed7a26b19 100644 --- a/doc/classes/XRPositionalTracker.xml +++ b/doc/classes/XRPositionalTracker.xml @@ -33,13 +33,6 @@ Returns the mesh related to a controller or anchor point if one is available. </description> </method> - <method name="get_name" qualifiers="const"> - <return type="StringName"> - </return> - <description> - Returns the controller or anchor point's name if available. - </description> - </method> <method name="get_orientation" qualifiers="const"> <return type="Basis"> </return> @@ -61,6 +54,20 @@ Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [XRController3D] and [XRAnchor3D] nodes. </description> </method> + <method name="get_tracker_name" qualifiers="const"> + <return type="StringName"> + </return> + <description> + Returns the controller or anchor point's name, if applicable. + </description> + </method> + <method name="get_tracker_type" qualifiers="const"> + <return type="int" enum="XRServer.TrackerType"> + </return> + <description> + Returns the tracker's type, which will be one of the values from the [enum XRServer.TrackerType] enum. + </description> + </method> <method name="get_tracks_orientation" qualifiers="const"> <return type="bool"> </return> @@ -84,13 +91,6 @@ Returns the transform combining this device's orientation and position. </description> </method> - <method name="get_type" qualifiers="const"> - <return type="int" enum="XRServer.TrackerType"> - </return> - <description> - Returns the tracker's type. - </description> - </method> </methods> <members> <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index b0d0a4bd7b..a63c509937 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -70,7 +70,7 @@ <argument index="0" name="from" type="float"> </argument> <description> - Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. + Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [code]from[/code] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation. </description> </method> <method name="operator !=" qualifiers="operator"> |