summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/@GlobalScope.xml32
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/Animation.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml18
-rw-r--r--doc/classes/Array.xml16
-rw-r--r--doc/classes/ArrayMesh.xml10
-rw-r--r--doc/classes/Camera2D.xml14
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/Color.xml4
-rw-r--r--doc/classes/Control.xml50
-rw-r--r--doc/classes/Dictionary.xml14
-rw-r--r--doc/classes/EditorInterface.xml14
-rw-r--r--doc/classes/EditorSceneImporterAssimp.xml36
-rw-r--r--doc/classes/EditorSceneImporterGLTF.xml13
-rw-r--r--doc/classes/EditorSceneImporterMesh.xml160
-rw-r--r--doc/classes/EditorSceneImporterMeshNode3D.xml21
-rw-r--r--doc/classes/EncodedObjectAsID.xml4
-rw-r--r--doc/classes/Engine.xml14
-rw-r--r--doc/classes/GLTFAccessor.xml43
-rw-r--r--doc/classes/GLTFAnimation.xml17
-rw-r--r--doc/classes/GLTFBufferView.xml25
-rw-r--r--doc/classes/GLTFCamera.xml23
-rw-r--r--doc/classes/GLTFDocument.xml13
-rw-r--r--doc/classes/GLTFLight.xml27
-rw-r--r--doc/classes/GLTFMesh.xml19
-rw-r--r--doc/classes/GLTFNode.xml43
-rw-r--r--doc/classes/GLTFSkeleton.xml67
-rw-r--r--doc/classes/GLTFSkin.xml71
-rw-r--r--doc/classes/GLTFSpecGloss.xml25
-rw-r--r--doc/classes/GLTFState.xml251
-rw-r--r--doc/classes/GLTFTexture.xml17
-rw-r--r--doc/classes/GeometryInstance3D.xml2
-rw-r--r--doc/classes/GraphEdit.xml6
-rw-r--r--doc/classes/ItemList.xml32
-rw-r--r--doc/classes/JSONParseResult.xml2
-rw-r--r--doc/classes/MainLoop.xml24
-rw-r--r--doc/classes/Mesh.xml6
-rw-r--r--doc/classes/NinePatchRect.xml4
-rw-r--r--doc/classes/Node3D.xml2
-rw-r--r--doc/classes/Object.xml2
-rw-r--r--doc/classes/PackedByteArray.xml14
-rw-r--r--doc/classes/PackedColorArray.xml14
-rw-r--r--doc/classes/PackedFloat32Array.xml14
-rw-r--r--doc/classes/PackedFloat64Array.xml14
-rw-r--r--doc/classes/PackedInt32Array.xml14
-rw-r--r--doc/classes/PackedInt64Array.xml14
-rw-r--r--doc/classes/PackedSceneGLTF.xml58
-rw-r--r--doc/classes/PackedStringArray.xml14
-rw-r--r--doc/classes/PackedVector2Array.xml14
-rw-r--r--doc/classes/PackedVector3Array.xml14
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/ProjectSettings.xml8
-rw-r--r--doc/classes/Quat.xml2
-rw-r--r--doc/classes/Rect2.xml22
-rw-r--r--doc/classes/Rect2i.xml22
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RenderingDevice.xml2
-rw-r--r--doc/classes/RenderingServer.xml38
-rw-r--r--doc/classes/SceneTree.xml12
-rw-r--r--doc/classes/String.xml14
-rw-r--r--doc/classes/StyleBox.xml6
-rw-r--r--doc/classes/StyleBoxFlat.xml8
-rw-r--r--doc/classes/StyleBoxTexture.xml8
-rw-r--r--doc/classes/SurfaceTool.xml40
-rw-r--r--doc/classes/TabContainer.xml6
-rw-r--r--doc/classes/TextureProgressBar.xml4
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/Vector2.xml26
-rw-r--r--doc/classes/Vector3.xml8
-rw-r--r--doc/classes/Viewport.xml4
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/XRController3D.xml14
-rw-r--r--doc/classes/XRPositionalTracker.xml32
-rw-r--r--modules/fbx/doc_classes/EditorSceneImporterFBX.xml2
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml1117
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml2
76 files changed, 1274 insertions, 1464 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index c8f216e199..b40ae65a61 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -944,6 +944,22 @@
[/codeblock]
</description>
</method>
+ <method name="snapped">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="step" type="float">
+ </argument>
+ <description>
+ Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals.
+ [codeblock]
+ snapped(100, 32) # Returns 96
+ snapped(3.14159, 0.01) # Returns 3.14
+ [/codeblock]
+ See also [method ceil], [method floor], and [method round].
+ </description>
+ </method>
<method name="sqrt">
<return type="float">
</return>
@@ -974,22 +990,6 @@
[/codeblock]
</description>
</method>
- <method name="snapped">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="step" type="float">
- </argument>
- <description>
- Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals.
- [codeblock]
- snapped(100, 32) # Returns 96
- snapped(3.14159, 0.01) # Returns 3.14
- [/codeblock]
- See also [method ceil], [method floor], and [method round].
- </description>
- </method>
<method name="str" qualifiers="vararg">
<return type="String">
</return>
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index baea84df65..8cd7e6f5fa 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -219,7 +219,7 @@
<argument index="0" name="aabb" type="AABB">
</argument>
<description>
- Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="merge">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 3e33a879b3..d26c0e8605 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -409,7 +409,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
+ Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
@@ -592,7 +592,7 @@
<argument index="2" name="transition" type="float">
</argument>
<description>
- Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
+ Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
</description>
</method>
<method name="track_set_key_value">
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 4dc88ffa56..c8468f9c8f 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -21,18 +21,17 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
- <method name="get_current_node" qualifiers="const">
- <return type="StringName">
+ <method name="get_current_length" qualifiers="const">
+ <return type="float">
</return>
<description>
- Returns the currently playing animation state.
</description>
</method>
- <method name="get_travel_path" qualifiers="const">
- <return type="PackedStringArray">
+ <method name="get_current_node" qualifiers="const">
+ <return type="StringName">
</return>
<description>
- Returns the current travel path as computed internally by the A* algorithm.
+ Returns the currently playing animation state.
</description>
</method>
<method name="get_current_play_position" qualifiers="const">
@@ -42,6 +41,13 @@
Returns the playback position within the current animation state.
</description>
</method>
+ <method name="get_travel_path" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns the current travel path as computed internally by the A* algorithm.
+ </description>
+ </method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index e4f9dcf993..db5d377c62 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -228,13 +228,6 @@
If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="erase">
<return type="void">
</return>
@@ -339,6 +332,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="max">
<return type="Variant">
</return>
@@ -482,7 +482,7 @@
<return type="void">
</return>
<description>
- Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GDScript.randi]. Call [method @GDScript.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
+ Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GlobalScope.randi]. Call [method @GlobalScope.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
</description>
</method>
<method name="size">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 59502e7017..1f532f4843 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -209,19 +209,13 @@
</method>
</methods>
<members>
- <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="ArrayMesh.BlendShapeMode" default="1">
- Sets the blend shape mode to one of [enum ArrayMesh.BlendShapeMode].
+ <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1">
+ Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</member>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
</members>
<constants>
- <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
- Blend shapes are normalized.
- </constant>
- <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
- Blend shapes are relative to base weight.
- </constant>
</constants>
</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index f17c56fb11..2a4e726d43 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -52,7 +52,7 @@
<method name="get_drag_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].
@@ -61,7 +61,7 @@
<method name="get_limit" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
@@ -85,7 +85,7 @@
<method name="set_drag_margin">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="drag_margin" type="float">
</argument>
@@ -96,7 +96,7 @@
<method name="set_limit">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="limit" type="int">
</argument>
@@ -118,10 +118,10 @@
<member name="drag_bottom_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the bottom edge of the screen.
</member>
- <member name="drag_horizontal_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled" default="false">
+ <member name="drag_horizontal_enabled" type="bool" setter="set_drag_horizontal_enabled" getter="is_drag_horizontal_enabled" default="false">
If [code]true[/code], the camera only moves when reaching the horizontal (left and right) drag margins. If [code]false[/code], the camera moves horizontally regardless of margins.
</member>
- <member name="drag_horizontal_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
+ <member name="drag_horizontal_offset" type="float" setter="set_drag_horizontal_offset" getter="get_drag_horizontal_offset" default="0.0">
The relative horizontal drag offset of the camera between the right ([code]-1[/code]) and left ([code]1[/code]) drag margins.
[b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when the horizontal drag margin is enabled or the drag margins are changed.
</member>
@@ -137,7 +137,7 @@
<member name="drag_vertical_enabled" type="bool" setter="set_drag_vertical_enabled" getter="is_drag_vertical_enabled" default="false">
If [code]true[/code], the camera only moves when reaching the vertical (top and bottom) drag margins. If [code]false[/code], the camera moves vertically regardless of the drag margins.
</member>
- <member name="drag_vertical_offset" type="float" setter="set_drag_verticaloffset" getter="get_drag_vertical_offset" default="0.0">
+ <member name="drag_vertical_offset" type="float" setter="set_drag_vertical_offset" getter="get_drag_vertical_offset" default="0.0">
The relative vertical drag offset of the camera between the bottom ([code]-1[/code]) and top ([code]1[/code]) drag margins.
[b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when the vertical drag margin is enabled or the drag margins are changed.
</member>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index fcdd072c80..d13f431a16 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -9,7 +9,7 @@
Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.
A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
- [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
+ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 755fd7eea2..8af5f29b65 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
- You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
+ You can also create a color from standardized color names by using [code]ColorN[/code] ([b]FIXME:[/b] No longer true, a Color(String) constructor should be re-implemented for that) or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
@@ -158,7 +158,7 @@
<argument index="0" name="to" type="Color">
</argument>
<description>
- Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="lerp">
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index c3db716d3a..533748aced 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -213,17 +213,6 @@
Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is [code]null[/code] or invalid, the override is cleared and the icon from assigned [Theme] is used.
</description>
</method>
- <method name="add_theme_shader_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="StringName">
- </argument>
- <argument index="1" name="shader" type="Shader">
- </argument>
- <description>
- Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is [code]null[/code] or invalid, the override is cleared and the shader from assigned [Theme] is used.
- </description>
- </method>
<method name="add_theme_stylebox_override">
<return type="void">
</return>
@@ -417,20 +406,20 @@
Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size].
</description>
</method>
- <method name="get_offset" qualifiers="const">
- <return type="float">
+ <method name="get_minimum_size" qualifiers="const">
+ <return type="Vector2">
</return>
- <argument index="0" name="side" type="int" enum="Side">
- </argument>
<description>
- Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
+ Returns the minimum size for this control. See [member rect_min_size].
</description>
</method>
- <method name="get_minimum_size" qualifiers="const">
- <return type="Vector2">
+ <method name="get_offset" qualifiers="const">
+ <return type="float">
</return>
+ <argument index="0" name="offset" type="int" enum="Side">
+ </argument>
<description>
- Returns the minimum size for this control. See [member rect_min_size].
+ Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
</description>
</method>
<method name="get_parent_area_size" qualifiers="const">
@@ -685,15 +674,6 @@
Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
- <method name="has_theme_shader_override" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="StringName">
- </argument>
- <description>
- Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node.
- </description>
- </method>
<method name="has_theme_stylebox" qualifiers="const">
<return type="bool">
</return>
@@ -1063,6 +1043,13 @@
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0">
Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</member>
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0">
+ The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
+ [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system.
+ </member>
+ <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="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.
@@ -1079,13 +1066,6 @@
Distance between the node's top edge and its parent control, based on [member anchor_top].
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.
</member>
- <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0">
- The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
- [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system.
- </member>
- <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="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered.
</member>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 2ca705cec7..d3fcbc9f64 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -215,13 +215,6 @@
Creates a copy of the dictionary, and returns it. The [code]deep[/code] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the dictionary is empty.
- </description>
- </method>
<method name="erase">
<return type="bool">
</return>
@@ -299,6 +292,13 @@
[b]Note:[/b] Dictionaries with the same keys/values but in a different order will have a different hash.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the dictionary is empty.
+ </description>
+ </method>
<method name="keys">
<return type="Array">
</return>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 5a61c05cee..b01af71852 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -40,13 +40,6 @@
Returns the edited (current) scene's root [Node].
</description>
</method>
- <method name="get_editor_settings">
- <return type="EditorSettings">
- </return>
- <description>
- Returns the editor's [EditorSettings] instance.
- </description>
- </method>
<method name="get_editor_main_control">
<return type="Control">
</return>
@@ -55,6 +48,13 @@
[b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
</description>
</method>
+ <method name="get_editor_settings">
+ <return type="EditorSettings">
+ </return>
+ <description>
+ Returns the editor's [EditorSettings] instance.
+ </description>
+ </method>
<method name="get_file_system_dock">
<return type="FileSystemDock">
</return>
diff --git a/doc/classes/EditorSceneImporterAssimp.xml b/doc/classes/EditorSceneImporterAssimp.xml
deleted file mode 100644
index c72d4ee25a..0000000000
--- a/doc/classes/EditorSceneImporterAssimp.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" version="4.0">
- <brief_description>
- FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url].
- </brief_description>
- <description>
- This is an FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. It currently has many known limitations and works best with static meshes. Most animated meshes won't import correctly.
- If exporting a FBX scene from Autodesk Maya, use these FBX export settings:
- [codeblock]
- - Smoothing Groups
- - Smooth Mesh
- - Triangluate (for meshes with blend shapes)
- - Bake Animation
- - Resample All
- - Deformed Models
- - Skins
- - Blend Shapes
- - Curve Filters
- - Constant Key Reducer
- - Auto Tangents Only
- - *Do not check* Constraints (as it will break the file)
- - Can check Embed Media (embeds textures into the exported FBX file)
- - Note that when importing embedded media, the texture and mesh will be a single immutable file.
- - You will have to re-export then re-import the FBX if the texture has changed.
- - Units: Centimeters
- - Up Axis: Y
- - Binary format in FBX 2017
- [/codeblock]
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/EditorSceneImporterGLTF.xml b/doc/classes/EditorSceneImporterGLTF.xml
new file mode 100644
index 0000000000..e717b30f73
--- /dev/null
+++ b/doc/classes/EditorSceneImporterGLTF.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneImporterGLTF" inherits="EditorSceneImporter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml
new file mode 100644
index 0000000000..1c903bd889
--- /dev/null
+++ b/doc/classes/EditorSceneImporterMesh.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneImporterMesh" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_blend_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_surface">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
+ </argument>
+ <argument index="1" name="arrays" type="Array">
+ </argument>
+ <argument index="2" name="blend_shapes" type="Array" default="[ ]">
+ </argument>
+ <argument index="3" name="lods" type="Dictionary" default="{
+}">
+ </argument>
+ <argument index="4" name="material" type="Material" default="null">
+ </argument>
+ <argument index="5" name="arg5" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_mode" qualifiers="const">
+ <return type="int" enum="Mesh.BlendShapeMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="blend_shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_mesh">
+ <return type="ArrayMesh">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_blend_shape_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <argument index="1" name="blend_shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_lod_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_lod_indices" qualifiers="const">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <argument index="1" name="lod_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_lod_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <argument index="1" name="lod_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_primitive_type">
+ <return type="int" enum="Mesh.PrimitiveType">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_blend_shape_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: [ ]}">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSceneImporterMeshNode3D.xml b/doc/classes/EditorSceneImporterMeshNode3D.xml
new file mode 100644
index 0000000000..1e459c1cee
--- /dev/null
+++ b/doc/classes/EditorSceneImporterMeshNode3D.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneImporterMeshNode3D" inherits="Node3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ <member name="skeleton_path" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath(&quot;&quot;)">
+ </member>
+ <member name="skin" type="Skin" setter="set_skin" getter="get_skin">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index fc68b47645..1e4fde453b 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -4,7 +4,7 @@
Holds a reference to an [Object]'s instance ID.
</brief_description>
<description>
- Utility class which holds a reference to the internal identifier of an [Object] instance, as given by [method Object.get_instance_id]. This ID can then be used to retrieve the object instance with [method @GDScript.instance_from_id].
+ Utility class which holds a reference to the internal identifier of an [Object] instance, as given by [method Object.get_instance_id]. This ID can then be used to retrieve the object instance with [method @GlobalScope.instance_from_id].
This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs.
</description>
<tutorials>
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="object_id" type="int" setter="set_object_id" getter="get_object_id" default="0">
- The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id].
+ The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GlobalScope.instance_from_id].
</member>
</members>
<constants>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index c079085fb3..02b81ee9b7 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -51,13 +51,6 @@
Returns the frames per second of the running game.
</description>
</method>
- <method name="get_process_frames" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
- </description>
- </method>
<method name="get_license_info" qualifiers="const">
<return type="Dictionary">
</return>
@@ -93,6 +86,13 @@
Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation.
</description>
</method>
+ <method name="get_process_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
+ </description>
+ </method>
<method name="get_singleton" qualifiers="const">
<return type="Object">
</return>
diff --git a/doc/classes/GLTFAccessor.xml b/doc/classes/GLTFAccessor.xml
new file mode 100644
index 0000000000..a1f596f7dd
--- /dev/null
+++ b/doc/classes/GLTFAccessor.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFAccessor" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="0">
+ </member>
+ <member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0">
+ </member>
+ <member name="component_type" type="int" setter="set_component_type" getter="get_component_type" default="0">
+ </member>
+ <member name="count" type="int" setter="set_count" getter="get_count" default="0">
+ </member>
+ <member name="max" type="PackedFloat64Array" setter="set_max" getter="get_max" default="PackedFloat64Array( )">
+ </member>
+ <member name="min" type="PackedFloat64Array" setter="set_min" getter="get_min" default="PackedFloat64Array( )">
+ </member>
+ <member name="normalized" type="bool" setter="set_normalized" getter="get_normalized" default="false">
+ </member>
+ <member name="sparse_count" type="int" setter="set_sparse_count" getter="get_sparse_count" default="0">
+ </member>
+ <member name="sparse_indices_buffer_view" type="int" setter="set_sparse_indices_buffer_view" getter="get_sparse_indices_buffer_view" default="0">
+ </member>
+ <member name="sparse_indices_byte_offset" type="int" setter="set_sparse_indices_byte_offset" getter="get_sparse_indices_byte_offset" default="0">
+ </member>
+ <member name="sparse_indices_component_type" type="int" setter="set_sparse_indices_component_type" getter="get_sparse_indices_component_type" default="0">
+ </member>
+ <member name="sparse_values_buffer_view" type="int" setter="set_sparse_values_buffer_view" getter="get_sparse_values_buffer_view" default="0">
+ </member>
+ <member name="sparse_values_byte_offset" type="int" setter="set_sparse_values_byte_offset" getter="get_sparse_values_byte_offset" default="0">
+ </member>
+ <member name="type" type="int" setter="set_type" getter="get_type" default="0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFAnimation.xml b/doc/classes/GLTFAnimation.xml
new file mode 100644
index 0000000000..5c1fa02f11
--- /dev/null
+++ b/doc/classes/GLTFAnimation.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFAnimation" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="loop" type="bool" setter="set_loop" getter="get_loop" default="false">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFBufferView.xml b/doc/classes/GLTFBufferView.xml
new file mode 100644
index 0000000000..edaad85e0a
--- /dev/null
+++ b/doc/classes/GLTFBufferView.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFBufferView" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="buffer" type="int" setter="set_buffer" getter="get_buffer" default="-1">
+ </member>
+ <member name="byte_length" type="int" setter="set_byte_length" getter="get_byte_length" default="0">
+ </member>
+ <member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0">
+ </member>
+ <member name="byte_stride" type="int" setter="set_byte_stride" getter="get_byte_stride" default="-1">
+ </member>
+ <member name="indices" type="bool" setter="set_indices" getter="get_indices" default="false">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFCamera.xml b/doc/classes/GLTFCamera.xml
new file mode 100644
index 0000000000..0b95f2c802
--- /dev/null
+++ b/doc/classes/GLTFCamera.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFCamera" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="fov_size" type="float" setter="set_fov_size" getter="get_fov_size" default="75.0">
+ </member>
+ <member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
+ </member>
+ <member name="zfar" type="float" setter="set_zfar" getter="get_zfar" default="4000.0">
+ </member>
+ <member name="znear" type="float" setter="set_znear" getter="get_znear" default="0.05">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFDocument.xml b/doc/classes/GLTFDocument.xml
new file mode 100644
index 0000000000..04c40dd752
--- /dev/null
+++ b/doc/classes/GLTFDocument.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFDocument" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFLight.xml b/doc/classes/GLTFLight.xml
new file mode 100644
index 0000000000..bfeaf9a86e
--- /dev/null
+++ b/doc/classes/GLTFLight.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFLight" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ </member>
+ <member name="inner_cone_angle" type="float" setter="set_inner_cone_angle" getter="get_inner_cone_angle" default="0.0">
+ </member>
+ <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="0.0">
+ </member>
+ <member name="outer_cone_angle" type="float" setter="set_outer_cone_angle" getter="get_outer_cone_angle" default="0.0">
+ </member>
+ <member name="range" type="float" setter="set_range" getter="get_range" default="0.0">
+ </member>
+ <member name="type" type="String" setter="set_type" getter="get_type" default="&quot;&quot;">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFMesh.xml b/doc/classes/GLTFMesh.xml
new file mode 100644
index 0000000000..55f79d2c55
--- /dev/null
+++ b/doc/classes/GLTFMesh.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFMesh" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="blend_weights" type="PackedFloat32Array" setter="set_blend_weights" getter="get_blend_weights" default="PackedFloat32Array( )">
+ </member>
+ <member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFNode.xml b/doc/classes/GLTFNode.xml
new file mode 100644
index 0000000000..5b7d4fadec
--- /dev/null
+++ b/doc/classes/GLTFNode.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFNode" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="camera" type="int" setter="set_camera" getter="get_camera" default="-1">
+ </member>
+ <member name="children" type="PackedInt32Array" setter="set_children" getter="get_children" default="PackedInt32Array( )">
+ </member>
+ <member name="fake_joint_parent" type="int" setter="set_fake_joint_parent" getter="get_fake_joint_parent" default="-1">
+ </member>
+ <member name="height" type="int" setter="set_height" getter="get_height" default="-1">
+ </member>
+ <member name="joint" type="bool" setter="set_joint" getter="get_joint" default="false">
+ </member>
+ <member name="light" type="int" setter="set_light" getter="get_light" default="-1">
+ </member>
+ <member name="mesh" type="int" setter="set_mesh" getter="get_mesh" default="-1">
+ </member>
+ <member name="parent" type="int" setter="set_parent" getter="get_parent" default="-1">
+ </member>
+ <member name="rotation" type="Quat" setter="set_rotation" getter="get_rotation" default="Quat( 0, 0, 0, 1 )">
+ </member>
+ <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )">
+ </member>
+ <member name="skeleton" type="int" setter="set_skeleton" getter="get_skeleton" default="-1">
+ </member>
+ <member name="skin" type="int" setter="set_skin" getter="get_skin" default="-1">
+ </member>
+ <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3( 0, 0, 0 )">
+ </member>
+ <member name="xform" type="Transform" setter="set_xform" getter="get_xform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFSkeleton.xml b/doc/classes/GLTFSkeleton.xml
new file mode 100644
index 0000000000..e27c838648
--- /dev/null
+++ b/doc/classes/GLTFSkeleton.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFSkeleton" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_bone_attachment">
+ <return type="BoneAttachment3D">
+ </return>
+ <argument index="0" name="arg0" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_attachment_count">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_godot_bone_node">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_godot_skeleton">
+ <return type="Skeleton3D">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unique_names">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_godot_bone_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="godot_bone_node" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_unique_names">
+ <return type="void">
+ </return>
+ <argument index="0" name="unique_names" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="joints" type="PackedInt32Array" setter="set_joints" getter="get_joints" default="PackedInt32Array( )">
+ </member>
+ <member name="roots" type="PackedInt32Array" setter="set_roots" getter="get_roots" default="PackedInt32Array( )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFSkin.xml b/doc/classes/GLTFSkin.xml
new file mode 100644
index 0000000000..5a80c7097a
--- /dev/null
+++ b/doc/classes/GLTFSkin.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFSkin" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_inverse_binds">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_joint_i_to_bone_i">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_joint_i_to_name">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_inverse_binds">
+ <return type="void">
+ </return>
+ <argument index="0" name="inverse_binds" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_joint_i_to_bone_i">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_i_to_bone_i" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_joint_i_to_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_i_to_name" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="godot_skin" type="Skin" setter="set_godot_skin" getter="get_godot_skin">
+ </member>
+ <member name="joints" type="PackedInt32Array" setter="set_joints" getter="get_joints" default="PackedInt32Array( )">
+ </member>
+ <member name="joints_original" type="PackedInt32Array" setter="set_joints_original" getter="get_joints_original" default="PackedInt32Array( )">
+ </member>
+ <member name="non_joints" type="PackedInt32Array" setter="set_non_joints" getter="get_non_joints" default="PackedInt32Array( )">
+ </member>
+ <member name="roots" type="PackedInt32Array" setter="set_roots" getter="get_roots" default="PackedInt32Array( )">
+ </member>
+ <member name="skeleton" type="int" setter="set_skeleton" getter="get_skeleton" default="-1">
+ </member>
+ <member name="skin_root" type="int" setter="set_skin_root" getter="get_skin_root" default="-1">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFSpecGloss.xml b/doc/classes/GLTFSpecGloss.xml
new file mode 100644
index 0000000000..68cc7c845d
--- /dev/null
+++ b/doc/classes/GLTFSpecGloss.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFSpecGloss" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="diffuse_factor" type="Color" setter="set_diffuse_factor" getter="get_diffuse_factor" default="Color( 1, 1, 1, 1 )">
+ </member>
+ <member name="diffuse_img" type="Image" setter="set_diffuse_img" getter="get_diffuse_img">
+ </member>
+ <member name="gloss_factor" type="float" setter="set_gloss_factor" getter="get_gloss_factor" default="1.0">
+ </member>
+ <member name="spec_gloss_img" type="Image" setter="set_spec_gloss_img" getter="get_spec_gloss_img">
+ </member>
+ <member name="specular_factor" type="Color" setter="set_specular_factor" getter="get_specular_factor" default="Color( 1, 1, 1, 1 )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFState.xml b/doc/classes/GLTFState.xml
new file mode 100644
index 0000000000..f7763efdb1
--- /dev/null
+++ b/doc/classes/GLTFState.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFState" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_accessors">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_player">
+ <return type="AnimationPlayer">
+ </return>
+ <argument index="0" name="arg0" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_players_count">
+ <return type="int">
+ </return>
+ <argument index="0" name="arg0" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_animations">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_buffer_views">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cameras">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_images">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lights">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_materials">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_meshes">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_nodes">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene_node">
+ <return type="Node">
+ </return>
+ <argument index="0" name="arg0" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_skeleton_to_node">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_skeletons">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_skins">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_textures">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unique_names">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_accessors">
+ <return type="void">
+ </return>
+ <argument index="0" name="accessors" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_animations">
+ <return type="void">
+ </return>
+ <argument index="0" name="animations" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_buffer_views">
+ <return type="void">
+ </return>
+ <argument index="0" name="buffer_views" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cameras">
+ <return type="void">
+ </return>
+ <argument index="0" name="cameras" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_images">
+ <return type="void">
+ </return>
+ <argument index="0" name="images" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lights">
+ <return type="void">
+ </return>
+ <argument index="0" name="lights" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_materials">
+ <return type="void">
+ </return>
+ <argument index="0" name="materials" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_meshes">
+ <return type="void">
+ </return>
+ <argument index="0" name="meshes" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_nodes">
+ <return type="void">
+ </return>
+ <argument index="0" name="nodes" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_skeleton_to_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="skeleton_to_node" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_skeletons">
+ <return type="void">
+ </return>
+ <argument index="0" name="skeletons" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_skins">
+ <return type="void">
+ </return>
+ <argument index="0" name="skins" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_textures">
+ <return type="void">
+ </return>
+ <argument index="0" name="textures" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_unique_names">
+ <return type="void">
+ </return>
+ <argument index="0" name="unique_names" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="buffers" type="Array" setter="set_buffers" getter="get_buffers" default="[ ]">
+ </member>
+ <member name="glb_data" type="PackedByteArray" setter="set_glb_data" getter="get_glb_data" default="PackedByteArray( )">
+ </member>
+ <member name="json" type="Dictionary" setter="set_json" getter="get_json" default="{}">
+ </member>
+ <member name="major_version" type="int" setter="set_major_version" getter="get_major_version" default="0">
+ </member>
+ <member name="minor_version" type="int" setter="set_minor_version" getter="get_minor_version" default="0">
+ </member>
+ <member name="root_nodes" type="Array" setter="set_root_nodes" getter="get_root_nodes" default="[ ]">
+ </member>
+ <member name="scene_name" type="String" setter="set_scene_name" getter="get_scene_name" default="&quot;&quot;">
+ </member>
+ <member name="use_named_skin_binds" type="bool" setter="set_use_named_skin_binds" getter="get_use_named_skin_binds" default="false">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GLTFTexture.xml b/doc/classes/GLTFTexture.xml
new file mode 100644
index 0000000000..c7f94ab0da
--- /dev/null
+++ b/doc/classes/GLTFTexture.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GLTFTexture" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="src_image" type="int" setter="set_src_image" getter="get_src_image" default="4">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index cc85ce295b..631a30abab 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -48,6 +48,8 @@
</member>
<member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
</member>
+ <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
+ </member>
<member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
The GeometryInstance3D's max LOD distance.
[b]Note:[/b] This property currently has no effect.
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 2347627c31..10afa4c339 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -281,17 +281,17 @@
Emitted at the end of a GraphNode movement.
</description>
</signal>
- <signal name="node_selected">
+ <signal name="node_deselected">
<argument index="0" name="node" type="Node">
</argument>
<description>
- Emitted when a GraphNode is selected.
</description>
</signal>
- <signal name="node_deselected">
+ <signal name="node_selected">
<argument index="0" name="node" type="Node">
</argument>
<description>
+ Emitted when a GraphNode is selected.
</description>
</signal>
<signal name="paste_nodes_request">
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 8542cdaca4..6e5ff83a35 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -52,6 +52,22 @@
Removes all OpenType features from the item's text.
</description>
</method>
+ <method name="deselect">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Ensures the item associated with the specified index is not selected.
+ </description>
+ </method>
+ <method name="deselect_all">
+ <return type="void">
+ </return>
+ <description>
+ Ensures there are no items selected.
+ </description>
+ </method>
<method name="ensure_current_is_visible">
<return type="void">
</return>
@@ -471,22 +487,6 @@
Sorts items in the list by their text.
</description>
</method>
- <method name="deselect">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Ensures the item associated with the specified index is not selected.
- </description>
- </method>
- <method name="deselect_all">
- <return type="void">
- </return>
- <description>
- Ensures there are no items selected.
- </description>
- </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 991ebcd7a0..bc94f74b07 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -21,7 +21,7 @@
The error message if the JSON source was not successfully parsed. See the [enum Error] constants.
</member>
<member name="result" type="Variant" setter="set_result" getter="get_result">
- A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned.
+ A [Variant] containing the parsed JSON. Use [method @GlobalScope.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
[b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
[codeblocks]
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 7682379b64..9e976babcf 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -19,7 +19,7 @@
print("Initialized:")
print(" Starting time: %s" % str(time_elapsed))
- func _idle(delta):
+ func _process(delta):
time_elapsed += delta
# Return true to end the main loop.
return quit
@@ -51,16 +51,6 @@
Called before the program exits.
</description>
</method>
- <method name="_idle" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- Called each idle frame with the time since the last idle frame as argument (in seconds). Equivalent to [method Node._process].
- If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
- </description>
- </method>
<method name="_initialize" qualifiers="virtual">
<return type="void">
</return>
@@ -68,7 +58,7 @@
Called once during initialization.
</description>
</method>
- <method name="_iteration" qualifiers="virtual">
+ <method name="_physics_process" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="delta" type="float">
@@ -78,6 +68,16 @@
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
</description>
</method>
+ <method name="_process" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._process].
+ If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
+ </description>
+ </method>
</methods>
<signals>
<signal name="on_request_permissions_result">
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index dff4b4f7ab..ed7c39d4d9 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -242,5 +242,11 @@
</constant>
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
</constant>
+ <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
+ Blend shapes are normalized.
+ </constant>
+ <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
+ Blend shapes are relative to base weight.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index f4b9d75e91..d6de0ef4cf 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -12,7 +12,7 @@
<method name="get_patch_margin" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the size of the margin on the specified [enum Side].
@@ -21,7 +21,7 @@
<method name="set_patch_margin">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="value" type="int">
</argument>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index f6ff514474..fe3a9c5d39 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -6,7 +6,7 @@
<description>
Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project.
Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system.
- [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
+ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
<link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 50d91c7943..6ff7e34194 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -242,7 +242,7 @@
</return>
<description>
Returns the object's unique instance ID.
- This ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GDScript.instance_from_id].
+ This ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GlobalScope.instance_from_id].
</description>
</method>
<method name="get_meta" qualifiers="const">
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index b00c59ade9..75fb7c1465 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -92,13 +92,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="get_string_from_ascii">
<return type="String">
</return>
@@ -171,6 +164,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index d6cd5196e4..48d5822f7c 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -59,13 +59,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -93,6 +86,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 52f6ece158..6598828089 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -60,13 +60,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -94,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 2f317d4b8c..d116c6756b 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -60,13 +60,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -94,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index bda902b15f..2ac7a67b4b 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -60,13 +60,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -94,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 9c52ec808b..a7b6bf0a0f 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -60,13 +60,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -94,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedSceneGLTF.xml b/doc/classes/PackedSceneGLTF.xml
new file mode 100644
index 0000000000..a04c6ef0b6
--- /dev/null
+++ b/doc/classes/PackedSceneGLTF.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedSceneGLTF" inherits="PackedScene" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="export_gltf">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <argument index="1" name="path" type="String">
+ </argument>
+ <argument index="2" name="flags" type="int" default="0">
+ </argument>
+ <argument index="3" name="bake_fps" type="float" default="1000.0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="import_gltf_scene">
+ <return type="Node">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="flags" type="int" default="0">
+ </argument>
+ <argument index="2" name="bake_fps" type="float" default="1000.0">
+ </argument>
+ <argument index="3" name="state" type="GLTFState" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pack_gltf">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="flags" type="int" default="0">
+ </argument>
+ <argument index="2" name="bake_fps" type="float" default="1000.0">
+ </argument>
+ <argument index="3" name="state" type="GLTFState" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" override="true" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PackedStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PackedInt32Array( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}" />
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 24406c53d4..fb7ed2a906 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -60,13 +60,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -94,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 2f583e2b9b..eb364ddb18 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -60,13 +60,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -94,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 6004454dc9..08ce187b5c 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -59,13 +59,6 @@
Creates a copy of the array, and returns it.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="has">
<return type="bool">
</return>
@@ -93,6 +86,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index e3242512c4..ed96f753c2 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -142,7 +142,7 @@
<argument index="0" name="to_plane" type="Plane">
</argument>
<description>
- Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_point_over">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index d623b0432f..ec380ddc54 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -1153,6 +1153,12 @@
<member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter="" default="3">
Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support.
</member>
+ <member name="rendering/quality/mesh_lod/threshold_pixels" type="float" setter="" getter="" default="1.0">
+ </member>
+ <member name="rendering/quality/rd_renderer/use_low_end_renderer" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/quality/rd_renderer/use_low_end_renderer.mobile" type="bool" setter="" getter="" default="true">
+ </member>
<member name="rendering/quality/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64">
Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM.
</member>
@@ -1281,6 +1287,8 @@
</member>
<member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2">
</member>
+ <member name="rendering/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10">
+ </member>
<member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1">
Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
</member>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 425e82c744..ef83ae7fb9 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -127,7 +127,7 @@
<argument index="0" name="to" type="Quat">
</argument>
<description>
- Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 3d2852f393..5d7ff39587 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -72,16 +72,6 @@
Returns a [Rect2] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive.
</description>
</method>
- <method name="intersection">
- <return type="Rect2">
- </return>
- <argument index="0" name="b" type="Rect2">
- </argument>
- <description>
- Returns the intersection of this [Rect2] and [code]b[/code].
- If the rectangles do not intersect, an empty [Rect2] is returned.
- </description>
- </method>
<method name="encloses">
<return type="bool">
</return>
@@ -134,7 +124,7 @@
<method name="grow_side">
<return type="Rect2">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="side" type="int">
</argument>
<argument index="1" name="amount" type="float">
</argument>
@@ -158,6 +148,16 @@
Returns [code]true[/code] if the [Rect2] contains a point.
</description>
</method>
+ <method name="intersection">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="b" type="Rect2">
+ </argument>
+ <description>
+ Returns the intersection of this [Rect2] and [code]b[/code].
+ If the rectangles do not intersect, an empty [Rect2] is returned.
+ </description>
+ </method>
<method name="intersects">
<return type="bool">
</return>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index 66e5dae78a..e581ccdb11 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -70,16 +70,6 @@
Returns a [Rect2i] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive.
</description>
</method>
- <method name="intersection">
- <return type="Rect2i">
- </return>
- <argument index="0" name="b" type="Rect2i">
- </argument>
- <description>
- Returns the intersection of this [Rect2i] and [code]b[/code].
- If the rectangles do not intersect, an empty [Rect2i] is returned.
- </description>
- </method>
<method name="encloses">
<return type="bool">
</return>
@@ -132,7 +122,7 @@
<method name="grow_side">
<return type="Rect2i">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="side" type="int">
</argument>
<argument index="1" name="amount" type="int">
</argument>
@@ -156,6 +146,16 @@
Returns [code]true[/code] if the [Rect2i] contains a point.
</description>
</method>
+ <method name="intersection">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="b" type="Rect2i">
+ </argument>
+ <description>
+ Returns the intersection of this [Rect2i] and [code]b[/code].
+ If the rectangles do not intersect, an empty [Rect2i] is returned.
+ </description>
+ </method>
<method name="intersects">
<return type="bool">
</return>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 5458b496da..cd08778c89 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -37,6 +37,8 @@
<member name="interior" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false">
If [code]true[/code], reflections will ignore sky contribution.
</member>
+ <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
+ </member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
Sets the max distance away from the probe an object can be before it is culled.
</member>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 7e5df9c40d..7cdc9ffaca 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -730,6 +730,8 @@
</argument>
<argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
</argument>
+ <argument index="2" name="use_as_storage" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 036b50f0ed..4be97b7d3d 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -859,6 +859,12 @@
Tries to free an object in the RenderingServer.
</description>
</method>
+ <method name="get_frame_setup_time_cpu" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_render_info">
<return type="int">
</return>
@@ -1354,7 +1360,7 @@
<argument index="1" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
+ Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
@@ -1366,7 +1372,7 @@
<argument index="1" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
+ Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
@@ -1380,7 +1386,7 @@
<argument index="2" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
+ Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
@@ -2715,6 +2721,22 @@
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
</description>
</method>
+ <method name="viewport_get_measured_render_time_cpu" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="viewport_get_measured_render_time_gpu" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="viewport_get_render_info">
<return type="int">
</return>
@@ -2852,6 +2874,16 @@
Currently unimplemented in Godot 3.x.
</description>
</method>
+ <method name="viewport_set_measure_render_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="viewport_set_msaa">
<return type="void">
</return>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 5fc1d0b895..2c99815abf 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -260,7 +260,7 @@
The default [MultiplayerAPI] instance for this [SceneTree].
</member>
<member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true">
- If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame].
+ If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame].
If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
</member>
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
@@ -298,11 +298,6 @@
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</signal>
- <signal name="idle_frame">
- <description>
- Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
- </description>
- </signal>
<signal name="network_peer_connected">
<argument index="0" name="id" type="int">
</argument>
@@ -350,6 +345,11 @@
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
</description>
</signal>
+ <signal name="process_frame">
+ <description>
+ Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
+ </description>
+ </signal>
<signal name="server_disconnected">
<description>
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index cbaf1196e3..79f21a0e70 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -135,13 +135,6 @@
Returns a copy of the string with indentation (leading tabs and spaces) removed.
</description>
</method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the length of the string equals [code]0[/code].
- </description>
- </method>
<method name="ends_with">
<return type="bool">
</return>
@@ -276,6 +269,13 @@
If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute.
</description>
</method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the length of the string equals [code]0[/code].
+ </description>
+ </method>
<method name="is_rel_path">
<return type="bool">
</return>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 525dba0549..a01dfbd4b8 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -39,7 +39,7 @@
<method name="get_default_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the default margin of the specified [enum Side].
@@ -48,7 +48,7 @@
<method name="get_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the content margin offset for the specified [enum Side].
@@ -72,7 +72,7 @@
<method name="set_default_margin">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="offset" type="float">
</argument>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 71f227dfb0..13ea7df294 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -27,7 +27,7 @@
<method name="get_border_width" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the specified [enum Side]'s border width.
@@ -52,7 +52,7 @@
<method name="get_expand_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the size of the specified [enum Side]'s expand margin.
@@ -61,7 +61,7 @@
<method name="set_border_width">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="width" type="int">
</argument>
@@ -116,7 +116,7 @@
<method name="set_expand_margin">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="size" type="float">
</argument>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 5b17f25978..895d0c357d 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -12,7 +12,7 @@
<method name="get_expand_margin_size" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the expand margin size of the specified [enum Side].
@@ -21,7 +21,7 @@
<method name="get_margin_size" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
Returns the margin size of the specified [enum Side].
@@ -54,7 +54,7 @@
<method name="set_expand_margin_size">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="size" type="float">
</argument>
@@ -65,7 +65,7 @@
<method name="set_margin_size">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="size" type="float">
</argument>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 82ffe86251..e10b65e309 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -31,15 +31,6 @@
Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices.
</description>
</method>
- <method name="add_smooth_group">
- <return type="void">
- </return>
- <argument index="0" name="smooth" type="bool">
- </argument>
- <description>
- Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation.
- </description>
- </method>
<method name="add_triangle_fan">
<return type="void">
</return>
@@ -148,6 +139,16 @@
Removes the index array by expanding the vertex array.
</description>
</method>
+ <method name="generate_lod">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="nd_threshold" type="float">
+ </argument>
+ <argument index="1" name="target_index_count" type="int" default="3">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="generate_normals">
<return type="void">
</return>
@@ -173,6 +174,12 @@
<description>
</description>
</method>
+ <method name="get_max_axis_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_skin_weight_count" qualifiers="const">
<return type="int" enum="SurfaceTool.SkinWeightCount">
</return>
@@ -186,6 +193,12 @@
Shrinks the vertex array by creating an index array (avoids reusing vertices).
</description>
</method>
+ <method name="optimize_indices_for_cache">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="set_bones">
<return type="void">
</return>
@@ -251,6 +264,15 @@
<description>
</description>
</method>
+ <method name="set_smooth_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation.
+ </description>
+ </method>
<method name="set_tangent">
<return type="void">
</return>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index c9ed1aaec9..10cdd0eade 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -137,6 +137,9 @@
</method>
</methods>
<members>
+ <member name="all_tabs_in_front" type="bool" setter="set_all_tabs_in_front" getter="is_all_tabs_in_front" default="false">
+ If [code]true[/code], all tabs are drawn in front of the panel. If [code]false[/code], inactive tabs are drawn behind the panel.
+ </member>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0">
The current tab index. When set, this index's [Control] node's [code]visible[/code] property is set to [code]true[/code] and all others are set to [code]false[/code].
</member>
@@ -149,9 +152,6 @@
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true">
If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden.
</member>
- <member name="all_tabs_in_front" type="bool" setter="set_all_tabs_in_front" getter="is_all_tabs_in_front" default="false">
- If [code]true[/code], all tabs are drawn in front of the panel. If [code]false[/code], inactive tabs are drawn behind the panel.
- </member>
<member name="use_hidden_tabs_for_min_size" type="bool" setter="set_use_hidden_tabs_for_min_size" getter="get_use_hidden_tabs_for_min_size" default="false">
If [code]true[/code], children [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
</member>
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index cfc8f16648..b40759578f 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -12,7 +12,7 @@
<method name="get_stretch_margin" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<description>
</description>
@@ -20,7 +20,7 @@
<method name="set_stretch_margin">
<return type="void">
</return>
- <argument index="0" name="side" type="int" enum="Side">
+ <argument index="0" name="margin" type="int" enum="Side">
</argument>
<argument index="1" name="value" type="int">
</argument>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index cd76689ffe..775bd58bcf 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -17,7 +17,7 @@
- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time.
- C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept.
- The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects.
- The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
+ The global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
[codeblock]
var foo = 2
match typeof(foo):
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index fef2d7cedd..4159a38d96 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -66,7 +66,7 @@
<description>
Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians.
For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees).
- Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
+ Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
</description>
</method>
<method name="angle_to">
@@ -196,7 +196,7 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
@@ -390,13 +390,20 @@
<description>
</description>
</method>
+ <method name="orthogonal">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length.
+ </description>
+ </method>
<method name="posmod">
<return type="Vector2">
</return>
<argument index="0" name="mod" type="float">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
</description>
</method>
<method name="posmodv">
@@ -405,7 +412,7 @@
<argument index="0" name="modv" type="Vector2">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
</description>
</method>
<method name="project">
@@ -432,7 +439,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
- Returns the vector rotated by [code]phi[/code] radians. See also [method @GDScript.deg2rad].
+ Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad].
</description>
</method>
<method name="round">
@@ -446,7 +453,7 @@
<return type="Vector2">
</return>
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GDScript.sign] on each component.
+ Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
<method name="slerp">
@@ -479,13 +486,6 @@
Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
- <method name="orthogonal">
- <return type="Vector2">
- </return>
- <description>
- Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length.
- </description>
- </method>
</methods>
<members>
<member name="x" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 46fd45f85f..2d129a2c86 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -171,7 +171,7 @@
<argument index="0" name="to" type="Vector3">
</argument>
<description>
- Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
@@ -410,7 +410,7 @@
<argument index="0" name="mod" type="float">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
</description>
</method>
<method name="posmodv">
@@ -419,7 +419,7 @@
<argument index="0" name="modv" type="Vector3">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
</description>
</method>
<method name="project">
@@ -462,7 +462,7 @@
<return type="Vector3">
</return>
<description>
- Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GDScript.sign] on each component.
+ Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
<method name="slerp">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 7b513d56c3..e66b8353a8 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -222,6 +222,8 @@
</member>
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member>
+ <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
+ </member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems.
</member>
@@ -405,6 +407,8 @@
</constant>
<constant name="DEBUG_DRAW_GI_BUFFER" value="17" enum="DebugDraw">
</constant>
+ <constant name="DEBUG_DRAW_DISABLE_LOD" value="18" enum="DebugDraw">
+ </constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
</constant>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 07d82289a3..4140df5828 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -4,7 +4,7 @@
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
<description>
- A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
+ A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index 345e5efdee..a4a86cc22a 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -19,13 +19,6 @@
If active, returns the name of the associated controller if provided by the AR/VR SDK used.
</description>
</method>
- <method name="get_tracker_hand" qualifiers="const">
- <return type="int" enum="XRPositionalTracker.TrackerHand">
- </return>
- <description>
- Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
- </description>
- </method>
<method name="get_is_active" qualifiers="const">
<return type="bool">
</return>
@@ -56,6 +49,13 @@
If provided by the [XRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
</description>
</method>
+ <method name="get_tracker_hand" qualifiers="const">
+ <return type="int" enum="XRPositionalTracker.TrackerHand">
+ </return>
+ <description>
+ Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
+ </description>
+ </method>
<method name="is_button_pressed" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index 36ff312e4d..36cd6e2ea0 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -12,13 +12,6 @@
<link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
- <method name="get_tracker_hand" qualifiers="const">
- <return type="int" enum="XRPositionalTracker.TrackerHand">
- </return>
- <description>
- Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
- </description>
- </method>
<method name="get_joy_id" qualifiers="const">
<return type="int">
</return>
@@ -47,6 +40,13 @@
Returns the world-space controller position.
</description>
</method>
+ <method name="get_tracker_hand" qualifiers="const">
+ <return type="int" enum="XRPositionalTracker.TrackerHand">
+ </return>
+ <description>
+ Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
+ </description>
+ </method>
<method name="get_tracker_id" qualifiers="const">
<return type="int">
</return>
@@ -68,6 +68,15 @@
Returns the tracker's type, which will be one of the values from the [enum XRServer.TrackerType] enum.
</description>
</method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="adjust_by_reference_frame" type="bool">
+ </argument>
+ <description>
+ Returns the transform combining this device's orientation and position.
+ </description>
+ </method>
<method name="is_tracking_orientation" qualifiers="const">
<return type="bool">
</return>
@@ -82,15 +91,6 @@
Returns [code]true[/code] if this device is tracking position.
</description>
</method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="adjust_by_reference_frame" type="bool">
- </argument>
- <description>
- Returns the transform combining this device's orientation and position.
- </description>
- </method>
</methods>
<members>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
diff --git a/modules/fbx/doc_classes/EditorSceneImporterFBX.xml b/modules/fbx/doc_classes/EditorSceneImporterFBX.xml
index 72b6e0f5fd..da1a68c27c 100644
--- a/modules/fbx/doc_classes/EditorSceneImporterFBX.xml
+++ b/modules/fbx/doc_classes/EditorSceneImporterFBX.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporterFBX" inherits="EditorSceneImporter" version="3.2">
+<class name="EditorSceneImporterFBX" inherits="EditorSceneImporter" version="4.0">
<brief_description>
FBX 3D asset importer.
</brief_description>
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index d60ed8c60c..9e974b6fdc 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -32,59 +32,6 @@
[/codeblock]
</description>
</method>
- <method name="ColorN">
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="alpha" type="float" default="1.0">
- </argument>
- <description>
- Returns a color according to the standardized [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
- [codeblock]
- red = ColorN("red", 1)
- [/codeblock]
- Supported color names are the same as the constants defined in [Color].
- </description>
- </method>
- <method name="abs">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the absolute value of parameter [code]s[/code] (i.e. positive value).
- [codeblock]
- a = abs(-1) # a is 1
- [/codeblock]
- </description>
- </method>
- <method name="acos">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the arc cosine of [code]s[/code] in radians. Use to get the angle of cosine [code]s[/code].
- [codeblock]
- # c is 0.523599 or 30 degrees if converted with rad2deg(s)
- c = acos(0.866025)
- [/codeblock]
- </description>
- </method>
- <method name="asin">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the arc sine of [code]s[/code] in radians. Use to get the angle of sine [code]s[/code].
- [codeblock]
- # s is 0.523599 or 30 degrees if converted with rad2deg(s)
- s = asin(0.5)
- [/codeblock]
- </description>
- </method>
<method name="assert">
<return type="void">
</return>
@@ -93,7 +40,7 @@
<argument index="1" name="message" type="String" default="&quot;&quot;">
</argument>
<description>
- Asserts that the [code]condition[/code] is [code]true[/code]. If the [code]condition[/code] is [code]false[/code], an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of [method push_error] for reporting errors to project developers or add-on users.
+ Asserts that the [code]condition[/code] is [code]true[/code]. If the [code]condition[/code] is [code]false[/code], an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of [method @GlobalScope.push_error] for reporting errors to project developers or add-on users.
[b]Note:[/b] For performance reasons, the code inside [method assert] is only executed in debug builds or when running the project from the editor. Don't include code that has side effects in an [method assert] call. Otherwise, the project will behave differently when exported in release mode.
The optional [code]message[/code] argument, if given, is shown in addition to the generic "Assertion failed" message. You can use this to provide additional details about why the assertion failed.
[codeblock]
@@ -106,75 +53,10 @@
[/codeblock]
</description>
</method>
- <method name="atan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the arc tangent of [code]s[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
- The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code].
- [codeblock]
- a = atan(0.5) # a is 0.463648
- [/codeblock]
- </description>
- </method>
- <method name="atan2">
- <return type="float">
- </return>
- <argument index="0" name="y" type="float">
- </argument>
- <argument index="1" name="x" type="float">
- </argument>
- <description>
- Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
- Important note: The Y coordinate comes first, by convention.
- [codeblock]
- a = atan2(0, -1) # a is 3.141593
- [/codeblock]
- </description>
- </method>
- <method name="bytes2var">
- <return type="Variant">
- </return>
- <argument index="0" name="bytes" type="PackedByteArray">
- </argument>
- <argument index="1" name="allow_objects" type="bool" default="false">
- </argument>
- <description>
- Decodes a byte array back to a value. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed.
- [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
- </description>
- </method>
- <method name="cartesian2polar">
- <return type="Vector2">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
- </description>
- </method>
- <method name="ceil">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds [code]s[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]s[/code].
- [codeblock]
- a = ceil(1.45) # a is 2.0
- a = ceil(1.001) # a is 2.0
- [/codeblock]
- See also [method floor], [method round], [method snapped], and [int].
- </description>
- </method>
<method name="char">
<return type="String">
</return>
- <argument index="0" name="code" type="int">
+ <argument index="0" name="char" type="int">
</argument>
<description>
Returns a character as a String of the given Unicode code point (which is compatible with ASCII code).
@@ -183,25 +65,6 @@
a = char(65 + 32) # a is "a"
a = char(8364) # a is "€"
[/codeblock]
- This is the inverse of [method ord].
- </description>
- </method>
- <method name="clamp">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
- </argument>
- <description>
- Clamps [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
- [codeblock]
- a = clamp(1000, 1, 20) # a is 20
- a = clamp(-10, 1, 20) # a is 1
- a = clamp(15, 1, 20) # a is 15
- [/codeblock]
</description>
</method>
<method name="convert">
@@ -223,159 +86,15 @@
[/codeblock]
</description>
</method>
- <method name="cos">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the cosine of angle [code]s[/code] in radians.
- [codeblock]
- a = cos(TAU) # a is 1.0
- a = cos(PI) # a is -1.0
- [/codeblock]
- </description>
- </method>
- <method name="cosh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic cosine of [code]s[/code] in radians.
- [codeblock]
- print(cosh(1)) # Prints 1.543081
- [/codeblock]
- </description>
- </method>
- <method name="db2linear">
- <return type="float">
- </return>
- <argument index="0" name="db" type="float">
- </argument>
- <description>
- Converts from decibels to linear energy (audio).
- </description>
- </method>
- <method name="dectime">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="amount" type="float">
- </argument>
- <argument index="2" name="step" type="float">
- </argument>
- <description>
- Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code].
- [codeblock]
- a = dectime(60, 10, 0.1)) # a is 59.0
- [/codeblock]
- </description>
- </method>
- <method name="deg2rad">
- <return type="float">
- </return>
- <argument index="0" name="deg" type="float">
- </argument>
- <description>
- Converts an angle expressed in degrees to radians.
- [codeblock]
- r = deg2rad(180) # r is 3.141593
- [/codeblock]
- </description>
- </method>
<method name="dict2inst">
<return type="Object">
</return>
- <argument index="0" name="dict" type="Dictionary">
+ <argument index="0" name="dictionary" type="Dictionary">
</argument>
<description>
Converts a dictionary (previously created with [method inst2dict]) back to an instance. Useful for deserializing.
</description>
</method>
- <method name="ease">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <argument index="1" name="curve" type="float">
- </argument>
- <description>
- Easing function, based on exponent. The curve values are: 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
- </description>
- </method>
- <method name="exp">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]s[/code] and returns it.
- [b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].
- For exponents to other bases use the method [method pow].
- [codeblock]
- a = exp(2) # Approximately 7.39
- [/codeblock]
- </description>
- </method>
- <method name="floor">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds [code]s[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]s[/code].
- [codeblock]
- a = floor(2.45) # a is 2.0
- a = floor(2.99) # a is 2.0
- a = floor(-2.99) # a is -3.0
- [/codeblock]
- See also [method ceil], [method round], [method snapped], and [int].
- [b]Note:[/b] This method returns a float. If you need an integer and [code]s[/code] is a non-negative number, you can use [code]int(s)[/code] directly.
- </description>
- </method>
- <method name="fmod">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns the floating-point remainder of [code]a/b[/code], keeping the sign of [code]a[/code].
- [codeblock]
- r = fmod(7, 5.5) # r is 1.5
- [/codeblock]
- For the integer remainder operation, use the % operator.
- </description>
- </method>
- <method name="fposmod">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns the floating-point modulus of [code]a/b[/code] that wraps equally in positive and negative.
- [codeblock]
- for i in 7:
- var x = 0.5 * i - 1.5
- print("%4.1f %4.1f %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
- [/codeblock]
- Produces:
- [codeblock]
- -1.5 -0.0 0.0
- -1.0 -1.0 0.5
- -0.5 -0.5 1.0
- 0.0 0.0 0.0
- 0.5 0.5 0.5
- 1.0 1.0 1.0
- 1.5 0.0 0.0
- [/codeblock]
- </description>
- </method>
<method name="get_stack">
<return type="Array">
</return>
@@ -397,22 +116,10 @@
[/codeblock]
</description>
</method>
- <method name="hash">
- <return type="int">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Returns the integer hash of the variable passed.
- [codeblock]
- print(hash("a")) # Prints 177670
- [/codeblock]
- </description>
- </method>
<method name="inst2dict">
<return type="Dictionary">
</return>
- <argument index="0" name="inst" type="Object">
+ <argument index="0" name="instance" type="Object">
</argument>
<description>
Returns the passed instance converted to a dictionary (useful for serializing).
@@ -430,92 +137,6 @@
[/codeblock]
</description>
</method>
- <method name="instance_from_id">
- <return type="Object">
- </return>
- <argument index="0" name="instance_id" type="int">
- </argument>
- <description>
- Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
- [codeblock]
- var foo = "bar"
- func _ready():
- var id = get_instance_id()
- var inst = instance_from_id(id)
- print(inst.foo) # Prints bar
- [/codeblock]
- </description>
- </method>
- <method name="inverse_lerp">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Returns a normalized value considering the given range. This is the opposite of [method lerp].
- [codeblock]
- var middle = lerp(20, 30, 0.75)
- # `middle` is now 27.5.
- # Now, we pretend to have forgotten the original ratio and want to get it back.
- var ratio = inverse_lerp(20, 30, 27.5)
- # `ratio` is now 0.75.
- [/codeblock]
- </description>
- </method>
- <method name="is_equal_approx">
- <return type="bool">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns [code]true[/code] if [code]a[/code] and [code]b[/code] are approximately equal to each other.
- Here, approximately equal means that [code]a[/code] and [code]b[/code] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
- Infinity values of the same sign are considered equal.
- </description>
- </method>
- <method name="is_inf">
- <return type="bool">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns whether [code]s[/code] is an infinity value (either positive infinity or negative infinity).
- </description>
- </method>
- <method name="is_instance_valid">
- <return type="bool">
- </return>
- <argument index="0" name="instance" type="Object">
- </argument>
- <description>
- Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
- </description>
- </method>
- <method name="is_nan">
- <return type="bool">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns whether [code]s[/code] is a NaN ("Not a Number" or invalid) value.
- </description>
- </method>
- <method name="is_zero_approx">
- <return type="bool">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns [code]true[/code] if [code]s[/code] is zero or almost zero.
- This method is faster than using [method is_equal_approx] with one value as zero.
- </description>
- </method>
<method name="len">
<return type="int">
</return>
@@ -530,63 +151,6 @@
[/codeblock]
</description>
</method>
- <method name="lerp">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Variant">
- </argument>
- <argument index="1" name="to" type="Variant">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Linearly interpolates between two values by a normalized value. This is the opposite of [method inverse_lerp].
- If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float].
- If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]lerp[/code] method).
- [codeblock]
- lerp(0, 4, 0.75) # Returns 3.0
- lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)
- [/codeblock]
- </description>
- </method>
- <method name="lerp_angle">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Linearly interpolates between two angles (in radians) by a normalized value.
- Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].
- [codeblock]
- extends Sprite
- var elapsed = 0.0
- func _process(delta):
- var min_angle = deg2rad(0.0)
- var max_angle = deg2rad(90.0)
- rotation = lerp_angle(min_angle, max_angle, elapsed)
- elapsed += delta
- [/codeblock]
- </description>
- </method>
- <method name="linear2db">
- <return type="float">
- </return>
- <argument index="0" name="nrg" type="float">
- </argument>
- <description>
- Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example:
- [codeblock]
- # "Slider" refers to a node that inherits Range such as HSlider or VSlider.
- # Its range must be configured to go from 0 to 1.
- # Change the bus name if you'd like to change the volume of a specific bus only.
- AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear2db($Slider.value))
- [/codeblock]
- </description>
- </method>
<method name="load">
<return type="Resource">
</return>
@@ -603,172 +167,6 @@
This method is a simplified version of [method ResourceLoader.load], which can be used for more advanced scenarios.
</description>
</method>
- <method name="log">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
- [b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
- [codeblock]
- log(10) # Returns 2.302585
- [/codeblock]
- [b]Note:[/b] The logarithm of [code]0[/code] returns [code]-inf[/code], while negative values return [code]-nan[/code].
- </description>
- </method>
- <method name="max">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns the maximum of two values.
- [codeblock]
- max(1, 2) # Returns 2
- max(-3.99, -4) # Returns -3.99
- [/codeblock]
- </description>
- </method>
- <method name="min">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns the minimum of two values.
- [codeblock]
- min(1, 2) # Returns 1
- min(-3.99, -4) # Returns -4
- [/codeblock]
- </description>
- </method>
- <method name="move_toward">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="delta" type="float">
- </argument>
- <description>
- Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value.
- Use a negative [code]delta[/code] value to move away.
- [codeblock]
- move_toward(5, 10, 4) # Returns 9
- move_toward(10, 5, 4) # Returns 6
- move_toward(10, 5, -1.5) # Returns 11.5
- [/codeblock]
- </description>
- </method>
- <method name="nearest_po2">
- <return type="int">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <description>
- Returns the nearest equal or larger power of 2 for integer [code]value[/code].
- In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value &lt;= a[/code] for some non-negative integer [code]n[/code].
- [codeblock]
- nearest_po2(3) # Returns 4
- nearest_po2(4) # Returns 4
- nearest_po2(5) # Returns 8
-
- nearest_po2(0) # Returns 0 (this may not be what you expect)
- nearest_po2(-1) # Returns 0 (this may not be what you expect)
- [/codeblock]
- [b]WARNING:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
- </description>
- </method>
- <method name="ord">
- <return type="int">
- </return>
- <argument index="0" name="char" type="String">
- </argument>
- <description>
- Returns an integer representing the Unicode code point of the given Unicode character [code]char[/code].
- [codeblock]
- a = ord("A") # a is 65
- a = ord("a") # a is 97
- a = ord("€") # a is 8364
- [/codeblock]
- This is the inverse of [method char].
- </description>
- </method>
- <method name="parse_json">
- <return type="Variant">
- </return>
- <argument index="0" name="json" type="String">
- </argument>
- <description>
- Parse JSON text to a Variant. (Use [method typeof] to check if the Variant's type is what you expect.)
- [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
- [b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
- [codeblock]
- var p = JSON.parse('["hello", "world", "!"]')
- if typeof(p.result) == TYPE_ARRAY:
- print(p.result[0]) # Prints "hello"
- else:
- push_error("Unexpected results.")
- [/codeblock]
- See also [JSON] for an alternative way to parse JSON text.
- </description>
- </method>
- <method name="polar2cartesian">
- <return type="Vector2">
- </return>
- <argument index="0" name="r" type="float">
- </argument>
- <argument index="1" name="th" type="float">
- </argument>
- <description>
- Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
- </description>
- </method>
- <method name="posmod">
- <return type="int">
- </return>
- <argument index="0" name="a" type="int">
- </argument>
- <argument index="1" name="b" type="int">
- </argument>
- <description>
- Returns the integer modulus of [code]a/b[/code] that wraps equally in positive and negative.
- [codeblock]
- for i in range(-3, 4):
- print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)])
- [/codeblock]
- Produces:
- [codeblock]
- -3 0 0
- -2 -2 1
- -1 -1 2
- 0 0 0
- 1 1 1
- 2 2 2
- 3 0 0
- [/codeblock]
- </description>
- </method>
- <method name="pow">
- <return type="float">
- </return>
- <argument index="0" name="base" type="float">
- </argument>
- <argument index="1" name="exp" type="float">
- </argument>
- <description>
- Returns the result of [code]base[/code] raised to the power of [code]exp[/code].
- [codeblock]
- pow(2, 5) # Returns 32.0
- [/codeblock]
- </description>
- </method>
<method name="preload">
<return type="Resource">
</return>
@@ -783,23 +181,11 @@
[/codeblock]
</description>
</method>
- <method name="print" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Converts one or more arguments to strings in the best way possible and prints them to the console.
- [codeblock]
- a = [1, 2, 3]
- print("a", "=", a) # Prints a=[1, 2, 3]
- [/codeblock]
- [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
- </description>
- </method>
<method name="print_debug" qualifiers="vararg">
<return type="void">
</return>
<description>
- Like [method print], but prints only when used in debug mode.
+ Like [method @GlobalScope.print], but prints only when used in debug mode.
</description>
</method>
<method name="print_stack">
@@ -813,158 +199,6 @@
[/codeblock]
</description>
</method>
- <method name="printerr" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to strings in the best way possible to standard error line.
- [codeblock]
- printerr("prints to stderr")
- [/codeblock]
- </description>
- </method>
- <method name="printraw" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to strings in the best way possible to console. No newline is added at the end.
- [codeblock]
- printraw("A")
- printraw("B")
- # Prints AB
- [/codeblock]
- [b]Note:[/b] Due to limitations with Godot's built-in console, this only prints to the terminal. If you need to print in the editor, use another method, such as [method print].
- </description>
- </method>
- <method name="prints" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to the console with a space between each argument.
- [codeblock]
- prints("A", "B", "C") # Prints A B C
- [/codeblock]
- </description>
- </method>
- <method name="printt" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to the console with a tab between each argument.
- [codeblock]
- printt("A", "B", "C") # Prints A B C
- [/codeblock]
- </description>
- </method>
- <method name="push_error">
- <return type="void">
- </return>
- <argument index="0" name="message" type="String">
- </argument>
- <description>
- Pushes an error message to Godot's built-in debugger and to the OS terminal.
- [codeblock]
- push_error("test error") # Prints "test error" to debugger and terminal as error call
- [/codeblock]
- [b]Note:[/b] Errors printed this way will not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
- </description>
- </method>
- <method name="push_warning">
- <return type="void">
- </return>
- <argument index="0" name="message" type="String">
- </argument>
- <description>
- Pushes a warning message to Godot's built-in debugger and to the OS terminal.
- [codeblock]
- push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call
- [/codeblock]
- </description>
- </method>
- <method name="rad2deg">
- <return type="float">
- </return>
- <argument index="0" name="rad" type="float">
- </argument>
- <description>
- Converts an angle expressed in radians to degrees.
- [codeblock]
- rad2deg(0.523599) # Returns 30.0
- [/codeblock]
- </description>
- </method>
- <method name="rand_seed">
- <return type="Array">
- </return>
- <argument index="0" name="seed" type="int">
- </argument>
- <description>
- Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
- </description>
- </method>
- <method name="randf">
- <return type="float">
- </return>
- <description>
- Returns a random floating point value on the interval [code][0, 1][/code].
- [codeblock]
- randf() # Returns e.g. 0.375671
- [/codeblock]
- </description>
- </method>
- <method name="randf_range">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <description>
- Random range, any floating point value between [code]from[/code] and [code]to[/code].
- [codeblock]
- prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315
- [/codeblock]
- </description>
- </method>
- <method name="randi">
- <return type="int">
- </return>
- <description>
- Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N - 1][/code] (where N is smaller than 2^32).
- [codeblock]
- randi() # Returns random integer between 0 and 2^32 - 1
- randi() % 20 # Returns random integer between 0 and 19
- randi() % 100 # Returns random integer between 0 and 99
- randi() % 100 + 1 # Returns random integer between 1 and 100
- [/codeblock]
- </description>
- </method>
- <method name="randi_range">
- <return type="int">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <argument index="1" name="to" type="int">
- </argument>
- <description>
- Random range, any 32-bit integer value between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code] they are swapped.
- [codeblock]
- print(randi_range(0, 1)) # Prints 0 or 1
- print(randi_range(-10, 1000)) # Prints any number from -10 to 1000
- [/codeblock]
- </description>
- </method>
- <method name="randomize">
- <return type="void">
- </return>
- <description>
- Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
- [codeblock]
- func _ready():
- randomize()
- [/codeblock]
- </description>
- </method>
<method name="range" qualifiers="vararg">
<return type="Array">
</return>
@@ -983,157 +217,6 @@
[/codeblock]
</description>
</method>
- <method name="range_lerp">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="istart" type="float">
- </argument>
- <argument index="2" name="istop" type="float">
- </argument>
- <argument index="3" name="ostart" type="float">
- </argument>
- <argument index="4" name="ostop" type="float">
- </argument>
- <description>
- Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code].
- [codeblock]
- range_lerp(75, 0, 100, -1, 1) # Returns 0.5
- [/codeblock]
- </description>
- </method>
- <method name="round">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds [code]s[/code] to the nearest whole number, with halfway cases rounded away from zero.
- [codeblock]
- a = round(2.49) # a is 2.0
- a = round(2.5) # a is 3.0
- a = round(2.51) # a is 3.0
- [/codeblock]
- See also [method floor], [method ceil], [method snapped], and [int].
- </description>
- </method>
- <method name="seed">
- <return type="void">
- </return>
- <argument index="0" name="seed" type="int">
- </argument>
- <description>
- Sets seed for the random number generator.
- [codeblock]
- my_seed = "Godot Rocks"
- seed(my_seed.hash())
- [/codeblock]
- </description>
- </method>
- <method name="sign">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0.
- [codeblock]
- sign(-6) # Returns -1
- sign(0) # Returns 0
- sign(6) # Returns 1
- [/codeblock]
- </description>
- </method>
- <method name="sin">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the sine of angle [code]s[/code] in radians.
- [codeblock]
- sin(0.523599) # Returns 0.5
- [/codeblock]
- </description>
- </method>
- <method name="sinh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic sine of [code]s[/code].
- [codeblock]
- a = log(2.0) # Returns 0.693147
- sinh(a) # Returns 0.75
- [/codeblock]
- </description>
- </method>
- <method name="smoothstep">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="s" type="float">
- </argument>
- <description>
- Returns the result of smoothly interpolating the value of [code]s[/code] between [code]0[/code] and [code]1[/code], based on the where [code]s[/code] lies with respect to the edges [code]from[/code] and [code]to[/code].
- The return value is [code]0[/code] if [code]s &lt;= from[/code], and [code]1[/code] if [code]s &gt;= to[/code]. If [code]s[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]s[/code] between [code]0[/code] and [code]1[/code].
- This S-shaped curve is the cubic Hermite interpolator, given by [code]f(s) = 3*s^2 - 2*s^3[/code].
- [codeblock]
- smoothstep(0, 2, -5.0) # Returns 0.0
- smoothstep(0, 2, 0.5) # Returns 0.15625
- smoothstep(0, 2, 1.0) # Returns 0.5
- smoothstep(0, 2, 2.0) # Returns 1.0
- [/codeblock]
- </description>
- </method>
- <method name="sqrt">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the square root of [code]s[/code], where [code]s[/code] is a non-negative number.
- [codeblock]
- sqrt(9) # Returns 3
- [/codeblock]
- [b]Note:[/b]Negative values of [code]s[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
- </description>
- </method>
- <method name="step_decimals">
- <return type="int">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
- [codeblock]
- n = step_decimals(5) # n is 0
- n = step_decimals(1.0005) # n is 4
- n = step_decimals(0.000000005) # n is 9
- [/codeblock]
- </description>
- </method>
- <method name="snapped">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <argument index="1" name="step" type="float">
- </argument>
- <description>
- Snaps float value [code]s[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals.
- [codeblock]
- snapped(100, 32) # Returns 96.0
- snapped(3.14159, 0.01) # Returns 3.14
- [/codeblock]
- See also [method ceil], [method floor], [method round], and [int].
- </description>
- </method>
<method name="str" qualifiers="vararg">
<return type="String">
</return>
@@ -1147,200 +230,12 @@
[/codeblock]
</description>
</method>
- <method name="str2var">
- <return type="Variant">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Converts a formatted string that was returned by [method var2str] to the original value.
- [codeblock]
- a = '{ "a": 1, "b": 2 }'
- b = str2var(a)
- print(b["a"]) # Prints 1
- [/codeblock]
- </description>
- </method>
- <method name="tan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the tangent of angle [code]s[/code] in radians.
- [codeblock]
- tan(deg2rad(45)) # Returns 1
- [/codeblock]
- </description>
- </method>
- <method name="tanh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic tangent of [code]s[/code].
- [codeblock]
- a = log(2.0) # a is 0.693147
- b = tanh(a) # b is 0.6
- [/codeblock]
- </description>
- </method>
- <method name="to_json">
- <return type="String">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Converts a [Variant] [code]var[/code] to JSON text and return the result. Useful for serializing data to store or send over the network.
- [codeblock]
- # Both numbers below are integers.
- a = { "a": 1, "b": 2 }
- b = to_json(a)
- print(b) # {"a":1, "b":2}
- # Both numbers above are floats, even if they display without any decimal places.
- [/codeblock]
- [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a [Variant] to JSON text will convert all numerical values to [float] types.
- See also [JSON] for an alternative way to convert a [Variant] to JSON text.
- </description>
- </method>
<method name="type_exists">
<return type="bool">
</return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- Returns whether the given class exists in [ClassDB].
- [codeblock]
- type_exists("Sprite2D") # Returns true
- type_exists("Variant") # Returns false
- [/codeblock]
- </description>
- </method>
- <method name="typeof">
- <return type="int">
- </return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <description>
- Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
- [codeblock]
- p = parse_json('["a", "b", "c"]')
- if typeof(p) == TYPE_ARRAY:
- print(p[0]) # Prints a
- else:
- print("unexpected results")
- [/codeblock]
- </description>
- </method>
- <method name="validate_json">
- <return type="String">
- </return>
- <argument index="0" name="json" type="String">
- </argument>
- <description>
- Checks that [code]json[/code] is valid JSON data. Returns an empty string if valid, or an error message otherwise.
- [codeblock]
- j = to_json([1, 2, 3])
- v = validate_json(j)
- if not v:
- print("Valid JSON.")
- else:
- push_error("Invalid JSON: " + v)
- [/codeblock]
- </description>
- </method>
- <method name="var2bytes">
- <return type="PackedByteArray">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <argument index="1" name="full_objects" type="bool" default="false">
- </argument>
- <description>
- Encodes a variable value to a byte array. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code).
- </description>
- </method>
- <method name="var2str">
- <return type="String">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Converts a Variant [code]var[/code] to a formatted string that can later be parsed using [method str2var].
- [codeblock]
- a = { "a": 1, "b": 2 }
- print(var2str(a))
- [/codeblock]
- prints
- [codeblock]
- {
- "a": 1,
- "b": 2
- }
- [/codeblock]
- </description>
- </method>
- <method name="weakref">
- <return type="WeakRef">
- </return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <description>
- Returns a weak reference to an object.
- A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
- </description>
- </method>
- <method name="wrapf">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
+ <argument index="0" name="type" type="StringName">
</argument>
<description>
- Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
- [codeblock]
- # Infinite loop between 5.0 and 9.9
- value = wrapf(value + 0.1, 5.0, 10.0)
- [/codeblock]
- [codeblock]
- # Infinite rotation (in radians)
- angle = wrapf(angle + 0.1, 0.0, TAU)
- [/codeblock]
- [codeblock]
- # Infinite rotation (in radians)
- angle = wrapf(angle + 0.1, -PI, PI)
- [/codeblock]
- [b]Note:[/b] If [code]min[/code] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
- [code]wrapf[/code] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
- </description>
- </method>
- <method name="wrapi">
- <return type="int">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <argument index="1" name="min" type="int">
- </argument>
- <argument index="2" name="max" type="int">
- </argument>
- <description>
- Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
- [codeblock]
- # Infinite loop between 5 and 9
- frame = wrapi(frame + 1, 5, 10)
- [/codeblock]
- [codeblock]
- # result is -2
- var result = wrapi(-6, -5, -1)
- [/codeblock]
- [b]Note:[/b] If [code]min[/code] is [code]0[/code], this is equivalent to [method posmod], so prefer using that instead.
- [code]wrapi[/code] is more flexible than using the [method posmod] approach by giving the user control over the minimum value.
</description>
</method>
</methods>
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 000fbd0140..4004f1a04c 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -92,7 +92,7 @@
<constant name="MATH_STEP_DECIMALS" value="24" enum="BuiltinFunc">
Return the number of digit places after the decimal that the first non-zero digit occurs.
</constant>
- <constant name="MATH_STEPIFY" value="25" enum="BuiltinFunc">
+ <constant name="MATH_SNAPPED" value="25" enum="BuiltinFunc">
Return the input snapped to a given step.
</constant>
<constant name="MATH_LERP" value="26" enum="BuiltinFunc">