summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml27
-rw-r--r--doc/classes/AnimatedSprite2D.xml8
-rw-r--r--doc/classes/DirectionalLight3D.xml1
-rw-r--r--doc/classes/GPUParticlesAttractor3D.xml12
-rw-r--r--doc/classes/GPUParticlesAttractorBox3D.xml4
-rw-r--r--doc/classes/GPUParticlesAttractorSphere3D.xml5
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField3D.xml7
-rw-r--r--doc/classes/GPUParticlesCollision3D.xml10
-rw-r--r--doc/classes/GPUParticlesCollisionBox3D.xml5
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField3D.xml24
-rw-r--r--doc/classes/GPUParticlesCollisionSDF3D.xml18
-rw-r--r--doc/classes/GPUParticlesCollisionSphere3D.xml5
-rw-r--r--doc/classes/GraphNode.xml21
-rw-r--r--doc/classes/Label3D.xml2
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/NavigationObstacle2D.xml8
-rw-r--r--doc/classes/NavigationObstacle3D.xml8
-rw-r--r--doc/classes/NavigationRegion3D.xml2
-rw-r--r--doc/classes/NavigationServer2D.xml28
-rw-r--r--doc/classes/NavigationServer3D.xml28
-rw-r--r--doc/classes/OmniLight3D.xml1
-rw-r--r--doc/classes/Performance.xml70
-rw-r--r--doc/classes/ProjectSettings.xml58
-rw-r--r--doc/classes/ScriptLanguageExtension.xml8
-rw-r--r--doc/classes/Shape2D.xml8
-rw-r--r--doc/classes/TextMesh.xml77
-rw-r--r--doc/classes/VisualInstance3D.xml1
-rw-r--r--doc/classes/float.xml12
-rw-r--r--doc/classes/int.xml12
29 files changed, 366 insertions, 106 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]&lt;&lt;[/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]&gt;&gt;[/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]&amp;[/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]&amp;&amp;[/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="&amp;&quot;default&quot;">
- 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/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/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/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="&quot;&quot;">
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/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/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/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 7c6d6d1c10..b54c129369 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="&quot;PowerVR,Mali,Adreno,Apple&quot;">
+ 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="&quot;vulkan&quot;">
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 lights renderable per object. This is further limited by hardware support. 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="256">
+ Max number of 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/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="&quot;&quot;">
+ 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="&quot;&quot;">
+ 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/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" />