diff options
Diffstat (limited to 'doc/classes')
54 files changed, 688 insertions, 174 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index a40b851efc..5f81c80887 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2799,40 +2799,43 @@ <constant name="OP_MODULE" value="12" enum="Variant.Operator"> Remainder/modulo operator ([code]%[/code]). </constant> - <constant name="OP_SHIFT_LEFT" value="13" enum="Variant.Operator"> + <constant name="OP_POWER" value="13" enum="Variant.Operator"> + Power operator ([code]**[/code]). + </constant> + <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator"> Left shift operator ([code]<<[/code]). </constant> - <constant name="OP_SHIFT_RIGHT" value="14" enum="Variant.Operator"> + <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator"> Right shift operator ([code]>>[/code]). </constant> - <constant name="OP_BIT_AND" value="15" enum="Variant.Operator"> + <constant name="OP_BIT_AND" value="16" enum="Variant.Operator"> Bitwise AND operator ([code]&[/code]). </constant> - <constant name="OP_BIT_OR" value="16" enum="Variant.Operator"> + <constant name="OP_BIT_OR" value="17" enum="Variant.Operator"> Bitwise OR operator ([code]|[/code]). </constant> - <constant name="OP_BIT_XOR" value="17" enum="Variant.Operator"> + <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator"> Bitwise XOR operator ([code]^[/code]). </constant> - <constant name="OP_BIT_NEGATE" value="18" enum="Variant.Operator"> + <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator"> Bitwise NOT operator ([code]~[/code]). </constant> - <constant name="OP_AND" value="19" enum="Variant.Operator"> + <constant name="OP_AND" value="20" enum="Variant.Operator"> Logical AND operator ([code]and[/code] or [code]&&[/code]). </constant> - <constant name="OP_OR" value="20" enum="Variant.Operator"> + <constant name="OP_OR" value="21" enum="Variant.Operator"> Logical OR operator ([code]or[/code] or [code]||[/code]). </constant> - <constant name="OP_XOR" value="21" enum="Variant.Operator"> + <constant name="OP_XOR" value="22" enum="Variant.Operator"> Logical XOR operator (not implemented in GDScript). </constant> - <constant name="OP_NOT" value="22" enum="Variant.Operator"> + <constant name="OP_NOT" value="23" enum="Variant.Operator"> Logical NOT operator ([code]not[/code] or [code]![/code]). </constant> - <constant name="OP_IN" value="23" enum="Variant.Operator"> + <constant name="OP_IN" value="24" enum="Variant.Operator"> Logical IN operator ([code]in[/code]). </constant> - <constant name="OP_MAX" value="24" enum="Variant.Operator"> + <constant name="OP_MAX" value="25" enum="Variant.Operator"> Represents the size of the [enum Variant.Operator] enum. </constant> </constants> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index e89134d1ac..638d142791 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimatedSprite2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Sprite node that can use multiple textures for animation. + Sprite node that contains multiple textures as frames to play for animation. </brief_description> <description> - Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. + [AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel. [b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps. </description> <tutorials> @@ -29,7 +29,7 @@ </methods> <members> <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&"default""> - The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. + The current animation from the [member frames] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> If [code]true[/code], texture will be centered. @@ -44,7 +44,7 @@ The displayed animation frame's index. </member> <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> - The [SpriteFrames] resource containing the animation(s). + The [SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [SpriteFrames] resource. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The texture's drawing offset. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 625cf3c47c..653607610d 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -179,6 +179,7 @@ <argument index="1" name="update" type="bool" default="false" /> <description> Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. + [b]Note:[/b] Seeking to the end of the animation doesn't emit [signal animation_finished]. If you want to skip animation and emit the signal, use [method advance]. </description> </method> <method name="set_blend_time"> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 5008cd826e..56e5ce1522 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -88,14 +88,14 @@ <return type="Vector3" /> <argument index="0" name="screen_point" type="Vector2" /> <description> - Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> <method name="project_ray_origin" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="screen_point" type="Vector2" /> <description> - Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> <method name="set_cull_mask_value"> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index a9d8a85226..f290fc9801 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -18,6 +18,7 @@ </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. + [b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a child of an [Area2D] node. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index f3a4cbc2d6..246e0e8663 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -18,6 +18,7 @@ </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> Sets whether this collision shape should only detect collision on one side (top or bottom). + [b]Note:[/b] This property has no effect if this [CollisionShape2D] is a child of an [Area2D] node. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index d084bd4db9..911b556f11 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1037,6 +1037,10 @@ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter" default="0"> Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. </member> + <member name="mouse_force_pass_scroll_events" type="bool" setter="set_force_pass_scroll_events" getter="is_force_pass_scroll_events" default="true"> + When enabled, scroll wheel events processed by [method _gui_input] will be passed to the parent control even if [member mouse_filter] is set to [constant MOUSE_FILTER_STOP]. As it defaults to true, this allows nested scrollable containers to work out of the box. + You should disable it on the root of your UI if you do not want scroll events to go to the [code]_unhandled_input[/code] processing. + </member> <member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0"> Distance between the node's bottom edge and its parent control, based on [member anchor_bottom]. Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node. @@ -1315,7 +1319,7 @@ The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. </constant> <constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to `_unhandled_input` for further processing. </constant> <constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter"> The control will not receive mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 16d0e82a1f..383d33532b 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -38,12 +38,6 @@ Removes all points from the curve. </description> </method> - <method name="get_point_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of points describing the curve. - </description> - </method> <method name="get_point_left_mode" qualifiers="const"> <return type="int" enum="Curve.TangentMode" /> <argument index="0" name="index" type="int" /> @@ -159,6 +153,9 @@ <member name="min_value" type="float" setter="set_min_value" getter="get_min_value" default="0.0"> The minimum value the curve can reach. </member> + <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0"> + The number of points describing the curve. + </member> </members> <signals> <signal name="range_changed"> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 94e52912a1..3bba825aaa 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -55,12 +55,6 @@ [code]to_point[/code] must be in this curve's local space. </description> </method> - <method name="get_point_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of points describing the curve. - </description> - </method> <method name="get_point_in" qualifiers="const"> <return type="Vector2" /> <argument index="0" name="idx" type="int" /> @@ -155,5 +149,8 @@ <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="5.0"> The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> + <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0"> + The number of points describing the curve. + </member> </members> </class> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index ed642e0ddc..6457d9681e 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -68,12 +68,6 @@ [code]to_point[/code] must be in this curve's local space. </description> </method> - <method name="get_point_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of points describing the curve. - </description> - </method> <method name="get_point_in" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="idx" type="int" /> @@ -194,6 +188,9 @@ <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="0.2"> The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> + <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0"> + The number of points describing the curve. + </member> <member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled" default="true"> If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. </member> diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index 754518239c..9c943b8c8b 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -34,7 +34,6 @@ <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5"> The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS]. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.1" /> <member name="sky_mode" type="int" setter="set_sky_mode" getter="get_sky_mode" enum="DirectionalLight3D.SkyMode" default="0"> Set whether this [DirectionalLight3D] is visible in the sky, in the scene, or both in the sky and in the scene. See [enum SkyMode] for options. </member> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 300cb4bfd6..60ac499d25 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -42,6 +42,15 @@ Returns [code]true[/code] of the filesystem is being scanned. </description> </method> + <method name="reimport_files"> + <return type="void" /> + <argument index="0" name="files" type="PackedStringArray" /> + <description> + Reimports a set of files. Call this if these files or their [code].import[/code] files were directly edited by script or an external program. + If the file type changed or the file was newly created, use [method update_file] or [method scan]. + [b]Note:[/b] This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress. + </description> + </method> <method name="scan"> <return type="void" /> <description> @@ -58,7 +67,8 @@ <return type="void" /> <argument index="0" name="path" type="String" /> <description> - Update a file information. Call this if an external program (not Godot) modified the file. + Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. + This will not import the file. To reimport, call [method reimport_files] or [method scan] methods. </description> </method> <method name="update_script_classes"> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index 96dea1edce..2ada211dab 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -11,6 +11,9 @@ <members> <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> </member> + <member name="hide_slider" type="bool" setter="set_hide_slider" getter="is_hiding_slider" default="false"> + If [code]true[/code], the slider is hidden. + </member> <member name="label" type="String" setter="set_label" getter="get_label" default=""""> </member> <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml index 5577b47c89..e69255cc31 100644 --- a/doc/classes/GPUParticlesAttractor3D.xml +++ b/doc/classes/GPUParticlesAttractor3D.xml @@ -1,19 +1,31 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Abstract class for 3D particle attractors affecting [GPUParticles3D] nodes. </brief_description> <description> + Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin. + Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. + Attractors can be temporarily disabled by hiding them, or by setting their [member strength] to [code]0.0[/code]. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0"> + The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. </member> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the attractor. By default, all particles are affected by an attractor. + After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> <member name="directionality" type="float" setter="set_directionality" getter="get_directionality" default="0.0"> + Adjusts how directional the attractor is. At [code]0.0[/code], the attractor is not directional at all: it will attract particles towards its center. At [code]1.0[/code], the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if [member strength] is negative). + [b]Note:[/b] If [member directionality] is greater than [code]0.0[/code], the direction in which particles are pushed can be changed by rotating the [GPUParticlesAttractor3D] node. </member> <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + If [member strength] is negative, particles will be pushed in the reverse direction. Particles will be pushed [i]away[/i] from the attractor's origin if [member directionality] is [code]0.0[/code], or towards local +Z if [member directionality] is greater than [code]0.0[/code]. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorBox3D.xml b/doc/classes/GPUParticlesAttractorBox3D.xml index 3fa8276579..6595428cc2 100644 --- a/doc/classes/GPUParticlesAttractorBox3D.xml +++ b/doc/classes/GPUParticlesAttractorBox3D.xml @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorBox3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The attractor box's extents in 3D units. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorSphere3D.xml b/doc/classes/GPUParticlesAttractorSphere3D.xml index 2b68637b38..4077937ef3 100644 --- a/doc/classes/GPUParticlesAttractorSphere3D.xml +++ b/doc/classes/GPUParticlesAttractorSphere3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorSphere3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The attractor sphere's radius in 3D units. + [b]Note:[/b] Stretched ellipses can be obtained by using non-uniform scaling on the [GPUParticlesAttractorSphere3D] node. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorVectorField3D.xml b/doc/classes/GPUParticlesAttractorVectorField3D.xml index cbf817f407..aeadfaf4ab 100644 --- a/doc/classes/GPUParticlesAttractorVectorField3D.xml +++ b/doc/classes/GPUParticlesAttractorVectorField3D.xml @@ -1,15 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorVectorField3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes. + Unlike [GPUParticlesAttractorBox3D], [GPUParticlesAttractorVectorField3D] uses a [member texture] to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The extents of the vector field box in 3D units. </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> + The 3D texture to be used. Values are linearly interpolated between the texture's pixels. + [b]Note:[/b] To get better performance, the 3D texture's resolution should reflect the [member extents] of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml index 45bc9b402b..435f9781f0 100644 --- a/doc/classes/GPUParticlesCollision3D.xml +++ b/doc/classes/GPUParticlesCollision3D.xml @@ -1,13 +1,23 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Abstract class for 3D particle collision shapes affecting [GPUParticles3D] nodes. </brief_description> <description> + Particle collision shapes can be used to make particles stop or bounce against them. + Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is [i]not[/i] supported. + Particle collision shapes can be temporarily disabled by hiding them. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. + [b]Note:[/b] Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting [member GPUParticles3D.fixed_fps] to [code]0[/code] or a value that matches or exceeds the target framerate. </description> <tutorials> </tutorials> <members> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticlesMaterial.collision_enabled] set to [code]true[/code] will be affected by a collision shape. + After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollisionBox3D.xml b/doc/classes/GPUParticlesCollisionBox3D.xml index 091b4ca730..60d66ca682 100644 --- a/doc/classes/GPUParticlesCollisionBox3D.xml +++ b/doc/classes/GPUParticlesCollisionBox3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionBox3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision box's extents in 3D units. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml index e7e14375d9..3fcad43efb 100644 --- a/doc/classes/GPUParticlesCollisionHeightField3D.xml +++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml @@ -1,41 +1,59 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step. + [GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, [GPUParticlesCollisionHeightField3D] is not suited for indoor particle collision. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision heightmap's extents in 3D units. To improve heightmap quality, [member extents] should be set as small as possible while covering the parts of the scene you need. </member> - <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_mode" getter="is_follow_camera_mode_enabled" default="false"> - </member> - <member name="follow_camera_push_ratio" type="float" setter="set_follow_camera_push_ratio" getter="get_follow_camera_push_ratio" default="0.1"> + <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_enabled" getter="is_follow_camera_enabled" default="false"> + If [code]true[/code], the [GPUParticlesCollisionHeightField3D] will follow the current camera in global space. The [GPUParticlesCollisionHeightField3D] does not need to be a child of the [Camera3D] node for this to work. + Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering [member resolution] to improve performance if [member follow_camera_enabled] is [code]true[/code]. </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2"> + Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If [member update_mode] is [constant UPDATE_MODE_ALWAYS], consider using the lowest resolution possible. </member> <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0"> + The update policy to use for the generated heightmap. </member> </members> <constants> <constant name="RESOLUTION_256" value="0" enum="Resolution"> + Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. </constant> <constant name="RESOLUTION_512" value="1" enum="Resolution"> + Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. </constant> <constant name="RESOLUTION_1024" value="2" enum="Resolution"> + Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. </constant> <constant name="RESOLUTION_2048" value="3" enum="Resolution"> + Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. </constant> <constant name="RESOLUTION_4096" value="4" enum="Resolution"> + Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. </constant> <constant name="RESOLUTION_8192" value="5" enum="Resolution"> + Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. </constant> <constant name="RESOLUTION_MAX" value="6" enum="Resolution"> + Represents the size of the [enum Resolution] enum. </constant> <constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode"> + Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction. </constant> <constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode"> + Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml index 6f59a18eb5..c9af07288e 100644 --- a/doc/classes/GPUParticlesCollisionSDF3D.xml +++ b/doc/classes/GPUParticlesCollisionSDF3D.xml @@ -1,35 +1,53 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionSDF3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes. + Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than [GPUParticlesCollisionHeightField3D], but it requires a baking step. + [b]Baking:[/b] The signed distance field texture can be baked by selecting the [GPUParticlesCollisionSDF3D] node in the editor, then clicking [b]Bake SDF[/b] at the top of the 3D viewport. Any [i]visible[/i] [MeshInstance3D]s touching the [member extents] will be taken into account for baking, regardless of their [member GeometryInstance3D.gi_mode]. + [b]Note:[/b] Baking a [GPUParticlesCollisionSDF3D]'s [member texture] is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked [Texture3D]s into its [member texture] property in an exported project. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision SDF's extents in 3D units. To improve SDF quality, the [member extents] should be set as small as possible while covering the parts of the scene you need. </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF3D.Resolution" default="2"> + The bake resolution to use for the signed distance field [member texture]. The texture must be baked again for changes to the [member resolution] property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> + The 3D texture representing the signed distance field. </member> <member name="thickness" type="float" setter="set_thickness" getter="get_thickness" default="1.0"> + The collision shape's thickness. Unlike other particle colliders, [GPUParticlesCollisionSDF3D] is actually hollow on the inside. [member thickness] can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the [GPUParticlesCollisionSDF3D] is moved. </member> </members> <constants> <constant name="RESOLUTION_16" value="0" enum="Resolution"> + Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. </constant> <constant name="RESOLUTION_32" value="1" enum="Resolution"> + Bake a 32×32×32 signed distance field. </constant> <constant name="RESOLUTION_64" value="2" enum="Resolution"> + Bake a 64×64×64 signed distance field. </constant> <constant name="RESOLUTION_128" value="3" enum="Resolution"> + Bake a 128×128×128 signed distance field. </constant> <constant name="RESOLUTION_256" value="4" enum="Resolution"> + Bake a 256×256×256 signed distance field. </constant> <constant name="RESOLUTION_512" value="5" enum="Resolution"> + Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. </constant> <constant name="RESOLUTION_MAX" value="6" enum="Resolution"> + Represents the size of the [enum Resolution] enum. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionSphere3D.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml index b78e114d09..6651a732da 100644 --- a/doc/classes/GPUParticlesCollisionSphere3D.xml +++ b/doc/classes/GPUParticlesCollisionSphere3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionSphere3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. </brief_description> <description> + Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The collision sphere's radius in 3D units. </member> </members> </class> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index e699a40ea0..02352ca808 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -296,8 +296,9 @@ </description> </signal> <signal name="delete_nodes_request"> + <argument index="0" name="nodes" type="StringName[]" /> <description> - Emitted when a GraphNode is attempted to be removed from the GraphEdit. + Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). </description> </signal> <signal name="disconnection_request"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 173da63a15..5f0dca0402 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -119,6 +119,13 @@ Returns the right (output) type of the slot [code]idx[/code]. </description> </method> + <method name="is_slot_draw_stylebox" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns true if the background [StyleBox] of the slot [code]idx[/code] is drawn. + </description> + </method> <method name="is_slot_enabled_left" qualifiers="const"> <return type="bool" /> <argument index="0" name="idx" type="int" /> @@ -152,6 +159,7 @@ <argument index="6" name="color_right" type="Color" /> <argument index="7" name="custom_left" type="Texture2D" default="null" /> <argument index="8" name="custom_right" type="Texture2D" default="null" /> + <argument index="9" name="enable" type="bool" default="true" /> <description> Sets properties of the slot with ID [code]idx[/code]. If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. @@ -178,6 +186,14 @@ Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code]. </description> </method> + <method name="set_slot_draw_stylebox"> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="draw_stylebox" type="bool" /> + <description> + Toggles the background [StyleBox] of the slot [code]idx[/code]. + </description> + </method> <method name="set_slot_enabled_left"> <return type="void" /> <argument index="0" name="idx" type="int" /> @@ -301,6 +317,8 @@ <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)"> Color of the title text. </theme_item> + <theme_item name="close_h_offset" data_type="constant" type="int" default="22"> + </theme_item> <theme_item name="close_offset" data_type="constant" type="int" default="22"> The vertical offset of the close button. </theme_item> @@ -343,5 +361,8 @@ <theme_item name="selected_frame" data_type="style" type="StyleBox"> The background used when the [GraphNode] is selected. </theme_item> + <theme_item name="slot" data_type="style" type="StyleBox"> + The [StyleBox] used for each slot of the [GraphNode]. + </theme_item> </theme_items> </class> diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index 1bd52ab2dc..c4d02e6101 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -78,7 +78,7 @@ Font size of the [Label3D]'s text. </member> <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1"> - Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the [enum HorizontalAlignment] constants. + Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. </member> <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. diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index b7822f1bb0..4d8fd63257 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -80,7 +80,7 @@ <member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5"> The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.2"> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1"> Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. </member> <member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0"> diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 1cffb1a627..36588ce2f5 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -1,8 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="NavigationMeshGenerator" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Helper class for creating and clearing navigation meshes. </brief_description> <description> + This class is responsible for creating and clearing 3D navigation meshes used as [NavigationMesh] resources inside [NavigationRegion3D]. The [NavigationMeshGenerator] has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse. + The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. + Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area. + The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes. </description> <tutorials> </tutorials> @@ -12,12 +17,14 @@ <argument index="0" name="nav_mesh" type="NavigationMesh" /> <argument index="1" name="root_node" type="Node" /> <description> + Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry/parsed_geometry_type] and [member NavigationMesh.geometry/source_geometry_mode] properties on the [NavigationMesh] resource. </description> </method> <method name="clear"> <return type="void" /> <argument index="0" name="nav_mesh" type="NavigationMesh" /> <description> + Removes all polygons and vertices from the provided [code]nav_mesh[/code] resource. </description> </method> </methods> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index 2540c56258..f3690ce8a7 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -8,6 +8,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this obstacle on the [NavigationServer2D]. + </description> + </method> + </methods> <members> <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true"> Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index f9489db5f1..e6ea70b91a 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -8,6 +8,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this obstacle on the [NavigationServer3D]. + </description> + </method> + </methods> <members> <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true"> Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 60f1020286..42f0e0c5d9 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -14,7 +14,7 @@ <return type="void" /> <argument index="0" name="on_thread" type="bool" default="true" /> <description> - Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. + Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). </description> </method> <method name="get_region_rid" qualifiers="const"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index e007dfd9b5..928834101f 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -21,6 +21,13 @@ Creates the agent. </description> </method> + <method name="agent_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="agent" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + </description> + </method> <method name="agent_is_map_changed" qualifiers="const"> <return type="bool" /> <argument index="0" name="agent" type="RID" /> @@ -123,6 +130,13 @@ Create a new map. </description> </method> + <method name="map_get_agents" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_cell_size" qualifiers="const"> <return type="float" /> <argument index="0" name="map" type="RID" /> @@ -164,6 +178,13 @@ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> + <method name="map_get_regions" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_is_active" qualifiers="const"> <return type="bool" /> <argument index="0" name="nap" type="RID" /> @@ -231,6 +252,13 @@ Returns the region's layers. </description> </method> + <method name="region_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index c987bc9042..8c83fe5485 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -21,6 +21,13 @@ Creates the agent. </description> </method> + <method name="agent_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="agent" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + </description> + </method> <method name="agent_is_map_changed" qualifiers="const"> <return type="bool" /> <argument index="0" name="agent" type="RID" /> @@ -123,6 +130,13 @@ Create a new map. </description> </method> + <method name="map_get_agents" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_cell_size" qualifiers="const"> <return type="float" /> <argument index="0" name="map" type="RID" /> @@ -182,6 +196,13 @@ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> + <method name="map_get_regions" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_up" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="map" type="RID" /> @@ -281,6 +302,13 @@ Returns the region's layers. </description> </method> + <method name="region_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml index f83d31a9b5..ce63dbdbc1 100644 --- a/doc/classes/OmniLight3D.xml +++ b/doc/classes/OmniLight3D.xml @@ -19,6 +19,7 @@ <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1"> See [enum ShadowMode]. </member> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.2" /> </members> <constants> <constant name="SHADOW_DUAL_PARABOLOID" value="0" enum="ShadowMode"> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 61dc1eef00..5d0861bcf3 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -61,6 +61,13 @@ Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="decode_double" qualifiers="const"> <return type="float" /> <argument index="0" name="byte_offset" type="int" /> @@ -257,6 +264,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="get_string_from_ascii" qualifiers="const"> <return type="String" /> <description> @@ -352,6 +367,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index f880771c77..12a553af49 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -54,6 +54,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Color" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedColorArray" /> <description> @@ -67,6 +74,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Color" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Color" /> @@ -115,6 +130,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Color" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index e2b877ad5f..0a114e6c06 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedFloat32Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="float" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index be7a52b7f4..0327559f5b 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedFloat64Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="float" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index 108273d859..f8b606d266 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedInt32Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index c34f2fc75e..ea3e304d35 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedInt64Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 536f5f02eb..a4653344f0 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -5,6 +5,12 @@ </brief_description> <description> An array specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes. + If you want to join the strings in the array, use [method String.join]. + [codeblock] + var string_array = PackedStringArray(["hello", "world"]) + var string = " ".join(string_array) + print(string) # "hello world" + [/codeblock] </description> <tutorials> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> @@ -55,6 +61,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="String" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedStringArray" /> <description> @@ -68,6 +81,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="String" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="String" /> @@ -116,6 +137,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="String" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 29423d1cde..8f3e5d173d 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector2" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedVector2Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector2" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector2" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector2" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 6d460cecab..1207293c32 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -54,6 +54,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedVector3Array" /> <description> @@ -67,6 +74,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector3" /> @@ -115,6 +130,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index bcaf38fd06..01da9cb9a2 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -6,8 +6,8 @@ <description> This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel. By using the [method get_monitor] method of this class, you can access this data from your code. You can add custom monitors using the [method add_custom_monitor] method. Custom monitors are available in [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel together with built-in monitors. - [b]Note:[/b] A few of these monitors are only available in debug mode and will always return 0 when used in a release build. - [b]Note:[/b] Many of these monitors are not updated in real-time, so there may be a short delay between changes. + [b]Note:[/b] Some of the built-in monitors are only available in debug mode and will always return [code]0[/code] when used in a project exported in release mode. + [b]Note:[/b] Some of the built-in monitors are not updated in real-time for performance reasons, so there may be a delay of up to 1 second between changes. [b]Note:[/b] Custom monitors do not support negative values. Negative values are clamped to 0. </description> <tutorials> @@ -19,7 +19,7 @@ <argument index="1" name="callable" type="Callable" /> <argument index="2" name="arguments" type="Array" default="[]" /> <description> - Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". + Adds a custom monitor with the name [code]id[/code]. You can specify the category of the monitor using slash delimiters in [code]id[/code] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [code]id[/code] is already present. [codeblocks] [gdscript] func _ready(): @@ -29,11 +29,11 @@ Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value) # Adds monitor with name "MyName" to category "Custom". - # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid. + # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different IDs, so the code is valid. Performance.add_custom_monitor("MyMonitor", monitor_value) # Adds monitor with name "MyName" to category "Custom". - # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid. + # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different IDs, so the code is valid. Performance.add_custom_monitor("Custom/MyMonitor", monitor_value) # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom". @@ -67,30 +67,28 @@ } [/csharp] [/codeblocks] - The debugger calls the callable to get the value of custom monitor. The callable must return a number. + The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. Callables are called with arguments supplied in argument array. - [b]Note:[/b] It prints an error if given id is already present. </description> </method> <method name="get_custom_monitor"> <return type="Variant" /> <argument index="0" name="id" type="StringName" /> <description> - Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. - [b]Note:[/b] It prints an error if the given id is absent. + Returns the value of custom monitor with given [code]id[/code]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [code]id[/code] is absent. </description> </method> <method name="get_custom_monitor_names"> <return type="Array" /> <description> - Returns the names of active custom monitors in an array. + Returns the names of active custom monitors in an [Array]. </description> </method> <method name="get_monitor" qualifiers="const"> <return type="float" /> <argument index="0" name="monitor" type="int" enum="Performance.Monitor" /> <description> - Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this: + Returns the value of one of the available built-in monitors. You should provide one of the [enum Monitor] constants as the argument, like this: [codeblocks] [gdscript] print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console. @@ -99,95 +97,99 @@ GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console. [/csharp] [/codeblocks] + See [method get_custom_monitor] to query custom performance monitors' values. </description> </method> <method name="get_monitor_modification_time"> <return type="int" /> <description> - Returns the last tick in which custom monitor was added/removed. + Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to [method Time.get_ticks_usec] when the monitor is updated. </description> </method> <method name="has_custom_monitor"> <return type="bool" /> <argument index="0" name="id" type="StringName" /> <description> - Returns true if custom monitor with the given id is present otherwise returns false. + Returns [code]true[/code] if custom monitor with the given [code]id[/code] is present, [code]false[/code] otherwise. </description> </method> <method name="remove_custom_monitor"> <return type="void" /> <argument index="0" name="id" type="StringName" /> <description> - Removes the custom monitor with given id. - [b]Note:[/b] It prints an error if the given id is already absent. + Removes the custom monitor with given [code]id[/code]. Prints an error if the given [code]id[/code] is already absent. </description> </method> </methods> <constants> <constant name="TIME_FPS" value="0" enum="Monitor"> - Number of frames per second. + The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. [i]Higher is better.[/i] </constant> <constant name="TIME_PROCESS" value="1" enum="Monitor"> - Time it took to complete one frame, in seconds. + Time it took to complete one frame, in seconds. [i]Lower is better.[/i] </constant> <constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor"> - Time it took to complete one physics frame, in seconds. + Time it took to complete one physics frame, in seconds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_STATIC" value="3" enum="Monitor"> - Static memory currently used, in bytes. Not available in release builds. + Static memory currently used, in bytes. Not available in release builds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor"> - Available static memory. Not available in release builds. + Available static memory. Not available in release builds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor"> - Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. + Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. [i]Lower is better.[/i] </constant> <constant name="OBJECT_COUNT" value="6" enum="Monitor"> - Number of objects currently instantiated (including nodes). + Number of objects currently instantiated (including nodes). [i]Lower is better.[/i] </constant> <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> - Number of resources currently used. + Number of resources currently used. [i]Lower is better.[/i] </constant> <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> - Number of nodes currently instantiated in the scene tree. This also includes the root node. + Number of nodes currently instantiated in the scene tree. This also includes the root node. [i]Lower is better.[/i] </constant> <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> - Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. + Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="10" enum="Monitor"> + The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="11" enum="Monitor"> + The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="12" enum="Monitor"> + The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. [i]Lower is better.[/i] </constant> <constant name="RENDER_VIDEO_MEM_USED" value="13" enum="Monitor"> - The amount of video memory used, i.e. texture and vertex memory combined. + The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. [i]Lower is better.[/i] </constant> <constant name="RENDER_TEXTURE_MEM_USED" value="14" enum="Monitor"> - The amount of texture memory used. + The amount of texture memory used (in bytes). [i]Lower is better.[/i] </constant> <constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor"> + The amount of render buffer memory used (in bytes). [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor"> - Number of active [RigidDynamicBody2D] nodes in the game. + Number of active [RigidDynamicBody2D] nodes in the game. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor"> - Number of collision pairs in the 2D physics engine. + Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_ISLAND_COUNT" value="18" enum="Monitor"> - Number of islands in the 2D physics engine. + Number of islands in the 2D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor"> - Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. + Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor"> - Number of collision pairs in the 3D physics engine. + Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_ISLAND_COUNT" value="21" enum="Monitor"> - Number of islands in the 3D physics engine. + Number of islands in the 3D physics engine. [i]Lower is better.[/i] </constant> <constant name="AUDIO_OUTPUT_LATENCY" value="22" enum="Monitor"> - Output latency of the [AudioServer]. + Output latency of the [AudioServer]. [i]Lower is better.[/i] </constant> <constant name="MONITOR_MAX" value="23" enum="Monitor"> Represents the size of the [enum Monitor] enum. diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 1e9ab7c375..8a781c51fb 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -9,10 +9,27 @@ <tutorials> </tutorials> <members> + <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0"> + The fill direction. See [enum FillMode] for possible values. + </member> <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true"> If [code]true[/code], the fill percentage is displayed on the bar. </member> </members> + <constants> + <constant name="FILL_BEGIN_TO_END" value="0" enum="FillMode"> + The progress bar fills from begin to end horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from left to right, and if it returns [code]true[/code], it fills from right to left. + </constant> + <constant name="FILL_END_TO_BEGIN" value="1" enum="FillMode"> + The progress bar fills from end to begin horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from right to left, and if it returns [code]true[/code], it fills from left to right. + </constant> + <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode"> + The progress fills from top to bottom. + </constant> + <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode"> + The progress fills from bottom to top. + </constant> + </constants> <theme_items> <theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)"> The color of the text. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7c6d6d1c10..7f3c0ea6d9 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1557,18 +1557,6 @@ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead. [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS. </member> - <member name="rendering/2d/opengl/batching_send_null" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/opengl/batching_stream" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/opengl/legacy_orphan_buffers" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/opengl/legacy_stream" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/options/ninepatch_mode" type="int" setter="" getter="" default="1"> - </member> - <member name="rendering/2d/options/use_software_skinning" type="bool" setter="" getter="" default="true"> - </member> <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> </member> <member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1"> @@ -1594,32 +1582,6 @@ </member> <member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18"> </member> - <member name="rendering/batching/debug/diagnose_frame" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/debug/flash_batching" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/lights/max_join_items" type="int" setter="" getter="" default="32"> - </member> - <member name="rendering/batching/lights/scissor_area_threshold" type="float" setter="" getter="" default="1.0"> - </member> - <member name="rendering/batching/options/single_rect_fallback" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/options/use_batching" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/options/use_batching_in_editor" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/parameters/batch_buffer_size" type="int" setter="" getter="" default="16384"> - </member> - <member name="rendering/batching/parameters/colored_vertex_format_threshold" type="float" setter="" getter="" default="0.25"> - </member> - <member name="rendering/batching/parameters/item_reordering_lookahead" type="int" setter="" getter="" default="4"> - </member> - <member name="rendering/batching/parameters/max_join_item_commands" type="int" setter="" getter="" default="16"> - </member> - <member name="rendering/batching/precision/uv_contract" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/precision/uv_contract_amount" type="int" setter="" getter="" default="100"> - </member> <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="1"> Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. </member> @@ -1629,13 +1591,16 @@ <member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false"> If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples. </member> + <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> + Disables [member rendering/driver/depth_prepass/enable] conditionally for certain venders. By default, disables the depth prepass for mobile devices as mobile devices do not benefit from the depth prepass due to their unique architecture. + </member> <member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed. - [b]Note:[/b] Only supported when using the Vulkan Clustered backend (not Vulkan Mobile or OpenGL). When using Vulkan Mobile or OpenGL, there is no depth prepass performed. + [b]Note:[/b] Only supported when using the Vulkan Clustered backend or the OpenGL backend. When using Vulkan Mobile there is no depth prepass performed. </member> <member name="rendering/driver/driver_name" type="String" setter="" getter="" default=""vulkan""> The video driver to use. - [b]Note:[/b] OpenGL support is currently incomplete. Only basic 2D rendering is supported, and single-window mode is required for correct operation. + [b]Note:[/b] OpenGL support is currently incomplete. Only basic rendering is supported. [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument. [b]FIXME:[/b] No longer valid after DisplayServer split: In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time. @@ -1715,10 +1680,6 @@ <member name="rendering/environment/volumetric_fog/volume_size" type="int" setter="" getter="" default="64"> Base size used to determine size of froxel buffer in the camera X-axis and Y-axis. The final size is scaled by the aspect ratio of the screen, so actual values may differ from what is set. Set a larger size for more detailed fog, set a smaller size for better performance. </member> - <member name="rendering/gles2/compatibility/disable_half_float" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/gles2/compatibility/enable_high_float.Android" type="bool" setter="" getter="" default="false"> - </member> <member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false"> If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. [b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead. @@ -1761,6 +1722,15 @@ </member> <member name="rendering/limits/global_shader_variables/buffer_size" type="int" setter="" getter="" default="65536"> </member> + <member name="rendering/limits/opengl/max_lights_per_object" type="int" setter="" getter="" default="8"> + Max number of omnilights and spotlights renderable per object. At the default value of 8, this means that each surface can be affected by up to 8 omnilights and 8 spotlights. This is further limited by hardware support and [member rendering/limits/opengl/max_renderable_lights]. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. + </member> + <member name="rendering/limits/opengl/max_renderable_elements" type="int" setter="" getter="" default="65536"> + Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + </member> + <member name="rendering/limits/opengl/max_renderable_lights" type="int" setter="" getter="" default="32"> + Max number of positional lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + </member> <member name="rendering/limits/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000"> </member> <member name="rendering/limits/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10"> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 970f5125cd..3cd2ab0903 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -18,9 +18,9 @@ <argument index="0" name="group" type="StringName" /> <argument index="1" name="method" type="StringName" /> <description> - Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag. + Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. [b]Note:[/b] Due to design limitations, [method call_group] will fail silently if one of the arguments is [code]null[/code]. - [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag. + [b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after [method call_group] was called, use [method call_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> <method name="call_group_flags" qualifiers="vararg"> @@ -30,11 +30,12 @@ <argument index="2" name="method" type="StringName" /> <description> Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. - [b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code]. [codeblock] - # Call the method immediately and in reverse order. - get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy") + # Call the method in a deferred manner and in reverse order. + get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE) [/codeblock] + [b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code]. + [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred]. </description> </method> <method name="change_scene"> @@ -139,6 +140,7 @@ <argument index="1" name="notification" type="int" /> <description> Sends the given notification to all members of the [code]group[/code]. + [b]Note:[/b] [method notify_group] will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification lots of members. To wait for one frame, use [method notify_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> <method name="notify_group_flags"> @@ -148,6 +150,7 @@ <argument index="2" name="notification" type="int" /> <description> Sends the given notification to all members of the [code]group[/code], respecting the given [enum GroupCallFlags]. + [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code]. </description> </method> <method name="queue_delete"> @@ -189,6 +192,7 @@ <argument index="2" name="value" type="Variant" /> <description> Sets the given [code]property[/code] to [code]value[/code] on all members of the given group. + [b]Note:[/b] [method set_group] will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. To wait for one frame, use [method set_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> <method name="set_group_flags"> @@ -199,6 +203,7 @@ <argument index="3" name="value" type="Variant" /> <description> Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags]. + [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred]. </description> </method> <method name="set_multiplayer"> @@ -297,8 +302,8 @@ <constant name="GROUP_CALL_REVERSE" value="1" enum="GroupCallFlags"> Call a group in reverse scene order. </constant> - <constant name="GROUP_CALL_REALTIME" value="2" enum="GroupCallFlags"> - Call a group immediately (calls are normally made on idle). + <constant name="GROUP_CALL_DEFERRED" value="2" enum="GroupCallFlags"> + Call a group with a one-frame delay (idle frame, not physics). </constant> <constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags"> Call a group only once even if the call is executed many times. diff --git a/doc/classes/ScriptLanguageExtension.xml b/doc/classes/ScriptLanguageExtension.xml index d66bb6a7c7..0f757cf806 100644 --- a/doc/classes/ScriptLanguageExtension.xml +++ b/doc/classes/ScriptLanguageExtension.xml @@ -372,11 +372,13 @@ </constant> <constant name="LOOKUP_RESULT_CLASS_METHOD" value="4" enum="LookupResultType"> </constant> - <constant name="LOOKUP_RESULT_CLASS_ENUM" value="5" enum="LookupResultType"> + <constant name="LOOKUP_RESULT_CLASS_SIGNAL" value="5" enum="LookupResultType"> </constant> - <constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="6" enum="LookupResultType"> + <constant name="LOOKUP_RESULT_CLASS_ENUM" value="6" enum="LookupResultType"> </constant> - <constant name="LOOKUP_RESULT_MAX" value="7" enum="LookupResultType"> + <constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="7" enum="LookupResultType"> + </constant> + <constant name="LOOKUP_RESULT_MAX" value="8" enum="LookupResultType"> </constant> <constant name="LOCATION_LOCAL" value="0" enum="CodeCompletionLocation"> The option is local to the location of the code completion query - e.g. a local variable. diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 03ff3cc188..94fb2d7dc7 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -26,7 +26,9 @@ <argument index="1" name="with_shape" type="Shape2D" /> <argument index="2" name="shape_xform" type="Transform2D" /> <description> - Returns a list of the points where this shape touches another. If there are no collisions the list is empty. + Returns a list of contact point pairs where this shape touches another. + If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code]. + A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). </description> </method> @@ -50,7 +52,9 @@ <argument index="3" name="shape_xform" type="Transform2D" /> <argument index="4" name="shape_motion" type="Vector2" /> <description> - Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty. + Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. + If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code]. + A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). </description> </method> diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml new file mode 100644 index 0000000000..5a1501d2ca --- /dev/null +++ b/doc/classes/TextMesh.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TextMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Generate an [PrimitiveMesh] from the text. + </brief_description> + <description> + Generate an [PrimitiveMesh] from the text. + TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported. + The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges. + </description> + <tutorials> + </tutorials> + <methods> + <method name="clear_opentype_features"> + <return type="void" /> + <description> + Removes all OpenType features. + </description> + </method> + <method name="get_opentype_feature" qualifiers="const"> + <return type="int" /> + <argument index="0" name="tag" type="String" /> + <description> + Returns OpenType feature [code]tag[/code]. + </description> + </method> + <method name="set_opentype_feature"> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> + <description> + Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. + </description> + </method> + </methods> + <members> + <member name="curve_step" type="float" setter="set_curve_step" getter="get_curve_step" default="0.5"> + Step (in pixels) used to approximate Bézier curves. + </member> + <member name="depth" type="float" setter="set_depth" getter="get_depth" default="0.05"> + Depths of the mesh, if set to [code]0.0[/code] only front surface, is generated, and UV layout is changed to use full texture for the front face only. + </member> + <member name="font" type="Font" setter="set_font" getter="get_font"> + [Font] used for the [TextMesh]'s text. + </member> + <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16"> + Font size of the [TextMesh]'s text. + </member> + <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1"> + Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. + </member> + <member name="language" type="String" setter="set_language" getter="get_language" default=""""> + Language code used for text shaping algorithms, if left empty current locale is used instead. + </member> + <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> + The size of one pixel's width on the text to scale it in 3D. + </member> + <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0"> + Set BiDi algorithm override for the structured text. + </member> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> + Set additional options for BiDi override. + </member> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> + The text to generate mesh from. + </member> + <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="TextServer.Direction" default="0"> + Base text writing direction. + </member> + <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false"> + If [code]true[/code], all the text displays as UPPERCASE. + </member> + <member name="width" type="float" setter="set_width" getter="get_width" default="500.0"> + Text width (in pixels), used for fill alignment. + </member> + </members> +</class> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 78a681d92a..2468042850 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -66,6 +66,7 @@ <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask"> The render layer(s) this [VisualInstance3D] is drawn on. This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. + For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> </members> </class> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index 4a73b1662e..6116e0df68 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -24,7 +24,13 @@ return vec3(max3, max3, max3); [/codeblock] </constant> - <constant name="FUNC_SEPIA" value="1" enum="Function"> + <constant name="FUNC_HSV2RGB" value="1" enum="Function"> + Converts HSV vector to RGB equivalent. + </constant> + <constant name="FUNC_RGB2HSV" value="2" enum="Function"> + Converts RGB vector to HSV equivalent. + </constant> + <constant name="FUNC_SEPIA" value="3" enum="Function"> Applies sepia tone effect using the following formula: [codeblock] vec3 c = input; @@ -34,7 +40,7 @@ return vec3(r, g, b); [/codeblock] </constant> - <constant name="FUNC_MAX" value="2" enum="Function"> + <constant name="FUNC_MAX" value="4" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index dc6628a9af..bc4e12c0b3 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -26,100 +26,94 @@ <constant name="FUNC_RECIPROCAL" value="3" enum="Function"> Returns [code]1/vector[/code]. </constant> - <constant name="FUNC_RGB2HSV" value="4" enum="Function"> - Converts RGB vector to HSV equivalent. - </constant> - <constant name="FUNC_HSV2RGB" value="5" enum="Function"> - Converts HSV vector to RGB equivalent. - </constant> - <constant name="FUNC_ABS" value="6" enum="Function"> + <constant name="FUNC_ABS" value="4" enum="Function"> Returns the absolute value of the parameter. </constant> - <constant name="FUNC_ACOS" value="7" enum="Function"> + <constant name="FUNC_ACOS" value="5" enum="Function"> Returns the arc-cosine of the parameter. </constant> - <constant name="FUNC_ACOSH" value="8" enum="Function"> + <constant name="FUNC_ACOSH" value="6" enum="Function"> Returns the inverse hyperbolic cosine of the parameter. </constant> - <constant name="FUNC_ASIN" value="9" enum="Function"> + <constant name="FUNC_ASIN" value="7" enum="Function"> Returns the arc-sine of the parameter. </constant> - <constant name="FUNC_ASINH" value="10" enum="Function"> + <constant name="FUNC_ASINH" value="8" enum="Function"> Returns the inverse hyperbolic sine of the parameter. </constant> - <constant name="FUNC_ATAN" value="11" enum="Function"> + <constant name="FUNC_ATAN" value="9" enum="Function"> Returns the arc-tangent of the parameter. </constant> - <constant name="FUNC_ATANH" value="12" enum="Function"> + <constant name="FUNC_ATANH" value="10" enum="Function"> Returns the inverse hyperbolic tangent of the parameter. </constant> - <constant name="FUNC_CEIL" value="13" enum="Function"> + <constant name="FUNC_CEIL" value="11" enum="Function"> Finds the nearest integer that is greater than or equal to the parameter. </constant> - <constant name="FUNC_COS" value="14" enum="Function"> + <constant name="FUNC_COS" value="12" enum="Function"> Returns the cosine of the parameter. </constant> - <constant name="FUNC_COSH" value="15" enum="Function"> + <constant name="FUNC_COSH" value="13" enum="Function"> Returns the hyperbolic cosine of the parameter. </constant> - <constant name="FUNC_DEGREES" value="16" enum="Function"> + <constant name="FUNC_DEGREES" value="14" enum="Function"> Converts a quantity in radians to degrees. </constant> - <constant name="FUNC_EXP" value="17" enum="Function"> + <constant name="FUNC_EXP" value="15" enum="Function"> Base-e Exponential. </constant> - <constant name="FUNC_EXP2" value="18" enum="Function"> + <constant name="FUNC_EXP2" value="16" enum="Function"> Base-2 Exponential. </constant> - <constant name="FUNC_FLOOR" value="19" enum="Function"> + <constant name="FUNC_FLOOR" value="17" enum="Function"> Finds the nearest integer less than or equal to the parameter. </constant> - <constant name="FUNC_FRAC" value="20" enum="Function"> + <constant name="FUNC_FRAC" value="18" enum="Function"> Computes the fractional part of the argument. </constant> - <constant name="FUNC_INVERSE_SQRT" value="21" enum="Function"> + <constant name="FUNC_INVERSE_SQRT" value="19" enum="Function"> Returns the inverse of the square root of the parameter. </constant> - <constant name="FUNC_LOG" value="22" enum="Function"> + <constant name="FUNC_LOG" value="20" enum="Function"> Natural logarithm. </constant> - <constant name="FUNC_LOG2" value="23" enum="Function"> + <constant name="FUNC_LOG2" value="21" enum="Function"> Base-2 logarithm. </constant> - <constant name="FUNC_RADIANS" value="24" enum="Function"> + <constant name="FUNC_RADIANS" value="22" enum="Function"> Converts a quantity in degrees to radians. </constant> - <constant name="FUNC_ROUND" value="25" enum="Function"> + <constant name="FUNC_ROUND" value="23" enum="Function"> Finds the nearest integer to the parameter. </constant> - <constant name="FUNC_ROUNDEVEN" value="26" enum="Function"> + <constant name="FUNC_ROUNDEVEN" value="24" enum="Function"> Finds the nearest even integer to the parameter. </constant> - <constant name="FUNC_SIGN" value="27" enum="Function"> + <constant name="FUNC_SIGN" value="25" enum="Function"> Extracts the sign of the parameter, i.e. returns [code]-1[/code] if the parameter is negative, [code]1[/code] if it's positive and [code]0[/code] otherwise. </constant> - <constant name="FUNC_SIN" value="28" enum="Function"> + <constant name="FUNC_SIN" value="26" enum="Function"> Returns the sine of the parameter. </constant> - <constant name="FUNC_SINH" value="29" enum="Function"> + <constant name="FUNC_SINH" value="27" enum="Function"> Returns the hyperbolic sine of the parameter. </constant> - <constant name="FUNC_SQRT" value="30" enum="Function"> + <constant name="FUNC_SQRT" value="28" enum="Function"> Returns the square root of the parameter. </constant> - <constant name="FUNC_TAN" value="31" enum="Function"> + <constant name="FUNC_TAN" value="29" enum="Function"> Returns the tangent of the parameter. </constant> - <constant name="FUNC_TANH" value="32" enum="Function"> + <constant name="FUNC_TANH" value="30" enum="Function"> Returns the hyperbolic tangent of the parameter. </constant> - <constant name="FUNC_TRUNC" value="33" enum="Function"> + <constant name="FUNC_TRUNC" value="31" enum="Function"> Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. </constant> - <constant name="FUNC_ONEMINUS" value="34" enum="Function"> + <constant name="FUNC_ONEMINUS" value="32" enum="Function"> Returns [code]1.0 - vector[/code]. </constant> - <constant name="FUNC_MAX" value="35" enum="Function"> + <constant name="FUNC_MAX" value="33" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 50961f9c7f..f36b1fddeb 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -124,6 +124,18 @@ Multiplies a [float] and an [int]. The result is a [float]. </description> </operator> + <operator name="operator **"> + <return type="float" /> + <argument index="0" name="right" type="float" /> + <description> + </description> + </operator> + <operator name="operator **"> + <return type="float" /> + <argument index="0" name="right" type="int" /> + <description> + </description> + </operator> <operator name="operator +"> <return type="float" /> <argument index="0" name="right" type="float" /> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 609291b69c..2eceba40fa 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -171,6 +171,18 @@ Multiplies two [int]s. </description> </operator> + <operator name="operator **"> + <return type="float" /> + <argument index="0" name="right" type="float" /> + <description> + </description> + </operator> + <operator name="operator **"> + <return type="int" /> + <argument index="0" name="right" type="int" /> + <description> + </description> + </operator> <operator name="operator +"> <return type="String" /> <argument index="0" name="right" type="String" /> |