diff options
Diffstat (limited to 'doc')
290 files changed, 5062 insertions, 4871 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 7c863a3563..74c364bad5 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -4,7 +4,7 @@ Global scope constants and variables. </brief_description> <description> - Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. + Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc. Singletons are also documented here, since they can be accessed from anywhere. </description> <tutorials> @@ -30,6 +30,9 @@ <member name="Geometry" type="Geometry" setter="" getter=""> The [Geometry] singleton. </member> + <member name="GodotSharp" type="GodotSharp" setter="" getter=""> + The [GodotSharp] singleton. Only available when using Godot's Mono build. + </member> <member name="IP" type="IP" setter="" getter=""> The [IP] singleton. </member> @@ -50,11 +53,17 @@ The [JavaScript] singleton. [b]Note:[/b] Only implemented on HTML5. </member> - <member name="Marshalls" type="Reference" setter="" getter=""> + <member name="Marshalls" type="Marshalls" setter="" getter=""> The [Marshalls] singleton. </member> - <member name="NavigationMeshGenerator" type="EditorNavigationMeshGenerator" setter="" getter=""> - The [EditorNavigationMeshGenerator] singleton. + <member name="Navigation2DServer" type="Navigation2DServer" setter="" getter=""> + The [Navigation2DServer] singleton. + </member> + <member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter=""> + The [NavigationMeshGenerator] singleton. + </member> + <member name="NavigationServer" type="NavigationServer" setter="" getter=""> + The [NavigationServer] singleton. </member> <member name="OS" type="OS" setter="" getter=""> The [OS] singleton. @@ -137,7 +146,7 @@ Vertical bottom alignment, usually for text-derived classes. </constant> <constant name="SPKEY" value="16777216"> - Scancodes with this bit applied are non-printable. + Keycodes with this bit applied are non-printable. </constant> <constant name="KEY_ESCAPE" value="16777217" enum="KeyList"> Escape key. @@ -1367,7 +1376,7 @@ Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. </constant> <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint"> - Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture"[/code]). Editing it will show a popup menu of valid resource types to instantiate. + Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate. </constant> <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint"> Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed. @@ -1471,70 +1480,94 @@ <constant name="TYPE_VECTOR2" value="5" enum="Variant.Type"> Variable is of type [Vector2]. </constant> - <constant name="TYPE_RECT2" value="6" enum="Variant.Type"> + <constant name="TYPE_VECTOR2I" value="6" enum="Variant.Type"> + Variable is of type [Vector2i]. + </constant> + <constant name="TYPE_RECT2" value="7" enum="Variant.Type"> Variable is of type [Rect2]. </constant> - <constant name="TYPE_VECTOR3" value="7" enum="Variant.Type"> + <constant name="TYPE_RECT2I" value="8" enum="Variant.Type"> + Variable is of type [Rect2i]. + </constant> + <constant name="TYPE_VECTOR3" value="9" enum="Variant.Type"> Variable is of type [Vector3]. </constant> - <constant name="TYPE_TRANSFORM2D" value="8" enum="Variant.Type"> + <constant name="TYPE_VECTOR3I" value="10" enum="Variant.Type"> + Variable is of type [Vector3i]. + </constant> + <constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type"> Variable is of type [Transform2D]. </constant> - <constant name="TYPE_PLANE" value="9" enum="Variant.Type"> + <constant name="TYPE_PLANE" value="12" enum="Variant.Type"> Variable is of type [Plane]. </constant> - <constant name="TYPE_QUAT" value="10" enum="Variant.Type"> + <constant name="TYPE_QUAT" value="13" enum="Variant.Type"> Variable is of type [Quat]. </constant> - <constant name="TYPE_AABB" value="11" enum="Variant.Type"> + <constant name="TYPE_AABB" value="14" enum="Variant.Type"> Variable is of type [AABB]. </constant> - <constant name="TYPE_BASIS" value="12" enum="Variant.Type"> + <constant name="TYPE_BASIS" value="15" enum="Variant.Type"> Variable is of type [Basis]. </constant> - <constant name="TYPE_TRANSFORM" value="13" enum="Variant.Type"> + <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type"> Variable is of type [Transform]. </constant> - <constant name="TYPE_COLOR" value="14" enum="Variant.Type"> + <constant name="TYPE_COLOR" value="17" enum="Variant.Type"> Variable is of type [Color]. </constant> - <constant name="TYPE_NODE_PATH" value="15" enum="Variant.Type"> + <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type"> + Variable is of type [StringName]. + </constant> + <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type"> Variable is of type [NodePath]. </constant> - <constant name="TYPE_RID" value="16" enum="Variant.Type"> + <constant name="TYPE_RID" value="20" enum="Variant.Type"> Variable is of type [RID]. </constant> - <constant name="TYPE_OBJECT" value="17" enum="Variant.Type"> + <constant name="TYPE_OBJECT" value="21" enum="Variant.Type"> Variable is of type [Object]. </constant> - <constant name="TYPE_DICTIONARY" value="18" enum="Variant.Type"> + <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type"> + Variable is of type [Callable]. + </constant> + <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type"> + Variable is of type [Signal]. + </constant> + <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type"> Variable is of type [Dictionary]. </constant> - <constant name="TYPE_ARRAY" value="19" enum="Variant.Type"> + <constant name="TYPE_ARRAY" value="25" enum="Variant.Type"> Variable is of type [Array]. </constant> - <constant name="TYPE_RAW_ARRAY" value="20" enum="Variant.Type"> - Variable is of type [PoolByteArray]. + <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type"> + Variable is of type [PackedByteArray]. + </constant> + <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type"> + Variable is of type [PackedInt32Array]. + </constant> + <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type"> + Variable is of type [PackedInt64Array]. </constant> - <constant name="TYPE_INT_ARRAY" value="21" enum="Variant.Type"> - Variable is of type [PoolIntArray]. + <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type"> + Variable is of type [PackedFloat32Array]. </constant> - <constant name="TYPE_REAL_ARRAY" value="22" enum="Variant.Type"> - Variable is of type [PoolRealArray]. + <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type"> + Variable is of type [PackedFloat64Array]. </constant> - <constant name="TYPE_STRING_ARRAY" value="23" enum="Variant.Type"> - Variable is of type [PoolStringArray]. + <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type"> + Variable is of type [PackedStringArray]. </constant> - <constant name="TYPE_VECTOR2_ARRAY" value="24" enum="Variant.Type"> - Variable is of type [PoolVector2Array]. + <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type"> + Variable is of type [PackedVector2Array]. </constant> - <constant name="TYPE_VECTOR3_ARRAY" value="25" enum="Variant.Type"> - Variable is of type [PoolVector3Array]. + <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type"> + Variable is of type [PackedVector3Array]. </constant> - <constant name="TYPE_COLOR_ARRAY" value="26" enum="Variant.Type"> - Variable is of type [PoolColorArray]. + <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type"> + Variable is of type [PackedColorArray]. </constant> - <constant name="TYPE_MAX" value="27" enum="Variant.Type"> + <constant name="TYPE_MAX" value="35" enum="Variant.Type"> Represents the size of the [enum Variant.Type] enum. </constant> <constant name="OP_EQUAL" value="0" enum="Variant.Operator"> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index d9757ad023..0727bda668 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -26,7 +26,7 @@ </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc). diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index a151f8d652..9225717978 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -34,7 +34,7 @@ </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the controller or anchor point's name if available. diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 6f0e4488fa..6db7121858 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -120,21 +120,21 @@ </members> <signals> <signal name="interface_added"> - <argument index="0" name="interface_name" type="String"> + <argument index="0" name="interface_name" type="StringName"> </argument> <description> Emitted when a new interface has been added. </description> </signal> <signal name="interface_removed"> - <argument index="0" name="interface_name" type="String"> + <argument index="0" name="interface_name" type="StringName"> </argument> <description> Emitted when an interface is removed. </description> </signal> <signal name="tracker_added"> - <argument index="0" name="tracker_name" type="String"> + <argument index="0" name="tracker_name" type="StringName"> </argument> <argument index="1" name="type" type="int"> </argument> @@ -145,7 +145,7 @@ </description> </signal> <signal name="tracker_removed"> - <argument index="0" name="tracker_name" type="String"> + <argument index="0" name="tracker_name" type="StringName"> </argument> <argument index="1" name="type" type="int"> </argument> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index ccbb033444..e930abba87 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -152,7 +152,7 @@ </description> </method> <method name="get_id_path"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="from_id" type="int"> </argument> @@ -185,7 +185,7 @@ </description> </method> <method name="get_point_connections"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="id" type="int"> </argument> @@ -213,7 +213,7 @@ </description> </method> <method name="get_point_path"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from_id" type="int"> </argument> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index d620ef2a79..2639f62552 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -111,7 +111,7 @@ </description> </method> <method name="get_id_path"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="from_id" type="int"> </argument> @@ -144,7 +144,7 @@ </description> </method> <method name="get_point_connections"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="id" type="int"> </argument> @@ -172,7 +172,7 @@ </description> </method> <method name="get_point_path"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from_id" type="int"> </argument> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index b0b9c155bb..01540383dc 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -76,7 +76,7 @@ </description> </signal> <signal name="custom_action"> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Emitted when a custom button is pressed. See [method add_button]. diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index ff56067cda..03c23b6fdd 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -19,7 +19,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="anim" type="String" default=""""> + <argument index="0" name="anim" type="StringName" default="@"""> </argument> <argument index="1" name="backwards" type="bool" default="false"> </argument> @@ -36,7 +36,7 @@ </method> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""default""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default""> The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> @@ -60,6 +60,10 @@ <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false"> If [code]true[/code], the [member animation] is currently playing. </member> + <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0"> + </member> + <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )"> + </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. </member> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index e24119c6c7..ad9706a52a 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -19,7 +19,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="anim" type="String" default=""""> + <argument index="0" name="anim" type="StringName" default="@"""> </argument> <description> Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. @@ -34,7 +34,7 @@ </method> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""default""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default""> The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index d4c25049d2..b851c76e59 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimatedTexture" inherits="Texture" version="4.0"> +<class name="AnimatedTexture" inherits="Texture2D" version="4.0"> <brief_description> Proxy texture for simple frame-based animations. </brief_description> <description> - [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet]. + [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet]. The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. [AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. Also, it doesn't support [AtlasTexture]. Each frame needs to be separate image. </description> @@ -21,12 +21,12 @@ </description> </method> <method name="get_frame_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="frame" type="int"> </argument> <description> - Returns the given frame's [Texture]. + Returns the given frame's [Texture2D]. </description> </method> <method name="set_frame_delay"> @@ -52,16 +52,15 @@ </return> <argument index="0" name="frame" type="int"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1. + Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1. You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation. </description> </method> </methods> <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> <member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0"> Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index c3d9216657..0926ef9855 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -14,7 +14,7 @@ animation.track_insert_key(track_index, 0.0, 0) animation.track_insert_key(track_index, 0.5, 100) [/codeblock] - Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. + Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> @@ -32,7 +32,7 @@ </description> </method> <method name="animation_track_get_key_animation" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="track_idx" type="int"> </argument> @@ -48,7 +48,7 @@ </argument> <argument index="1" name="time" type="float"> </argument> - <argument index="2" name="animation" type="String"> + <argument index="2" name="animation" type="StringName"> </argument> <description> </description> @@ -60,7 +60,7 @@ </argument> <argument index="1" name="key_idx" type="int"> </argument> - <argument index="2" name="animation" type="String"> + <argument index="2" name="animation" type="StringName"> </argument> <description> </description> @@ -274,7 +274,7 @@ </description> </method> <method name="method_track_get_key_indices" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="track_idx" type="int"> </argument> @@ -287,7 +287,7 @@ </description> </method> <method name="method_track_get_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="track_idx" type="int"> </argument> @@ -627,7 +627,7 @@ </description> </method> <method name="value_track_get_key_indices" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="track_idx" type="int"> </argument> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 331a30bd9e..3d6ebd5934 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -23,7 +23,7 @@ <method name="blend_animation"> <return type="void"> </return> - <argument index="0" name="animation" type="String"> + <argument index="0" name="animation" type="StringName"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -59,7 +59,7 @@ <method name="blend_node"> <return type="float"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="node" type="AnimationNode"> </argument> @@ -119,7 +119,7 @@ <method name="get_parameter" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. @@ -128,7 +128,7 @@ <method name="get_parameter_default_value" qualifiers="virtual"> <return type="Variant"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. @@ -142,7 +142,7 @@ </description> </method> <method name="has_filter" qualifiers="virtual"> - <return type="String"> + <return type="bool"> </return> <description> Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node. @@ -193,7 +193,7 @@ <method name="set_parameter"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 369969a2d4..ab44148c15 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"""> Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. </member> </members> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 5a86af6865..0befb79577 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -11,7 +11,7 @@ <method name="add_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="node" type="AnimationNode"> </argument> @@ -23,11 +23,11 @@ <method name="connect_node"> <return type="void"> </return> - <argument index="0" name="input_node" type="String"> + <argument index="0" name="input_node" type="StringName"> </argument> <argument index="1" name="input_index" type="int"> </argument> - <argument index="2" name="output_node" type="String"> + <argument index="2" name="output_node" type="StringName"> </argument> <description> </description> @@ -35,7 +35,7 @@ <method name="disconnect_node"> <return type="void"> </return> - <argument index="0" name="input_node" type="String"> + <argument index="0" name="input_node" type="StringName"> </argument> <argument index="1" name="input_index" type="int"> </argument> @@ -45,7 +45,7 @@ <method name="get_node" qualifiers="const"> <return type="AnimationNode"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -53,7 +53,7 @@ <method name="get_node_position" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -61,7 +61,7 @@ <method name="has_node" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -69,7 +69,7 @@ <method name="remove_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -77,9 +77,9 @@ <method name="rename_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> </description> @@ -87,7 +87,7 @@ <method name="set_node_position"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="position" type="Vector2"> </argument> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 39a9af5ead..b647ff70b8 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -18,7 +18,7 @@ <method name="add_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="node" type="AnimationNode"> </argument> @@ -31,9 +31,9 @@ <method name="add_transition"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> - <argument index="1" name="to" type="String"> + <argument index="1" name="to" type="StringName"> </argument> <argument index="2" name="transition" type="AnimationNodeStateMachineTransition"> </argument> @@ -58,14 +58,14 @@ <method name="get_node" qualifiers="const"> <return type="AnimationNode"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the animation node with the given name. </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="node" type="AnimationNode"> </argument> @@ -76,7 +76,7 @@ <method name="get_node_position" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the given node's coordinates. Used for display in the editor. @@ -106,7 +106,7 @@ </description> </method> <method name="get_transition_from" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -115,7 +115,7 @@ </description> </method> <method name="get_transition_to" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -126,7 +126,7 @@ <method name="has_node" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the graph contains the given node. @@ -135,9 +135,9 @@ <method name="has_transition" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> - <argument index="1" name="to" type="String"> + <argument index="1" name="to" type="StringName"> </argument> <description> Returns [code]true[/code] if there is a transition between the given nodes. @@ -146,7 +146,7 @@ <method name="remove_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Deletes the given node from the graph. @@ -155,9 +155,9 @@ <method name="remove_transition"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> - <argument index="1" name="to" type="String"> + <argument index="1" name="to" type="StringName"> </argument> <description> Deletes the transition between the two specified nodes. @@ -175,9 +175,9 @@ <method name="rename_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> Renames the given node. @@ -186,7 +186,7 @@ <method name="set_end_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Sets the given node as the graph end point. @@ -204,7 +204,7 @@ <method name="set_node_position"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="position" type="Vector2"> </argument> @@ -215,7 +215,7 @@ <method name="set_start_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Sets the given node as the graph start point. diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 0198237bed..f4b89a5086 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -16,14 +16,14 @@ </tutorials> <methods> <method name="get_current_node" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the currently playing animation state. </description> </method> <method name="get_travel_path" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the current travel path as computed internally by the A* algorithm. @@ -39,7 +39,7 @@ <method name="start"> <return type="void"> </return> - <argument index="0" name="node" type="String"> + <argument index="0" name="node" type="StringName"> </argument> <description> Starts playing the given animation. @@ -55,7 +55,7 @@ <method name="travel"> <return type="void"> </return> - <argument index="0" name="to_node" type="String"> + <argument index="0" name="to_node" type="StringName"> </argument> <description> Transitions from the current state to another one, following the shortest path. diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index d40a6f1e46..f0b7cc4099 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -10,7 +10,7 @@ <methods> </methods> <members> - <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition" default=""""> + <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@"""> Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: [codeblock] $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0) diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 3e8315f686..1420b1bf64 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -16,7 +16,7 @@ <method name="add_animation"> <return type="int" enum="Error"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="animation" type="Animation"> </argument> @@ -34,9 +34,9 @@ </description> </method> <method name="animation_get_next" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> <description> Returns the name of the next animation in the queue. @@ -45,9 +45,9 @@ <method name="animation_set_next"> <return type="void"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> - <argument index="1" name="anim_to" type="String"> + <argument index="1" name="anim_to" type="StringName"> </argument> <description> Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes. @@ -68,7 +68,7 @@ </description> </method> <method name="find_animation" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="animation" type="Animation"> </argument> @@ -79,14 +79,14 @@ <method name="get_animation" qualifiers="const"> <return type="Animation"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found. </description> </method> <method name="get_animation_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the list of stored animation names. @@ -95,9 +95,9 @@ <method name="get_blend_time" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> - <argument index="1" name="anim_to" type="String"> + <argument index="1" name="anim_to" type="StringName"> </argument> <description> Gets the blend time (in seconds) between two animations, referenced by their names. @@ -111,7 +111,7 @@ </description> </method> <method name="get_queue"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns a list of the animation names that are currently queued to play. @@ -120,7 +120,7 @@ <method name="has_animation" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code]. @@ -136,7 +136,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="name" type="String" default=""""> + <argument index="0" name="name" type="StringName" default=""""> </argument> <argument index="1" name="custom_blend" type="float" default="-1"> </argument> @@ -153,7 +153,7 @@ <method name="play_backwards"> <return type="void"> </return> - <argument index="0" name="name" type="String" default=""""> + <argument index="0" name="name" type="StringName" default=""""> </argument> <argument index="1" name="custom_blend" type="float" default="-1"> </argument> @@ -165,7 +165,7 @@ <method name="queue"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Queues an animation for playback once the current one is done. @@ -175,7 +175,7 @@ <method name="remove_animation"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Removes the animation with key [code]name[/code]. @@ -184,9 +184,9 @@ <method name="rename_animation"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="newname" type="String"> + <argument index="1" name="newname" type="StringName"> </argument> <description> Renames an existing animation with key [code]name[/code] to [code]newname[/code]. @@ -206,9 +206,9 @@ <method name="set_blend_time"> <return type="void"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> - <argument index="1" name="anim_to" type="String"> + <argument index="1" name="anim_to" type="StringName"> </argument> <argument index="2" name="sec" type="float"> </argument> @@ -264,23 +264,23 @@ </members> <signals> <signal name="animation_changed"> - <argument index="0" name="old_name" type="String"> + <argument index="0" name="old_name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> If the currently being played animation changes, this signal will notify of such change. </description> </signal> <signal name="animation_finished"> - <argument index="0" name="anim_name" type="String"> + <argument index="0" name="anim_name" type="StringName"> </argument> <description> Notifies when an animation finished playing. </description> </signal> <signal name="animation_started"> - <argument index="0" name="anim_name" type="String"> + <argument index="0" name="anim_name" type="StringName"> </argument> <description> Notifies when an animation starts playing. diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml deleted file mode 100644 index e09e646960..0000000000 --- a/doc/classes/AnimationTreePlayer.xml +++ /dev/null @@ -1,656 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationTreePlayer" inherits="Node" version="4.0"> - <brief_description> - Animation player that uses a node graph for blending animations. - </brief_description> - <description> - A node graph tool for blending multiple animations bound to an [AnimationPlayer]. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. - It takes [Animation]s from an [AnimationPlayer] node and mixes them depending on the graph. - </description> - <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> - </tutorials> - <methods> - <method name="add_node"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType"> - </argument> - <argument index="1" name="id" type="String"> - </argument> - <description> - Adds a [code]type[/code] node to the graph with name [code]id[/code]. - </description> - </method> - <method name="advance"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <description> - Shifts position in the animation timeline. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. - </description> - </method> - <method name="animation_node_get_animation" qualifiers="const"> - <return type="Animation"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the [AnimationPlayer]'s [Animation] bound to the [AnimationTreePlayer]'s animation node with name [code]id[/code]. - </description> - </method> - <method name="animation_node_get_master_animation" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the name of the [member master_player]'s [Animation] bound to this animation node. - </description> - </method> - <method name="animation_node_get_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the absolute playback timestamp of the animation node with name [code]id[/code]. - </description> - </method> - <method name="animation_node_set_animation"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="animation" type="Animation"> - </argument> - <description> - Binds a new [Animation] from the [member master_player] to the [AnimationTreePlayer]'s animation node with name [code]id[/code]. - </description> - </method> - <method name="animation_node_set_filter_path"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="path" type="NodePath"> - </argument> - <argument index="2" name="enable" type="bool"> - </argument> - <description> - If [code]enable[/code] is [code]true[/code], the animation node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. - </description> - </method> - <method name="animation_node_set_master_animation"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="source" type="String"> - </argument> - <description> - Binds the [Animation] named [code]source[/code] from [member master_player] to the animation node [code]id[/code]. Recalculates caches. - </description> - </method> - <method name="are_nodes_connected" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="dst_id" type="String"> - </argument> - <argument index="2" name="dst_input_idx" type="int"> - </argument> - <description> - Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot. - </description> - </method> - <method name="blend2_node_get_amount" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the blend amount of a Blend2 node given its name. - </description> - </method> - <method name="blend2_node_set_amount"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="blend" type="float"> - </argument> - <description> - Sets the blend amount of a Blend2 node given its name and value. - A Blend2 node blends two animations (A and B) with the amount between 0 and 1. - At 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B. - </description> - </method> - <method name="blend2_node_set_filter_path"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="path" type="NodePath"> - </argument> - <argument index="2" name="enable" type="bool"> - </argument> - <description> - If [code]enable[/code] is [code]true[/code], the Blend2 node with name [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. - </description> - </method> - <method name="blend3_node_get_amount" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the blend amount of a Blend3 node given its name. - </description> - </method> - <method name="blend3_node_set_amount"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="blend" type="float"> - </argument> - <description> - Sets the blend amount of a Blend3 node given its name and value. - A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1. - At -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+. - </description> - </method> - <method name="blend4_node_get_amount" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the blend amount of a Blend4 node given its name. - </description> - </method> - <method name="blend4_node_set_amount"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="blend" type="Vector2"> - </argument> - <description> - Sets the blend amount of a Blend4 node given its name and value. - A Blend4 Node blends two pairs of animations. - The two pairs are blended like Blend2 and then added together. - </description> - </method> - <method name="connect_nodes"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="dst_id" type="String"> - </argument> - <argument index="2" name="dst_input_idx" type="int"> - </argument> - <description> - Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot. - </description> - </method> - <method name="disconnect_nodes"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="dst_input_idx" type="int"> - </argument> - <description> - Disconnects nodes connected to [code]id[/code] at the specified input slot. - </description> - </method> - <method name="get_node_list"> - <return type="PoolStringArray"> - </return> - <description> - Returns a [PoolStringArray] containing the name of all nodes. - </description> - </method> - <method name="mix_node_get_amount" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the mix amount of a Mix node given its name. - </description> - </method> - <method name="mix_node_set_amount"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="ratio" type="float"> - </argument> - <description> - Sets the mix amount of a Mix node given its name and value. - A Mix node adds input b to input a by the amount given by ratio. - </description> - </method> - <method name="node_exists" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="node" type="String"> - </argument> - <description> - Check if a node exists (by name). - </description> - </method> - <method name="node_get_input_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the input count for a given node. Different types of nodes have different amount of inputs. - </description> - </method> - <method name="node_get_input_source" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <description> - Returns the input source for a given node input. - </description> - </method> - <method name="node_get_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns position of a node in the graph given its name. - </description> - </method> - <method name="node_get_type" qualifiers="const"> - <return type="int" enum="AnimationTreePlayer.NodeType"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Gets the node type, will return from [enum NodeType] enum. - </description> - </method> - <method name="node_rename"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="node" type="String"> - </argument> - <argument index="1" name="new_name" type="String"> - </argument> - <description> - Renames a node in the graph. - </description> - </method> - <method name="node_set_position"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="screen_position" type="Vector2"> - </argument> - <description> - Sets the position of a node in the graph given its name and position. - </description> - </method> - <method name="oneshot_node_get_autorestart_delay" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the autostart delay of a OneShot node given its name. - </description> - </method> - <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the autostart random delay of a OneShot node given its name. - </description> - </method> - <method name="oneshot_node_get_fadein_time" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the fade in time of a OneShot node given its name. - </description> - </method> - <method name="oneshot_node_get_fadeout_time" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the fade out time of a OneShot node given its name. - </description> - </method> - <method name="oneshot_node_has_autorestart" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns whether a OneShot node will auto restart given its name. - </description> - </method> - <method name="oneshot_node_is_active" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns whether a OneShot node is active given its name. - </description> - </method> - <method name="oneshot_node_set_autorestart"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <description> - Sets the autorestart property of a OneShot node given its name and value. - </description> - </method> - <method name="oneshot_node_set_autorestart_delay"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="delay_sec" type="float"> - </argument> - <description> - Sets the autorestart delay of a OneShot node given its name and value in seconds. - </description> - </method> - <method name="oneshot_node_set_autorestart_random_delay"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="rand_sec" type="float"> - </argument> - <description> - Sets the autorestart random delay of a OneShot node given its name and value in seconds. - </description> - </method> - <method name="oneshot_node_set_fadein_time"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> - <description> - Sets the fade in time of a OneShot node given its name and value in seconds. - </description> - </method> - <method name="oneshot_node_set_fadeout_time"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> - <description> - Sets the fade out time of a OneShot node given its name and value in seconds. - </description> - </method> - <method name="oneshot_node_set_filter_path"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="path" type="NodePath"> - </argument> - <argument index="2" name="enable" type="bool"> - </argument> - <description> - If [code]enable[/code] is [code]true[/code], the OneShot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. - </description> - </method> - <method name="oneshot_node_start"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Starts a OneShot node given its name. - </description> - </method> - <method name="oneshot_node_stop"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Stops the OneShot node with name [code]id[/code]. - </description> - </method> - <method name="recompute_caches"> - <return type="void"> - </return> - <description> - Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state. - </description> - </method> - <method name="remove_node"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Removes the animation node with name [code]id[/code]. - </description> - </method> - <method name="reset"> - <return type="void"> - </return> - <description> - Resets this [AnimationTreePlayer]. - </description> - </method> - <method name="timescale_node_get_scale" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the time scale value of the TimeScale node with name [code]id[/code]. - </description> - </method> - <method name="timescale_node_set_scale"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="scale" type="float"> - </argument> - <description> - Sets the time scale of the TimeScale node with name [code]id[/code] to [code]scale[/code]. - The TimeScale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1. - If applied after a blend or mix, affects all input animations to that blend or mix. - </description> - </method> - <method name="timeseek_node_seek"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="seconds" type="float"> - </argument> - <description> - Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code]. - This functions as a seek in the [Animation] or the blend or mix of [Animation]s input in it. - </description> - </method> - <method name="transition_node_delete_input"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="input_idx" type="int"> - </argument> - <description> - Deletes the input at [code]input_idx[/code] for the transition node with name [code]id[/code]. - </description> - </method> - <method name="transition_node_get_current" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the index of the currently evaluated input for the transition node with name [code]id[/code]. - </description> - </method> - <method name="transition_node_get_input_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the number of inputs for the transition node with name [code]id[/code]. You can add inputs by right-clicking on the transition node. - </description> - </method> - <method name="transition_node_get_xfade_time" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <description> - Returns the cross fade time for the transition node with name [code]id[/code]. - </description> - </method> - <method name="transition_node_has_input_auto_advance" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="input_idx" type="int"> - </argument> - <description> - Returns [code]true[/code] if the input at [code]input_idx[/code] on the transition node with name [code]id[/code] is set to automatically advance to the next input upon completion. - </description> - </method> - <method name="transition_node_set_current"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="input_idx" type="int"> - </argument> - <description> - The transition node with name [code]id[/code] sets its current input at [code]input_idx[/code]. - </description> - </method> - <method name="transition_node_set_input_auto_advance"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="input_idx" type="int"> - </argument> - <argument index="2" name="enable" type="bool"> - </argument> - <description> - The transition node with name [code]id[/code] advances to its next input automatically when the input at [code]input_idx[/code] completes. - </description> - </method> - <method name="transition_node_set_input_count"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="count" type="int"> - </argument> - <description> - Resizes the number of inputs available for the transition node with name [code]id[/code]. - </description> - </method> - <method name="transition_node_set_xfade_time"> - <return type="void"> - </return> - <argument index="0" name="id" type="String"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> - <description> - The transition node with name [code]id[/code] sets its cross fade time to [code]time_sec[/code]. - </description> - </method> - </methods> - <members> - <member name="active" type="bool" setter="set_active" getter="is_active" default="false"> - If [code]true[/code], the [AnimationTreePlayer] is able to play animations. - </member> - <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path" default="NodePath("..")"> - The node from which to relatively access other nodes. - It accesses the bones, so it should point to the same node the [AnimationPlayer] would point its Root Node at. - </member> - <member name="master_player" type="NodePath" setter="set_master_player" getter="get_master_player" default="NodePath("")"> - The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes. - Once set, [Animation] nodes can be added to the [AnimationTreePlayer]. - </member> - <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode" default="1"> - The thread in which to update animations. - </member> - </members> - <constants> - <constant name="NODE_OUTPUT" value="0" enum="NodeType"> - Output node. - </constant> - <constant name="NODE_ANIMATION" value="1" enum="NodeType"> - Animation node. - </constant> - <constant name="NODE_ONESHOT" value="2" enum="NodeType"> - OneShot node. - </constant> - <constant name="NODE_MIX" value="3" enum="NodeType"> - Mix node. - </constant> - <constant name="NODE_BLEND2" value="4" enum="NodeType"> - Blend2 node. - </constant> - <constant name="NODE_BLEND3" value="5" enum="NodeType"> - Blend3 node. - </constant> - <constant name="NODE_BLEND4" value="6" enum="NodeType"> - Blend4 node. - </constant> - <constant name="NODE_TIMESCALE" value="7" enum="NodeType"> - TimeScale node. - </constant> - <constant name="NODE_TIMESEEK" value="8" enum="NodeType"> - TimeSeek node. - </constant> - <constant name="NODE_TRANSITION" value="9" enum="NodeType"> - Transition node. - </constant> - <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode"> - Process animation during the physics process. This is especially useful when animating physics bodies. - </constant> - <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode"> - Process animation during the idle process. - </constant> - </constants> -</class> diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index f2f9284ae3..b273a7a9d9 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -89,7 +89,7 @@ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" default=""Master""> + <member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@"Master""> The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> @@ -131,7 +131,7 @@ <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false"> If [code]true[/code], the area applies reverb to its associated audio. </member> - <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus" default=""Master""> + <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@"Master""> The reverb bus name to use for this area's associated audio. </member> <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 715e9b3286..0c1317f19d 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -90,7 +90,7 @@ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name" default=""Master""> + <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@"Master""> The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 08455bb7bc..234949277a 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -14,6 +14,12 @@ array[2] = "Three" print(array[-2]) # Three. [/codeblock] + Arrays can be concatenated using the [code]+[/code] operator: + [codeblock] + var array1 = ["One", 2] + var array2 = [3, "Four"] + print(array1 + array2) # ["One", 2, 3, "Four"] + [/codeblock] Arrays are always passed by reference. </description> <tutorials> @@ -22,67 +28,87 @@ <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolColorArray"> + <argument index="0" name="from" type="PackedColorArray"> + </argument> + <description> + Constructs an array from a [PackedColorArray]. + </description> + </method> + <method name="Array"> + <return type="Array"> + </return> + <argument index="0" name="from" type="PackedVector3Array"> + </argument> + <description> + Constructs an array from a [PackedVector3Array]. + </description> + </method> + <method name="Array"> + <return type="Array"> + </return> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs an array from a [PoolColorArray]. + Constructs an array from a [PackedVector2Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolVector3Array"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs an array from a [PoolVector3Array]. + Constructs an array from a [PackedStringArray]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolVector2Array"> + <argument index="0" name="from" type="PackedFloat64Array"> </argument> <description> - Constructs an array from a [PoolVector2Array]. + Constructs an array from a [PackedFloat64Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolStringArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs an array from a [PoolStringArray]. + Constructs an array from a [PackedFloat32Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolRealArray"> + <argument index="0" name="from" type="PackedInt64Array"> </argument> <description> - Constructs an array from a [PoolRealArray]. + Constructs an array from a [PackedInt64Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolIntArray"> + <argument index="0" name="from" type="PackedInt32Array"> </argument> <description> - Constructs an array from a [PoolIntArray]. + Constructs an array from a [PackedInt32Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolByteArray"> + <argument index="0" name="from" type="PackedByteArray"> </argument> <description> - Constructs an array from a [PoolByteArray]. + Constructs an array from a [PackedByteArray]. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -90,7 +116,7 @@ </description> </method> <method name="back"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the last element of the array, or [code]null[/code] if the array is empty. @@ -125,6 +151,8 @@ </description> </method> <method name="clear"> + <return type="void"> + </return> <description> Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]. </description> @@ -156,6 +184,8 @@ </description> </method> <method name="erase"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -183,7 +213,7 @@ </description> </method> <method name="front"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the first element of the array, or [code]null[/code] if the array is empty. @@ -212,6 +242,8 @@ </description> </method> <method name="insert"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <argument index="1" name="value" type="Variant"> @@ -221,39 +253,43 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="max"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="min"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="pop_back"> - <return type="Variant"> + <return type="void"> </return> <description> Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="pop_front"> - <return type="Variant"> + <return type="void"> </return> <description> Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -261,6 +297,8 @@ </description> </method> <method name="push_front"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -268,6 +306,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <description> @@ -275,6 +315,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="size" type="int"> </argument> <description> @@ -293,6 +335,8 @@ </description> </method> <method name="shuffle"> + <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. </description> @@ -320,6 +364,8 @@ </description> </method> <method name="sort"> + <return type="void"> + </return> <description> Sorts the array. [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: @@ -331,6 +377,8 @@ </description> </method> <method name="sort_custom"> + <return type="void"> + </return> <argument index="0" name="obj" type="Object"> </argument> <argument index="1" name="func" type="String"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 821c6db717..33b62054df 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -7,7 +7,7 @@ The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle: [codeblock] - var vertices = PoolVector3Array() + var vertices = PackedVector3Array() vertices.push_back(Vector3(0, 1, 0)) vertices.push_back(Vector3(1, 0, 0)) vertices.push_back(Vector3(0, 0, 1)) @@ -30,7 +30,7 @@ <method name="add_blend_shape"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. @@ -45,7 +45,11 @@ </argument> <argument index="2" name="blend_shapes" type="Array" default="[ ]"> </argument> - <argument index="3" name="compress_flags" type="int" default="97280"> + <argument index="3" name="lods" type="Dictionary" default="{ + +}"> + </argument> + <argument index="4" name="compress_flags" type="int" default="31744"> </argument> <description> Creates a new surface. @@ -62,6 +66,12 @@ Removes all blend shapes from this [ArrayMesh]. </description> </method> + <method name="clear_surfaces"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="get_blend_shape_count" qualifiers="const"> <return type="int"> </return> @@ -70,7 +80,7 @@ </description> </method> <method name="get_blend_shape_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="index" type="int"> </argument> @@ -150,15 +160,6 @@ Returns the primitive type of the requested surface (see [method add_surface_from_arrays]). </description> </method> - <method name="surface_remove"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <description> - Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down. - </description> - </method> <method name="surface_set_name"> <return type="void"> </return> @@ -177,7 +178,7 @@ </argument> <argument index="1" name="offset" type="int"> </argument> - <argument index="2" name="data" type="PoolByteArray"> + <argument index="2" name="data" type="PackedByteArray"> </argument> <description> Updates a specified region of mesh arrays on the GPU. @@ -201,31 +202,31 @@ Amount of weights/bone indices per vertex (always 4). </constant> <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> - [PoolVector3Array], [PoolVector2Array], or [Array] of vertex positions. + [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions. </constant> <constant name="ARRAY_NORMAL" value="1" enum="ArrayType"> - [PoolVector3Array] of vertex normals. + [PackedVector3Array] of vertex normals. </constant> <constant name="ARRAY_TANGENT" value="2" enum="ArrayType"> - [PoolRealArray] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. + [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. </constant> <constant name="ARRAY_COLOR" value="3" enum="ArrayType"> - [PoolColorArray] of vertex colors. + [PackedColorArray] of vertex colors. </constant> <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType"> - [PoolVector2Array] for UV coordinates. + [PackedVector2Array] for UV coordinates. </constant> <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> - [PoolVector2Array] for second UV coordinates. + [PackedVector2Array] for second UV coordinates. </constant> <constant name="ARRAY_BONES" value="6" enum="ArrayType"> - [PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of 4 floats. + [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats. </constant> <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType"> - [PoolRealArray] of bone weights. Each element in groups of 4 floats. + [PackedFloat32Array] of bone weights. Each element in groups of 4 floats. </constant> <constant name="ARRAY_INDEX" value="8" enum="ArrayType"> - [PoolIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. </constant> <constant name="ARRAY_MAX" value="9" enum="ArrayType"> diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index 7150490371..5bc077ef49 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -1,23 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AtlasTexture" inherits="Texture" version="4.0"> +<class name="AtlasTexture" inherits="Texture2D" version="4.0"> <brief_description> Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls. </brief_description> <description> - [Texture] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture. + [Texture2D] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture2D], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas"> - The texture that contains the atlas. Can be any [Texture] subtype. + <member name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas"> + The texture that contains the atlas. Can be any [Texture2D] subtype. </member> <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false"> If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels. </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )"> The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin. </member> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index fe0d63777f..3117978d8a 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -32,7 +32,7 @@ <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0"> Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. </member> - <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" default=""""> + <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="@"""> Reduce the sound level using another audio bus for threshold detection. </member> <member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0"> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 72acf616a9..49c6f5bb34 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -107,7 +107,7 @@ <method name="get_bus_index" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="bus_name" type="String"> + <argument index="0" name="bus_name" type="StringName"> </argument> <description> Returns the index of the bus with the name [code]bus_name[/code]. @@ -145,7 +145,7 @@ </description> </method> <method name="get_bus_send" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="bus_idx" type="int"> </argument> @@ -341,7 +341,7 @@ </return> <argument index="0" name="bus_idx" type="int"> </argument> - <argument index="1" name="send" type="String"> + <argument index="1" name="send" type="StringName"> </argument> <description> Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code]. diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index 2552cd50a4..e3e17b8a93 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -37,7 +37,7 @@ <method name="push_buffer"> <return type="bool"> </return> - <argument index="0" name="frames" type="PoolVector2Array"> + <argument index="0" name="frames" type="PackedVector2Array"> </argument> <description> </description> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 2d65defad3..eab6505734 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -54,7 +54,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 66254b504a..fdbef1b89e 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -60,7 +60,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Bus on which this audio is playing. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0"> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index f476bec323..4ec8dba2c6 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -66,7 +66,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Bus on which this audio is playing. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0"> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 898879ae27..6d99433c90 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -22,7 +22,7 @@ </method> </methods> <members> - <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )"> + <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )"> Contains the audio data in bytes. [b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. </member> diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml deleted file mode 100644 index 587ff7f304..0000000000 --- a/doc/classes/BakedLightmap.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="BakedLightmap" inherits="VisualInstance" version="4.0"> - <brief_description> - Prerendered indirect light map for a scene. - </brief_description> - <description> - Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the [GIProbe] approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time. - </description> - <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/baked_lightmaps.html</link> - </tutorials> - <methods> - <method name="bake"> - <return type="int" enum="BakedLightmap.BakeError"> - </return> - <argument index="0" name="from_node" type="Node" default="null"> - </argument> - <argument index="1" name="create_visual_debug" type="bool" default="false"> - </argument> - <description> - Bakes the lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed. - </description> - </method> - <method name="debug_bake"> - <return type="void"> - </return> - <description> - Executes a dry run bake of lightmaps within the currently edited scene. - </description> - </method> - </methods> - <members> - <member name="bake_cell_size" type="float" setter="set_bake_cell_size" getter="get_bake_cell_size" default="0.25"> - Grid subdivision size for lightmapper calculation. The default value will work for most cases. Increase for better lighting on small details or if your scene is very large. - </member> - <member name="bake_default_texels_per_unit" type="float" setter="set_bake_default_texels_per_unit" getter="get_bake_default_texels_per_unit" default="20.0"> - If a [member Mesh.lightmap_size_hint] isn't specified, the lightmap baker will dynamically set the lightmap size using this value. This value is measured in texels per world unit. The maximum lightmap texture size is 4096x4096. - </member> - <member name="bake_energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> - Multiplies the light sources' intensity by this value. For instance, if the value is set to 2, lights will be twice as bright. If the value is set to 0.5, lights will be half as bright. - </member> - <member name="bake_extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> - The size of the affected area. - </member> - <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr" default="false"> - If [code]true[/code], the lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller file size. - </member> - <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode" default="0"> - Lightmapping mode. See [enum BakeMode]. - </member> - <member name="bake_propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0"> - Defines how far the light will travel before it is no longer effective. The higher the number, the farther the light will travel. For instance, if the value is set to 2, the light will go twice as far. If the value is set to 0.5, the light will only go half as far. - </member> - <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1"> - Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality]. - </member> - <member name="capture_cell_size" type="float" setter="set_capture_cell_size" getter="get_capture_cell_size" default="0.5"> - Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size]. - </member> - <member name="image_path" type="String" setter="set_image_path" getter="get_image_path" default="".""> - The location where lightmaps will be saved. - </member> - <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data"> - The calculated light data. - </member> - </members> - <constants> - <constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality"> - The lowest bake quality mode. Fastest to calculate. - </constant> - <constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality"> - The default bake quality mode. - </constant> - <constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality"> - The highest bake quality mode. Takes longer to calculate. - </constant> - <constant name="BAKE_MODE_CONE_TRACE" value="0" enum="BakeMode"> - Less precise but faster bake mode. - </constant> - <constant name="BAKE_MODE_RAY_TRACE" value="1" enum="BakeMode"> - More precise bake mode but can take considerably longer to bake. - </constant> - <constant name="BAKE_ERROR_OK" value="0" enum="BakeError"> - Baking was successful. - </constant> - <constant name="BAKE_ERROR_NO_SAVE_PATH" value="1" enum="BakeError"> - Returns if no viable save path is found. This can happen where an [member image_path] is not specified or when the save location is invalid. - </constant> - <constant name="BAKE_ERROR_NO_MESHES" value="2" enum="BakeError"> - Currently unused. - </constant> - <constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="3" enum="BakeError"> - Returns when the baker cannot save per-mesh textures to file. - </constant> - <constant name="BAKE_ERROR_USER_ABORTED" value="4" enum="BakeError"> - Returns if user cancels baking. - </constant> - </constants> -</class> diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml deleted file mode 100644 index 9193fb3b68..0000000000 --- a/doc/classes/BakedLightmapData.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="BakedLightmapData" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="add_user"> - <return type="void"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> - <argument index="1" name="lightmap" type="Texture"> - </argument> - <argument index="2" name="instance" type="int"> - </argument> - <description> - </description> - </method> - <method name="clear_users"> - <return type="void"> - </return> - <description> - </description> - </method> - <method name="get_user_count" qualifiers="const"> - <return type="int"> - </return> - <description> - </description> - </method> - <method name="get_user_lightmap" qualifiers="const"> - <return type="Texture"> - </return> - <argument index="0" name="user_idx" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_user_path" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="user_idx" type="int"> - </argument> - <description> - </description> - </method> - </methods> - <members> - <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 0, 0, 0 )"> - </member> - <member name="cell_space_transform" type="Transform" setter="set_cell_space_transform" getter="get_cell_space_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - </member> - <member name="cell_subdiv" type="int" setter="set_cell_subdiv" getter="get_cell_subdiv" default="1"> - </member> - <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> - </member> - <member name="octree" type="PoolByteArray" setter="set_octree" getter="get_octree" default="PoolByteArray( )"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/BaseMaterial3D.xml index c6780511b9..2e4ca9677d 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpatialMaterial" inherits="Material" version="4.0"> +<class name="BaseMaterial3D" inherits="Material" version="4.0"> <brief_description> Default 3D rendering material. </brief_description> @@ -13,7 +13,7 @@ <method name="get_feature" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature"> + <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature"> </argument> <description> Returns [code]true[/code], if the specified [enum Feature] is enabled. @@ -22,16 +22,16 @@ <method name="get_flag" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags"> + <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags"> </argument> <description> Returns [code]true[/code], if the specified flag is enabled. See [enum Flags] enumerator for options. </description> </method> <method name="get_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> - <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam"> + <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam"> </argument> <description> Returns the [Texture] associated with the specified [enum TextureParam]. @@ -40,34 +40,33 @@ <method name="set_feature"> <return type="void"> </return> - <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature"> + <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature"> </argument> <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code], enables the specified [enum Feature]. Many features that are available in [SpatialMaterial]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to [code]true[/code]. + If [code]true[/code], enables the specified [enum Feature]. Many features that are available in [BaseMaterial3D]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to [code]true[/code]. </description> </method> <method name="set_flag"> <return type="void"> </return> - <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags"> + <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags"> </argument> <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code], enables the specified flag. Flags are optional behaviour that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to [code]true[/code]. See [enum Flags] enumerator for options. + If [code]true[/code], enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to [code]true[/code]. See [enum Flags] enumerator for options. </description> </method> <method name="set_texture"> <return type="void"> </return> - <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam"> + <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Sets the [Texture] to be used by the specified [enum TextureParam]. This function is called when setting members ending in [code]*_texture[/code]. </description> </method> </methods> @@ -75,16 +74,22 @@ <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color( 1, 1, 1, 1 )"> The material's base color. </member> - <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> + Forces a conversion of the [member albedo_texture] from sRGB space to linear space. + </member> + <member name="albedo_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture to multiply by [member albedo_color]. Used for basic texturing of objects. </member> + <member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold"> + Threshold at which the alpha scissor will discard values. + </member> <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy"> The strength of the anisotropy effect. </member> <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken. </member> - <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture"> + <member name="anisotropy_flowmap" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that offsets the tangent map for anisotropy calculations. </member> <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> @@ -96,12 +101,22 @@ <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag"> If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </member> - <member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="ao_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that defines the amount of ambient occlusion for a given point on the object. </member> - <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="SpatialMaterial.TextureChannel"> + <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel"> Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> + <member name="billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED]. + </member> + <member name="billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0"> + Controls how the object faces the camera. See [enum BillboardMode]. + </member> + <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="BaseMaterial3D.BlendMode" default="0"> + The material's blend mode. + [b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode]. + </member> <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect. </member> @@ -111,65 +126,56 @@ <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat. </member> - <member name="clearcoat_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="clearcoat_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. </member> - <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled"> - If [code]true[/code], the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping. - </member> - <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also [member normal_enabled]. - </member> - <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal"> - If [code]true[/code], direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect. - </member> - <member name="depth_flip_tangent" type="bool" setter="set_depth_deep_parallax_flip_tangent" getter="get_depth_deep_parallax_flip_tangent"> - If [code]true[/code], direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect. - </member> - <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers"> - Number of layers to use when using [member depth_deep_parallax] and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. - </member> - <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers"> - Number of layers to use when using [member depth_deep_parallax] and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. - </member> - <member name="depth_scale" type="float" setter="set_depth_scale" getter="get_depth_scale"> - Scales the depth offset effect. A higher number will create a larger depth. + <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="BaseMaterial3D.CullMode" default="0"> + Which side of the object is not drawn when backfaces are rendered. See [enum CullMode]. </member> - <member name="depth_texture" type="Texture" setter="set_texture" getter="get_texture"> - Texture used to determine depth at a given pixel. Depth is always stored in the red channel. + <member name="depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="BaseMaterial3D.DepthDrawMode" default="0"> + Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency]. </member> - <member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture"> + <member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that specifies the color of the detail overlay. </member> - <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="SpatialMaterial.BlendMode"> + <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode"> Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options. </member> <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures. </member> - <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture"> + <member name="detail_mask" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to specify how the detail textures get blended with the base textures. </member> - <member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture"> + <member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that specifies the per-pixel normal of the detail overlay. </member> - <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV"> + <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV"> Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options. </member> + <member name="diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="BaseMaterial3D.DiffuseMode" default="0"> + The algorithm used for diffuse light scattering. See [enum DiffuseMode]. + </member> + <member name="disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object receives no ambient light. + </member> + <member name="disable_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. + </member> <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance"> Distance at which the object fades fully and is no longer visible. </member> <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> Distance at which the object starts to fade. If the object is less than this distance away it will appear normal. </member> - <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode" default="0"> + <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0"> Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. </member> <member name="emission" type="Color" setter="set_emission" getter="get_emission"> The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] or [BakedLightmap] is used and this object is used in baked lighting. + If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] is used and this object is used in baked lighting. </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> The emitted light's strength. See [member emission_enabled]. @@ -177,119 +183,77 @@ <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag"> Use [code]UV2[/code] to read from the [member emission_texture]. </member> - <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="SpatialMaterial.EmissionOperator"> + <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="BaseMaterial3D.EmissionOperator"> Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options. </member> - <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="emission_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that specifies how much surface emits light at a given point. </member> - <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> - Forces a conversion of the [member albedo_texture] from sRGB space to linear space. + <member name="fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object is rendered at the same size regardless of distance. </member> - <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the object receives no ambient light. + <member name="grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" default="false"> + If [code]true[/code], enables the vertex grow setting. See [member grow_amount]. </member> - <member name="flags_do_not_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. + <member name="grow_amount" type="float" setter="set_grow" getter="get_grow" default="0.0"> + Grows object vertices in the direction of their normals. </member> - <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling. + <member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled"> </member> - <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the object is rendered at the same size regardless of distance. + <member name="heightmap_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> </member> - <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], depth testing is disabled and the object will be drawn in render order. + <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal"> </member> - <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], transparency is enabled on the body. See also [member params_blend_mode]. + <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent"> </member> - <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the object is unaffected by lighting. + <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag"> </member> - <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], render point size can be changed. - [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. + <member name="heightmap_max_layers" type="int" setter="set_heightmap_deep_parallax_max_layers" getter="get_heightmap_deep_parallax_max_layers"> </member> - <member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. + <member name="heightmap_min_layers" type="int" setter="set_heightmap_deep_parallax_min_layers" getter="get_heightmap_deep_parallax_min_layers"> </member> - <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. + <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale"> </member> - <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. + <member name="heightmap_texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> <member name="metallic" type="float" setter="set_metallic" getter="get_metallic" default="0.0"> - The reflectivity of the object's surface. The higher the value, the more light is reflected. + A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness]. </member> <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5"> Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources. [b]Note:[/b] unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]. </member> - <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="metallic_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to specify metallic for an object. This is multiplied by [member metallic]. </member> - <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="0"> + <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> + <member name="no_depth_test" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], depth testing is disabled and the object will be drawn in render order. + </member> <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], normal mapping is enabled. </member> <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale"> The strength of the normal map's effect. </member> - <member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh]. </member> - <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold"> - Threshold at which the alpha scissor will discard values. - </member> - <member name="params_billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member params_billboard_mode] is [constant BILLBOARD_ENABLED]. - </member> - <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0"> - Controls how the object faces the camera. See [enum BillboardMode]. - </member> - <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="SpatialMaterial.BlendMode" default="0"> - The material's blend mode. - [b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode]. - </member> - <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="SpatialMaterial.CullMode" default="0"> - Which side of the object is not drawn when backfaces are rendered. See [enum CullMode]. - </member> - <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="SpatialMaterial.DepthDrawMode" default="0"> - Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member flags_transparent]. - </member> - <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="SpatialMaterial.DiffuseMode" default="0"> - The algorithm used for diffuse light scattering. See [enum DiffuseMode]. - </member> - <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" default="false"> - If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount]. - </member> - <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow"> - Grows object vertices in the direction of their normals. - </member> - <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width" default="1.0"> - Currently unimplemented in Godot. - </member> - <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0"> - The point size in pixels. See [member flags_use_point_size]. - </member> - <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="SpatialMaterial.SpecularMode" default="0"> - The method for rendering the specular blob. See [enum SpecularMode]. - </member> - <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the shader will discard all pixels that have an alpha value less than [member params_alpha_scissor_threshold]. + <member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> - The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. + The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. </member> <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> - If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. + If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> - The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. + The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. + </member> + <member name="point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0"> + The point size in pixels. See [member use_point_size]. </member> <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. @@ -303,10 +267,10 @@ <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction"> The strength of the refraction effect. </member> - <member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="refraction_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]. </member> - <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="SpatialMaterial.TextureChannel"> + <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel"> Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="rim" type="float" setter="set_rim" getter="get_rim"> @@ -315,7 +279,7 @@ <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. </member> - <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="rim_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim]. </member> <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint"> @@ -324,30 +288,51 @@ <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0"> Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic]. </member> - <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="roughness_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to control the roughness per-pixel. Multiplied by [member roughness]. </member> - <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="0"> + <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> + <member name="shading_mode" type="int" setter="set_shading_mode" getter="get_shading_mode" enum="BaseMaterial3D.ShadingMode" default="1"> + </member> + <member name="shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. + </member> + <member name="specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="BaseMaterial3D.SpecularMode" default="0"> + The method for rendering the specular blob. See [enum SpecularMode]. + </member> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. </member> <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength"> The strength of the subsurface scattering effect. </member> - <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="subsurf_scatter_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]. </member> + <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3"> + Filter flags for the texture. See [enum TextureFilter] for options. + </member> + <member name="texture_repeat" type="bool" setter="set_flag" getter="get_flag" default="true"> + Repeat flags for the texture. See [enum TextureFilter] for options. + </member> <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission"> The color used by the transmission effect. Represents the light passing through an object. </member> <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], the transmission effect is enabled. </member> - <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="transmission_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to control the transmission effect per-pixel. Added to [member transmission]. </member> + <member name="transparency" type="int" setter="set_transparency" getter="get_transparency" enum="BaseMaterial3D.Transparency" default="0"> + If [code]true[/code], transparency is enabled on the body. See also [member blend_mode]. + </member> + <member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], render point size can be changed. + [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size]. + </member> <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )"> How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture. </member> @@ -360,6 +345,9 @@ <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0"> A lower number blends the texture more softly while a higher number blends the texture more sharply. </member> + <member name="uv1_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in world space rather than object local space. See also [member uv1_triplanar]. + </member> <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )"> How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture. </member> @@ -372,6 +360,9 @@ <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0"> A lower number blends the texture more softly while a higher number blends the texture more sharply. </member> + <member name="uv2_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], triplanar mapping for [code]UV2[/code] is calculated in world space rather than object local space. See also [member uv2_triplanar]. + </member> <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the model's vertex colors are processed as sRGB mode. </member> @@ -407,8 +398,8 @@ <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8" enum="TextureParam"> Texture specifying per-pixel ambient occlusion value. </constant> - <constant name="TEXTURE_DEPTH" value="9" enum="TextureParam"> - Texture specifying per-pixel depth. + <constant name="TEXTURE_HEIGHTMAP" value="9" enum="TextureParam"> + Texture specifying per-pixel height. </constant> <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10" enum="TextureParam"> Texture specifying per-pixel subsurface scattering. @@ -428,52 +419,82 @@ <constant name="TEXTURE_DETAIL_NORMAL" value="15" enum="TextureParam"> Texture specifying per-pixel detail normal. </constant> - <constant name="TEXTURE_MAX" value="16" enum="TextureParam"> + <constant name="TEXTURE_ORM" value="16" enum="TextureParam"> + </constant> + <constant name="TEXTURE_MAX" value="17" enum="TextureParam"> Represents the size of the [enum TextureParam] enum. </constant> + <constant name="TEXTURE_FILTER_NEAREST" value="0" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_LINEAR" value="1" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="2" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="3" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="4" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_MAX" value="6" enum="TextureFilter"> + </constant> <constant name="DETAIL_UV_1" value="0" enum="DetailUV"> Use [code]UV[/code] with the detail texture. </constant> <constant name="DETAIL_UV_2" value="1" enum="DetailUV"> Use [code]UV2[/code] with the detail texture. </constant> - <constant name="FEATURE_TRANSPARENT" value="0" enum="Feature"> - Constant for setting [member flags_transparent]. + <constant name="TRANSPARENCY_DISABLED" value="0" enum="Transparency"> + </constant> + <constant name="TRANSPARENCY_ALPHA" value="1" enum="Transparency"> + </constant> + <constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency"> + </constant> + <constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="3" enum="Transparency"> </constant> - <constant name="FEATURE_EMISSION" value="1" enum="Feature"> + <constant name="TRANSPARENCY_MAX" value="4" enum="Transparency"> + </constant> + <constant name="SHADING_MODE_UNSHADED" value="0" enum="ShadingMode"> + </constant> + <constant name="SHADING_MODE_PER_PIXEL" value="1" enum="ShadingMode"> + </constant> + <constant name="SHADING_MODE_PER_VERTEX" value="2" enum="ShadingMode"> + </constant> + <constant name="SHADING_MODE_MAX" value="3" enum="ShadingMode"> + </constant> + <constant name="FEATURE_EMISSION" value="0" enum="Feature"> Constant for setting [member emission_enabled]. </constant> - <constant name="FEATURE_NORMAL_MAPPING" value="2" enum="Feature"> + <constant name="FEATURE_NORMAL_MAPPING" value="1" enum="Feature"> Constant for setting [member normal_enabled]. </constant> - <constant name="FEATURE_RIM" value="3" enum="Feature"> + <constant name="FEATURE_RIM" value="2" enum="Feature"> Constant for setting [member rim_enabled]. </constant> - <constant name="FEATURE_CLEARCOAT" value="4" enum="Feature"> + <constant name="FEATURE_CLEARCOAT" value="3" enum="Feature"> Constant for setting [member clearcoat_enabled]. </constant> - <constant name="FEATURE_ANISOTROPY" value="5" enum="Feature"> + <constant name="FEATURE_ANISOTROPY" value="4" enum="Feature"> Constant for setting [member anisotropy_enabled]. </constant> - <constant name="FEATURE_AMBIENT_OCCLUSION" value="6" enum="Feature"> + <constant name="FEATURE_AMBIENT_OCCLUSION" value="5" enum="Feature"> Constant for setting [member ao_enabled]. </constant> - <constant name="FEATURE_DEPTH_MAPPING" value="7" enum="Feature"> - Constant for setting [member depth_enabled]. + <constant name="FEATURE_HEIGHT_MAPPING" value="6" enum="Feature"> </constant> - <constant name="FEATURE_SUBSURACE_SCATTERING" value="8" enum="Feature"> + <constant name="FEATURE_SUBSURACE_SCATTERING" value="7" enum="Feature"> Constant for setting [member subsurf_scatter_enabled]. </constant> - <constant name="FEATURE_TRANSMISSION" value="9" enum="Feature"> + <constant name="FEATURE_TRANSMISSION" value="8" enum="Feature"> Constant for setting [member transmission_enabled]. </constant> - <constant name="FEATURE_REFRACTION" value="10" enum="Feature"> + <constant name="FEATURE_REFRACTION" value="9" enum="Feature"> Constant for setting [member refraction_enabled]. </constant> - <constant name="FEATURE_DETAIL" value="11" enum="Feature"> + <constant name="FEATURE_DETAIL" value="10" enum="Feature"> Constant for setting [member detail_enabled]. </constant> - <constant name="FEATURE_MAX" value="12" enum="Feature"> + <constant name="FEATURE_MAX" value="11" enum="Feature"> Represents the size of the [enum Feature] enum. </constant> <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode"> @@ -497,9 +518,6 @@ <constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode"> No depth draw. </constant> - <constant name="DEPTH_DRAW_ALPHA_OPAQUE_PREPASS" value="3" enum="DepthDrawMode"> - For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn. - </constant> <constant name="CULL_BACK" value="0" enum="CullMode"> Default cull mode. The back of the object is culled when not visible. </constant> @@ -509,64 +527,60 @@ <constant name="CULL_DISABLED" value="2" enum="CullMode"> No culling is performed. </constant> - <constant name="FLAG_UNSHADED" value="0" enum="Flags"> - No lighting is used on the object. Color comes directly from [code]ALBEDO[/code]. - </constant> - <constant name="FLAG_USE_VERTEX_LIGHTING" value="1" enum="Flags"> - Lighting is calculated per-vertex rather than per-pixel. This can be used to increase the speed of the shader at the cost of quality. - </constant> - <constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="Flags"> + <constant name="FLAG_DISABLE_DEPTH_TEST" value="0" enum="Flags"> Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. </constant> - <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3" enum="Flags"> + <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="1" enum="Flags"> Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh. </constant> - <constant name="FLAG_SRGB_VERTEX_COLOR" value="4" enum="Flags"> - Vertex color is in sRGB space and needs to be converted to linear. Only applies in the GLES3 renderer. + <constant name="FLAG_SRGB_VERTEX_COLOR" value="2" enum="Flags"> + Vertex color is in sRGB space and needs to be converted to linear. Only applies in the Vulkan renderer. </constant> - <constant name="FLAG_USE_POINT_SIZE" value="5" enum="Flags"> + <constant name="FLAG_USE_POINT_SIZE" value="3" enum="Flags"> Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/code]. </constant> - <constant name="FLAG_FIXED_SIZE" value="6" enum="Flags"> + <constant name="FLAG_FIXED_SIZE" value="4" enum="Flags"> Object is scaled by depth so that it always appears the same size on screen. </constant> - <constant name="FLAG_BILLBOARD_KEEP_SCALE" value="7" enum="Flags"> - Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member params_billboard_mode] is [constant BILLBOARD_ENABLED]. + <constant name="FLAG_BILLBOARD_KEEP_SCALE" value="5" enum="Flags"> + Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED]. </constant> - <constant name="FLAG_UV1_USE_TRIPLANAR" value="8" enum="Flags"> + <constant name="FLAG_UV1_USE_TRIPLANAR" value="6" enum="Flags"> Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code]. </constant> - <constant name="FLAG_UV2_USE_TRIPLANAR" value="9" enum="Flags"> + <constant name="FLAG_UV2_USE_TRIPLANAR" value="7" enum="Flags"> Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code]. </constant> - <constant name="FLAG_AO_ON_UV2" value="11" enum="Flags"> - Use [code]UV2[/code] coordinates to look up from the [member ao_texture]. + <constant name="FLAG_UV1_USE_WORLD_TRIPLANAR" value="8" enum="Flags"> + Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code]. </constant> - <constant name="FLAG_EMISSION_ON_UV2" value="12" enum="Flags"> - Use [code]UV2[/code] coordinates to look up from the [member emission_texture]. + <constant name="FLAG_UV2_USE_WORLD_TRIPLANAR" value="9" enum="Flags"> + Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code]. </constant> - <constant name="FLAG_USE_ALPHA_SCISSOR" value="13" enum="Flags"> - Use alpha scissor. Set by [member params_use_alpha_scissor]. + <constant name="FLAG_AO_ON_UV2" value="10" enum="Flags"> + Use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </constant> - <constant name="FLAG_TRIPLANAR_USE_WORLD" value="10" enum="Flags"> - Use world coordinates in the triplanar texture lookup instead of local coordinates. + <constant name="FLAG_EMISSION_ON_UV2" value="11" enum="Flags"> + Use [code]UV2[/code] coordinates to look up from the [member emission_texture]. </constant> - <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="14" enum="Flags"> + <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="12" enum="Flags"> Forces the shader to convert albedo from sRGB space to linear space. </constant> - <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="15" enum="Flags"> + <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="13" enum="Flags"> Disables receiving shadows from other objects. </constant> - <constant name="FLAG_DISABLE_AMBIENT_LIGHT" value="17" enum="Flags"> + <constant name="FLAG_DISABLE_AMBIENT_LIGHT" value="14" enum="Flags"> Disables receiving ambient light. </constant> - <constant name="FLAG_ENSURE_CORRECT_NORMALS" value="16" enum="Flags"> - Ensures that normals appear correct, even with non-uniform scaling. - </constant> - <constant name="FLAG_USE_SHADOW_TO_OPACITY" value="18" enum="Flags"> + <constant name="FLAG_USE_SHADOW_TO_OPACITY" value="15" enum="Flags"> Enables the shadow to opacity feature. </constant> - <constant name="FLAG_MAX" value="19" enum="Flags"> + <constant name="FLAG_USE_TEXTURE_REPEAT" value="16" enum="Flags"> + </constant> + <constant name="FLAG_INVERT_HEIGHTMAP" value="17" enum="Flags"> + Invert values read from a depth texture to convert them to height values (heightmap). + </constant> + <constant name="FLAG_MAX" value="18" enum="Flags"> Represents the size of the [enum Flags] enum. </constant> <constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode"> diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml index 87cccca310..421b405808 100644 --- a/doc/classes/BitmapFont.xml +++ b/doc/classes/BitmapFont.xml @@ -43,7 +43,7 @@ <method name="add_texture"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <description> Adds a texture to the [BitmapFont]. @@ -88,7 +88,7 @@ </description> </method> <method name="get_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="idx" type="int"> </argument> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index 4b5d4c853a..0d8233e6ff 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -4,7 +4,7 @@ Base class for box containers. </brief_description> <description> - Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes. + Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes. </description> <tutorials> </tutorials> @@ -15,13 +15,13 @@ <argument index="0" name="begin" type="bool"> </argument> <description> - Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children. + Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children. </description> </method> </methods> <members> <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0"> - The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]). + The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]). </member> </members> <constants> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 23c357ac68..675441d842 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -23,7 +23,7 @@ <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> Flat buttons don't display decoration. </member> - <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon"> + <member name="icon" type="Texture2D" setter="set_button_icon" getter="get_button_icon"> Button's icon, if text is present the icon will be placed before the text. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index b9cc655784..6a6525e99a 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -171,13 +171,13 @@ <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. </member> - <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )"> + <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray( )"> Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals"> + <member name="emission_normals" type="PackedVector3Array" setter="set_emission_normals" getter="get_emission_normals"> Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )"> + <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array( )"> Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0"> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index e747feeae8..799ba32075 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -169,13 +169,13 @@ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0"> Particle draw order. Uses [enum DrawOrder] values. </member> - <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> + <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors"> Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals"> + <member name="emission_normals" type="PackedVector2Array" setter="set_emission_normals" getter="get_emission_normals"> Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points"> + <member name="emission_points" type="PackedVector2Array" setter="set_emission_points" getter="get_emission_points"> Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents"> @@ -238,7 +238,7 @@ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. </member> - <member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap"> + <member name="normalmap" type="Texture2D" setter="set_normalmap" getter="get_normalmap"> Normal map to be used for the [member texture] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> @@ -292,7 +292,7 @@ <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Tangential acceleration randomness ratio. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code], particles will be squares. </member> </members> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml new file mode 100644 index 0000000000..ec38128c1e --- /dev/null +++ b/doc/classes/Callable.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Callable" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="Callable"> + <return type="Callable"> + </return> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="method_name" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="call" qualifiers="vararg"> + <return type="Variant"> + </return> + <description> + </description> + </method> + <method name="call_deferred" qualifiers="vararg"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_method"> + <return type="StringName"> + </return> + <description> + </description> + </method> + <method name="get_object"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_object_id"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="hash"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="is_custom"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="is_null"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="is_standard"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index 84f6fa8b8e..6097721cbd 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -175,6 +175,8 @@ <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0"> If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. </member> + <member name="effects" type="CameraEffects" setter="set_effects" getter="get_effects"> + </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The [Environment] to use for this camera. </member> diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml new file mode 100644 index 0000000000..23f0a1c7af --- /dev/null +++ b/doc/classes/CameraEffects.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraEffects" inherits="Resource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1"> + </member> + <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> + </member> + <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> + </member> + <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> + </member> + <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> + </member> + <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> + </member> + <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> + </member> + <member name="override_exposure" type="float" setter="set_override_exposure" getter="get_override_exposure" default="1.0"> + </member> + <member name="override_exposure_enable" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml index 14d0559c85..3232f5970c 100644 --- a/doc/classes/CameraFeed.xml +++ b/doc/classes/CameraFeed.xml @@ -10,57 +10,7 @@ <tutorials> </tutorials> <methods> - <method name="get_id" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the unique ID for this feed. - </description> - </method> - <method name="get_name" qualifiers="const"> - <return type="String"> - </return> - <description> - Returns the camera's name. - </description> - </method> - <method name="get_position" qualifiers="const"> - <return type="int" enum="CameraFeed.FeedPosition"> - </return> - <description> - Returns the position of camera on the device. - </description> - </method> </methods> - <members> - <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false"> - If [code]true[/code], the feed is active. - </member> - <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )"> - The transform applied to the camera's image. - </member> - </members> <constants> - <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType"> - No image set for the feed. - </constant> - <constant name="FEED_RGB" value="1" enum="FeedDataType"> - Feed supplies RGB images. - </constant> - <constant name="FEED_YCBCR" value="2" enum="FeedDataType"> - Feed supplies YCbCr images that need to be converted to RGB. - </constant> - <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType"> - Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. - </constant> - <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition"> - Unspecified position. - </constant> - <constant name="FEED_FRONT" value="1" enum="FeedPosition"> - Camera is mounted at the front of the device. - </constant> - <constant name="FEED_BACK" value="2" enum="FeedPosition"> - Camera is mounted at the back of the device. - </constant> </constants> </class> diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml index d4b7310819..c0730129a9 100644 --- a/doc/classes/CameraTexture.xml +++ b/doc/classes/CameraTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CameraTexture" inherits="Texture" version="4.0"> +<class name="CameraTexture" inherits="Texture2D" version="4.0"> <brief_description> Texture provided by a [CameraFeed]. </brief_description> @@ -18,7 +18,6 @@ <member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active" default="false"> Convenience property that gives access to the active property of the [CameraFeed]. </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> <member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage" default="0"> Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component. </member> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index b8e09708e3..dec7c907a4 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -39,8 +39,6 @@ </argument> <argument index="6" name="width" type="float" default="1.0"> </argument> - <argument index="7" name="antialiased" type="bool" default="false"> - </argument> <description> Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. </description> @@ -78,17 +76,23 @@ <method name="draw_colored_polygon"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <argument index="1" name="color" type="Color"> </argument> - <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> + </argument> + <argument index="3" name="texture" type="Texture2D" default="null"> + </argument> + <argument index="4" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="5" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="3" name="texture" type="Texture" default="null"> + <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> - <argument index="4" name="normal_map" type="Texture" default="null"> + <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> - <argument index="5" name="antialiased" type="bool" default="false"> + <argument index="8" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a colored polygon of any amount of points, convex or concave. @@ -105,10 +109,8 @@ </argument> <argument index="3" name="width" type="float" default="1.0"> </argument> - <argument index="4" name="antialiased" type="bool" default="false"> - </argument> <description> - Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. + Draws a line from a 2D point to another, with a given color and width. </description> </method> <method name="draw_mesh"> @@ -116,13 +118,21 @@ </return> <argument index="0" name="mesh" type="Mesh"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> - <argument index="2" name="normal_map" type="Texture" default="null"> + <argument index="2" name="normal_map" type="Texture2D" default="null"> </argument> - <argument index="3" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <argument index="3" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="5" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + </argument> + <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> + </argument> + <argument index="8" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation. @@ -131,31 +141,27 @@ <method name="draw_multiline"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <argument index="1" name="color" type="Color"> </argument> <argument index="2" name="width" type="float" default="1.0"> </argument> - <argument index="3" name="antialiased" type="bool" default="false"> - </argument> <description> - Draws multiple, parallel lines with a uniform [code]color[/code]. [code]width[/code] and [code]antialiased[/code] are currently not implemented and have no effect. + Draws multiple, parallel lines with a uniform [code]color[/code]. </description> </method> <method name="draw_multiline_colors"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> <argument index="2" name="width" type="float" default="1.0"> </argument> - <argument index="3" name="antialiased" type="bool" default="false"> - </argument> <description> - Draws multiple, parallel lines with a uniform [code]width[/code], segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. + Draws multiple, parallel lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. </description> </method> <method name="draw_multimesh"> @@ -163,9 +169,17 @@ </return> <argument index="0" name="multimesh" type="MultiMesh"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> + </argument> + <argument index="2" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="3" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> - <argument index="2" name="normal_map" type="Texture" default="null"> + <argument index="5" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> + </argument> + <argument index="6" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation. @@ -174,17 +188,23 @@ <method name="draw_polygon"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> + </argument> + <argument index="1" name="colors" type="PackedColorArray"> + </argument> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> + </argument> + <argument index="3" name="texture" type="Texture2D" default="null"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="4" name="normal_map" type="Texture2D" default="null"> </argument> - <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="5" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="3" name="texture" type="Texture" default="null"> + <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> - <argument index="4" name="normal_map" type="Texture" default="null"> + <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> - <argument index="5" name="antialiased" type="bool" default="false"> + <argument index="8" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a polygon of any amount of points, convex or concave. @@ -193,50 +213,54 @@ <method name="draw_polyline"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <argument index="1" name="color" type="Color"> </argument> <argument index="2" name="width" type="float" default="1.0"> </argument> - <argument index="3" name="antialiased" type="bool" default="false"> - </argument> <description> - Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code] and optional antialiasing. + Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code]. </description> </method> <method name="draw_polyline_colors"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> <argument index="2" name="width" type="float" default="1.0"> </argument> - <argument index="3" name="antialiased" type="bool" default="false"> - </argument> <description> - Draws interconnected line segments with a uniform [code]width[/code], segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. + Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. </description> </method> <method name="draw_primitive"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> - <argument index="2" name="uvs" type="PoolVector2Array"> + <argument index="2" name="uvs" type="PackedVector2Array"> </argument> - <argument index="3" name="texture" type="Texture" default="null"> + <argument index="3" name="texture" type="Texture2D" default="null"> </argument> <argument index="4" name="width" type="float" default="1.0"> </argument> - <argument index="5" name="normal_map" type="Texture" default="null"> + <argument index="5" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="6" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> + </argument> + <argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> - Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. + Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. </description> </method> <method name="draw_rect"> @@ -250,11 +274,9 @@ </argument> <argument index="3" name="width" type="float" default="1.0"> </argument> - <argument index="4" name="antialiased" type="bool" default="false"> - </argument> <description> - Draws a rectangle. If [code]filled[/code] is [code]true[/code], the rectangle will be filled with the [code]color[/code] specified. If [code]filled[/code] is [code]false[/code], the rectangle will be drawn as a stroke with the [code]color[/code] and [code]width[/code] specified. If [code]antialiased[/code] is [code]true[/code], the lines will be antialiased. - [b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only effective if [code]filled[/code] is [code]false[/code]. + Draws a rectangle. If [code]filled[/code] is [code]true[/code], the rectangle will be filled with the [code]color[/code] specified. If [code]filled[/code] is [code]false[/code], the rectangle will be drawn as a stroke with the [code]color[/code] and [code]width[/code] specified. + [b]Note:[/b] [code]width[/code] is only effective if [code]filled[/code] is [code]false[/code]. </description> </method> <method name="draw_set_transform"> @@ -310,13 +332,21 @@ <method name="draw_texture"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="position" type="Vector2"> </argument> <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> - <argument index="3" name="normal_map" type="Texture" default="null"> + <argument index="3" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="4" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="5" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="6" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> + </argument> + <argument index="7" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a texture at a given position. @@ -325,7 +355,7 @@ <method name="draw_texture_rect"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="rect" type="Rect2"> </argument> @@ -335,7 +365,15 @@ </argument> <argument index="4" name="transpose" type="bool" default="false"> </argument> - <argument index="5" name="normal_map" type="Texture" default="null"> + <argument index="5" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="6" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> + </argument> + <argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a textured rectangle at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped. @@ -344,7 +382,7 @@ <method name="draw_texture_rect_region"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="rect" type="Rect2"> </argument> @@ -354,9 +392,17 @@ </argument> <argument index="4" name="transpose" type="bool" default="false"> </argument> - <argument index="5" name="normal_map" type="Texture" default="null"> + <argument index="5" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="6" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="8" name="clip_uv" type="bool" default="true"> + </argument> + <argument index="9" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> - <argument index="6" name="clip_uv" type="bool" default="true"> + <argument index="10" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> Draws a textured rectangle region at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped. @@ -560,6 +606,10 @@ <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top"> If [code]true[/code], the object draws on top of its parent. </member> + <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0"> + </member> + <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0"> + </member> <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false"> If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. </member> @@ -590,24 +640,6 @@ </signal> </signals> <constants> - <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode"> - Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. - </constant> - <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode"> - Additive blending mode. - </constant> - <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode"> - Subtractive blending mode. - </constant> - <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode"> - Multiplicative blending mode. - </constant> - <constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode"> - Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. - </constant> - <constant name="BLEND_MODE_DISABLED" value="5" enum="BlendMode"> - Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. - </constant> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000"> The [CanvasItem]'s transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform]. </constant> @@ -623,5 +655,31 @@ <constant name="NOTIFICATION_EXIT_CANVAS" value="33"> The [CanvasItem] has exited the canvas. </constant> + <constant name="TEXTURE_FILTER_PARENT_NODE" value="0" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_NEAREST" value="1" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_LINEAR" value="2" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter"> + </constant> + <constant name="TEXTURE_REPEAT_PARENT_NODE" value="0" enum="TextureRepeat"> + </constant> + <constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat"> + </constant> + <constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat"> + </constant> + <constant name="TEXTURE_REPEAT_MIRROR" value="3" enum="TextureRepeat"> + </constant> + <constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat"> + </constant> </constants> </class> diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index 1265d2f268..ffe2272260 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -18,7 +18,7 @@ The manner in which material reacts to lighting. </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> - The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D]. + The number of columns in the spritesheet assigned as [Texture2D] for a [Particles2D] or [CPUParticles2D]. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> @@ -26,7 +26,7 @@ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> - The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D]. + The number of rows in the spritesheet assigned as [Texture2D] for a [Particles2D] or [CPUParticles2D]. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false"> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index ffcc22703f..c29f089bce 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -20,7 +20,7 @@ <theme_item name="check_vadjust" type="int" default="0"> The vertical offset used when rendering the check icons (in pixels). </theme_item> - <theme_item name="checked" type="Texture"> + <theme_item name="checked" type="Texture2D"> The check icon to display when the [CheckBox] is checked. </theme_item> <theme_item name="disabled" type="StyleBox"> @@ -62,13 +62,13 @@ <theme_item name="pressed" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is pressed. </theme_item> - <theme_item name="radio_checked" type="Texture"> + <theme_item name="radio_checked" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked. </theme_item> - <theme_item name="radio_unchecked" type="Texture"> + <theme_item name="radio_unchecked" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked. </theme_item> - <theme_item name="unchecked" type="Texture"> + <theme_item name="unchecked" type="Texture2D"> The check icon to display when the [CheckBox] is unchecked. </theme_item> </theme_items> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 6c024a3753..616940a494 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -56,16 +56,16 @@ <theme_item name="normal" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> - <theme_item name="off" type="Texture"> + <theme_item name="off" type="Texture2D"> The icon to display when the [CheckButton] is unchecked. </theme_item> - <theme_item name="off_disabled" type="Texture"> + <theme_item name="off_disabled" type="Texture2D"> The icon to display when the [CheckButton] is unchecked and disabled. </theme_item> - <theme_item name="on" type="Texture"> + <theme_item name="on" type="Texture2D"> The icon to display when the [CheckButton] is checked. </theme_item> - <theme_item name="on_disabled" type="Texture"> + <theme_item name="on_disabled" type="Texture2D"> The icon to display when the [CheckButton] is checked and disabled. </theme_item> <theme_item name="pressed" type="StyleBox"> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 4d7ccb65e8..2a6a2ddd91 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -12,7 +12,7 @@ <method name="can_instance" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case. @@ -21,16 +21,16 @@ <method name="class_exists" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns whether the specified [code]class[/code] is available or not. </description> </method> <method name="class_get_category" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required. @@ -39,18 +39,18 @@ <method name="class_get_integer_constant" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <description> Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found. </description> </method> <method name="class_get_integer_constant_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -61,7 +61,7 @@ <method name="class_get_method_list" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -74,7 +74,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <description> Returns the value of [code]property[/code] of [code]class[/code] or its ancestry. @@ -83,7 +83,7 @@ <method name="class_get_property_list" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -94,9 +94,9 @@ <method name="class_get_signal" qualifiers="const"> <return type="Dictionary"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="signal" type="String"> + <argument index="1" name="signal" type="StringName"> </argument> <description> Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. @@ -105,7 +105,7 @@ <method name="class_get_signal_list" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -116,9 +116,9 @@ <method name="class_has_integer_constant" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <description> Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not. @@ -127,9 +127,9 @@ <method name="class_has_method" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="no_inheritance" type="bool" default="false"> </argument> @@ -140,9 +140,9 @@ <method name="class_has_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="signal" type="String"> + <argument index="1" name="signal" type="StringName"> </argument> <description> Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not. @@ -153,7 +153,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -162,25 +162,25 @@ </description> </method> <method name="get_class_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the names of all the classes available. </description> </method> <method name="get_inheriters_from_class" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns the names of all the classes that directly or indirectly inherit from [code]class[/code]. </description> </method> <method name="get_parent_class" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns the parent class of [code]class[/code]. @@ -189,7 +189,7 @@ <method name="instance" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Creates an instance of [code]class[/code]. @@ -198,7 +198,7 @@ <method name="is_class_enabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns whether this [code]class[/code] is enabled or not. @@ -207,9 +207,9 @@ <method name="is_parent_class" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="inherits" type="String"> + <argument index="1" name="inherits" type="StringName"> </argument> <description> Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not. diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index ac519d3817..8aceec17a8 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -17,7 +17,7 @@ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collision will be produced. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> Array of vertices which define the polygon. [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index c4fd417918..e3135a4d0f 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -22,8 +22,8 @@ </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> - The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference. + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference. </member> </members> <constants> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 0d3f51309b..7335ff5a2e 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -128,18 +128,6 @@ [/codeblock] </description> </method> - <method name="gray"> - <return type="float"> - </return> - <description> - Returns the color's grayscale representation. - The gray value is calculated as [code](r + g + b) / 3[/code]. - [codeblock] - var c = Color(0.2, 0.45, 0.82) - var gray = c.gray() # A value of 0.466667 - [/codeblock] - </description> - </method> <method name="inverted"> <return type="Color"> </return> @@ -307,9 +295,6 @@ </member> </members> <constants> - <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )"> - Gray color. - </constant> <constant name="aliceblue" value="Color( 0.94, 0.97, 1, 1 )"> Alice blue color. </constant> @@ -460,6 +445,9 @@ <constant name="goldenrod" value="Color( 0.85, 0.65, 0.13, 1 )"> Goldenrod color. </constant> + <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )"> + Gray color. + </constant> <constant name="green" value="Color( 0, 1, 0, 1 )"> Green color. </constant> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index d315c6a387..5ab929d911 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -4,7 +4,7 @@ Color picker control. </brief_description> <description> - [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace. + Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace. </description> <tutorials> </tutorials> @@ -29,7 +29,7 @@ </description> </method> <method name="get_presets" qualifiers="const"> - <return type="PoolColorArray"> + <return type="PackedColorArray"> </return> <description> Returns the list of colors in the presets of the color picker. @@ -87,11 +87,11 @@ <constants> </constants> <theme_items> - <theme_item name="add_preset" type="Texture"> + <theme_item name="add_preset" type="Texture2D"> </theme_item> - <theme_item name="color_hue" type="Texture"> + <theme_item name="color_hue" type="Texture2D"> </theme_item> - <theme_item name="color_sample" type="Texture"> + <theme_item name="color_sample" type="Texture2D"> </theme_item> <theme_item name="h_width" type="int" default="30"> </theme_item> @@ -99,11 +99,11 @@ </theme_item> <theme_item name="margin" type="int" default="4"> </theme_item> - <theme_item name="overbright_indicator" type="Texture"> + <theme_item name="overbright_indicator" type="Texture2D"> </theme_item> - <theme_item name="preset_bg" type="Texture"> + <theme_item name="preset_bg" type="Texture2D"> </theme_item> - <theme_item name="screen_picker" type="Texture"> + <theme_item name="screen_picker" type="Texture2D"> </theme_item> <theme_item name="sv_height" type="int" default="256"> </theme_item> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index d9023a4f3a..67f64c8a66 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -55,7 +55,7 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="Texture"> + <theme_item name="bg" type="Texture2D"> The background of the color preview rect on the button. </theme_item> <theme_item name="disabled" type="StyleBox"> diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml index 3ae07ee52f..21f2f681b9 100644 --- a/doc/classes/ConcavePolygonShape.xml +++ b/doc/classes/ConcavePolygonShape.xml @@ -10,7 +10,7 @@ </tutorials> <methods> <method name="get_faces" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> Returns the faces (an array of triangles). @@ -19,7 +19,7 @@ <method name="set_faces"> <return type="void"> </return> - <argument index="0" name="faces" type="PoolVector3Array"> + <argument index="0" name="faces" type="PackedVector3Array"> </argument> <description> Sets the faces (an array of triangles). diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index 6fb32436a8..9999d086da 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments" default="PoolVector2Array( )"> + <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array( )"> The array of points that make up the [ConcavePolygonShape2D]'s line segments. </member> </members> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 7eaa815a87..00d98130f3 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -51,7 +51,7 @@ </description> </method> <method name="get_section_keys" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="section" type="String"> </argument> @@ -60,7 +60,7 @@ </description> </method> <method name="get_sections" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns an array of all defined section identifiers. @@ -114,7 +114,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="key" type="PoolByteArray"> + <argument index="1" name="key" type="PackedByteArray"> </argument> <description> </description> @@ -129,6 +129,16 @@ <description> </description> </method> + <method name="parse"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="data" type="String"> + </argument> + <description> + Parses the the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). + </description> + </method> <method name="save"> <return type="int" enum="Error"> </return> @@ -144,7 +154,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="key" type="PoolByteArray"> + <argument index="1" name="key" type="PackedByteArray"> </argument> <description> </description> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 556ebb93bf..89db5baf8a 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -90,7 +90,7 @@ <method name="add_color_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="color" type="Color"> </argument> @@ -101,7 +101,7 @@ <method name="add_constant_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="constant" type="int"> </argument> @@ -112,7 +112,7 @@ <method name="add_font_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="font" type="Font"> </argument> @@ -123,9 +123,9 @@ <method name="add_icon_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is empty or invalid, the override is cleared and the icon from assigned [Theme] is used. @@ -134,7 +134,7 @@ <method name="add_shader_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="shader" type="Shader"> </argument> @@ -145,7 +145,7 @@ <method name="add_stylebox_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="stylebox" type="StyleBox"> </argument> @@ -220,9 +220,9 @@ <method name="get_color" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -242,9 +242,9 @@ <method name="get_constant" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -301,9 +301,9 @@ <method name="get_font" qualifiers="const"> <return type="Font"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -317,11 +317,11 @@ </description> </method> <method name="get_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -374,9 +374,9 @@ <method name="get_stylebox" qualifiers="const"> <return type="StyleBox"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -412,9 +412,9 @@ <method name="has_color" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -423,7 +423,7 @@ <method name="has_color_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node. @@ -432,9 +432,9 @@ <method name="has_constant" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -443,7 +443,7 @@ <method name="has_constant_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node. @@ -459,9 +459,9 @@ <method name="has_font" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -470,7 +470,7 @@ <method name="has_font_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node. @@ -479,9 +479,9 @@ <method name="has_icon" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -490,7 +490,7 @@ <method name="has_icon_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node. @@ -510,7 +510,7 @@ <method name="has_shader_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <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. @@ -519,9 +519,9 @@ <method name="has_stylebox" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -530,7 +530,7 @@ <method name="has_stylebox_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node. diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml index 544f304051..077bb57a03 100644 --- a/doc/classes/ConvexPolygonShape.xml +++ b/doc/classes/ConvexPolygonShape.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" default="PoolVector3Array( )"> + <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array( )"> The list of 3D points forming the convex polygon shape. </member> </members> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index e17048e061..cba446fff8 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -13,7 +13,7 @@ <method name="set_point_cloud"> <return type="void"> </return> - <argument index="0" name="point_cloud" type="PoolVector2Array"> + <argument index="0" name="point_cloud" type="PackedVector2Array"> </argument> <description> Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details. @@ -21,7 +21,7 @@ </method> </methods> <members> - <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )"> + <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )"> The polygon's list of vertices. Can be in either clockwise or counterclockwise order. </member> </members> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index fb373145f9..10f1f18f0d 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -28,12 +28,12 @@ </tutorials> <methods> <method name="generate_random_bytes"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="size" type="int"> </argument> <description> - Generates a [PoolByteArray] of cryptographically secure random bytes with given [code]size[/code]. + Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code]. </description> </method> <method name="generate_rsa"> diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml deleted file mode 100644 index 78731a7cd0..0000000000 --- a/doc/classes/CubeMap.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="CubeMap" inherits="Resource" version="4.0"> - <brief_description> - A CubeMap is a 6-sided 3D texture. - </brief_description> - <description> - A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_height" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the [CubeMap]'s height. - </description> - </method> - <method name="get_side" qualifiers="const"> - <return type="Image"> - </return> - <argument index="0" name="side" type="int" enum="CubeMap.Side"> - </argument> - <description> - Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. - </description> - </method> - <method name="get_width" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the [CubeMap]'s width. - </description> - </method> - <method name="set_side"> - <return type="void"> - </return> - <argument index="0" name="side" type="int" enum="CubeMap.Side"> - </argument> - <argument index="1" name="image" type="Image"> - </argument> - <description> - Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. - </description> - </method> - </methods> - <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" default="7"> - The render flags for the [CubeMap]. See the [enum Flags] constants for details. - </member> - <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> - The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY]. - </member> - <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0"> - The [CubeMap]'s storage mode. See [enum Storage] constants. - </member> - </members> - <constants> - <constant name="STORAGE_RAW" value="0" enum="Storage"> - Store the [CubeMap] without any compression. - </constant> - <constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage"> - Store the [CubeMap] with strong compression that reduces image quality. - </constant> - <constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage"> - Store the [CubeMap] with moderate compression that doesn't reduce image quality. - </constant> - <constant name="SIDE_LEFT" value="0" enum="Side"> - Identifier for the left face of the [CubeMap]. - </constant> - <constant name="SIDE_RIGHT" value="1" enum="Side"> - Identifier for the right face of the [CubeMap]. - </constant> - <constant name="SIDE_BOTTOM" value="2" enum="Side"> - Identifier for the bottom face of the [CubeMap]. - </constant> - <constant name="SIDE_TOP" value="3" enum="Side"> - Identifier for the top face of the [CubeMap]. - </constant> - <constant name="SIDE_FRONT" value="4" enum="Side"> - Identifier for the front face of the [CubeMap]. - </constant> - <constant name="SIDE_BACK" value="5" enum="Side"> - Identifier for the back face of the [CubeMap]. - </constant> - <constant name="FLAG_MIPMAPS" value="1" enum="Flags"> - Generate mipmaps, to enable smooth zooming out of the texture. - </constant> - <constant name="FLAG_REPEAT" value="2" enum="Flags"> - Repeat (instead of clamp to edge). - </constant> - <constant name="FLAG_FILTER" value="4" enum="Flags"> - Turn on magnifying filter, to enable smooth zooming in of the texture. - </constant> - <constant name="FLAGS_DEFAULT" value="7" enum="Flags"> - Default flags. Generate mipmaps, repeat, and filter are enabled. - </constant> - </constants> -</class> diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml new file mode 100644 index 0000000000..16431c65c9 --- /dev/null +++ b/doc/classes/Cubemap.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Cubemap" inherits="TextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml new file mode 100644 index 0000000000..03cfd75acf --- /dev/null +++ b/doc/classes/CubemapArray.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CubemapArray" inherits="TextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index f6eacfb33b..8ac6258e97 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -41,10 +41,10 @@ </description> </method> <method name="get_baked_points" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <description> - Returns the cache of points as a [PoolVector2Array]. + Returns the cache of points as a [PackedVector2Array]. </description> </method> <method name="get_closest_offset" qualifiers="const"> @@ -178,7 +178,7 @@ </description> </method> <method name="tessellate" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="max_stages" type="int" default="5"> </argument> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 52b0052908..5024cdefbd 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -41,24 +41,24 @@ </description> </method> <method name="get_baked_points" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> - Returns the cache of points as a [PoolVector3Array]. + Returns the cache of points as a [PackedVector3Array]. </description> </method> <method name="get_baked_tilts" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <description> - Returns the cache of tilts as a [PoolRealArray]. + Returns the cache of tilts as a [PackedFloat32Array]. </description> </method> <method name="get_baked_up_vectors" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> - Returns the cache of up vectors as a [PoolVector3Array]. + Returns the cache of up vectors as a [PackedVector3Array]. If [member up_vector_enabled] is [code]false[/code], the cache will be empty. </description> </method> @@ -227,7 +227,7 @@ </description> </method> <method name="tessellate" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="max_stages" type="int" default="5"> </argument> diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml index 10c7a4a086..bc6b69d2d1 100644 --- a/doc/classes/CurveTexture.xml +++ b/doc/classes/CurveTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CurveTexture" inherits="Texture" version="4.0"> +<class name="CurveTexture" inherits="Texture2D" version="4.0"> <brief_description> A texture that shows a curve. </brief_description> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml new file mode 100644 index 0000000000..8c71b61553 --- /dev/null +++ b/doc/classes/DTLSServer.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="DTLSServer" inherits="Reference" version="4.0"> + <brief_description> + Helper class to implement a DTLS server. + </brief_description> + <description> + This class is used to store the state of a DTLS server. Upon [method setup] it converts connected [PacketPeerUDP] to [PacketPeerDTLS] accepting them via [method take_connection] as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. + Below a small example of how to use it: + [codeblock] + # server.gd + extends Node + + var dtls := DTLSServer.new() + var server := UDPServer.new() + var peers = [] + + func _ready(): + server.listen(4242) + var key = load("key.key") # Your private key. + var cert = load("cert.crt") # Your X509 certificate. + dtls.setup(key, cert) + + func _process(delta): + while server.is_connection_available(): + var peer : PacketPeerUDP = server.take_connection() + var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer) + if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING: + continue # It is normal that 50% of the connections fails due to cookie exchange. + print("Peer connected!") + peers.append(dtls_peer) + for p in peers: + p.poll() # Must poll to update the state. + if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: + while p.get_available_packet_count() > 0: + print("Received message from client: %s" % p.get_packet().get_string_from_utf8()) + p.put_packet("Hello DTLS client".to_utf8()) + [/codeblock] + [codeblock] + # client.gd + extends Node + + var dtls := PacketPeerDTLS.new() + var udp := PacketPeerUDP.new() + var connected = false + + func _ready(): + udp.connect_to_host("127.0.0.1", 4242) + dtls.connect_to_peer(udp, false) # Use true in production for certificate validation! + + func _process(delta): + dtls.poll() + if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: + if !connected: + # Try to contact server + dtls.put_packet("The answer is... 42!".to_utf8()) + while dtls.get_available_packet_count() > 0: + print("Connected: %s" % dtls.get_packet().get_string_from_utf8()) + connected = true + [/codeblock] + </description> + <tutorials> + </tutorials> + <methods> + <method name="setup"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="key" type="CryptoKey"> + </argument> + <argument index="1" name="certificate" type="X509Certificate"> + </argument> + <argument index="2" name="chain" type="X509Certificate" default="null"> + </argument> + <description> + Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate. + </description> + </method> + <method name="take_connection"> + <return type="PacketPeerDTLS"> + </return> + <argument index="0" name="udp_peer" type="PacketPeerUDP"> + </argument> + <description> + Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]). + [b]Note[/b]: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 8432744ea7..6104cf165e 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -66,6 +66,8 @@ </tutorials> <methods> <method name="clear"> + <return type="void"> + </return> <description> Clear the dictionary, removing all key/value pairs. </description> @@ -96,7 +98,7 @@ </description> </method> <method name="get"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="key" type="Variant"> </argument> diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 8dddf921d3..a3ef830d5d 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -21,6 +21,8 @@ <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0"> Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. </member> + <member name="directional_shadow_fade_start" type="float" setter="set_param" getter="get_param" default="0.8"> + </member> <member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="100.0"> The maximum distance for shadow splits. </member> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index c2fb4d53cc..29e430b14d 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -108,12 +108,6 @@ <member name="size" type="int" setter="set_size" getter="get_size" default="16"> The font size in pixels. </member> - <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false"> - If [code]true[/code], filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired. - </member> - <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false"> - If [code]true[/code], mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective. - </member> </members> <constants> <constant name="SPACING_TOP" value="0" enum="SpacingType"> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 5de68cae71..da3840384e 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -10,7 +10,7 @@ <method name="_export_begin" qualifiers="virtual"> <return type="void"> </return> - <argument index="0" name="features" type="PoolStringArray"> + <argument index="0" name="features" type="PackedStringArray"> </argument> <argument index="1" name="is_debug" type="bool"> </argument> @@ -34,7 +34,7 @@ </argument> <argument index="1" name="type" type="String"> </argument> - <argument index="2" name="features" type="PoolStringArray"> + <argument index="2" name="features" type="PackedStringArray"> </argument> <description> </description> @@ -44,7 +44,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="file" type="PoolByteArray"> + <argument index="1" name="file" type="PackedByteArray"> </argument> <argument index="2" name="remap" type="bool"> </argument> @@ -96,7 +96,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="tags" type="PoolStringArray"> + <argument index="1" name="tags" type="PackedStringArray"> </argument> <description> </description> diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index 5fac4f7822..387962cf6a 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -18,7 +18,7 @@ <method name="is_class_disabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <description> </description> @@ -26,7 +26,7 @@ <method name="is_class_editor_disabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <description> </description> @@ -34,9 +34,9 @@ <method name="is_class_property_disabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <description> </description> @@ -68,7 +68,7 @@ <method name="set_disable_class"> <return type="void"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <argument index="1" name="disable" type="bool"> </argument> @@ -78,7 +78,7 @@ <method name="set_disable_class_editor"> <return type="void"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <argument index="1" name="disable" type="bool"> </argument> @@ -88,9 +88,9 @@ <method name="set_disable_class_property"> <return type="void"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="disable" type="bool"> </argument> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 91adf6f2af..2afdfde064 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -84,7 +84,7 @@ </description> </signal> <signal name="files_selected"> - <argument index="0" name="paths" type="PoolStringArray"> + <argument index="0" name="paths" type="PackedStringArray"> </argument> <description> Emitted when multiple files are selected. diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index a05fbf2be7..a79c57e90f 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -85,14 +85,14 @@ </description> </signal> <signal name="resources_reimported"> - <argument index="0" name="resources" type="PoolStringArray"> + <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> Remitted if a resource is reimported. </description> </signal> <signal name="resources_reload"> - <argument index="0" name="resources" type="PoolStringArray"> + <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> </description> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index bbd3ee9b17..096fe5df8f 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -78,7 +78,7 @@ </description> </method> <method name="get_file_type" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 7834390247..61d240c1dc 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorInspector" inherits="ScrollContainer" version="4.0"> <brief_description> + A tab used to edit properties of the selected node. </brief_description> <description> + The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as the Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow. </description> <tutorials> </tutorials> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index eaddd9917c..3cc624f49b 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -40,7 +40,7 @@ </return> <argument index="0" name="label" type="String"> </argument> - <argument index="1" name="properties" type="PoolStringArray"> + <argument index="1" name="properties" type="PackedStringArray"> </argument> <argument index="2" name="editor" type="Control"> </argument> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index fea746f32d..771b7d59d4 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -127,7 +127,7 @@ <argument index="1" name="preview_size" type="int"> </argument> <description> - Returns mesh previews rendered at the given size as an [Array] of [Texture]s. + Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s. </description> </method> <method name="open_scene_from_path"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index eaaa87c6f9..d17fd0a661 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -67,11 +67,11 @@ </argument> <argument index="2" name="script" type="Script"> </argument> - <argument index="3" name="icon" type="Texture"> + <argument index="3" name="icon" type="Texture2D"> </argument> <description> Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. - When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. + When given node or resource is selected, the base type will be instanced (e.g. "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. </description> @@ -253,7 +253,7 @@ </description> </method> <method name="get_breakpoints" qualifiers="virtual"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code]. diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index b93274491a..3216541b20 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -21,11 +21,11 @@ <method name="emit_changed"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> - <argument index="2" name="field" type="String" default=""""> + <argument index="2" name="field" type="StringName" default="@"""> </argument> <argument index="3" name="changing" type="bool" default="false"> </argument> @@ -41,7 +41,7 @@ </description> </method> <method name="get_edited_property"> - <return type="String"> + <return type="StringName"> </return> <description> Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property. @@ -93,7 +93,7 @@ </members> <signals> <signal name="multiple_properties_changed"> - <argument index="0" name="properties" type="PoolStringArray"> + <argument index="0" name="properties" type="PackedStringArray"> </argument> <argument index="1" name="value" type="Array"> </argument> @@ -102,7 +102,7 @@ </description> </signal> <signal name="object_id_selected"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -111,7 +111,7 @@ </description> </signal> <signal name="property_changed"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -120,7 +120,7 @@ </description> </signal> <signal name="property_checked"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="bool" type="String"> </argument> @@ -129,14 +129,14 @@ </description> </signal> <signal name="property_keyed"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> Emit it if you want to add this value as an animation key (check for keying being enabled first). </description> </signal> <signal name="property_keyed_with_value"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 8e0f8842e9..aac75c5c8e 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -34,7 +34,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="receiver_func" type="String"> + <argument index="2" name="receiver_func" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant"> </argument> @@ -49,7 +49,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="receiver_func" type="String"> + <argument index="2" name="receiver_func" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant"> </argument> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index 0436f7ce06..e935bf19fc 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -18,7 +18,7 @@ </description> </method> <method name="generate" qualifiers="virtual"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="from" type="Resource"> </argument> @@ -31,7 +31,7 @@ </description> </method> <method name="generate_from_path" qualifiers="virtual"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="path" type="String"> </argument> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 30fc1e0c7b..73ef807c5f 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -50,7 +50,7 @@ </description> </method> <method name="get_favorites" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Gets the list of favorite files and directories for this project. @@ -76,7 +76,7 @@ </description> </method> <method name="get_recent_dirs" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Gets the list of recently visited folders in the file dialog for this project. @@ -126,7 +126,7 @@ <method name="set_favorites"> <return type="void"> </return> - <argument index="0" name="dirs" type="PoolStringArray"> + <argument index="0" name="dirs" type="PackedStringArray"> </argument> <description> Sets the list of favorite files and directories for this project. @@ -135,7 +135,7 @@ <method name="set_initial_value"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -159,7 +159,7 @@ <method name="set_recent_dirs"> <return type="void"> </return> - <argument index="0" name="dirs" type="PoolStringArray"> + <argument index="0" name="dirs" type="PackedStringArray"> </argument> <description> Sets the list of recently visited folders in the file dialog for this project. diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index e7c5ca9c0f..b8c4daab07 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -12,7 +12,7 @@ <method name="add_collision_segments"> <return type="void"> </return> - <argument index="0" name="segments" type="PoolVector3Array"> + <argument index="0" name="segments" type="PackedVector3Array"> </argument> <description> </description> @@ -29,7 +29,7 @@ <method name="add_handles"> <return type="void"> </return> - <argument index="0" name="handles" type="PoolVector3Array"> + <argument index="0" name="handles" type="PackedVector3Array"> </argument> <argument index="1" name="material" type="Material"> </argument> @@ -45,7 +45,7 @@ <method name="add_lines"> <return type="void"> </return> - <argument index="0" name="lines" type="PoolVector3Array"> + <argument index="0" name="lines" type="PackedVector3Array"> </argument> <argument index="1" name="material" type="Material"> </argument> diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index eba75438b9..b1a4a25a5f 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -15,7 +15,7 @@ </return> <argument index="0" name="name" type="String"> </argument> - <argument index="1" name="material" type="SpatialMaterial"> + <argument index="1" name="material" type="StandardMaterial3D"> </argument> <description> Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. @@ -68,7 +68,7 @@ </return> <argument index="0" name="name" type="String"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <argument index="2" name="on_top" type="bool" default="false"> </argument> @@ -118,7 +118,7 @@ </description> </method> <method name="get_material"> - <return type="SpatialMaterial"> + <return type="StandardMaterial3D"> </return> <argument index="0" name="name" type="String"> </argument> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 8cdb9c1c3f..45c153b6dc 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -147,10 +147,10 @@ If [code]true[/code], it is running inside the editor. Useful for tool scripts. </member> <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60"> - The number of fixed iterations per second (for fixed process and physics). + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> - Controls how much physic ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. + Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. </member> <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index da4b1d883a..3dad948629 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -40,8 +40,8 @@ <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0"> The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> - <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> - Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. + <member name="adjustment_color_correction" type="Texture2D" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> + Applies the provided [Texture2D] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0"> The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. @@ -58,9 +58,13 @@ <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> The ambient light's energy. The higher the value, the stronger the light. </member> + <member name="ambient_light_occlusion_color" type="Color" setter="set_ao_color" getter="get_ao_color" default="Color( 0, 0, 0, 1 )"> + </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0"> Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. </member> + <member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0"> + </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false"> If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. </member> @@ -83,7 +87,7 @@ The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. </member> <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )"> - The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant BG_COLOR_SKY] background modes). + The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode. </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> The power of the light emitted by the background. @@ -91,51 +95,6 @@ <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> The background mode. See [enum BGMode] for possible values. </member> - <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> - The [Sky] resource defined as background. - </member> - <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> - The [Sky] resource's custom field of view. - </member> - <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> - The [Sky] resource's rotation expressed as a [Basis]. - </member> - <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> - The [Sky] resource's rotation expressed as Euler angles in radians. - </member> - <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )"> - The [Sky] resource's rotation expressed as Euler angles in degrees. - </member> - <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1"> - The amount of far blur for the depth-of-field effect. - </member> - <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> - The distance from the camera where the far blur effect affects the rendering. - </member> - <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> - If [code]true[/code], enables the depth-of-field far blur effect. - </member> - <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1"> - The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. - </member> - <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> - The length of the transition between the no-blur area and far blur. - </member> - <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1"> - The amount of near blur for the depth-of-field effect. - </member> - <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> - Distance from the camera where the near blur effect affects the rendering. - </member> - <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> - If [code]true[/code], enables the depth-of-field near blur effect. - </member> - <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1"> - The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. - </member> - <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> - The length of the transition between the near blur and no-blur area. - </member> <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )"> The fog's [Color]. </member> @@ -224,9 +183,19 @@ <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest). </member> + <member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05"> + </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> + <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> + </member> + <member name="sky" type="Sky" setter="set_sky" getter="get_sky"> + </member> + <member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> + </member> + <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> + </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> The depth tolerance for screen-space reflections. </member> @@ -254,9 +223,6 @@ <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3"> The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values. </member> - <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )"> - The screen-space ambient occlusion color. - </member> <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0"> The screen-space ambient occlusion edge sharpness. </member> @@ -266,21 +232,12 @@ <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0"> The primary screen-space ambient occlusion intensity. See also [member ssao_radius]. </member> - <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0"> - The secondary screen-space ambient occlusion intensity. See also [member ssao_radius2]. - </member> <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0"> The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light. </member> - <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1"> - The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower. - </member> <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0"> The primary screen-space ambient occlusion radius. </member> - <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0"> - The secondary screen-space ambient occlusion radius. If set to a value higher than [code]0[/code], enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance). - </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> The default exposure used for tonemapping. </member> @@ -292,9 +249,6 @@ </member> </members> <constants> - <constant name="BG_KEEP" value="5" enum="BGMode"> - Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. - </constant> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color]. </constant> @@ -304,18 +258,32 @@ <constant name="BG_SKY" value="2" enum="BGMode"> Displays a user-defined sky in the background. </constant> - <constant name="BG_COLOR_SKY" value="3" enum="BGMode"> - Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than [constant BG_SKY] and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera). - </constant> - <constant name="BG_CANVAS" value="4" enum="BGMode"> + <constant name="BG_CANVAS" value="3" enum="BGMode"> Displays a [CanvasLayer] in the background. </constant> - <constant name="BG_CAMERA_FEED" value="6" enum="BGMode"> + <constant name="BG_KEEP" value="4" enum="BGMode"> + Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. + </constant> + <constant name="BG_CAMERA_FEED" value="5" enum="BGMode"> Displays a camera feed in the background. </constant> - <constant name="BG_MAX" value="7" enum="BGMode"> + <constant name="BG_MAX" value="6" enum="BGMode"> Represents the size of the [enum BGMode] enum. </constant> + <constant name="AMBIENT_SOURCE_BG" value="0" enum="AmbientSource"> + </constant> + <constant name="AMBIENT_SOURCE_DISABLED" value="1" enum="AmbientSource"> + </constant> + <constant name="AMBIENT_SOURCE_COLOR" value="2" enum="AmbientSource"> + </constant> + <constant name="AMBIENT_SOURCE_SKY" value="3" enum="AmbientSource"> + </constant> + <constant name="REFLECTION_SOURCE_BG" value="0" enum="ReflectionSource"> + </constant> + <constant name="REFLECTION_SOURCE_DISABLED" value="1" enum="ReflectionSource"> + </constant> + <constant name="REFLECTION_SOURCE_SKY" value="2" enum="ReflectionSource"> + </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="GlowBlendMode"> Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. </constant> @@ -328,6 +296,8 @@ <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode"> Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. </constant> + <constant name="GLOW_BLEND_MODE_MIX" value="4" enum="GlowBlendMode"> + </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> Linear tonemapper operator. Reads the linear data and passes it on unmodified. </constant> @@ -340,15 +310,6 @@ <constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper"> Academy Color Encoding System tonemapper operator. </constant> - <constant name="DOF_BLUR_QUALITY_LOW" value="0" enum="DOFBlurQuality"> - Low depth-of-field blur quality (fastest). - </constant> - <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1" enum="DOFBlurQuality"> - Medium depth-of-field blur quality. - </constant> - <constant name="DOF_BLUR_QUALITY_HIGH" value="2" enum="DOFBlurQuality"> - High depth-of-field blur quality (slowest). - </constant> <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur"> No blur for the screen-space ambient occlusion effect (fastest). </constant> @@ -361,14 +322,5 @@ <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur"> 3×3 blur for the screen-space ambient occlusion effect (slowest). </constant> - <constant name="SSAO_QUALITY_LOW" value="0" enum="SSAOQuality"> - Low quality for the screen-space ambient occlusion effect (fastest). - </constant> - <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality"> - Low quality for the screen-space ambient occlusion effect. - </constant> - <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality"> - Low quality for the screen-space ambient occlusion effect (slowest). - </constant> </constants> </class> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index b0a2802e43..fcd1aa43c0 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -59,7 +59,7 @@ </return> <argument index="0" name="expression" type="String"> </argument> - <argument index="1" name="input_names" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray( )"> </argument> <description> Parses the expression and returns an [enum Error] code. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 7fa87c2b60..e9477517cf 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -87,16 +87,16 @@ </description> </method> <method name="get_buffer" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="len" type="int"> </argument> <description> - Returns next [code]len[/code] bytes of the file as a [PoolByteArray]. + Returns next [code]len[/code] bytes of the file as a [PackedByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delim" type="String" default="",""> </argument> @@ -252,7 +252,7 @@ </argument> <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags"> </argument> - <argument index="2" name="key" type="PoolByteArray"> + <argument index="2" name="key" type="PackedByteArray"> </argument> <description> Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. @@ -329,7 +329,7 @@ <method name="store_buffer"> <return type="void"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Stores the given array of bytes in the file. @@ -338,12 +338,12 @@ <method name="store_csv_line"> <return type="void"> </return> - <argument index="0" name="values" type="PoolStringArray"> + <argument index="0" name="values" type="PackedStringArray"> </argument> <argument index="1" name="delim" type="String" default="",""> </argument> <description> - Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. + Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. </description> </method> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 5cf252c173..f2c65a8610 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -68,8 +68,8 @@ The currently selected file path of the file dialog. </member> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" /> - <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" default="PoolStringArray( )"> - The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. + <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )"> + The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4"> The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants. @@ -98,7 +98,7 @@ </description> </signal> <signal name="files_selected"> - <argument index="0" name="paths" type="PoolStringArray"> + <argument index="0" name="paths" type="PackedStringArray"> </argument> <description> Emitted when the user selects multiple files. @@ -134,15 +134,15 @@ <theme_items> <theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )"> </theme_item> - <theme_item name="folder" type="Texture"> + <theme_item name="folder" type="Texture2D"> </theme_item> <theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="parent_folder" type="Texture"> + <theme_item name="parent_folder" type="Texture2D"> </theme_item> - <theme_item name="reload" type="Texture"> + <theme_item name="reload" type="Texture2D"> </theme_item> - <theme_item name="toggle_hidden" type="Texture"> + <theme_item name="toggle_hidden" type="Texture2D"> </theme_item> </theme_items> </class> diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml index 37c3597a95..bf0c0b0d34 100644 --- a/doc/classes/FuncRef.xml +++ b/doc/classes/FuncRef.xml @@ -36,7 +36,7 @@ <method name="set_function"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> The name of the referenced function to call on the object, without parentheses or any parameters. diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 76d9620ecf..322143ea9e 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -5,7 +5,7 @@ </brief_description> <description> [GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. - Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/voxel_cone_tracing/high_quality]. + Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/gi_probes/quality]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> @@ -31,34 +31,12 @@ </method> </methods> <members> - <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5"> - Offsets the lookup of the light contribution from the [GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [member normal_bias] should be played around with to minimize self-shadowing and light leaking. - [b]Note:[/b] [code]bias[/code] should usually be above 1.0 as that is the size of the voxels. - </member> - <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false"> - If [code]true[/code], the data for this [GIProbe] will be compressed. Compression saves space, but results in far worse visual quality. - </member> <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data"> The [GIProbeData] resource that holds the data for this [GIProbe]. </member> - <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="4"> - The maximum brightness that the [GIProbe] will recognize. Brightness will be scaled within this range. - </member> - <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> - Energy multiplier. Makes the lighting contribution from the [GIProbe] brighter. - </member> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting. </member> - <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> - If [code]true[/code], ignores the sky contribution when calculating lighting. - </member> - <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0"> - Offsets the lookup into the [GIProbe] based on the object's normal direction. Can be used to reduce some self-shadowing artifacts. - </member> - <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7"> - How much light propagates through the probe internally. A higher value allows light to spread further. - </member> <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1"> Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance. </member> diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index bb1ee4d054..228e1afb4c 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -7,29 +7,83 @@ <tutorials> </tutorials> <methods> + <method name="allocate"> + <return type="void"> + </return> + <argument index="0" name="to_cell_xform" type="Transform"> + </argument> + <argument index="1" name="aabb" type="AABB"> + </argument> + <argument index="2" name="octree_size" type="Vector3"> + </argument> + <argument index="3" name="octree_cells" type="PackedByteArray"> + </argument> + <argument index="4" name="data_cells" type="PackedByteArray"> + </argument> + <argument index="5" name="distance_field" type="PackedByteArray"> + </argument> + <argument index="6" name="level_counts" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> + <method name="get_bounds" qualifiers="const"> + <return type="AABB"> + </return> + <description> + </description> + </method> + <method name="get_data_cells" qualifiers="const"> + <return type="PackedByteArray"> + </return> + <description> + </description> + </method> + <method name="get_level_counts" qualifiers="const"> + <return type="PackedInt32Array"> + </return> + <description> + </description> + </method> + <method name="get_octree_cells" qualifiers="const"> + <return type="PackedByteArray"> + </return> + <description> + </description> + </method> + <method name="get_octree_size" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_to_cell_xform" qualifiers="const"> + <return type="Transform"> + </return> + <description> + </description> + </method> </methods> <members> - <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.4"> + <member name="anisotropy_strength" type="float" setter="set_anisotropy_strength" getter="get_anisotropy_strength" default="0.5"> </member> - <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 1, 1, 1 )"> + <member name="ao" type="float" setter="set_ao" getter="get_ao" default="0.0"> </member> - <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0"> + <member name="ao_size" type="float" setter="set_ao_size" getter="get_ao_size" default="0.5"> </member> - <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false"> + <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5"> </member> - <member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data" default="PoolIntArray( )"> - </member> - <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="1"> + <member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="4.0"> </member> <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> </member> <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> </member> - <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.4"> + <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0"> </member> - <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0"> + <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7"> </member> - <member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false"> </member> </members> <constants> diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 739c860b28..b2d77f6f92 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -51,9 +51,9 @@ </description> </method> <method name="clip_polygon"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> - <argument index="0" name="points" type="PoolVector3Array"> + <argument index="0" name="points" type="PackedVector3Array"> </argument> <argument index="1" name="plane" type="Plane"> </argument> @@ -64,9 +64,9 @@ <method name="clip_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code]. @@ -76,18 +76,18 @@ <method name="clip_polyline_with_polygon_2d"> <return type="Array"> </return> - <argument index="0" name="polyline" type="PoolVector2Array"> + <argument index="0" name="polyline" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon" type="PoolVector2Array"> + <argument index="1" name="polygon" type="PackedVector2Array"> </argument> <description> Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. </description> </method> <method name="convex_hull_2d"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <description> Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. @@ -96,9 +96,9 @@ <method name="exclude_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. @@ -158,7 +158,7 @@ </description> </method> <method name="get_closest_points_between_segments"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="p1" type="Vector3"> </argument> @@ -169,11 +169,11 @@ <argument index="3" name="q2" type="Vector3"> </argument> <description> - Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="get_closest_points_between_segments_2d"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="p1" type="Vector2"> </argument> @@ -184,7 +184,7 @@ <argument index="3" name="q2" type="Vector2"> </argument> <description> - Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="get_uv84_normal_bit"> @@ -199,9 +199,9 @@ <method name="intersect_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. @@ -211,9 +211,9 @@ <method name="intersect_polyline_with_polygon_2d"> <return type="Array"> </return> - <argument index="0" name="polyline" type="PoolVector2Array"> + <argument index="0" name="polyline" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon" type="PoolVector2Array"> + <argument index="1" name="polygon" type="PackedVector2Array"> </argument> <description> Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. @@ -237,7 +237,7 @@ </return> <argument index="0" name="point" type="Vector2"> </argument> - <argument index="1" name="polygon" type="PoolVector2Array"> + <argument index="1" name="polygon" type="PackedVector2Array"> </argument> <description> Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code]. @@ -246,7 +246,7 @@ <method name="is_polygon_clockwise"> <return type="bool"> </return> - <argument index="0" name="polygon" type="PoolVector2Array"> + <argument index="0" name="polygon" type="PackedVector2Array"> </argument> <description> Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code]. @@ -271,7 +271,7 @@ <method name="make_atlas"> <return type="Dictionary"> </return> - <argument index="0" name="sizes" type="PoolVector2Array"> + <argument index="0" name="sizes" type="PackedVector2Array"> </argument> <description> Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2]. @@ -280,9 +280,9 @@ <method name="merge_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. @@ -292,7 +292,7 @@ <method name="offset_polygon_2d"> <return type="Array"> </return> - <argument index="0" name="polygon" type="PoolVector2Array"> + <argument index="0" name="polygon" type="PackedVector2Array"> </argument> <argument index="1" name="delta" type="float"> </argument> @@ -307,7 +307,7 @@ <method name="offset_polyline_2d"> <return type="Array"> </return> - <argument index="0" name="polyline" type="PoolVector2Array"> + <argument index="0" name="polyline" type="PackedVector2Array"> </argument> <argument index="1" name="delta" type="float"> </argument> @@ -370,7 +370,7 @@ </description> </method> <method name="segment_intersects_convex"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Vector3"> </argument> @@ -379,11 +379,11 @@ <argument index="2" name="planes" type="Array"> </argument> <description> - Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PoolVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty. + Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty. </description> </method> <method name="segment_intersects_cylinder"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Vector3"> </argument> @@ -394,7 +394,7 @@ <argument index="3" name="radius" type="float"> </argument> <description> - Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PoolVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. + Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. </description> </method> <method name="segment_intersects_segment_2d"> @@ -413,7 +413,7 @@ </description> </method> <method name="segment_intersects_sphere"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Vector3"> </argument> @@ -424,7 +424,7 @@ <argument index="3" name="sphere_radius" type="float"> </argument> <description> - Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PoolVector3Array]. If yes, returns a [PoolVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. + Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. </description> </method> <method name="segment_intersects_triangle"> @@ -445,21 +445,21 @@ </description> </method> <method name="triangulate_delaunay_2d"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <description> - Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned. + Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> <method name="triangulate_polygon"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> - <argument index="0" name="polygon" type="PoolVector2Array"> + <argument index="0" name="polygon" type="PackedVector2Array"> </argument> <description> - Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned. + Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> </methods> diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index fccd75edad..8259462531 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -66,8 +66,10 @@ The material override for the whole geometry. If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. </member> + <member name="use_dynamic_gi" type="bool" setter="set_flag" getter="get_flag" default="false"> + </member> <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap]. + If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe]. </member> </members> <constants> @@ -87,12 +89,14 @@ In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. </constant> <constant name="FLAG_USE_BAKED_LIGHT" value="0" enum="Flags"> - Will allow the GeometryInstance to be used when baking lights using a [GIProbe] or [BakedLightmap]. + Will allow the GeometryInstance to be used when baking lights using a [GIProbe]. + </constant> + <constant name="FLAG_USE_DYNAMIC_GI" value="1" enum="Flags"> </constant> - <constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="Flags"> + <constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="Flags"> Unused in this class, exposed for consistency with [enum VisualServer.InstanceFlags]. </constant> - <constant name="FLAG_MAX" value="2" enum="Flags"> + <constant name="FLAG_MAX" value="3" enum="Flags"> Represents the size of the [enum Flags] enum. </constant> </constants> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 3ce70045ef..05aebef9de 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -87,11 +87,11 @@ </method> </methods> <members> - <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" default="PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )"> - Gradient's colors returned as a [PoolColorArray]. + <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )"> + Gradient's colors returned as a [PackedColorArray]. </member> - <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" default="PoolRealArray( 0, 1 )"> - Gradient's offsets returned as a [PoolRealArray]. + <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )"> + Gradient's offsets returned as a [PackedFloat32Array]. </member> </members> <constants> diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml index fc9c3fd1bb..242a78b2e4 100644 --- a/doc/classes/GradientTexture.xml +++ b/doc/classes/GradientTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GradientTexture" inherits="Texture" version="4.0"> +<class name="GradientTexture" inherits="Texture2D" version="4.0"> <brief_description> Gradient-filled texture. </brief_description> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index e35fc2b7d1..543afb01ee 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -49,11 +49,11 @@ <method name="connect_node"> <return type="int" enum="Error"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -64,11 +64,11 @@ <method name="disconnect_node"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -94,11 +94,11 @@ <method name="is_node_connected"> <return type="bool"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -149,11 +149,11 @@ <method name="set_connection_activity"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -204,7 +204,7 @@ </description> </signal> <signal name="connection_from_empty"> - <argument index="0" name="to" type="String"> + <argument index="0" name="to" type="StringName"> </argument> <argument index="1" name="to_slot" type="int"> </argument> @@ -215,11 +215,11 @@ </description> </signal> <signal name="connection_request"> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_slot" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_slot" type="int"> </argument> @@ -228,7 +228,7 @@ </description> </signal> <signal name="connection_to_empty"> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_slot" type="int"> </argument> @@ -249,11 +249,11 @@ </description> </signal> <signal name="disconnection_request"> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_slot" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_slot" type="int"> </argument> @@ -308,21 +308,21 @@ </theme_item> <theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )"> </theme_item> - <theme_item name="minus" type="Texture"> + <theme_item name="minus" type="Texture2D"> </theme_item> - <theme_item name="more" type="Texture"> + <theme_item name="more" type="Texture2D"> </theme_item> <theme_item name="port_grab_distance_horizontal" type="int" default="48"> </theme_item> <theme_item name="port_grab_distance_vertical" type="int" default="6"> </theme_item> - <theme_item name="reset" type="Texture"> + <theme_item name="reset" type="Texture2D"> </theme_item> <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> </theme_item> <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> </theme_item> - <theme_item name="snap" type="Texture"> + <theme_item name="snap" type="Texture2D"> </theme_item> </theme_items> </class> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index cc6e3dc7f9..a9f1b15443 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -166,9 +166,9 @@ </argument> <argument index="6" name="color_right" type="Color"> </argument> - <argument index="7" name="custom_left" type="Texture" default="null"> + <argument index="7" name="custom_left" type="Texture2D" default="null"> </argument> - <argument index="8" name="custom_right" type="Texture" default="null"> + <argument index="8" name="custom_right" type="Texture2D" default="null"> </argument> <description> Sets properties of the slot with ID [code]idx[/code]. @@ -254,7 +254,7 @@ <theme_items> <theme_item name="breakpoint" type="StyleBox"> </theme_item> - <theme_item name="close" type="Texture"> + <theme_item name="close" type="Texture2D"> </theme_item> <theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> @@ -270,13 +270,13 @@ </theme_item> <theme_item name="frame" type="StyleBox"> </theme_item> - <theme_item name="port" type="Texture"> + <theme_item name="port" type="Texture2D"> </theme_item> <theme_item name="port_offset" type="int" default="3"> </theme_item> <theme_item name="position" type="StyleBox"> </theme_item> - <theme_item name="resizer" type="Texture"> + <theme_item name="resizer" type="Texture2D"> </theme_item> <theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index 129e15b489..963454dab8 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -13,10 +13,10 @@ <constants> </constants> <theme_items> - <theme_item name="decrement" type="Texture"> + <theme_item name="decrement" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="decrement_highlight" type="Texture"> + <theme_item name="decrement_highlight" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> <theme_item name="grabber" type="StyleBox"> @@ -28,10 +28,10 @@ <theme_item name="grabber_pressed" type="StyleBox"> Used when the grabber is being dragged. </theme_item> - <theme_item name="increment" type="Texture"> + <theme_item name="increment" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="increment_highlight" type="Texture"> + <theme_item name="increment_highlight" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> <theme_item name="scroll" type="StyleBox"> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 2999580e83..be3c94e495 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -13,17 +13,17 @@ <constants> </constants> <theme_items> - <theme_item name="grabber" type="Texture"> + <theme_item name="grabber" type="Texture2D"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> - <theme_item name="grabber_disabled" type="Texture"> + <theme_item name="grabber_disabled" type="Texture2D"> </theme_item> - <theme_item name="grabber_highlight" type="Texture"> + <theme_item name="grabber_highlight" type="Texture2D"> </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> - <theme_item name="tick" type="Texture"> + <theme_item name="tick" type="Texture2D"> </theme_item> </theme_items> </class> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index 6191087c2e..0dd1f96602 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -17,7 +17,7 @@ </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> - <theme_item name="grabber" type="Texture"> + <theme_item name="grabber" type="Texture2D"> </theme_item> <theme_item name="separation" type="int" default="12"> </theme_item> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index bdcbb11ef0..76153ae041 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -55,7 +55,7 @@ </description> </method> <method name="get_response_headers"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the response headers. @@ -124,7 +124,7 @@ </description> </method> <method name="read_response_body_chunk"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Reads one chunk from the response. @@ -137,7 +137,7 @@ </argument> <argument index="1" name="url" type="String"> </argument> - <argument index="2" name="headers" type="PoolStringArray"> + <argument index="2" name="headers" type="PackedStringArray"> </argument> <argument index="3" name="body" type="String" default=""""> </argument> @@ -160,9 +160,9 @@ </argument> <argument index="1" name="url" type="String"> </argument> - <argument index="2" name="headers" type="PoolStringArray"> + <argument index="2" name="headers" type="PackedStringArray"> </argument> - <argument index="3" name="body" type="PoolByteArray"> + <argument index="3" name="body" type="PackedByteArray"> </argument> <description> Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 313f21d8f9..53ca1fc6a9 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -96,7 +96,7 @@ </return> <argument index="0" name="url" type="String"> </argument> - <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )"> </argument> <argument index="2" name="ssl_validate_domain" type="bool" default="true"> </argument> @@ -136,9 +136,9 @@ </argument> <argument index="1" name="response_code" type="int"> </argument> - <argument index="2" name="headers" type="PoolStringArray"> + <argument index="2" name="headers" type="PackedStringArray"> </argument> - <argument index="3" name="body" type="PoolByteArray"> + <argument index="3" name="body" type="PackedByteArray"> </argument> <description> Emitted when a request is completed. diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index bc585df4a0..f8152c813e 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -33,7 +33,7 @@ </tutorials> <methods> <method name="finish"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Closes the current context, and return the computed hash. @@ -51,7 +51,7 @@ <method name="update"> <return type="int" enum="Error"> </return> - <argument index="0" name="chunk" type="PoolByteArray"> + <argument index="0" name="chunk" type="PackedByteArray"> </argument> <description> Updates the computation with the given [code]chunk[/code] of data. diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml index f94089066c..029f3642d2 100644 --- a/doc/classes/HeightMapShape.xml +++ b/doc/classes/HeightMapShape.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data" default="PoolRealArray( 0, 0, 0, 0 )"> + <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 0, 0, 0, 0 )"> Height map data, pool array must be of [member map_width] * [member map_depth] size. </member> <member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 2cd17cb5c5..8bd2213194 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -4,7 +4,7 @@ Image datatype. </brief_description> <description> - Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. + Native image datatype. Contains image data, which can be converted to a [Texture2D], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. </description> <tutorials> </tutorials> @@ -86,14 +86,26 @@ </return> <argument index="0" name="mode" type="int" enum="Image.CompressMode"> </argument> - <argument index="1" name="source" type="int" enum="Image.CompressSource"> + <argument index="1" name="source" type="int" enum="Image.CompressSource" default="0"> </argument> - <argument index="2" name="lossy_quality" type="float"> + <argument index="2" name="lossy_quality" type="float" default="0.7"> </argument> <description> Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants. </description> </method> + <method name="compress_from_channels"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="mode" type="int" enum="Image.CompressMode"> + </argument> + <argument index="1" name="channels" type="int" enum="Image.CompressSource"> + </argument> + <argument index="2" name="lossy_quality" type="float" default="0.7"> + </argument> + <description> + </description> + </method> <method name="convert"> <return type="void"> </return> @@ -138,7 +150,7 @@ </argument> <argument index="3" name="format" type="int" enum="Image.Format"> </argument> - <argument index="4" name="data" type="PoolByteArray"> + <argument index="4" name="data" type="PackedByteArray"> </argument> <description> Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. @@ -169,6 +181,14 @@ Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> + <method name="detect_used_channels"> + <return type="int" enum="Image.UsedChannels"> + </return> + <argument index="0" name="source" type="int" enum="Image.CompressSource" default="0"> + </argument> + <description> + </description> + </method> <method name="expand_x2_hq2x"> <return type="void"> </return> @@ -216,7 +236,7 @@ </description> </method> <method name="get_data" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the image's raw data. @@ -253,7 +273,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Returns the color of the pixel at [code](x, y)[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixelv], but two integer arguments instead of a Vector2 argument. + Returns the color of the pixel at [code](x, y)[/code]. This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2] argument. </description> </method> <method name="get_pixelv" qualifiers="const"> @@ -262,7 +282,7 @@ <argument index="0" name="src" type="Vector2"> </argument> <description> - Returns the color of the pixel at [code]src[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixel], but with a Vector2 argument instead of two integer arguments. + Returns the color of the pixel at [code]src[/code]. This is the same as [method get_pixel], but with a [Vector2] argument instead of two integer arguments. </description> </method> <method name="get_rect" qualifiers="const"> @@ -335,7 +355,7 @@ <method name="load_jpg_from_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Loads an image from the binary contents of a JPEG file. @@ -344,7 +364,7 @@ <method name="load_png_from_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Loads an image from the binary contents of a PNG file. @@ -353,19 +373,12 @@ <method name="load_webp_from_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Loads an image from the binary contents of a WebP file. </description> </method> - <method name="lock"> - <return type="void"> - </return> - <description> - Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel. - </description> - </method> <method name="normalmap_to_xy"> <return type="void"> </return> @@ -439,14 +452,11 @@ <argument index="2" name="color" type="Color"> </argument> <description> - Sets the [Color] of the pixel at [code](x, y)[/code] if the image is locked. Example: + Sets the [Color] of the pixel at [code](x, y)[/code]. Example: [codeblock] var img = Image.new() img.create(img_width, img_height, false, Image.FORMAT_RGBA8) - img.lock() - img.set_pixel(x, y, color) # Works - img.unlock() - img.set_pixel(x, y, color) # Does not have an effect + img.set_pixel(x, y, color) [/codeblock] </description> </method> @@ -458,14 +468,11 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code] if the image is locked. Note that the [code]dst[/code] values must be integers. Example: + Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code]. Note that the [code]dst[/code] values must be integers. Example: [codeblock] var img = Image.new() img.create(img_width, img_height, false, Image.FORMAT_RGBA8) - img.lock() - img.set_pixelv(Vector2(x, y), color) # Works - img.unlock() - img.set_pixelv(Vector2(x, y), color) # Does not have an effect + img.set_pixelv(Vector2(x, y), color) [/codeblock] </description> </method> @@ -483,24 +490,17 @@ Converts the raw data from the sRGB colorspace to a linear scale. </description> </method> - <method name="unlock"> - <return type="void"> - </return> - <description> - Unlocks the data and prevents changes. - </description> - </method> </methods> <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PoolByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> + <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PackedByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> Holds all of the image's color data in a given format. See [enum Format] constants. </member> </members> <constants> - <constant name="MAX_WIDTH" value="16384"> + <constant name="MAX_WIDTH" value="16777216"> The maximal width allowed for [Image] resources. </constant> - <constant name="MAX_HEIGHT" value="16384"> + <constant name="MAX_HEIGHT" value="16777216"> The maximal height allowed for [Image] resources. </constant> <constant name="FORMAT_L8" value="0" enum="Format"> @@ -526,8 +526,7 @@ <constant name="FORMAT_RGBA4444" value="6" enum="Format"> OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 4. </constant> - <constant name="FORMAT_RGBA5551" value="7" enum="Format"> - OpenGL texture format [code]GL_RGB5_A1[/code] where 5 bits of depth for each component of RGB and one bit for alpha. + <constant name="FORMAT_RGB565" value="7" enum="Format"> </constant> <constant name="FORMAT_RF" value="8" enum="Format"> OpenGL texture format [code]GL_R32F[/code] where there's one component, a 32-bit floating-point value. @@ -624,7 +623,11 @@ [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8_PUNCHTHROUGH_ALPHA1[/code] variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> - <constant name="FORMAT_MAX" value="37" enum="Format"> + <constant name="FORMAT_ETC2_RA_AS_RG" value="37" enum="Format"> + </constant> + <constant name="FORMAT_DXT5_RA_AS_RG" value="38" enum="Format"> + </constant> + <constant name="FORMAT_MAX" value="39" enum="Format"> Represents the size of the [enum Format] enum. </constant> <constant name="INTERPOLATE_NEAREST" value="0" enum="Interpolation"> @@ -670,6 +673,18 @@ <constant name="COMPRESS_ETC2" value="4" enum="CompressMode"> Use ETC2 compression. </constant> + <constant name="USED_CHANNELS_L" value="0" enum="UsedChannels"> + </constant> + <constant name="USED_CHANNELS_LA" value="1" enum="UsedChannels"> + </constant> + <constant name="USED_CHANNELS_R" value="2" enum="UsedChannels"> + </constant> + <constant name="USED_CHANNELS_RG" value="3" enum="UsedChannels"> + </constant> + <constant name="USED_CHANNELS_RGB" value="4" enum="UsedChannels"> + </constant> + <constant name="USED_CHANNELS_RGBA" value="5" enum="UsedChannels"> + </constant> <constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource"> Source texture (before compression) is a regular texture. Default for all textures. </constant> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 7e3e818773..98eb42831b 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -1,39 +1,21 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ImageTexture" inherits="Texture" version="4.0"> +<class name="ImageTexture" inherits="Texture2D" version="4.0"> <brief_description> - A [Texture] based on an [Image]. + A [Texture2D] based on an [Image]. </brief_description> <description> - A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image]. + A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image]. </description> <tutorials> </tutorials> <methods> - <method name="create"> - <return type="void"> - </return> - <argument index="0" name="width" type="int"> - </argument> - <argument index="1" name="height" type="int"> - </argument> - <argument index="2" name="format" type="int" enum="Image.Format"> - </argument> - <argument index="3" name="flags" type="int" default="7"> - </argument> - <description> - Create a new [ImageTexture] with [code]width[/code] and [code]height[/code]. - [code]format[/code] is a value from [enum Image.Format], [code]flags[/code] is any combination of [enum Texture.Flags]. - </description> - </method> <method name="create_from_image"> <return type="void"> </return> <argument index="0" name="image" type="Image"> </argument> - <argument index="1" name="flags" type="int" default="7"> - </argument> <description> - Create a new [ImageTexture] from an [Image] with [code]flags[/code] from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format]. + Create a new [ImageTexture] from an [Image]. </description> </method> <method name="get_format" qualifiers="const"> @@ -43,52 +25,26 @@ Returns the format of the [ImageTexture], one of [enum Image.Format]. </description> </method> - <method name="load"> - <return type="int" enum="Error"> + <method name="set_size_override"> + <return type="void"> </return> - <argument index="0" name="path" type="String"> + <argument index="0" name="size" type="Vector2"> </argument> <description> - Load an [ImageTexture] from a file path. + Resizes the [ImageTexture] to the specified dimensions. </description> </method> - <method name="set_data"> + <method name="update"> <return type="void"> </return> <argument index="0" name="image" type="Image"> </argument> - <description> - Sets the [Image] of this [ImageTexture]. - </description> - </method> - <method name="set_size_override"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> + <argument index="1" name="immediate" type="bool" default="false"> </argument> <description> - Resizes the [ImageTexture] to the specified dimensions. </description> </method> </methods> - <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" /> - <member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> - The storage quality for [constant STORAGE_COMPRESS_LOSSY]. - </member> - <member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage" default="0"> - The storage type (raw, lossy, or compressed). - </member> - </members> <constants> - <constant name="STORAGE_RAW" value="0" enum="Storage"> - [Image] data is stored raw and unaltered. - </constant> - <constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage"> - [Image] data is compressed with a lossy algorithm. You can set the storage quality with [member lossy_quality]. - </constant> - <constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage"> - [Image] data is compressed with a lossless algorithm. - </constant> </constants> </class> diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index bb58192313..710e929d1a 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -38,7 +38,7 @@ </return> <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> </argument> - <argument index="1" name="texture" type="Texture" default="null"> + <argument index="1" name="texture" type="Texture2D" default="null"> </argument> <description> Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index b7afe57218..557a63b1cc 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -13,7 +13,7 @@ <method name="action_press"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="strength" type="float" default="1.0"> </argument> @@ -26,7 +26,7 @@ <method name="action_release"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> If the specified action is already pressed, this will release it. @@ -54,7 +54,7 @@ <method name="get_action_strength" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. @@ -202,7 +202,7 @@ <method name="is_action_just_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. @@ -212,7 +212,7 @@ <method name="is_action_just_released" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. @@ -221,7 +221,7 @@ <method name="is_action_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. @@ -250,10 +250,10 @@ <method name="is_key_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="scancode" type="int"> + <argument index="0" name="keycode" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the key. You can pass a [enum KeyList] constant. + Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant. </description> </method> <method name="is_mouse_button_pressed" qualifiers="const"> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 9e3764206b..413e217b45 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -31,7 +31,7 @@ <method name="get_action_strength" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. @@ -40,7 +40,7 @@ <method name="is_action" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if this input event matches a pre-defined action of any type. @@ -49,7 +49,7 @@ <method name="is_action_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="allow_echo" type="bool" default="false"> </argument> @@ -60,7 +60,7 @@ <method name="is_action_released" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 2dac693a52..1c38ff8e8f 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="action" type="String" setter="set_action" getter="get_action" default=""""> + <member name="action" type="StringName" setter="set_action" getter="get_action" default="@"""> The action's name. Actions are accessed via this [String]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 637f697f01..42ac7e58d9 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -10,12 +10,20 @@ <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> - <method name="get_scancode_with_modifiers" qualifiers="const"> + <method name="get_keycode_with_modifiers" qualifiers="const"> <return type="int"> </return> <description> - Returns the scancode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers]. - To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_scancode_string(event.get_scancode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. + Returns the keycode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers]. + To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. + </description> + </method> + <method name="get_physical_keycode_with_modifiers" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the physical keycode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers]. + To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. </description> </method> </methods> @@ -26,9 +34,13 @@ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released. </member> - <member name="scancode" type="int" setter="set_scancode" getter="get_scancode" default="0"> - The key scancode, which corresponds to one of the [enum KeyList] constants. - To get a human-readable representation of the [InputEventKey], use [code]OS.get_scancode_string(event.scancode)[/code] where [code]event[/code] is the [InputEventKey]. + <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0"> + The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout. + To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. + </member> + <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0"> + Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. + To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> <member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0"> The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index aa3400dd97..da93d7fb53 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -13,7 +13,7 @@ <method name="action_add_event"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="event" type="InputEvent"> </argument> @@ -24,7 +24,7 @@ <method name="action_erase_event"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="event" type="InputEvent"> </argument> @@ -35,7 +35,7 @@ <method name="action_erase_events"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Removes all events from an action. @@ -44,7 +44,7 @@ <method name="action_has_event"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="event" type="InputEvent"> </argument> @@ -55,7 +55,7 @@ <method name="action_set_deadzone"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="deadzone" type="float"> </argument> @@ -66,7 +66,7 @@ <method name="add_action"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="deadzone" type="float" default="0.5"> </argument> @@ -78,7 +78,7 @@ <method name="erase_action"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Removes an action from the [InputMap]. @@ -89,7 +89,7 @@ </return> <argument index="0" name="event" type="InputEvent"> </argument> - <argument index="1" name="action" type="String"> + <argument index="1" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. @@ -98,7 +98,7 @@ <method name="get_action_list"> <return type="Array"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns an array of [InputEvent]s associated with a given action. @@ -114,7 +114,7 @@ <method name="has_action" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if the [InputMap] has a registered action with the given name. diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index c1d920c2c1..39827f6604 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -4,8 +4,8 @@ Placeholder for the root [Node] of a [PackedScene]. </brief_description> <description> - Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstancePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively. - The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. + Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively. + The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. </description> <tutorials> </tutorials> @@ -24,7 +24,7 @@ <return type="String"> </return> <description> - Gets the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]. + Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance]. </description> </method> <method name="get_stored_values"> @@ -35,15 +35,6 @@ <description> </description> </method> - <method name="replace_by_instance"> - <return type="void"> - </return> - <argument index="0" name="custom_scene" type="PackedScene" default="null"> - </argument> - <description> - Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. - </description> - </method> </methods> <constants> </constants> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 5c4a956c08..c6ed1e22ed 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -14,7 +14,7 @@ <method name="add_icon_item"> <return type="void"> </return> - <argument index="0" name="icon" type="Texture"> + <argument index="0" name="icon" type="Texture2D"> </argument> <argument index="1" name="selectable" type="bool" default="true"> </argument> @@ -27,7 +27,7 @@ </return> <argument index="0" name="text" type="String"> </argument> - <argument index="1" name="icon" type="Texture" default="null"> + <argument index="1" name="icon" type="Texture2D" default="null"> </argument> <argument index="2" name="selectable" type="bool" default="true"> </argument> @@ -88,7 +88,7 @@ </description> </method> <method name="get_item_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -142,7 +142,7 @@ </description> </method> <method name="get_selected_items"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns an array with the indexes of the selected items. @@ -286,10 +286,10 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="icon" type="Texture"> + <argument index="1" name="icon" type="Texture2D"> </argument> <description> - Sets (or replaces) the icon's [Texture] associated with the specified index. + Sets (or replaces) the icon's [Texture2D] associated with the specified index. </description> </method> <method name="set_item_icon_modulate"> diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml index ab39462870..a1d172e4b1 100644 --- a/doc/classes/LargeTexture.xml +++ b/doc/classes/LargeTexture.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LargeTexture" inherits="Texture" version="4.0"> +<class name="LargeTexture" inherits="Texture2D" version="4.0"> <brief_description> - A [Texture] capable of storing many smaller textures with offsets. + A [Texture2D] capable of storing many smaller textures with offsets. </brief_description> <description> - A [Texture] capable of storing many smaller textures with offsets. - You can dynamically add pieces ([Texture]s) to this [LargeTexture] using different offsets. + A [Texture2D] capable of storing many smaller textures with offsets. + You can dynamically add pieces ([Texture2D]s) to this [LargeTexture] using different offsets. </description> <tutorials> </tutorials> @@ -15,7 +15,7 @@ </return> <argument index="0" name="ofs" type="Vector2"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> Adds [code]texture[/code] to this [LargeTexture], starting on offset [code]ofs[/code]. @@ -45,12 +45,12 @@ </description> </method> <method name="get_piece_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Returns the [Texture] of the piece with the index [code]idx[/code]. + Returns the [Texture2D] of the piece with the index [code]idx[/code]. </description> </method> <method name="set_piece_offset"> @@ -69,10 +69,10 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Sets the [Texture] of the piece with index [code]idx[/code] to [code]texture[/code]. + Sets the [Texture2D] of the piece with index [code]idx[/code] to [code]texture[/code]. </description> </method> <method name="set_size"> @@ -85,9 +85,6 @@ </description> </method> </methods> - <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index 763f3b4b41..a2867a50d2 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -48,7 +48,7 @@ The light's strength multiplier. </member> <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0"> - Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe]. + Secondary multiplier used with indirect light (light bounces). Used with [GIProbe]. </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. @@ -109,16 +109,18 @@ <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param"> Constant for accessing [member DirectionalLight.directional_shadow_split_3]. </constant> - <constant name="PARAM_SHADOW_NORMAL_BIAS" value="12" enum="Param"> + <constant name="PARAM_SHADOW_FADE_START" value="12" enum="Param"> + </constant> + <constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param"> Constant for accessing [member DirectionalLight.directional_shadow_normal_bias]. </constant> - <constant name="PARAM_SHADOW_BIAS" value="13" enum="Param"> + <constant name="PARAM_SHADOW_BIAS" value="14" enum="Param"> Constant for accessing [member shadow_bias]. </constant> - <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="Param"> + <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="15" enum="Param"> Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale]. </constant> - <constant name="PARAM_MAX" value="15" enum="Param"> + <constant name="PARAM_MAX" value="16" enum="Param"> Represents the size of the [enum Param] enum. </constant> <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index 5f3ad1b865..2862190d4d 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -64,14 +64,11 @@ <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" default="0.0"> Smoothing value for shadows. </member> - <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length" default="0.0"> - Smooth shadow gradient length. - </member> <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" default="1"> The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - [Texture] used for the Light2D's appearance. + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + [Texture2D] used for the Light2D's appearance. </member> <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" default="1.0"> The [code]texture[/code]'s scale factor. @@ -93,19 +90,10 @@ <constant name="SHADOW_FILTER_NONE" value="0" enum="ShadowFilter"> No filter applies to the shadow map. See [member shadow_filter]. </constant> - <constant name="SHADOW_FILTER_PCF3" value="1" enum="ShadowFilter"> - Percentage closer filtering (3 samples) applies to the shadow map. See [member shadow_filter]. - </constant> - <constant name="SHADOW_FILTER_PCF5" value="2" enum="ShadowFilter"> + <constant name="SHADOW_FILTER_PCF5" value="1" enum="ShadowFilter"> Percentage closer filtering (5 samples) applies to the shadow map. See [member shadow_filter]. </constant> - <constant name="SHADOW_FILTER_PCF7" value="3" enum="ShadowFilter"> - Percentage closer filtering (7 samples) applies to the shadow map. See [member shadow_filter]. - </constant> - <constant name="SHADOW_FILTER_PCF9" value="4" enum="ShadowFilter"> - Percentage closer filtering (9 samples) applies to the shadow map. See [member shadow_filter]. - </constant> - <constant name="SHADOW_FILTER_PCF13" value="5" enum="ShadowFilter"> + <constant name="SHADOW_FILTER_PCF13" value="2" enum="ShadowFilter"> Percentage closer filtering (13 samples) applies to the shadow map. See [member shadow_filter]. </constant> </constants> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index b5983e00b9..68cec3e624 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -5,7 +5,6 @@ </brief_description> <description> A line through several points in 2D space. - [b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb]. </description> <tutorials> </tutorials> @@ -85,7 +84,7 @@ <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode" default="0"> The style for the points between the start and the end. </member> - <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )"> + <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )"> The points that form the lines. The line is drawn between every point set in this array. </member> <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8"> @@ -94,7 +93,7 @@ <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit" default="2.0"> The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [constant LINE_JOINT_SHARP]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. </member> <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0"> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 512401d2de..447446ba10 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -22,6 +22,8 @@ - Ctrl + N: Like the down arrow key, move the cursor to the next line - Ctrl + D: Like the Delete key, delete the character on the right side of cursor - Ctrl + H: Like the Backspace key, delete the character on the left side of the cursor + - Ctrl + A: Like the Home key, move the cursor to the beginning of the line + - Ctrl + E: Like the End key, move the cursor to the end of the line - Command + Left arrow: Like the Home key, move the cursor to the beginning of the line - Command + Right arrow: Like the End key, move the cursor to the end of the line </description> @@ -128,7 +130,7 @@ <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default=""""> Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]). </member> - <member name="right_icon" type="Texture" setter="set_right_icon" getter="get_right_icon"> + <member name="right_icon" type="Texture2D" setter="set_right_icon" getter="get_right_icon"> Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to [code]false[/code]. </member> <member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false"> @@ -209,7 +211,7 @@ </constant> </constants> <theme_items> - <theme_item name="clear" type="Texture"> + <theme_item name="clear" type="Texture2D"> Texture for the clear button. See [member clear_button_enabled]. </theme_item> <theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml index 33352b7d98..d3cfc94a8c 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/LineShape2D.xml @@ -14,7 +14,7 @@ <member name="d" type="float" setter="set_d" getter="get_d" default="0.0"> The line's distance from the origin. </member> - <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, -1 )"> + <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, 1 )"> The line's normal. </member> </members> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 2ae7eacdb6..af71c30936 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -26,9 +26,9 @@ func _input_event(event): # Record keys. if event is InputEventKey and event.pressed and !event.echo: - keys_typed.append(OS.get_scancode_string(event.scancode)) + keys_typed.append(OS.get_keycode_string(event.keycode)) # Quit on Escape press. - if event.scancode == KEY_ESCAPE: + if event.keycode == KEY_ESCAPE: quit = true # Quit on any mouse click. if event is InputEventMouseButton: @@ -46,7 +46,7 @@ <method name="_drop_files" qualifiers="virtual"> <return type="void"> </return> - <argument index="0" name="files" type="PoolStringArray"> + <argument index="0" name="files" type="PackedStringArray"> </argument> <argument index="1" name="from_screen" type="int"> </argument> diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index f9ca391f1c..4250ffd700 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Marshalls" inherits="Reference" version="4.0"> +<class name="Marshalls" inherits="Object" version="4.0"> <brief_description> Data transformation (marshalling) and encoding helpers. </brief_description> @@ -10,12 +10,12 @@ </tutorials> <methods> <method name="base64_to_raw"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="base64_str" type="String"> </argument> <description> - Returns a decoded [PoolByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. + Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. </description> </method> <method name="base64_to_utf8"> @@ -42,10 +42,10 @@ <method name="raw_to_base64"> <return type="String"> </return> - <argument index="0" name="array" type="PoolByteArray"> + <argument index="0" name="array" type="PackedByteArray"> </argument> <description> - Returns a Base64-encoded string of a given [PoolByteArray]. + Returns a Base64-encoded string of a given [PackedByteArray]. </description> </method> <method name="utf8_to_base64"> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index ba74be330e..a0c1979646 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -13,7 +13,7 @@ <members> <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass"> Sets the [Material] to be used for the next pass. This renders the object again using a different material. - [b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial". + [b]Note:[/b] only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial". </member> <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index b2d979239c..dc7ffc8934 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -49,7 +49,7 @@ </description> </method> <method name="get_faces" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. @@ -103,7 +103,7 @@ </methods> <members> <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )"> - Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit]. + Sets a hint to be used for lightmap resolution. </member> </members> <constants> @@ -116,18 +116,12 @@ <constant name="PRIMITIVE_LINE_STRIP" value="2" enum="PrimitiveType"> Render array as line strip. </constant> - <constant name="PRIMITIVE_LINE_LOOP" value="3" enum="PrimitiveType"> - Render array as line loop (like line strip, but closed). - </constant> - <constant name="PRIMITIVE_TRIANGLES" value="4" enum="PrimitiveType"> + <constant name="PRIMITIVE_TRIANGLES" value="3" enum="PrimitiveType"> Render array as triangles (every three vertices a triangle is created). </constant> - <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5" enum="PrimitiveType"> + <constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType"> Render array as triangle strips. </constant> - <constant name="PRIMITIVE_TRIANGLE_FAN" value="6" enum="PrimitiveType"> - Render array as triangle fans. - </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> Blend shapes are normalized. </constant> @@ -161,12 +155,6 @@ <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> Mesh array uses indices. </constant> - <constant name="ARRAY_COMPRESS_BASE" value="9" enum="ArrayFormat"> - Used internally to calculate other [code]ARRAY_COMPRESS_*[/code] enum values. Do not use. - </constant> - <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat"> - Flag used to mark a compressed (half float) vertex array. - </constant> <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> Flag used to mark a compressed (half float) normal array. </constant> @@ -182,23 +170,14 @@ <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> - <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> - Flag used to mark a compressed bone array. - </constant> - <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> - Flag used to mark a compressed (half float) weight array. - </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat"> - Flag used to mark that the array uses 16-bit bones instead of 8-bit. - </constant> - <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat"> - Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly. + <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat"> + Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. </constant> <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> Array of vertices. diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 5c6401521a..81ff5969e3 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -57,7 +57,7 @@ </description> </method> <method name="get_edge_faces" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -160,7 +160,7 @@ </description> </method> <method name="get_vertex_bones" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -185,7 +185,7 @@ </description> </method> <method name="get_vertex_edges" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -194,7 +194,7 @@ </description> </method> <method name="get_vertex_faces" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -248,7 +248,7 @@ </description> </method> <method name="get_vertex_weights" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -303,7 +303,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="bones" type="PoolIntArray"> + <argument index="1" name="bones" type="PackedInt32Array"> </argument> <description> Sets the bones of the given vertex. @@ -380,7 +380,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="weights" type="PoolRealArray"> + <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> Sets the bone weights of the given vertex. diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index a14ad1d4cd..2781dd4626 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -15,11 +15,11 @@ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> The [Mesh] that will be drawn by the [MeshInstance2D]. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> The normal map that will be used if using the default [CanvasItemMaterial]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> </members> <signals> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index 95c046398a..a96f6d7231 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -36,7 +36,7 @@ </description> </method> <method name="get_item_list" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns the list of item IDs in use. @@ -79,13 +79,12 @@ </description> </method> <method name="get_item_preview" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="id" type="int"> </argument> <description> - Returns a generated item preview (a 3D rendering in isometric perspective). - [b]Note:[/b] Since item previews are only generated in an editor context, this function will return an empty [Texture] in a running project. + When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project. </description> </method> <method name="get_item_shapes" qualifiers="const"> @@ -164,7 +163,7 @@ </return> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> Sets a texture to use as the item's preview icon in the editor. diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml index 6e18517ef1..bcc9adf90f 100644 --- a/doc/classes/MeshTexture.xml +++ b/doc/classes/MeshTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MeshTexture" inherits="Texture" version="4.0"> +<class name="MeshTexture" inherits="Texture2D" version="4.0"> <brief_description> Simple texture that uses a mesh to draw itself. </brief_description> @@ -11,10 +11,9 @@ <methods> </methods> <members> - <member name="base_texture" type="Texture" setter="set_base_texture" getter="get_base_texture"> + <member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture"> Sets the base texture that the Mesh will use to draw. </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2( 0, 0 )"> Sets the size of the image, needed for reference. </member> diff --git a/doc/classes/MonoGCHandle.xml b/doc/classes/MonoGCHandle.xml new file mode 100644 index 0000000000..1e33dd1359 --- /dev/null +++ b/doc/classes/MonoGCHandle.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MonoGCHandle" inherits="Reference" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 270ac08178..24b87f8e28 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -57,17 +57,6 @@ Returns the [Transform2D] of a specific instance. </description> </method> - <method name="set_as_bulk_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PoolRealArray"> - </argument> - <description> - Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. - All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc... - [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. - </description> - </method> <method name="set_instance_color"> <return type="void"> </return> @@ -77,7 +66,7 @@ </argument> <description> Sets the color of a specific instance. - For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [MultiMesh] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material. + For the color to take effect, ensure that [member use_colors] is [code]true[/code] on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is [code]true[/code] on the material. </description> </method> <method name="set_instance_custom_data"> @@ -88,7 +77,8 @@ <argument index="1" name="custom_data" type="Color"> </argument> <description> - Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum CustomDataFormat] used. + Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. + For the custom data to be used, ensure that [member use_custom_data] is [code]true[/code]. </description> </method> <method name="set_instance_transform"> @@ -115,11 +105,11 @@ </method> </methods> <members> - <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat" default="0"> - Format of colors in color array that gets passed to shader. + <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )"> + </member> + <member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array"> </member> - <member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat" default="0"> - Format of custom data in custom data array that gets passed to shader. + <member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array"> </member> <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0"> Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count]. @@ -127,9 +117,17 @@ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> Mesh to be drawn. </member> + <member name="transform_2d_array" type="PackedVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array"> + </member> + <member name="transform_array" type="PackedVector3Array" setter="_set_transform_array" getter="_get_transform_array"> + </member> <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat" default="0"> Format of transform used to transform mesh, either 2D or 3D. </member> + <member name="use_colors" type="bool" setter="set_use_colors" getter="is_using_colors" default="false"> + </member> + <member name="use_custom_data" type="bool" setter="set_use_custom_data" getter="is_using_custom_data" default="false"> + </member> <member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count" default="-1"> Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. </member> @@ -141,23 +139,5 @@ <constant name="TRANSFORM_3D" value="1" enum="TransformFormat"> Use this when using 3D transforms. </constant> - <constant name="COLOR_NONE" value="0" enum="ColorFormat"> - Use when you are not using per-instance [Color]s. - </constant> - <constant name="COLOR_8BIT" value="1" enum="ColorFormat"> - Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision. - </constant> - <constant name="COLOR_FLOAT" value="2" enum="ColorFormat"> - The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color]. - </constant> - <constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat"> - Use when you are not using per-instance custom data. - </constant> - <constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat"> - Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision and range. Floats packed into 8 bits can only represent values between 0 and 1, numbers outside that range will be clamped. - </constant> - <constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat"> - The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision. - </constant> </constants> </class> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index 5c0e85d3fe..2fe5447a27 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -15,11 +15,11 @@ <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> The normal map that will be used if using the default [CanvasItemMaterial]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> </members> <signals> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index f34d3c5da4..9c753818d9 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -19,7 +19,7 @@ </description> </method> <method name="get_network_connected_peers" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]. @@ -65,7 +65,7 @@ <method name="send_bytes"> <return type="int" enum="Error"> </return> - <argument index="0" name="bytes" type="PoolByteArray"> + <argument index="0" name="bytes" type="PackedByteArray"> </argument> <argument index="1" name="id" type="int" default="0"> </argument> @@ -88,7 +88,7 @@ </methods> <members> <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> - If [code]true[/code] (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to [code]true[/code]), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. + If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> @@ -126,7 +126,7 @@ <signal name="network_peer_packet"> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="packet" type="PoolByteArray"> + <argument index="1" name="packet" type="PackedByteArray"> </argument> <description> Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. @@ -151,15 +151,9 @@ <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode"> Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. </constant> - <constant name="RPC_MODE_SLAVE" value="3" enum="RPCMode"> - [i]Deprecated.[/i] Use [constant RPC_MODE_PUPPET] instead. Analogous to the [code]slave[/code] keyword. - </constant> <constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode"> Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword. </constant> - <constant name="RPC_MODE_SYNC" value="4" enum="RPCMode"> - [i]Deprecated.[/i] Use [constant RPC_MODE_REMOTESYNC] instead. Analogous to the [code]sync[/code] keyword. - </constant> <constant name="RPC_MODE_MASTERSYNC" value="5" enum="RPCMode"> Behave like [constant RPC_MODE_MASTER] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword. </constant> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index 615ccf6c36..93170bca4a 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -4,39 +4,39 @@ Mesh-based navigation and pathfinding node. </brief_description> <description> - Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes, but they can also be added on the fly with [method navmesh_add]. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. + Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. </description> <tutorials> </tutorials> <methods> - <method name="get_closest_point"> + <method name="get_closest_point" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="to_point" type="Vector3"> </argument> <description> - Returns the navigation point closest to the point given. Points are in local coordinate space. + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. </description> </method> - <method name="get_closest_point_normal"> + <method name="get_closest_point_normal" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="to_point" type="Vector3"> </argument> <description> - Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on. + Returns the normal for the point returned by [method get_closest_point]. </description> </method> - <method name="get_closest_point_owner"> - <return type="Object"> + <method name="get_closest_point_owner" qualifiers="const"> + <return type="RID"> </return> <argument index="0" name="to_point" type="Vector3"> </argument> <description> - Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). + Returns the owner region RID for the point returned by [method get_closest_point]. </description> </method> - <method name="get_closest_point_to_segment"> + <method name="get_closest_point_to_segment" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="start" type="Vector3"> @@ -46,57 +46,34 @@ <argument index="2" name="use_collision" type="bool" default="false"> </argument> <description> - Returns the navigation point closest to the given line segment. When enabling [code]use_collision[/code], only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned. + Returns the closest point between the navigation surface and the segment. </description> </method> - <method name="get_simple_path"> - <return type="PoolVector3Array"> + <method name="get_rid" qualifiers="const"> + <return type="RID"> </return> - <argument index="0" name="start" type="Vector3"> - </argument> - <argument index="1" name="end" type="Vector3"> - </argument> - <argument index="2" name="optimize" type="bool" default="true"> - </argument> - <description> - Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. - </description> - </method> - <method name="navmesh_add"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="NavigationMesh"> - </argument> - <argument index="1" name="xform" type="Transform"> - </argument> - <argument index="2" name="owner" type="Object" default="null"> - </argument> <description> - Adds a [NavigationMesh]. Returns an ID for use with [method navmesh_remove] or [method navmesh_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner]. </description> </method> - <method name="navmesh_remove"> - <return type="void"> + <method name="get_simple_path" qualifiers="const"> + <return type="PackedVector3Array"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="start" type="Vector3"> </argument> - <description> - Removes the [NavigationMesh] with the given ID. - </description> - </method> - <method name="navmesh_set_transform"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="end" type="Vector3"> </argument> - <argument index="1" name="xform" type="Transform"> + <argument index="2" name="optimize" type="bool" default="true"> </argument> <description> - Sets the transform applied to the [NavigationMesh] with the given ID. + Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. </description> </method> </methods> <members> + <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> + </member> + <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0"> + </member> <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )"> Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction. </member> diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml index ba15c59238..dcbfbc2350 100644 --- a/doc/classes/Navigation2D.xml +++ b/doc/classes/Navigation2D.xml @@ -4,76 +4,55 @@ 2D navigation and pathfinding node. </brief_description> <description> - Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. By default, these are automatically collected from child [NavigationPolygonInstance] nodes, but they can also be added on the fly with [method navpoly_add]. + Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes. </description> <tutorials> </tutorials> <methods> - <method name="get_closest_point"> + <method name="get_closest_point" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="to_point" type="Vector2"> </argument> <description> - Returns the navigation point closest to the point given. Points are in local coordinate space. + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. </description> </method> - <method name="get_closest_point_owner"> - <return type="Object"> + <method name="get_closest_point_owner" qualifiers="const"> + <return type="RID"> </return> <argument index="0" name="to_point" type="Vector2"> </argument> <description> - Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). + Returns the owner region RID for the point returned by [method get_closest_point]. </description> </method> - <method name="get_simple_path"> - <return type="PoolVector2Array"> + <method name="get_rid" qualifiers="const"> + <return type="RID"> </return> - <argument index="0" name="start" type="Vector2"> - </argument> - <argument index="1" name="end" type="Vector2"> - </argument> - <argument index="2" name="optimize" type="bool" default="true"> - </argument> - <description> - Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible. - </description> - </method> - <method name="navpoly_add"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="NavigationPolygon"> - </argument> - <argument index="1" name="xform" type="Transform2D"> - </argument> - <argument index="2" name="owner" type="Object" default="null"> - </argument> <description> - Adds a [NavigationPolygon]. Returns an ID for use with [method navpoly_remove] or [method navpoly_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner]. </description> </method> - <method name="navpoly_remove"> - <return type="void"> + <method name="get_simple_path" qualifiers="const"> + <return type="PackedVector2Array"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="start" type="Vector2"> </argument> - <description> - Removes the [NavigationPolygon] with the given ID. - </description> - </method> - <method name="navpoly_set_transform"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="end" type="Vector2"> </argument> - <argument index="1" name="xform" type="Transform2D"> + <argument index="2" name="optimize" type="bool" default="true"> </argument> <description> - Sets the transform applied to the [NavigationPolygon] with the given ID. + Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible. </description> </method> </methods> + <members> + <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="10.0"> + </member> + <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="100.0"> + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/Navigation2DServer.xml b/doc/classes/Navigation2DServer.xml new file mode 100644 index 0000000000..110844c492 --- /dev/null +++ b/doc/classes/Navigation2DServer.xml @@ -0,0 +1,298 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Navigation2DServer" inherits="Object" version="4.0"> + <brief_description> + Server interface for low-level 2D navigation access + </brief_description> + <description> + Navigation2DServer is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + </description> + <tutorials> + </tutorials> + <methods> + <method name="agent_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates the agent. + </description> + </method> + <method name="agent_is_map_changed" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <description> + Returns true if the map got changed the previous frame. + </description> + </method> + <method name="agent_set_callback" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="receiver" type="Object"> + </argument> + <argument index="2" name="method" type="StringName"> + </argument> + <argument index="3" name="userdata" type="Variant" default="null"> + </argument> + <description> + Callback called at the end of the RVO process. + </description> + </method> + <method name="agent_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Puts the agent in the map. + </description> + </method> + <method name="agent_set_max_neighbors" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="count" type="int"> + </argument> + <description> + Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_max_speed" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="max_speed" type="float"> + </argument> + <description> + Sets the maximum speed of the agent. Must be positive. + </description> + </method> + <method name="agent_set_neighbor_dist" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="dist" type="float"> + </argument> + <description> + Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_position" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="position" type="Vector2"> + </argument> + <description> + Sets the position of the agent in world space. + </description> + </method> + <method name="agent_set_radius" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <description> + Sets the radius of the agent. + </description> + </method> + <method name="agent_set_target_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="target_velocity" type="Vector2"> + </argument> + <description> + Sets the new target velocity. + </description> + </method> + <method name="agent_set_time_horizon" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="time" type="float"> + </argument> + <description> + The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. + </description> + </method> + <method name="agent_set_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="velocity" type="Vector2"> + </argument> + <description> + Sets the current velocity of the agent. + </description> + </method> + <method name="free" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="object" type="RID"> + </argument> + <description> + Destroy the RID + </description> + </method> + <method name="map_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Create a new map. + </description> + </method> + <method name="map_get_cell_size" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the map cell size. + </description> + </method> + <method name="map_get_closest_point" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector2"> + </argument> + <description> + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + </description> + </method> + <method name="map_get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector2"> + </argument> + <description> + Returns the owner region RID for the point returned by [method map_get_closest_point]. + </description> + </method> + <method name="map_get_edge_connection_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. + </description> + </method> + <method name="map_get_path" qualifiers="const"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="origin" type="Vector2"> + </argument> + <argument index="2" name="destination" type="Vector2"> + </argument> + <argument index="3" name="optimize" type="bool"> + </argument> + <description> + Returns the navigation path to reach the destination from the origin, while avoiding static obstacles. + </description> + </method> + <method name="map_is_active" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="nap" type="RID"> + </argument> + <description> + Returns true if the map is active. + </description> + </method> + <method name="map_set_active" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="active" type="bool"> + </argument> + <description> + Sets the map active. + </description> + </method> + <method name="map_set_cell_size" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="cell_size" type="float"> + </argument> + <description> + Set the map cell size used to weld the navigation mesh polygons. + </description> + </method> + <method name="map_set_edge_connection_margin" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="margin" type="float"> + </argument> + <description> + Set the map edge connection margin used to weld the compatible region edges. + </description> + </method> + <method name="region_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates a new region. + </description> + </method> + <method name="region_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Sets the map for the region. + </description> + </method> + <method name="region_set_navpoly" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="nav_poly" type="NavigationPolygon"> + </argument> + <description> + Sets the navigation mesh for the region. + </description> + </method> + <method name="region_set_transform" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform2D"> + </argument> + <description> + Sets the global transformation for the region. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/NavigationAgent.xml b/doc/classes/NavigationAgent.xml new file mode 100644 index 0000000000..f896bf6d15 --- /dev/null +++ b/doc/classes/NavigationAgent.xml @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationAgent" inherits="Node" version="4.0"> + <brief_description> + 3D Agent used in navigation for collision avoidance. + </brief_description> + <description> + 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation] node, or using [method set_navigation]. [NavigationAgent] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="distance_to_target" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + </description> + </method> + <method name="get_final_location"> + <return type="Vector3"> + </return> + <description> + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. + </description> + </method> + <method name="get_nav_path" qualifiers="const"> + <return type="PackedVector3Array"> + </return> + <description> + Returns the path from start to finish in global coordinates. + </description> + </method> + <method name="get_nav_path_index" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. + </description> + </method> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation] node that the agent is using for its navigation system. + </description> + </method> + <method name="get_next_location"> + <return type="Vector3"> + </return> + <description> + Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. + </description> + </method> + <method name="get_target_location" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the user defined [Vector3] after setting the target location. + </description> + </method> + <method name="is_navigation_finished"> + <return type="bool"> + </return> + <description> + Returns true if the navigation path's final location has been reached. + </description> + </method> + <method name="is_target_reachable"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reachable. The target location is set using [method set_target_location]. + </description> + </method> + <method name="is_target_reached" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation] node. + </description> + </method> + <method name="set_target_location"> + <return type="void"> + </return> + <argument index="0" name="location" type="Vector3"> + </argument> + <description> + Sets the user desired final location. This will clear the current navigation path. + </description> + </method> + <method name="set_velocity"> + <return type="void"> + </return> + <argument index="0" name="velocity" type="Vector3"> + </argument> + <description> + Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. + </description> + </method> + </methods> + <members> + <member name="agent_height_offset" type="float" setter="set_agent_height_offset" getter="get_agent_height_offset" default="0.0"> + The agent height offset to match the navigation mesh height. + </member> + <member name="ignore_y" type="bool" setter="set_ignore_y" getter="get_ignore_y" default="true"> + Ignores collisions on the Y axis. Must be true to move on a horizontal plane. + </member> + <member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10"> + The maximum number of neighbors for the agent to consider. + </member> + <member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="10.0"> + The maximum speed that an agent can move. + </member> + <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0"> + The distance to search for other agents. + </member> + <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> + The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceded, it recalculates the ideal path. + </member> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The radius of the agent. + </member> + <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> + The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. + </member> + <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0"> + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + </member> + </members> + <signals> + <signal name="navigation_finished"> + <description> + Notifies when the final location is reached. + </description> + </signal> + <signal name="path_changed"> + <description> + Notifies when the navigation path changes. + </description> + </signal> + <signal name="target_reached"> + <description> + Notifies when the player defined target, set with [method set_target_location], is reached. + </description> + </signal> + <signal name="velocity_computed"> + <argument index="0" name="safe_velocity" type="Vector3"> + </argument> + <description> + Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml new file mode 100644 index 0000000000..116db76cc5 --- /dev/null +++ b/doc/classes/NavigationAgent2D.xml @@ -0,0 +1,159 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationAgent2D" inherits="Node" version="4.0"> + <brief_description> + 2D Agent used in navigation for collision avoidance. + </brief_description> + <description> + 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationAgent2D] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="distance_to_target" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + </description> + </method> + <method name="get_final_location"> + <return type="Vector2"> + </return> + <description> + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. + </description> + </method> + <method name="get_nav_path" qualifiers="const"> + <return type="PackedVector2Array"> + </return> + <description> + Returns the path from start to finish in global coordinates. + </description> + </method> + <method name="get_nav_path_index" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. + </description> + </method> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation2D] node that the agent is using for its navigation system. + </description> + </method> + <method name="get_next_location"> + <return type="Vector2"> + </return> + <description> + Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. + </description> + </method> + <method name="get_target_location" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the user defined [Vector2] after setting the target location. + </description> + </method> + <method name="is_navigation_finished"> + <return type="bool"> + </return> + <description> + Returns true if the navigation path's final location has been reached. + </description> + </method> + <method name="is_target_reachable"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reachable. The target location is set using [method set_target_location]. + </description> + </method> + <method name="is_target_reached" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation2D] node. + </description> + </method> + <method name="set_target_location"> + <return type="void"> + </return> + <argument index="0" name="location" type="Vector2"> + </argument> + <description> + Sets the user desired final location. This will clear the current navigation path. + </description> + </method> + <method name="set_velocity"> + <return type="void"> + </return> + <argument index="0" name="velocity" type="Vector2"> + </argument> + <description> + Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. + </description> + </method> + </methods> + <members> + <member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10"> + The maximum number of neighbors for the agent to consider. + </member> + <member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="200.0"> + The maximum speed that an agent can move. + </member> + <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0"> + The distance to search for other agents. + </member> + <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> + The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceded, it recalculates the ideal path. + </member> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> + The radius of the agent. + </member> + <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> + The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. + </member> + <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0"> + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + </member> + </members> + <signals> + <signal name="navigation_finished"> + <description> + Notifies when the final location is reached. + </description> + </signal> + <signal name="path_changed"> + <description> + Notifies when the navigation path changes. + </description> + </signal> + <signal name="target_reached"> + <description> + Notifies when the player defined target, set with [method set_target_location], is reached. + </description> + </signal> + <signal name="velocity_computed"> + <argument index="0" name="safe_velocity" type="Vector3"> + </argument> + <description> + Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index fb3babf4aa..6deca4394f 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -10,7 +10,7 @@ <method name="add_polygon"> <return type="void"> </return> - <argument index="0" name="polygon" type="PoolIntArray"> + <argument index="0" name="polygon" type="PackedInt32Array"> </argument> <description> </description> @@ -38,7 +38,7 @@ </description> </method> <method name="get_polygon"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -52,7 +52,7 @@ </description> </method> <method name="get_vertices" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> </description> @@ -70,7 +70,7 @@ <method name="set_vertices"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector3Array"> + <argument index="0" name="vertices" type="PackedVector3Array"> </argument> <description> </description> @@ -109,7 +109,7 @@ </member> <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> </member> - <member name="geometry/source_group_name" type="String" setter="set_source_group_name" getter="get_source_group_name"> + <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name"> </member> <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> </member> diff --git a/doc/classes/EditorNavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 1201b6cca1..ce1182ffbe 100644 --- a/doc/classes/EditorNavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorNavigationMeshGenerator" inherits="Object" version="4.0"> +<class name="NavigationMeshGenerator" inherits="Object" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml deleted file mode 100644 index a348740fdc..0000000000 --- a/doc/classes/NavigationMeshInstance.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationMeshInstance" inherits="Spatial" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> - </member> - <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/NavigationObstacle.xml b/doc/classes/NavigationObstacle.xml new file mode 100644 index 0000000000..31cf01793a --- /dev/null +++ b/doc/classes/NavigationObstacle.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationObstacle" inherits="Node" version="4.0"> + <brief_description> + 3D Obstacle used in navigation for collision avoidance. + </brief_description> + <description> + 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation] node, or using [method set_navigation]. [NavigationObstacle] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation] node that the obstacle is using for its navigation system. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation] node. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml new file mode 100644 index 0000000000..4d12b985e0 --- /dev/null +++ b/doc/classes/NavigationObstacle2D.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationObstacle2D" inherits="Node" version="4.0"> + <brief_description> + 2D Obstacle used in navigation for collision avoidance. + </brief_description> + <description> + 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation2D] node that the obstacle is using for its navigation system. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 0157a6f3f7..b0f77dff83 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -8,19 +8,19 @@ Using [method add_outline]: [codeblock] var polygon = NavigationPolygon.new() - var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.add_outline(outline) polygon.make_polygons_from_outlines() - $NavigationPolygonInstance.navpoly = polygon + $NavigationRegion2D.navpoly = polygon [/codeblock] Using [method add_polygon] and indices of the vertices array. [codeblock] var polygon = NavigationPolygon.new() - var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.set_vertices(vertices) - var indices = PoolIntArray(0, 3, 1) + var indices = PackedInt32Array(0, 3, 1) polygon.add_polygon(indices) - $NavigationPolygonInstance.navpoly = polygon + $NavigationRegion2D.navpoly = polygon [/codeblock] </description> <tutorials> @@ -29,27 +29,27 @@ <method name="add_outline"> <return type="void"> </return> - <argument index="0" name="outline" type="PoolVector2Array"> + <argument index="0" name="outline" type="PackedVector2Array"> </argument> <description> - Appends a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. + Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. </description> </method> <method name="add_outline_at_index"> <return type="void"> </return> - <argument index="0" name="outline" type="PoolVector2Array"> + <argument index="0" name="outline" type="PackedVector2Array"> </argument> <argument index="1" name="index" type="int"> </argument> <description> - Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. + Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. </description> </method> <method name="add_polygon"> <return type="void"> </return> - <argument index="0" name="polygon" type="PoolIntArray"> + <argument index="0" name="polygon" type="PackedInt32Array"> </argument> <description> Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. @@ -70,12 +70,12 @@ </description> </method> <method name="get_outline" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script. + Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script. </description> </method> <method name="get_outline_count" qualifiers="const"> @@ -86,12 +86,12 @@ </description> </method> <method name="get_polygon"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Returns a [PoolIntArray] containing the indices of the vertices of a created polygon. + Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. </description> </method> <method name="get_polygon_count" qualifiers="const"> @@ -102,10 +102,10 @@ </description> </method> <method name="get_vertices" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <description> - Returns a [PoolVector2Array] containing all the vertices being used to create the polygons. + Returns a [PackedVector2Array] containing all the vertices being used to create the polygons. </description> </method> <method name="make_polygons_from_outlines"> @@ -129,7 +129,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="outline" type="PoolVector2Array"> + <argument index="1" name="outline" type="PackedVector2Array"> </argument> <description> Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update. @@ -138,7 +138,7 @@ <method name="set_vertices"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector2Array"> + <argument index="0" name="vertices" type="PackedVector2Array"> </argument> <description> Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method. diff --git a/doc/classes/NavigationRegion.xml b/doc/classes/NavigationRegion.xml new file mode 100644 index 0000000000..41fac70654 --- /dev/null +++ b/doc/classes/NavigationRegion.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationRegion" inherits="Spatial" version="4.0"> + <brief_description> + A region of the navigation map. + </brief_description> + <description> + A region of the navigation map. It tells the [Navigation] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation] node (even not a direct child). + </description> + <tutorials> + </tutorials> + <methods> + <method name="bake_navigation_mesh"> + <return type="void"> + </return> + <description> + Bakes the [NavigationMesh]. The baking is done in a seperate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. + </description> + </method> + </methods> + <members> + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> + Determines if the [NavigationRegion] is enabled or disabled. + </member> + <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> + The [NavigationMesh] resource to use. + </member> + </members> + <signals> + <signal name="bake_finished"> + <description> + Notifies when the navigation mesh bake operation is completed. + </description> + </signal> + <signal name="navigation_mesh_changed"> + <description> + Notifies when the [NavigationMesh] has changed. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationRegion2D.xml index 34c6b09859..aef114e1db 100644 --- a/doc/classes/NavigationPolygonInstance.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPolygonInstance" inherits="Node2D" version="4.0"> +<class name="NavigationRegion2D" inherits="Node2D" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml new file mode 100644 index 0000000000..1b534b8458 --- /dev/null +++ b/doc/classes/NavigationServer.xml @@ -0,0 +1,375 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationServer" inherits="Object" version="4.0"> + <brief_description> + Server interface for low-level 3D navigation access + </brief_description> + <description> + NavigationServer is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + </description> + <tutorials> + </tutorials> + <methods> + <method name="agent_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates the agent. + </description> + </method> + <method name="agent_is_map_changed" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <description> + Returns true if the map got changed the previous frame. + </description> + </method> + <method name="agent_set_callback" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="receiver" type="Object"> + </argument> + <argument index="2" name="method" type="StringName"> + </argument> + <argument index="3" name="userdata" type="Variant" default="null"> + </argument> + <description> + Callback called at the end of the RVO process. + </description> + </method> + <method name="agent_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Puts the agent in the map. + </description> + </method> + <method name="agent_set_max_neighbors" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="count" type="int"> + </argument> + <description> + Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_max_speed" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="max_speed" type="float"> + </argument> + <description> + Sets the maximum speed of the agent. Must be positive. + </description> + </method> + <method name="agent_set_neighbor_dist" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="dist" type="float"> + </argument> + <description> + Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_position" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="position" type="Vector3"> + </argument> + <description> + Sets the position of the agent in world space. + </description> + </method> + <method name="agent_set_radius" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <description> + Sets the radius of the agent. + </description> + </method> + <method name="agent_set_target_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="target_velocity" type="Vector3"> + </argument> + <description> + Sets the new target velocity. + </description> + </method> + <method name="agent_set_time_horizon" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="time" type="float"> + </argument> + <description> + The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. + </description> + </method> + <method name="agent_set_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="velocity" type="Vector3"> + </argument> + <description> + Sets the current velocity of the agent. + </description> + </method> + <method name="free" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="object" type="RID"> + </argument> + <description> + Destroy the RID + </description> + </method> + <method name="map_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Create a new map. + </description> + </method> + <method name="map_get_cell_size" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the map cell size. + </description> + </method> + <method name="map_get_closest_point" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector3"> + </argument> + <description> + Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. + </description> + </method> + <method name="map_get_closest_point_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector3"> + </argument> + <description> + Returns the normal for the point returned by [method map_get_closest_point]. + </description> + </method> + <method name="map_get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector3"> + </argument> + <description> + Returns the owner region RID for the point returned by [method map_get_closest_point]. + </description> + </method> + <method name="map_get_closest_point_to_segment" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="start" type="Vector3"> + </argument> + <argument index="2" name="end" type="Vector3"> + </argument> + <argument index="3" name="use_collision" type="bool" default="false"> + </argument> + <description> + Returns the closest point between the navigation surface and the segment. + </description> + </method> + <method name="map_get_edge_connection_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the edge connection margin of the map. + </description> + </method> + <method name="map_get_path" qualifiers="const"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="origin" type="Vector3"> + </argument> + <argument index="2" name="destination" type="Vector3"> + </argument> + <argument index="3" name="optimize" type="bool"> + </argument> + <description> + Returns the navigation path to reach the destination from the origin. + </description> + </method> + <method name="map_get_up" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the map's up direction. + </description> + </method> + <method name="map_is_active" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="nap" type="RID"> + </argument> + <description> + Returns true if the map is active. + </description> + </method> + <method name="map_set_active" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="active" type="bool"> + </argument> + <description> + Sets the map active. + </description> + </method> + <method name="map_set_cell_size" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="cell_size" type="float"> + </argument> + <description> + Set the map cell size used to weld the navigation mesh polygons. + </description> + </method> + <method name="map_set_edge_connection_margin" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="margin" type="float"> + </argument> + <description> + Set the map edge connection margein used to weld the compatible region edges. + </description> + </method> + <method name="map_set_up" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="up" type="Vector3"> + </argument> + <description> + Sets the map up direction. + </description> + </method> + <method name="process"> + <return type="void"> + </return> + <argument index="0" name="delta_time" type="float"> + </argument> + <description> + Process the collision avoidance agents. + The result of this process is needed by the physics server, so this must be called in the main thread. + Note: This function is not thread safe. + </description> + </method> + <method name="region_bake_navmesh" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="NavigationMesh"> + </argument> + <argument index="1" name="node" type="Node"> + </argument> + <description> + Bakes the navigation mesh. + </description> + </method> + <method name="region_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates a new region. + </description> + </method> + <method name="region_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Sets the map for the region. + </description> + </method> + <method name="region_set_navmesh" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="nav_mesh" type="NavigationMesh"> + </argument> + <description> + Sets the navigation mesh for the region. + </description> + </method> + <method name="region_set_transform" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform"> + </argument> + <description> + Sets the global transformation for the region. + </description> + </method> + <method name="set_active" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="active" type="bool"> + </argument> + <description> + Control activation of this server. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 68326d7e77..9c3acc9b0a 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -56,7 +56,7 @@ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The node's texture resource. </member> </members> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 1847954b67..717130728d 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -129,27 +129,29 @@ child_node.get_parent().remove_child(child_node) add_child(child_node) [/codeblock] + If you need the child node to be added below a specific node in the list of children, use [method add_child_below_node] instead of this method. [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. </description> </method> <method name="add_child_below_node"> <return type="void"> </return> - <argument index="0" name="node" type="Node"> + <argument index="0" name="preceding_node" type="Node"> </argument> - <argument index="1" name="child_node" type="Node"> + <argument index="1" name="node" type="Node"> </argument> <argument index="2" name="legible_unique_name" type="bool" default="false"> </argument> <description> - Adds a child node. The child is placed below the given node in the list of children. + Adds a child node below the [code]preceding_node[/code]. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. + Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. </description> </method> <method name="add_to_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <argument index="1" name="persistent" type="bool" default="false"> </argument> @@ -326,7 +328,7 @@ <return type="float"> </return> <description> - Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.target_fps]. + Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second]. </description> </method> <method name="get_position_in_parent" qualifiers="const"> @@ -410,7 +412,7 @@ <method name="is_in_group" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <description> Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree]. @@ -532,7 +534,7 @@ <method name="propagate_call"> <return type="void"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="args" type="Array" default="[ ]"> </argument> @@ -584,7 +586,7 @@ <method name="remove_from_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <description> Removes a node from a group. See notes in the description, and the group methods in [SceneTree]. @@ -611,7 +613,7 @@ <method name="rpc" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant]. @@ -619,9 +621,9 @@ </description> </method> <method name="rpc_config"> - <return type="void"> + <return type="int"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> @@ -634,7 +636,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. @@ -643,7 +645,7 @@ <method name="rpc_unreliable" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant]. @@ -654,7 +656,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. @@ -663,7 +665,7 @@ <method name="rset"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -672,9 +674,9 @@ </description> </method> <method name="rset_config"> - <return type="void"> + <return type="int"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> @@ -687,7 +689,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -698,7 +700,7 @@ <method name="rset_unreliable"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -711,7 +713,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -745,7 +747,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.target_fps] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored. + Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.iterations_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_physics_process_internal"> @@ -830,7 +832,7 @@ <member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer"> The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree). </member> - <member name="name" type="String" setter="set_name" getter="get_name"> + <member name="name" type="StringName" setter="set_name" getter="get_name"> The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed. </member> <member name="owner" type="Node" setter="set_owner" getter="get_owner"> diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml new file mode 100644 index 0000000000..d275f93196 --- /dev/null +++ b/doc/classes/ORMMaterial3D.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 21c8dcd20a..6d950a4175 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -93,7 +93,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="arguments" type="PoolStringArray"> + <argument index="1" name="arguments" type="PackedStringArray"> </argument> <argument index="2" name="blocking" type="bool" default="true"> </argument> @@ -124,13 +124,13 @@ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> - <method name="find_scancode_from_string" qualifiers="const"> + <method name="find_keycode_from_string" qualifiers="const"> <return type="int"> </return> <argument index="0" name="string" type="String"> </argument> <description> - Returns the scancode of the given string (e.g. "Escape"). + Returns the keycode of the given string (e.g. "Escape"). </description> </method> <method name="get_audio_driver_count" qualifiers="const"> @@ -150,14 +150,14 @@ </description> </method> <method name="get_cmdline_args"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the command line arguments passed to the engine. </description> </method> <method name="get_connected_midi_inputs"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns an array of MIDI device names. @@ -200,13 +200,6 @@ The returned Dictionary's values will be the same as [method get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch. </description> </method> - <method name="get_dynamic_memory_usage" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the total amount of dynamic memory used (only works in debug). - </description> - </method> <method name="get_environment" qualifiers="const"> <return type="String"> </return> @@ -224,7 +217,7 @@ </description> </method> <method name="get_granted_permissions" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> With this function you can get the list of dangerous permissions that have been granted to the Android application. @@ -280,30 +273,6 @@ Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"Haiku"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code]. </description> </method> - <method name="get_power_percent_left"> - <return type="int"> - </return> - <description> - Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - </description> - </method> - <method name="get_power_seconds_left"> - <return type="int"> - </return> - <description> - Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - </description> - </method> - <method name="get_power_state"> - <return type="int" enum="OS.PowerState"> - </return> - <description> - Returns the current state of the device regarding battery and power. See [enum PowerState] constants. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - </description> - </method> <method name="get_process_id" qualifiers="const"> <return type="int"> </return> @@ -326,14 +295,14 @@ Returns the window size including decorations like window borders. </description> </method> - <method name="get_scancode_string" qualifiers="const"> + <method name="get_keycode_string" qualifiers="const"> <return type="String"> </return> <argument index="0" name="code" type="int"> </argument> <description> - Returns the given scancode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). - See also [member InputEventKey.scancode] and [method InputEventKey.get_scancode_with_modifiers]. + Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). + See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers]. </description> </method> <method name="get_screen_count" qualifiers="const"> @@ -626,13 +595,13 @@ Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right. </description> </method> - <method name="is_scancode_unicode" qualifiers="const"> + <method name="is_keycode_unicode" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="code" type="int"> </argument> <description> - Returns [code]true[/code] if the input scancode corresponds to a Unicode character. + Returns [code]true[/code] if the input keycode corresponds to a Unicode character. </description> </method> <method name="is_stdout_verbose" qualifiers="const"> @@ -758,7 +727,7 @@ <method name="print_resources_by_type"> <return type="void"> </return> - <argument index="0" name="types" type="PoolStringArray"> + <argument index="0" name="types" type="PackedStringArray"> </argument> <description> Shows the number of resources loaded by the game of the given types. @@ -960,7 +929,7 @@ If [code]true[/code], the window background is transparent and window frame is removed. Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. [b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled. - [b]Note:[/b] This property is implemented on Linux, macOS and Windows. + [b]Note:[/b] This property is implemented on HTML5, Linux, macOS and Windows. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )"> The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. @@ -973,11 +942,11 @@ </member> </members> <constants> - <constant name="VIDEO_DRIVER_GLES2" value="1" enum="VideoDriver"> + <constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver"> The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web. </constant> - <constant name="VIDEO_DRIVER_GLES3" value="0" enum="VideoDriver"> - The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web. + <constant name="VIDEO_DRIVER_VULKAN" value="1" enum="VideoDriver"> + The Vulkan rendering backend. </constant> <constant name="DAY_SUNDAY" value="0" enum="Weekday"> Sunday. @@ -1081,20 +1050,5 @@ <constant name="SYSTEM_DIR_RINGTONES" value="7" enum="SystemDir"> Ringtones directory path. </constant> - <constant name="POWERSTATE_UNKNOWN" value="0" enum="PowerState"> - Unknown powerstate. - </constant> - <constant name="POWERSTATE_ON_BATTERY" value="1" enum="PowerState"> - Unplugged, running on battery. - </constant> - <constant name="POWERSTATE_NO_BATTERY" value="2" enum="PowerState"> - Plugged in, no battery available. - </constant> - <constant name="POWERSTATE_CHARGING" value="3" enum="PowerState"> - Plugged in, battery charging. - </constant> - <constant name="POWERSTATE_CHARGED" value="4" enum="PowerState"> - Plugged in, battery fully charged. - </constant> </constants> </class> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 858bf5b635..a3faccae1a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -23,7 +23,7 @@ <method name="_get" qualifiers="virtual"> <return type="Variant"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> Virtual method which can be overridden to customize the return value of [method get]. @@ -58,7 +58,7 @@ <method name="_set" qualifiers="virtual"> <return type="bool"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -89,7 +89,7 @@ <method name="call" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -101,7 +101,7 @@ <method name="call_deferred" qualifiers="vararg"> <return type="void"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -113,7 +113,7 @@ <method name="callv"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="arg_array" type="Array"> </argument> @@ -134,17 +134,16 @@ <method name="connect"> <return type="int" enum="Error"> </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="target" type="Object"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> - <argument index="3" name="binds" type="Array" default="[ ]"> + <argument index="2" name="binds" type="Array" default="[ ]"> </argument> - <argument index="4" name="flags" type="int" default="0"> + <argument index="3" name="flags" type="int" default="0"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. @@ -166,13 +165,12 @@ <method name="disconnect"> <return type="void"> </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="target" type="Object"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code]. If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. </description> @@ -180,7 +178,7 @@ <method name="emit_signal" qualifiers="vararg"> <return type="void"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> <description> Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -251,10 +249,10 @@ </description> </method> <method name="get_meta_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> - Returns the object's metadata as a [PoolStringArray]. + Returns the object's metadata as a [PackedStringArray]. </description> </method> <method name="get_method_list" qualifiers="const"> @@ -273,7 +271,7 @@ </description> </method> <method name="get_script" qualifiers="const"> - <return type="Reference"> + <return type="Variant"> </return> <description> Returns the object's [Script] instance, or [code]null[/code] if none is assigned. @@ -307,7 +305,7 @@ <method name="has_method" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Returns [code]true[/code] if the object contains the given [code]method[/code]. @@ -316,7 +314,7 @@ <method name="has_user_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> <description> Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. @@ -341,13 +339,12 @@ <method name="is_connected" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="1" name="target" type="Object"> - </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code]. </description> </method> @@ -409,7 +406,7 @@ <method name="set_deferred"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -456,7 +453,7 @@ <method name="set_script"> <return type="void"> </return> - <argument index="0" name="script" type="Reference"> + <argument index="0" name="script" type="Variant"> </argument> <description> Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. @@ -472,9 +469,9 @@ </description> </method> <method name="tr" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="message" type="String"> + <argument index="0" name="message" type="StringName"> </argument> <description> Translates a message using translation catalogs configured in the Project Settings. diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index 6cfef42204..8a59ef5cb4 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -17,7 +17,7 @@ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0"> The culling mode to use. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> A [Vector2] array with the index for polygon's vertices positions. [b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference. </member> diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index e836dc1758..dc57efd3f9 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -18,9 +18,6 @@ <member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0"> The light's radius. </member> - <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1"> - See [enum ShadowDetail]. - </member> <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1"> See [enum ShadowMode]. </member> @@ -32,11 +29,5 @@ <constant name="SHADOW_CUBE" value="1" enum="ShadowMode"> Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. </constant> - <constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail"> - Use more detail vertically when computing the shadow. - </constant> - <constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail"> - Use more detail horizontally when computing the shadow. - </constant> </constants> </class> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index d488e918b9..5cb2aaf314 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -12,7 +12,7 @@ <method name="add_icon_item"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="label" type="String"> </argument> @@ -55,7 +55,7 @@ </description> </method> <method name="get_item_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -164,7 +164,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> Sets the icon of the item at index [code]idx[/code]. @@ -231,7 +231,7 @@ <constants> </constants> <theme_items> - <theme_item name="arrow" type="Texture"> + <theme_item name="arrow" type="Texture2D"> The arrow icon to be drawn on the right end of the button. </theme_item> <theme_item name="arrow_margin" type="int" default="2"> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PackedByteArray.xml index 63a7037fb1..b08357e278 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolByteArray" version="4.0"> +<class name="PackedByteArray" version="4.0"> <brief_description> - A pooled [Array] of bytes. + A packed [Array] of bytes. </brief_description> <description> - An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolByteArray"> - <return type="PoolByteArray"> + <method name="PackedByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolByteArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="byte" type="int"> </argument> <description> @@ -27,30 +29,32 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolByteArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedByteArray"> </argument> <description> - Appends a [PoolByteArray] at the end of this array. + Appends a [PackedByteArray] at the end of this array. </description> </method> <method name="compress"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="compression_mode" type="int" default="0"> </argument> <description> - Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. + Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="decompress"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="buffer_size" type="int"> </argument> <argument index="1" name="compression_mode" type="int" default="0"> </argument> <description> - Returns a new [PoolByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. + Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="empty"> @@ -80,7 +84,7 @@ <description> Returns a hexadecimal representation of this array as a [String]. [codeblock] - var array = PoolByteArray([11, 46, 255]) + var array = PackedByteArray([11, 46, 255]) print(array.hex_encode()) # Prints: 0b2eff [/codeblock] </description> @@ -97,11 +101,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="byte" type="int"> </argument> <description> @@ -109,6 +117,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -116,6 +126,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -123,6 +135,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="byte" type="int"> @@ -139,14 +153,14 @@ </description> </method> <method name="subarray"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="from" type="int"> </argument> <argument index="1" name="to" type="int"> </argument> <description> - Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array. + Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array. </description> </method> </methods> diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PackedColorArray.xml index d5599f821c..06228e4dac 100644 --- a/doc/classes/PoolColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolColorArray" version="4.0"> +<class name="PackedColorArray" version="4.0"> <brief_description> - A pooled [Array] of [Color]. + A packed [Array] of [Color]s. </brief_description> <description> - An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolColorArray"> - <return type="PoolColorArray"> + <method name="PackedColorArray"> + <return type="PackedColorArray"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolColorArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="color" type="Color"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolColorArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedColorArray"> </argument> <description> - Appends a [PoolColorArray] at the end of this array. + Appends a [PackedColorArray] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +56,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="color" type="Color"> </argument> <description> @@ -64,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="color" type="Color"> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index 79c9fa8d9c..296f9d3373 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -23,7 +23,7 @@ </method> </methods> <members> - <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data" default="PoolByteArray( )"> + <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PackedFloat32Array.xml index 6957e7282b..ee82586cdb 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -1,25 +1,28 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolRealArray" version="4.0"> +<class name="PackedFloat32Array" version="4.0"> <brief_description> - A pooled [Array] of reals ([float]). + A packed [Array] of 32-bit floating-point values. </brief_description> <description> - An [Array] specifically designed to hold floating-point values ([float]). Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. + If you need to pack 64-bit floats tightly, see [PackedFloat64Array]. </description> <tutorials> </tutorials> <methods> - <method name="PoolRealArray"> - <return type="PoolRealArray"> + <method name="PackedFloat32Array"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolRealArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="value" type="float"> </argument> <description> @@ -27,10 +30,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolRealArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedFloat32Array"> </argument> <description> - Appends a [PoolRealArray] at the end of this array. + Appends a [PackedFloat32Array] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +57,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="value" type="float"> </argument> <description> @@ -64,6 +73,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +82,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +91,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="value" type="float"> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml new file mode 100644 index 0000000000..ce2300c65a --- /dev/null +++ b/doc/classes/PackedFloat64Array.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PackedFloat64Array" version="4.0"> + <brief_description> + A packed [Array] of 64-bit floating-point values. + </brief_description> + <description> + An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. + [b]Note:[/b] This type is passed by value and not by reference. + If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative. + </description> + <tutorials> + </tutorials> + <methods> + <method name="PackedFloat64Array"> + <return type="PackedFloat64Array"> + </return> + <argument index="0" name="from" type="Array"> + </argument> + <description> + Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted. + </description> + </method> + <method name="append"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Appends an element at the end of the array (alias of [method push_back]). + </description> + </method> + <method name="append_array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedFloat64Array"> + </argument> + <description> + Appends a [PackedFloat64Array] at the end of this array. + </description> + </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> + <method name="insert"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + </description> + </method> + <method name="invert"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> + <method name="push_back"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Appends an element at the end of the array. + </description> + </method> + <method name="remove"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Removes an element from the array by index. + </description> + </method> + <method name="resize"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. + </description> + </method> + <method name="set"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + Changes the float at the given index. + </description> + </method> + <method name="size"> + <return type="int"> + </return> + <description> + Returns the size of the array. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml new file mode 100644 index 0000000000..176c624956 --- /dev/null +++ b/doc/classes/PackedInt32Array.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PackedInt32Array" version="4.0"> + <brief_description> + A packed [Array] of 32-bit integers. + </brief_description> + <description> + An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes. + [b]Note:[/b] This type is passed by value and not by reference. + [b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="PackedInt32Array"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="from" type="Array"> + </argument> + <description> + Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted. + </description> + </method> + <method name="append"> + <return type="void"> + </return> + <argument index="0" name="integer" type="int"> + </argument> + <description> + Appends an element at the end of the array (alias of [method push_back]). + </description> + </method> + <method name="append_array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedInt32Array"> + </argument> + <description> + Appends a [PackedInt32Array] at the end of this array. + </description> + </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> + <method name="insert"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="integer" type="int"> + </argument> + <description> + Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + </description> + </method> + <method name="invert"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> + <method name="push_back"> + <return type="void"> + </return> + <argument index="0" name="integer" type="int"> + </argument> + <description> + Appends a value to the array. + </description> + </method> + <method name="remove"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Removes an element from the array by index. + </description> + </method> + <method name="resize"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. + </description> + </method> + <method name="set"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="integer" type="int"> + </argument> + <description> + Changes the integer at the given index. + </description> + </method> + <method name="size"> + <return type="int"> + </return> + <description> + Returns the array size. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PackedInt64Array.xml index 54f0f46e11..d8a8071590 100644 --- a/doc/classes/PoolIntArray.xml +++ b/doc/classes/PackedInt64Array.xml @@ -1,26 +1,28 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolIntArray" version="4.0"> +<class name="PackedInt64Array" version="4.0"> <brief_description> - A pooled [Array] of integers ([int]). + A packed [Array] of 64-bit integers. </brief_description> <description> - An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. - [b]Note:[/b] This type is limited to signed 32-bit integers, which means it can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. + [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative. </description> <tutorials> </tutorials> <methods> - <method name="PoolIntArray"> - <return type="PoolIntArray"> + <method name="PackedInt64Array"> + <return type="PackedInt64Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolIntArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="integer" type="int"> </argument> <description> @@ -28,10 +30,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolIntArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedInt64Array"> </argument> <description> - Appends a [PoolIntArray] at the end of this array. + Appends a [PackedInt64Array] at the end of this array. </description> </method> <method name="empty"> @@ -49,15 +53,19 @@ <argument index="1" name="integer" type="int"> </argument> <description> - Inserts a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="integer" type="int"> </argument> <description> @@ -65,6 +73,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -72,6 +82,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -79,12 +91,14 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="integer" type="int"> </argument> <description> - Changes the int at the given index. + Changes the integer at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index d13195bd5e..e422545b7b 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -65,7 +65,7 @@ </method> </methods> <members> - <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{"conn_count": 0,"conns": PoolIntArray( ),"editable_instances": [ ],"names": PoolStringArray( ),"node_count": 0,"node_paths": [ ],"nodes": PoolIntArray( ),"variants": [ ],"version": 2}"> + <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{"conn_count": 0,"conns": PackedInt32Array( ),"editable_instances": [ ],"names": PackedStringArray( ),"node_count": 0,"node_paths": [ ],"nodes": PackedInt32Array( ),"variants": [ ],"version": 2}"> A dictionary representation of the scene contents. Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. </member> diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PackedStringArray.xml index b4fb7b31d4..9526f5899d 100644 --- a/doc/classes/PoolStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolStringArray" version="4.0"> +<class name="PackedStringArray" version="4.0"> <brief_description> - A pooled [Array] of [String]. + A packed [Array] of [String]s. </brief_description> <description> - An [Array] specifically designed to hold [String]s. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolStringArray"> - <return type="PoolStringArray"> + <method name="PackedStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolStringArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="string" type="String"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolStringArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedStringArray"> </argument> <description> - Appends a [PoolStringArray] at the end of this array. + Appends a [PackedStringArray] at the end of this array. </description> </method> <method name="empty"> @@ -52,20 +56,15 @@ </description> </method> <method name="invert"> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="join"> - <return type="String"> + <return type="void"> </return> - <argument index="0" name="delimiter" type="String"> - </argument> <description> - Returns a [String] with each element of the array joined with the given [code]delimiter[/code]. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="string" type="String"> </argument> <description> @@ -73,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -80,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -87,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="string" type="String"> diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PackedVector2Array.xml index cb4536be5b..87f202357c 100644 --- a/doc/classes/PoolVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolVector2Array" version="4.0"> +<class name="PackedVector2Array" version="4.0"> <brief_description> - A pooled [Array] of [Vector2]. + A packed [Array] of [Vector2]s. </brief_description> <description> - An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolVector2Array"> - <return type="PoolVector2Array"> + <method name="PackedVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="vector2" type="Vector2"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolVector2Array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedVector2Array"> </argument> <description> - Appends a [PoolVector2Array] at the end of this array. + Appends a [PackedVector2Array] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +56,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="vector2" type="Vector2"> </argument> <description> @@ -64,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="vector2" type="Vector2"> diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PackedVector3Array.xml index 6c40de9bd8..7bfa684ff5 100644 --- a/doc/classes/PoolVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolVector3Array" version="4.0"> +<class name="PackedVector3Array" version="4.0"> <brief_description> - A pooled [Array] of [Vector3]. + A packed [Array] of [Vector3]s. </brief_description> <description> - An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolVector3Array"> - <return type="PoolVector3Array"> + <method name="PackedVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="vector3" type="Vector3"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolVector3Array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedVector3Array"> </argument> <description> - Appends a [PoolVector3Array] at the end of this array. + Appends a [PackedVector3Array] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +56,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="vector3" type="Vector3"> </argument> <description> @@ -64,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="vector3" type="Vector3"> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 39da9d1548..e3e2f63e14 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -17,7 +17,7 @@ </description> </method> <method name="get_packet"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Gets a raw packet. @@ -36,14 +36,14 @@ <argument index="0" name="allow_objects" type="bool" default="false"> </argument> <description> - Gets a Variant. If [code]allow_objects[/code] (or [member allow_object_decoding]) is [code]true[/code], decoding objects is allowed. + Gets a Variant. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="put_packet"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Sends a raw packet. @@ -57,16 +57,11 @@ <argument index="1" name="full_objects" type="bool" default="false"> </argument> <description> - Sends a [Variant] as a packet. If [code]full_objects[/code] (or [member allow_object_decoding]) is [code]true[/code], encoding objects is allowed (and can potentially include code). + Sends a [Variant] as a packet. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> </method> </methods> <members> - <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> - [i]Deprecated.[/i] Use [code]get_var[/code] and [code]put_var[/code] parameters instead. - If [code]true[/code], the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var]. - [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. - </member> <member name="encode_buffer_max_size" type="int" setter="set_encode_buffer_max_size" getter="get_encode_buffer_max_size" default="8388608"> Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations. The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY]. diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml new file mode 100644 index 0000000000..19ebb9d81e --- /dev/null +++ b/doc/classes/PacketPeerDTLS.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PacketPeerDTLS" inherits="PacketPeer" version="4.0"> + <brief_description> + DTLS packet peer. + </brief_description> + <description> + This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="connect_to_peer"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="packet_peer" type="PacketPeerUDP"> + </argument> + <argument index="1" name="validate_certs" type="bool" default="true"> + </argument> + <argument index="2" name="for_hostname" type="String" default=""""> + </argument> + <argument index="3" name="valid_certificate" type="X509Certificate" default="null"> + </argument> + <description> + Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument. + </description> + </method> + <method name="disconnect_from_peer"> + <return type="void"> + </return> + <description> + Disconnects this peer, terminating the DTLS session. + </description> + </method> + <method name="get_status" qualifiers="const"> + <return type="int" enum="PacketPeerDTLS.Status"> + </return> + <description> + Returns the status of the connection. See [enum Status] for values. + </description> + </method> + <method name="poll"> + <return type="void"> + </return> + <description> + Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. + </description> + </method> + </methods> + <constants> + <constant name="STATUS_DISCONNECTED" value="0" enum="Status"> + A status representing a [PacketPeerDTLS] that is disconnected. + </constant> + <constant name="STATUS_HANDSHAKING" value="1" enum="Status"> + A status representing a [PacketPeerDTLS] that is currently performing the handshake with a remote peer. + </constant> + <constant name="STATUS_CONNECTED" value="2" enum="Status"> + A status representing a [PacketPeerDTLS] that is connected to a remote peer. + </constant> + <constant name="STATUS_ERROR" value="3" enum="Status"> + A status representing a [PacketPeerDTLS] in a generic error state. + </constant> + <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status"> + An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation. + </constant> + </constants> +</class> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 81cd341ef7..aa5599a3fb 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -16,6 +16,18 @@ Closes the UDP socket the [PacketPeerUDP] is currently listening on. </description> </method> + <method name="connect_to_host"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="host" type="String"> + </argument> + <argument index="1" name="port" type="int"> + </argument> + <description> + Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. + Note: Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transfering sensitive information. + </description> + </method> <method name="get_packet_ip" qualifiers="const"> <return type="String"> </return> @@ -30,6 +42,13 @@ Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). </description> </method> + <method name="is_connected_to_host" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host]. + </description> + </method> <method name="is_listening" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml index c1c048f875..0ddf1cb054 100644 --- a/doc/classes/PanoramaSky.xml +++ b/doc/classes/PanoramaSky.xml @@ -5,14 +5,16 @@ </brief_description> <description> A resource referenced in an [Environment] that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. + Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR ([code].hdr[/code]) and OpenEXR ([code].exr[/code]) image formats for this purpose. + You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama"> - [Texture] to be applied to the PanoramaSky. + <member name="panorama" type="Texture2D" setter="set_panorama" getter="get_panorama"> + [Texture2D] to be applied to the PanoramaSky. </member> </members> <constants> diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml index 105d105731..7210bee11c 100644 --- a/doc/classes/ParallaxLayer.xml +++ b/doc/classes/ParallaxLayer.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )"> - The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture] will not be mirrored. + The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored. </member> <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )"> The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]. diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index b146678bfc..74651ddd2f 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -68,7 +68,7 @@ <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" default="1"> The number of draw passes when rendering particles. </member> - <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> + <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="false"> If [code]true[/code], particles are being emitted. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index 2a00ec3113..50fc3680bc 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -33,7 +33,7 @@ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0"> Particle draw order. Uses [enum DrawOrder] values. </member> - <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> + <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="false"> If [code]true[/code], particles are being emitted. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> @@ -51,7 +51,7 @@ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> Normal map to be used for the [member texture] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> @@ -69,7 +69,7 @@ <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code], particles will be squares. </member> <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )"> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 42f0fe1f00..1e90214e47 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -39,12 +39,12 @@ </description> </method> <method name="get_param_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> </argument> <description> - Returns the [Texture] used by the specified parameter. + Returns the [Texture2D] used by the specified parameter. </description> </method> <method name="set_flag"> @@ -85,19 +85,19 @@ </return> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Sets the [Texture] for the specified [enum Parameter]. + Sets the [Texture2D] for the specified [enum Parameter]. </description> </method> </methods> <members> <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> Initial rotation applied to each particle, in degrees. - Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES]. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. </member> - <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's rotation will be animated along this [CurveTexture]. </member> <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -105,9 +105,9 @@ </member> <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES]. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. </member> - <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's angular velocity will vary along this [CurveTexture]. </member> <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -116,7 +116,7 @@ <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation offset. </member> - <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's animation offset will vary along this [CurveTexture]. </member> <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -125,22 +125,22 @@ <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation speed. </member> - <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="anim_speed_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's animation speed will vary along this [CurveTexture]. </member> <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> Animation speed randomness ratio. </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> - Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member SpatialMaterial.vertex_color_use_as_albedo] to [code]true[/code]. + Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. </member> - <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp"> + <member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp"> Each particle's color will vary along this [GradientTexture]. </member> <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. </member> - <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Damping will vary along this [CurveTexture]. </member> <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -152,16 +152,16 @@ <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The box's extents if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_BOX]. </member> - <member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture"> + <member name="emission_color_texture" type="Texture2D" setter="set_emission_color_texture" getter="get_emission_color_texture"> Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]. </member> - <member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture"> + <member name="emission_normal_texture" type="Texture2D" setter="set_emission_normal_texture" getter="get_emission_normal_texture"> Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> <member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count"> The number of emission points if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture"> + <member name="emission_point_texture" type="Texture2D" setter="set_emission_point_texture" getter="get_emission_point_texture"> Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0"> @@ -188,7 +188,7 @@ <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> Initial hue variation applied to each particle. </member> - <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="hue_variation_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's hue will vary along this [CurveTexture]. </member> <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -206,7 +206,7 @@ <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Linear acceleration applied to each particle in the direction of motion. </member> - <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's linear acceleration will vary along this [CurveTexture]. </member> <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -216,7 +216,7 @@ Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. Only available when [member flag_disable_z] is [code]true[/code]. </member> - <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's orbital velocity will vary along this [CurveTexture]. </member> <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> @@ -225,7 +225,7 @@ <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> - <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="radial_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's radial acceleration will vary along this [CurveTexture]. </member> <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -234,7 +234,7 @@ <member name="scale" type="float" setter="set_param" getter="get_param" default="1.0"> Initial scale applied to each particle. </member> - <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's scale will vary along this [CurveTexture]. </member> <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> @@ -246,7 +246,7 @@ <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> - <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="tangential_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's tangential acceleration will vary along this [CurveTexture]. </member> <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index e992f25836..378b165644 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -37,82 +37,76 @@ <constant name="MEMORY_STATIC" value="3" enum="Monitor"> Static memory currently used, in bytes. Not available in release builds. </constant> - <constant name="MEMORY_DYNAMIC" value="4" enum="Monitor"> - Dynamic memory currently used, in bytes. Not available in release builds. - </constant> - <constant name="MEMORY_STATIC_MAX" value="5" enum="Monitor"> + <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor"> Available static memory. Not available in release builds. </constant> - <constant name="MEMORY_DYNAMIC_MAX" value="6" enum="Monitor"> - Available dynamic memory. Not available in release builds. - </constant> - <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7" enum="Monitor"> + <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor"> Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. </constant> - <constant name="OBJECT_COUNT" value="8" enum="Monitor"> + <constant name="OBJECT_COUNT" value="6" enum="Monitor"> Number of objects currently instanced (including nodes). </constant> - <constant name="OBJECT_RESOURCE_COUNT" value="9" enum="Monitor"> + <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> Number of resources currently used. </constant> - <constant name="OBJECT_NODE_COUNT" value="10" enum="Monitor"> + <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> Number of nodes currently instanced in the scene tree. This also includes the root node. </constant> - <constant name="OBJECT_ORPHAN_NODE_COUNT" value="11" enum="Monitor"> + <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. </constant> - <constant name="RENDER_OBJECTS_IN_FRAME" value="12" enum="Monitor"> + <constant name="RENDER_OBJECTS_IN_FRAME" value="10" enum="Monitor"> 3D objects drawn per frame. </constant> - <constant name="RENDER_VERTICES_IN_FRAME" value="13" enum="Monitor"> + <constant name="RENDER_VERTICES_IN_FRAME" value="11" enum="Monitor"> Vertices drawn per frame. 3D only. </constant> - <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="14" enum="Monitor"> + <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="12" enum="Monitor"> Material changes per frame. 3D only. </constant> - <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="15" enum="Monitor"> + <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="13" enum="Monitor"> Shader changes per frame. 3D only. </constant> - <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="16" enum="Monitor"> + <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="14" enum="Monitor"> Render surface changes per frame. 3D only. </constant> - <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="17" enum="Monitor"> + <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="15" enum="Monitor"> Draw calls per frame. 3D only. </constant> - <constant name="RENDER_VIDEO_MEM_USED" value="18" enum="Monitor"> + <constant name="RENDER_VIDEO_MEM_USED" value="16" enum="Monitor"> The amount of video memory used, i.e. texture and vertex memory combined. </constant> - <constant name="RENDER_TEXTURE_MEM_USED" value="19" enum="Monitor"> + <constant name="RENDER_TEXTURE_MEM_USED" value="17" enum="Monitor"> The amount of texture memory used. </constant> - <constant name="RENDER_VERTEX_MEM_USED" value="20" enum="Monitor"> + <constant name="RENDER_VERTEX_MEM_USED" value="18" enum="Monitor"> The amount of vertex memory used. </constant> - <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="21" enum="Monitor"> - Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0. + <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="19" enum="Monitor"> + Unimplemented in the GLES2 rendering backend, always returns 0. </constant> - <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="22" enum="Monitor"> + <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="20" enum="Monitor"> Number of active [RigidBody2D] nodes in the game. </constant> - <constant name="PHYSICS_2D_COLLISION_PAIRS" value="23" enum="Monitor"> + <constant name="PHYSICS_2D_COLLISION_PAIRS" value="21" enum="Monitor"> Number of collision pairs in the 2D physics engine. </constant> - <constant name="PHYSICS_2D_ISLAND_COUNT" value="24" enum="Monitor"> + <constant name="PHYSICS_2D_ISLAND_COUNT" value="22" enum="Monitor"> Number of islands in the 2D physics engine. </constant> - <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="25" enum="Monitor"> + <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="23" enum="Monitor"> Number of active [RigidBody] and [VehicleBody] nodes in the game. </constant> - <constant name="PHYSICS_3D_COLLISION_PAIRS" value="26" enum="Monitor"> + <constant name="PHYSICS_3D_COLLISION_PAIRS" value="24" enum="Monitor"> Number of collision pairs in the 3D physics engine. </constant> - <constant name="PHYSICS_3D_ISLAND_COUNT" value="27" enum="Monitor"> + <constant name="PHYSICS_3D_ISLAND_COUNT" value="25" enum="Monitor"> Number of islands in the 3D physics engine. </constant> - <constant name="AUDIO_OUTPUT_LATENCY" value="28" enum="Monitor"> + <constant name="AUDIO_OUTPUT_LATENCY" value="26" enum="Monitor"> Output latency of the [AudioServer]. </constant> - <constant name="MONITOR_MAX" value="29" enum="Monitor"> + <constant name="MONITOR_MAX" value="27" enum="Monitor"> Represents the size of the [enum Monitor] enum. </constant> </constants> diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml index cef41aac5c..bb31f03c18 100644 --- a/doc/classes/PhysicalBone.xml +++ b/doc/classes/PhysicalBone.xml @@ -43,12 +43,6 @@ <description> </description> </method> - <method name="is_static_body"> - <return type="bool"> - </return> - <description> - </description> - </method> </methods> <members> <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index 4fac27a82b..45215253be 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -165,7 +165,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> </description> @@ -199,7 +199,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: @@ -661,7 +661,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant" default="null"> </argument> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index d54a907d3d..c9f4accee2 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -156,7 +156,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> </description> @@ -190,7 +190,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: @@ -678,7 +678,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant" default="null"> </argument> @@ -1467,7 +1467,7 @@ If [code]set[/code] there is a linear motor on this axis that targets a specific velocity. </constant> <constant name="SHAPE_PLANE" value="0" enum="ShapeType"> - The [Shape] is a [PlaneShape]. + The [Shape] is a [WorldMarginShape]. </constant> <constant name="SHAPE_RAY" value="1" enum="ShapeType"> The [Shape] is a [RayShape]. diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml index af100d5206..266ab2a898 100644 --- a/doc/classes/PointMesh.xml +++ b/doc/classes/PointMesh.xml @@ -5,7 +5,7 @@ </brief_description> <description> The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud). - PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [SpatialMaterial] by setting [member SpatialMaterial.flags_use_point_size] and the variable [member SpatialMaterial.params_point_size]. + PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [BaseMaterial3D] by setting [member BaseMaterial3D.use_point_size] and the variable [member BaseMaterial3D.point_size]. When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face. </description> <tutorials> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index e911ed7664..f777545733 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -5,7 +5,6 @@ </brief_description> <description> A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. - [b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb]. </description> <tutorials> </tutorials> @@ -15,7 +14,7 @@ </return> <argument index="0" name="path" type="NodePath"> </argument> - <argument index="1" name="weights" type="PoolRealArray"> + <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> </description> @@ -49,7 +48,7 @@ </description> </method> <method name="get_bone_weights" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="index" type="int"> </argument> @@ -71,7 +70,7 @@ </return> <argument index="0" name="index" type="int"> </argument> - <argument index="1" name="weights" type="PoolRealArray"> + <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> </description> @@ -94,18 +93,26 @@ <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false"> If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. </member> + <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> + </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The offset applied to each vertex. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> The polygon's list of vertices. The final point will be connected to the first. - [b]Note:[/b] This returns a copy of the [PoolVector2Array] rather than a reference. + [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference. </member> <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]"> </member> + <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0"> + </member> <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath("")"> </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )"> + </member> + <member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map"> + </member> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. </member> <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> @@ -120,10 +127,10 @@ <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )"> Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. </member> - <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv" default="PoolVector2Array( )"> + <member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array( )"> Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code]. </member> - <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PoolColorArray( )"> + <member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray( )"> Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. </member> </members> diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml index 28a0447f3d..49453d32ac 100644 --- a/doc/classes/PolygonPathFinder.xml +++ b/doc/classes/PolygonPathFinder.xml @@ -8,7 +8,7 @@ </tutorials> <methods> <method name="find_path"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Vector2"> </argument> @@ -32,7 +32,7 @@ </description> </method> <method name="get_intersections" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Vector2"> </argument> @@ -70,9 +70,9 @@ <method name="setup"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="connections" type="PoolIntArray"> + <argument index="1" name="connections" type="PackedInt32Array"> </argument> <description> </description> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 31ab27628a..8dda33f624 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -42,7 +42,7 @@ <method name="add_icon_check_item"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="label" type="String"> </argument> @@ -59,7 +59,7 @@ <method name="add_icon_check_shortcut"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="shortcut" type="ShortCut"> </argument> @@ -76,7 +76,7 @@ <method name="add_icon_item"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="label" type="String"> </argument> @@ -92,7 +92,7 @@ <method name="add_icon_radio_check_item"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="label" type="String"> </argument> @@ -107,7 +107,7 @@ <method name="add_icon_radio_check_shortcut"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="shortcut" type="ShortCut"> </argument> @@ -122,7 +122,7 @@ <method name="add_icon_shortcut"> <return type="void"> </return> - <argument index="0" name="texture" type="Texture"> + <argument index="0" name="texture" type="Texture2D"> </argument> <argument index="1" name="shortcut" type="ShortCut"> </argument> @@ -259,7 +259,7 @@ </description> </method> <method name="get_item_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -485,10 +485,10 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="icon" type="Texture"> + <argument index="1" name="icon" type="Texture2D"> </argument> <description> - Replaces the [Texture] icon of the specified [code]idx[/code]. + Replaces the [Texture2D] icon of the specified [code]idx[/code]. </description> </method> <method name="set_item_id"> @@ -644,8 +644,8 @@ <constants> </constants> <theme_items> - <theme_item name="checked" type="Texture"> - [Texture] icon for the checked checkbox items. + <theme_item name="checked" type="Texture2D"> + [Texture2D] icon for the checked checkbox items. </theme_item> <theme_item name="font" type="Font"> [Font] used for the menu items. @@ -680,20 +680,20 @@ <theme_item name="panel_disabled" type="StyleBox"> [StyleBox] used when the [PopupMenu] item is disabled. </theme_item> - <theme_item name="radio_checked" type="Texture"> - [Texture] icon for the checked radio button items. + <theme_item name="radio_checked" type="Texture2D"> + [Texture2D] icon for the checked radio button items. </theme_item> - <theme_item name="radio_unchecked" type="Texture"> - [Texture] icon for the unchecked radio button items. + <theme_item name="radio_unchecked" type="Texture2D"> + [Texture2D] icon for the unchecked radio button items. </theme_item> <theme_item name="separator" type="StyleBox"> [StyleBox] used for the separators. See [method add_separator]. </theme_item> - <theme_item name="submenu" type="Texture"> - [Texture] icon for the submenu arrow. + <theme_item name="submenu" type="Texture2D"> + [Texture2D] icon for the submenu arrow. </theme_item> - <theme_item name="unchecked" type="Texture"> - [Texture] icon for the unchecked checkbox items. + <theme_item name="unchecked" type="Texture2D"> + [Texture2D] icon for the unchecked checkbox items. </theme_item> <theme_item name="vseparation" type="int" default="4"> The vertical space between each menu item. diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index ea84860632..77915bc538 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -23,7 +23,7 @@ </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. - This gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode]. + This gives the same result as using [constant BaseMaterial3D.CULL_BACK] in [member BaseMaterial3D.cull_mode]. </member> <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml index 25d09a1bc0..9a61fac63a 100644 --- a/doc/classes/ProceduralSky.xml +++ b/doc/classes/ProceduralSky.xml @@ -58,7 +58,7 @@ The direction of the sun using polar coordinates. </member> <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize" default="2"> - Size of [Texture] that the ProceduralSky will generate. The size is set using [enum TextureSize]. + Size of [Texture2D] that the ProceduralSky will generate. The size is set using [enum TextureSize]. </member> </members> <constants> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b4284e06b9..a2c6ed34e0 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -284,7 +284,7 @@ If [code]true[/code], enables warnings when a constant is used as a function. </member> <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when deprecated keywords such as [code]slave[/code] are used. + If [code]true[/code], enables warnings when deprecated keywords are used. </member> <member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings. @@ -469,7 +469,7 @@ <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path. </member> - <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( "gd", "shader" )"> + <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0"> @@ -815,6 +815,18 @@ <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60"> This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. </member> + <member name="mono/debugger_agent/port" type="int" setter="" getter="" default="23685"> + </member> + <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter="" default="false"> + </member> + <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter="" default="3000"> + </member> + <member name="mono/profiler/args" type="String" setter="" getter="" default=""log:calls,alloc,sample,output=output.mlpd""> + </member> + <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false"> + </member> + <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0"> + </member> <member name="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter="" default="2048"> Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> @@ -956,10 +968,12 @@ Enables [member Viewport.physics_object_picking] on the root viewport. </member> <member name="physics/common/physics_fps" type="int" setter="" getter="" default="60"> - Frames per second used in the physics. Physics always needs a fixed amount of frames per second. + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. + [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead. </member> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS. + [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. </member> <member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color]. @@ -967,44 +981,16 @@ <member name="rendering/environment/default_environment" type="String" setter="" getter="" default=""""> [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. </member> - <member name="rendering/limits/buffers/blend_shape_max_buffer_size_kb" type="int" setter="" getter="" default="4096"> - Max buffer size for blend shapes. Any blend shape bigger than this will not work. - </member> - <member name="rendering/limits/buffers/canvas_polygon_buffer_size_kb" type="int" setter="" getter="" default="128"> - Max buffer size for drawing polygons. Any polygon bigger than this will not work. - </member> - <member name="rendering/limits/buffers/canvas_polygon_index_buffer_size_kb" type="int" setter="" getter="" default="128"> - Max index buffer size for drawing polygons. Any polygon bigger than this will not work. - </member> - <member name="rendering/limits/buffers/immediate_buffer_size_kb" type="int" setter="" getter="" default="2048"> - Max buffer size for drawing immediate objects (ImmediateGeometry nodes). Nodes using more than this size will not work. - </member> - <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="65536"> + <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000"> Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves. </member> - <member name="rendering/limits/rendering/max_renderable_lights" type="int" setter="" getter="" default="4096"> - Max number of lights renderable in a frame. If more than this number are used, they will be ignored. On some systems (particularly web) setting this number as low as possible can increase the speed of shader compilation. - </member> - <member name="rendering/limits/rendering/max_renderable_reflections" type="int" setter="" getter="" default="1024"> - Max number of reflection probes renderable in a frame. If more than this number are used, they will be ignored. On some systems (particularly web) setting this number as low as possible can increase the speed of shader compilation. - </member> - <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> - Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds). - </member> <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter="" default="false"> Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details. - If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms. + If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend, and only desktop platforms. It is not necessary when using the Vulkan backend. </member> <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter="" default="false"> If [code]true[/code], forces snapping of polygons to pixels in 2D rendering. May help in some pixel art styles. </member> - <member name="rendering/quality/depth/hdr" type="bool" setter="" getter="" default="true"> - If [code]true[/code], allocates the main framebuffer with high dynamic range. High dynamic range allows the use of [Color] values greater than 1. - [b]Note:[/b] Only available on the GLES3 backend. - </member> - <member name="rendering/quality/depth/hdr.mobile" type="bool" setter="" getter="" default="false"> - Lower-end override for [member rendering/quality/depth/hdr] on mobile devices, due to performance concerns or driver support. - </member> <member name="rendering/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. </member> @@ -1017,48 +1003,62 @@ <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> Lower-end override for [member rendering/quality/directional_shadow/size] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""GLES3""> - The video driver to use ("GLES2" or "GLES3"). - [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time. + <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""Vulkan""> + The video driver to use ("GLES2" or "Vulkan"). + [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time. </member> - <member name="rendering/quality/driver/fallback_to_gles2" type="bool" setter="" getter="" default="false"> - If [code]true[/code], allows falling back to the GLES2 driver if the GLES3 driver is not supported. - [b]Note:[/b] The two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size. + <member name="rendering/quality/filters/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> </member> - <member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter="" default="4"> - Maximum anisotropic filter level used for textures with anisotropy enabled. Higher values will result in sharper textures when viewed from oblique angles, at the cost of performance. Only power-of-two values are valid (2, 4, 8, 16). + <member name="rendering/quality/filters/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1"> + </member> + <member name="rendering/quality/filters/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/quality/filters/max_anisotropy" type="int" setter="" getter="" default="4"> </member> <member name="rendering/quality/filters/msaa" type="int" setter="" getter="" default="0"> Sets the number of MSAA samples to use. MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. [b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend. </member> + <member name="rendering/quality/filters/screen_space_roughness_limiter" type="int" setter="" getter="" default="0"> + </member> + <member name="rendering/quality/filters/screen_space_roughness_limiter_curve" type="float" setter="" getter="" default="1.0"> + </member> <member name="rendering/quality/filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. </member> + <member name="rendering/quality/gi_probes/anisotropic" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1"> + </member> <member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2"> Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment]. </member> <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/reflections/atlas_size" type="int" setter="" getter="" default="2048"> - Size of the atlas used by reflection probes. A larger size can result in higher visual quality, while a smaller size will be faster and take up less memory. + <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> + <member name="rendering/quality/reflection_atlas/reflection_size" type="int" setter="" getter="" default="128"> + Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower. + </member> + <member name="rendering/quality/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128"> + Lower-end override for [member rendering/quality/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/reflections/atlas_subdiv" type="int" setter="" getter="" default="8"> - Number of subdivisions to use for the reflection atlas. A higher number lowers the quality of each atlas, but allows you to use more. + <member name="rendering/quality/reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false"> + Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed. </member> - <member name="rendering/quality/reflections/high_quality_ggx" type="bool" setter="" getter="" default="true"> - If [code]true[/code], uses a high amount of samples to create blurred variants of reflection probes and panorama backgrounds (sky). Those blurred variants are used by rough materials. + <member name="rendering/quality/reflections/ggx_samples" type="int" setter="" getter="" default="1024"> + Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail. </member> - <member name="rendering/quality/reflections/high_quality_ggx.mobile" type="bool" setter="" getter="" default="false"> - Lower-end override for [member rendering/quality/reflections/high_quality_ggx] on mobile devices, due to performance concerns or driver support. + <member name="rendering/quality/reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128"> + Lower-end override for [member rendering/quality/reflections/ggx_samples] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/reflections/irradiance_max_size" type="int" setter="" getter="" default="128"> - Limits the size of the irradiance map which is normally determined by [member Sky.radiance_size]. A higher size results in a higher quality irradiance map similarly to [member rendering/quality/reflections/high_quality_ggx]. Use a higher value when using high-frequency HDRI maps, otherwise keep this as low as possible. - [b]Note:[/b] Low and mid range hardware do not support complex irradiance maps well and may crash if this is set too high. + <member name="rendering/quality/reflections/roughness_layers" type="int" setter="" getter="" default="6"> + Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM. </member> <member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true"> - If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise on reflections, but costs more performance and memory. + If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/quality/reflections/roughness_layers] times more memory. </member> <member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support. @@ -1105,32 +1105,21 @@ <member name="rendering/quality/shadows/filter_mode.mobile" type="int" setter="" getter="" default="0"> Lower-end override for [member rendering/quality/shadows/filter_mode] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/subsurface_scattering/follow_surface" type="bool" setter="" getter="" default="false"> - Improves quality of subsurface scattering, but cost significantly increases. + <member name="rendering/quality/ssao/half_size" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/quality/subsurface_scattering/quality" type="int" setter="" getter="" default="1"> - Quality setting for subsurface scattering (samples taken). - </member> - <member name="rendering/quality/subsurface_scattering/scale" type="int" setter="" getter="" default="1.0"> - Max radius used for subsurface scattering samples. - </member> - <member name="rendering/quality/subsurface_scattering/weight_samples" type="bool" setter="" getter="" default="true"> - Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen. - </member> - <member name="rendering/quality/voxel_cone_tracing/high_quality" type="bool" setter="" getter="" default="false"> - Use high-quality voxel cone tracing. This results in better-looking reflections, but is much more expensive on the GPU. + <member name="rendering/quality/ssao/quality" type="int" setter="" getter="" default="1"> </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> <member name="rendering/vram_compression/import_bptc" type="bool" setter="" getter="" default="false"> - If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the GLES3 renderer. + If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer. </member> <member name="rendering/vram_compression/import_etc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures. </member> <member name="rendering/vram_compression/import_etc2" type="bool" setter="" getter="" default="true"> - If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the GLES3 renderer. + If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer. </member> <member name="rendering/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS. @@ -1138,6 +1127,14 @@ <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles. </member> + <member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64"> + </member> + <member name="rendering/vulkan/staging_buffer/block_size_kb" type="int" setter="" getter="" default="256"> + </member> + <member name="rendering/vulkan/staging_buffer/max_size_mb" type="int" setter="" getter="" default="128"> + </member> + <member name="rendering/vulkan/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64"> + </member> </members> <constants> </constants> diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml index fdff8908d5..4f25fbcdf9 100644 --- a/doc/classes/ProxyTexture.xml +++ b/doc/classes/ProxyTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ProxyTexture" inherits="Texture" version="4.0"> +<class name="ProxyTexture" inherits="Texture2D" version="4.0"> <brief_description> </brief_description> <description> @@ -9,9 +9,8 @@ <methods> </methods> <members> - <member name="base" type="Texture" setter="set_base" getter="get_base"> + <member name="base" type="Texture2D" setter="set_base" getter="get_base"> </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> </members> <constants> </constants> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index f11f20f1f9..327fa882e5 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -132,6 +132,8 @@ </description> </method> <method name="set_axis_angle"> + <return type="void"> + </return> <argument index="0" name="axis" type="Vector3"> </argument> <argument index="1" name="angle" type="float"> @@ -141,6 +143,8 @@ </description> </method> <method name="set_euler"> + <return type="void"> + </return> <argument index="0" name="euler" type="Vector3"> </argument> <description> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index e32b19ff00..26abfb538b 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Rect2" version="4.0"> <brief_description> - 2D axis-aligned bounding box. + 2D axis-aligned bounding box using floating point coordinates. </brief_description> <description> - Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + [Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + It uses floating point coordinates. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -36,6 +37,15 @@ Constructs a [Rect2] by x, y, width, and height. </description> </method> + <method name="Rect2"> + <return type="Rect2"> + </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a [Rect2] from a [Rect2i]. + </description> + </method> <method name="abs"> <return type="Rect2"> </return> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml new file mode 100644 index 0000000000..2e8be384c1 --- /dev/null +++ b/doc/classes/Rect2i.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Rect2i" version="4.0"> + <brief_description> + 2D axis-aligned bounding box using integer coordinates. + </brief_description> + <description> + [Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + It uses integer coordinates. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + </tutorials> + <methods> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="size" type="Vector2"> + </argument> + <description> + Constructs a [Rect2i] by position and size. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="width" type="int"> + </argument> + <argument index="3" name="height" type="int"> + </argument> + <description> + Constructs a [Rect2i] by x, y, width, and height. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="from" type="Rect2"> + </argument> + <description> + Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 9c7a645fec..e138af6841 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -4,7 +4,7 @@ Captures its surroundings to create reflections. </brief_description> <description> - Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses. + Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses. The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them. </description> <tutorials> @@ -52,7 +52,7 @@ </members> <constants> <constant name="UPDATE_ONCE" value="0" enum="UpdateMode"> - Update the probe once on the next frame. + Update the probe once on the next frame. The corresponding radiance map will be generated over the following six frames. This is slower to update than [constant UPDATE_ALWAYS] but can result in higher quality reflections. </constant> <constant name="UPDATE_ALWAYS" value="1" enum="UpdateMode"> Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use [constant UPDATE_ONCE] whenever possible. diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml new file mode 100644 index 0000000000..2615f0a2e9 --- /dev/null +++ b/doc/classes/RenderingDevice.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RenderingDevice" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 496b1c4f3c..5bc34772c8 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -37,7 +37,7 @@ <return type="RID"> </return> <description> - Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID. + Returns the RID of the resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID. </description> </method> <method name="setup_local_to_scene"> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index fc36f922e1..713f2c1726 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -24,7 +24,7 @@ </description> </method> <method name="get_recognized_extensions" qualifiers="virtual"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Gets the list of extensions for files this loader is able to read. @@ -43,7 +43,7 @@ <method name="handles_type" qualifiers="virtual"> <return type="bool"> </return> - <argument index="0" name="typename" type="String"> + <argument index="0" name="typename" type="StringName"> </argument> <description> Tells which resource class this loader can load. diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 369c158ce4..69f8b43898 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -11,7 +11,7 @@ </tutorials> <methods> <method name="get_recognized_extensions" qualifiers="virtual"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="resource" type="Resource"> </argument> diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml deleted file mode 100644 index 64e94c4f2d..0000000000 --- a/doc/classes/ResourceInteractiveLoader.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceInteractiveLoader" inherits="Reference" version="4.0"> - <brief_description> - Interactive [Resource] loader. - </brief_description> - <description> - Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_resource"> - <return type="Resource"> - </return> - <description> - Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise. - </description> - </method> - <method name="get_stage" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the load stage. The total amount of stages can be queried with [method get_stage_count]. - </description> - </method> - <method name="get_stage_count" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the total amount of stages (calls to [method poll]) needed to completely load this resource. - </description> - </method> - <method name="poll"> - <return type="int" enum="Error"> - </return> - <description> - Polls the loading operation, i.e. loads a data chunk up to the next stage. - Returns [constant OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed. - Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource]. - Returns another [enum Error] code if the poll has failed. - </description> - </method> - <method name="wait"> - <return type="int" enum="Error"> - </return> - <description> - Polls the loading operation successively until the resource is completely loaded or a [method poll] fails. - Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource]. - Returns another [enum Error] code if a poll has failed, aborting the operation. - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 661043b083..533bc9ec28 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -24,7 +24,7 @@ </description> </method> <method name="get_dependencies"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="path" type="String"> </argument> @@ -33,7 +33,7 @@ </description> </method> <method name="get_recognized_extensions_for_type"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> @@ -41,15 +41,6 @@ Returns the list of recognized extensions for a resource type. </description> </method> - <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <description> - [i]Deprecated method.[/i] Use [method has_cached] or [method exists] instead. - </description> - </method> <method name="has_cached"> <return type="bool"> </return> @@ -57,7 +48,7 @@ </argument> <description> Returns whether a cached resource is available for the given [code]path[/code]. - Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] or [method load_interactive] methods will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path. + Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path. </description> </method> <method name="load"> @@ -77,16 +68,34 @@ Returns an empty resource if no ResourceFormatLoader could handle the file. </description> </method> - <method name="load_interactive"> - <return type="ResourceInteractiveLoader"> + <method name="load_threaded_get"> + <return type="Resource"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="load_threaded_get_status"> + <return type="int" enum="ResourceLoader.ThreadLoadStatus"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="progress" type="Array" default="[ ]"> + </argument> + <description> + </description> + </method> + <method name="load_threaded_request"> + <return type="int" enum="Error"> </return> <argument index="0" name="path" type="String"> </argument> <argument index="1" name="type_hint" type="String" default=""""> </argument> + <argument index="2" name="use_sub_threads" type="bool" default="false"> + </argument> <description> - Starts loading a resource interactively. The returned [ResourceInteractiveLoader] object allows to load with high granularity, calling its [method ResourceInteractiveLoader.poll] method successively to load chunks. - An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. </description> </method> <method name="set_abort_on_missing_resources"> @@ -100,5 +109,13 @@ </method> </methods> <constants> + <constant name="THREAD_LOAD_INVALID_RESOURCE" value="0" enum="ThreadLoadStatus"> + </constant> + <constant name="THREAD_LOAD_IN_PROGRESS" value="1" enum="ThreadLoadStatus"> + </constant> + <constant name="THREAD_LOAD_FAILED" value="2" enum="ThreadLoadStatus"> + </constant> + <constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus"> + </constant> </constants> </class> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 1e0dcaaea8..3159a4c424 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -13,7 +13,7 @@ <method name="add_resource"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="resource" type="Resource"> </argument> @@ -24,14 +24,14 @@ <method name="get_resource" qualifiers="const"> <return type="Resource"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the resource associated to [code]name[/code]. </description> </method> <method name="get_resource_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the list of resources inside the preloader. @@ -40,7 +40,7 @@ <method name="has_resource" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code]. @@ -49,7 +49,7 @@ <method name="remove_resource"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Removes the resource associated to [code]name[/code] from the preloader. @@ -58,9 +58,9 @@ <method name="rename_resource"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="newname" type="String"> + <argument index="1" name="newname" type="StringName"> </argument> <description> Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code]. diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 8c27b951f5..ecde5754f9 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -11,7 +11,7 @@ </tutorials> <methods> <method name="get_recognized_extensions"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="Resource"> </argument> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index bad3625abc..5f07133a27 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -14,7 +14,7 @@ <method name="add_image"> <return type="void"> </return> - <argument index="0" name="image" type="Texture"> + <argument index="0" name="image" type="Texture2D"> </argument> <argument index="1" name="width" type="int" default="0"> </argument> @@ -113,7 +113,7 @@ <method name="parse_expressions_for_values"> <return type="Dictionary"> </return> - <argument index="0" name="expressions" type="PoolStringArray"> + <argument index="0" name="expressions" type="PackedStringArray"> </argument> <description> Parses BBCode parameter [code]expressions[/code] into a dictionary. diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 19c0363963..e2b7813361 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -145,10 +145,6 @@ <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> Lock the body's movement in the Z axis. </member> - <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). - Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. - </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. </member> @@ -165,10 +161,6 @@ <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false"> If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. </member> - <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body's friction, from 0 (frictionless) to 1 (max friction). - Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. - </member> <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 958c6f0504..79c4205f59 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -126,10 +126,6 @@ <member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0"> The body's total applied torque. </member> - <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). - Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. - </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. </member> @@ -146,10 +142,6 @@ <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false"> If [code]true[/code], internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function. </member> - <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). - Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. - </member> <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b] and/or any additional gravity vector applied by [Area2D]s. </member> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index 7304e03bf6..abc429d5fe 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -37,7 +37,7 @@ </description> </method> <method name="get_connection_method" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -46,7 +46,7 @@ </description> </method> <method name="get_connection_signal" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -81,7 +81,7 @@ </description> </method> <method name="get_node_groups" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -117,7 +117,7 @@ </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -157,7 +157,7 @@ </description> </method> <method name="get_node_property_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -179,7 +179,7 @@ </description> </method> <method name="get_node_type" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 1499173d6b..e6778013cf 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -16,9 +16,9 @@ <method name="call_group" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Calls [code]method[/code] on each member of the given group. @@ -29,9 +29,9 @@ </return> <argument index="0" name="flags" type="int"> </argument> - <argument index="1" name="group" type="String"> + <argument index="1" name="group" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. @@ -83,7 +83,7 @@ </description> </method> <method name="get_network_connected_peers" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer]. @@ -106,7 +106,7 @@ <method name="get_nodes_in_group"> <return type="Array"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <description> Returns a list of all nodes assigned to the given group. @@ -122,7 +122,7 @@ <method name="has_group" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the given group exists. @@ -152,7 +152,7 @@ <method name="notify_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <argument index="1" name="notification" type="int"> </argument> @@ -165,7 +165,7 @@ </return> <argument index="0" name="call_flags" type="int"> </argument> - <argument index="1" name="group" type="String"> + <argument index="1" name="group" type="StringName"> </argument> <argument index="2" name="notification" type="int"> </argument> @@ -212,7 +212,7 @@ <method name="set_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <argument index="1" name="property" type="String"> </argument> @@ -227,7 +227,7 @@ </return> <argument index="0" name="call_flags" type="int"> </argument> - <argument index="1" name="group" type="String"> + <argument index="1" name="group" type="StringName"> </argument> <argument index="2" name="property" type="String"> </argument> @@ -320,7 +320,7 @@ </description> </signal> <signal name="files_dropped"> - <argument index="0" name="files" type="PoolStringArray"> + <argument index="0" name="files" type="PackedStringArray"> </argument> <argument index="1" name="screen" type="int"> </argument> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 0f07cb83f3..f671315620 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -26,7 +26,7 @@ </description> </method> <method name="get_instance_base_type" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the script's base type. @@ -35,7 +35,7 @@ <method name="get_property_default_value"> <return type="Variant"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> </description> @@ -67,7 +67,7 @@ <method name="has_script_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal_name" type="String"> + <argument index="0" name="signal_name" type="StringName"> </argument> <description> Returns [code]true[/code] if the script, or a base class, defines a signal with the given name. diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 0b113bebe5..9c5634f43a 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -4,7 +4,9 @@ A helper node for displaying scrollable elements such as lists. </brief_description> <description> - A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). + A ScrollContainer node meant to contain a [Control] child. + ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. + Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). </description> <tutorials> </tutorials> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index cab906ee25..14c5d7a03c 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -12,9 +12,9 @@ </tutorials> <methods> <method name="get_default_texture_param" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <description> Returns the texture that is set as default for the specified parameter. @@ -31,7 +31,7 @@ <method name="has_param" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the shader has this param defined as a uniform in its code. @@ -41,9 +41,9 @@ <method name="set_default_texture_param"> <return type="void"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index adb30c14d1..7e0e1ce831 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -13,7 +13,7 @@ <method name="get_shader_param" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <description> Returns the current value set for this material of a uniform in the shader. @@ -40,7 +40,7 @@ <method name="set_shader_param"> <return type="void"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml new file mode 100644 index 0000000000..ff428b887d --- /dev/null +++ b/doc/classes/Signal.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Signal" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="Signal"> + <return type="Signal"> + </return> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="signal_name" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="connect"> + <return type="int"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <argument index="1" name="binds" type="Array" default="[]"> + </argument> + <argument index="2" name="flags" type="int" default="0"> + </argument> + <description> + </description> + </method> + <method name="disconnect"> + <return type="void"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="emit" qualifiers="vararg"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_connections"> + <return type="Array"> + </return> + <description> + </description> + </method> + <method name="get_name"> + <return type="StringName"> + </return> + <description> + </description> + </method> + <method name="get_object"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_object_id"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="is_connected"> + <return type="bool"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="is_null"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml index 1fc8b2eb35..eaab4063b8 100644 --- a/doc/classes/Skeleton.xml +++ b/doc/classes/Skeleton.xml @@ -258,6 +258,10 @@ </description> </method> </methods> + <members> + <member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true"> + </member> + </members> <constants> <constant name="NOTIFICATION_UPDATE_SKELETON" value="50"> </constant> diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml index 0f07031708..1db78314d2 100644 --- a/doc/classes/SkeletonIK.xml +++ b/doc/classes/SkeletonIK.xml @@ -45,13 +45,13 @@ </member> <member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true"> </member> - <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone" default=""""> + <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="@"""> </member> <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> </member> - <member name="tip_bone" type="String" setter="set_tip_bone" getter="get_tip_bone" default=""""> + <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="@"""> </member> <member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false"> </member> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index b65d9d8f98..e22feb42f0 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -37,6 +37,14 @@ <description> </description> </method> + <method name="get_bind_name" qualifiers="const"> + <return type="StringName"> + </return> + <argument index="0" name="bind_index" type="int"> + </argument> + <description> + </description> + </method> <method name="get_bind_pose" qualifiers="const"> <return type="Transform"> </return> @@ -63,6 +71,16 @@ <description> </description> </method> + <method name="set_bind_name"> + <return type="void"> + </return> + <argument index="0" name="bind_index" type="int"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <description> + </description> + </method> <method name="set_bind_pose"> <return type="void"> </return> diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml index 11cea6dbc3..ba9c5ee661 100644 --- a/doc/classes/Sky.xml +++ b/doc/classes/Sky.xml @@ -11,6 +11,9 @@ <methods> </methods> <members> + <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Sky.ProcessMode" default="0"> + Sets the method for generating the radiance map from the sky. The radiance map is a cubemap with increasingly blurry versions of the sky corresponding to different levels of roughness. Radiance maps can be expensive to calculate. See [enum ProcessMode] for options. + </member> <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="2"> The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be. See [enum RadianceSize] constants for values. @@ -42,5 +45,12 @@ <constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize"> Represents the size of the [enum RadianceSize] enum. </constant> + <constant name="PROCESS_MODE_QUALITY" value="0" enum="ProcessMode"> + Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. + </constant> + <constant name="PROCESS_MODE_REALTIME" value="1" enum="ProcessMode"> + Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. + [b]Note:[/b] The fast filtering algorithm is limited to 128x128 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_128]. + </constant> </constants> </class> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 3b8bb7fb4b..c8ba8ab697 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -51,8 +51,8 @@ <constants> </constants> <theme_items> - <theme_item name="updown" type="Texture"> - Sets a custom [Texture] for up and down arrows of the [SpinBox]. + <theme_item name="updown" type="Texture2D"> + Sets a custom [Texture2D] for up and down arrows of the [SpinBox]. </theme_item> </theme_items> </class> diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml index f426cfc352..780ed5077d 100644 --- a/doc/classes/SpringArm.xml +++ b/doc/classes/SpringArm.xml @@ -18,14 +18,14 @@ <argument index="0" name="RID" type="RID"> </argument> <description> - Adds the object with the given [RID] to the list of objects excluded from the collision check. + Adds the [PhysicsBody] object with the given [RID] to the list of [PhysicsBody] objects excluded from the collision check. </description> </method> <method name="clear_excluded_objects"> <return type="void"> </return> <description> - Clears the list of objects excluded from the collision check. + Clears the list of [PhysicsBody] objects excluded from the collision check. </description> </method> <method name="get_hit_length"> @@ -41,7 +41,7 @@ <argument index="0" name="RID" type="RID"> </argument> <description> - Removes the given [RID] from the list of objects excluded from the collision check. + Removes the given [RID] from the list of [PhysicsBody] objects excluded from the collision check. </description> </method> </methods> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 5f82f76911..89cdae1dff 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -52,7 +52,7 @@ <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> The normal map gives depth to the Sprite. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> @@ -67,8 +67,14 @@ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - [Texture] object to draw. + <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0"> + </member> + <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )"> + </member> + <member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map"> + </member> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + [Texture2D] object to draw. </member> <member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1"> The number of rows in the sprite sheet. diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index a082a297f8..4c12399761 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -26,8 +26,8 @@ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - [Texture] object to draw. + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + [Texture2D] object to draw. </member> <member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1"> The number of rows in the sprite sheet. diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 8a923b4521..aaea4178fb 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -46,7 +46,7 @@ <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis" default="2"> The direction in which the front of the texture faces. </member> - <member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0"> + <member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0"> </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> If [code]true[/code], texture will be centered. diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 30690392e9..9facdde681 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -12,7 +12,7 @@ <method name="add_animation"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Adds a new animation to the library. @@ -21,9 +21,9 @@ <method name="add_frame"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> - <argument index="1" name="frame" type="Texture"> + <argument index="1" name="frame" type="Texture2D"> </argument> <argument index="2" name="at_position" type="int" default="-1"> </argument> @@ -34,7 +34,7 @@ <method name="clear"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Removes all frames from the given animation. @@ -50,14 +50,14 @@ <method name="get_animation_loop" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> If [code]true[/code], the given animation will loop. </description> </method> <method name="get_animation_names" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns an array containing the names associated to each animation. Values are placed in alphabetical order. @@ -66,16 +66,16 @@ <method name="get_animation_speed" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> The animation's speed in frames per second. </description> </method> <method name="get_frame" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="idx" type="int"> </argument> @@ -86,7 +86,7 @@ <method name="get_frame_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Returns the number of frames in the animation. @@ -95,7 +95,7 @@ <method name="has_animation" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> If [code]true[/code], the named animation exists. @@ -104,7 +104,7 @@ <method name="remove_animation"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Removes the given animation. @@ -113,7 +113,7 @@ <method name="remove_frame"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="idx" type="int"> </argument> @@ -124,9 +124,9 @@ <method name="rename_animation"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> - <argument index="1" name="newname" type="String"> + <argument index="1" name="newname" type="StringName"> </argument> <description> Changes the animation's name to [code]newname[/code]. @@ -135,7 +135,7 @@ <method name="set_animation_loop"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="loop" type="bool"> </argument> @@ -146,7 +146,7 @@ <method name="set_animation_speed"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="speed" type="float"> </argument> @@ -157,11 +157,11 @@ <method name="set_frame"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="idx" type="int"> </argument> - <argument index="2" name="txt" type="Texture"> + <argument index="2" name="txt" type="Texture2D"> </argument> <description> Sets the texture of the given frame. diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml new file mode 100644 index 0000000000..4ed9146e0f --- /dev/null +++ b/doc/classes/StandardMaterial3D.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml index ce7584ecda..280b95d182 100644 --- a/doc/classes/StaticBody.xml +++ b/doc/classes/StaticBody.xml @@ -12,20 +12,12 @@ <methods> </methods> <members> - <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). - Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. - </member> <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )"> The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. </member> <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )"> The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. </member> - <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body's friction, from 0 (frictionless) to 1 (full friction). - Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. - </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index daa160b8a9..2a5c1ea6f4 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -12,20 +12,12 @@ <methods> </methods> <members> - <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). - Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. - </member> <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0"> The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )"> The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving. </member> - <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction). - Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. - </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 31742199dd..a73d3c8212 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -171,7 +171,7 @@ <method name="put_data"> <return type="int" enum="Error"> </return> - <argument index="0" name="data" type="PoolByteArray"> + <argument index="0" name="data" type="PackedByteArray"> </argument> <description> Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code. @@ -198,7 +198,7 @@ <method name="put_partial_data"> <return type="Array"> </return> - <argument index="0" name="data" type="PoolByteArray"> + <argument index="0" name="data" type="PackedByteArray"> </argument> <description> Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent. diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 23e3890fdb..41cef9fb55 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -49,7 +49,7 @@ </method> </methods> <members> - <member name="data_array" type="PoolByteArray" setter="set_data_array" getter="get_data_array" default="PoolByteArray( )"> + <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml index 75e2661db0..a2d26d3d14 100644 --- a/doc/classes/StreamTexture.xml +++ b/doc/classes/StreamTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamTexture" inherits="Texture" version="4.0"> +<class name="StreamTexture" inherits="Texture2D" version="4.0"> <brief_description> A [code].stex[/code] texture. </brief_description> @@ -19,7 +19,6 @@ </method> </methods> <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> <member name="load_path" type="String" setter="load" getter="get_load_path" default=""""> The StreamTexture's file path to a [code].stex[/code] file. </member> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index cb80d04f24..1a5182b76e 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -49,6 +49,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Vector2i"> + </argument> + <description> + Constructs a new String from the given [Vector2i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Rect2"> </argument> <description> @@ -58,6 +67,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a new String from the given [Rect2i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Vector3"> </argument> <description> @@ -67,6 +85,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Vector3i"> + </argument> + <description> + Constructs a new String from the given [Vector3i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Transform2D"> </argument> <description> @@ -130,6 +157,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="StringName"> + </argument> + <description> + Constructs a new String from the given [StringName]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="NodePath"> </argument> <description> @@ -148,6 +184,24 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Callable"> + </argument> + <description> + Constructs a new String from the given [Callable]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="Signal"> + </argument> + <description> + Constructs a new String from the given [Signal]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Dictionary"> </argument> <description> @@ -166,64 +220,82 @@ <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolByteArray"> + <argument index="0" name="from" type="PackedByteArray"> + </argument> + <description> + Constructs a new String from the given [PackedByteArray]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="PackedInt32Array"> + </argument> + <description> + Constructs a new String from the given [PackedInt32Array]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="PackedInt64Array"> </argument> <description> - Constructs a new String from the given [PoolByteArray]. + Constructs a new String from the given [PackedInt64Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolIntArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs a new String from the given [PoolIntArray]. + Constructs a new String from the given [PackedFloat32Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolRealArray"> + <argument index="0" name="from" type="PackedFloat64Array"> </argument> <description> - Constructs a new String from the given [PoolRealArray]. + Constructs a new String from the given [PackedFloat64Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolStringArray"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs a new String from the given [PoolStringArray]. + Constructs a new String from the given [PackedStringArray]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolVector2Array"> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs a new String from the given [PoolVector2Array]. + Constructs a new String from the given [PackedVector2Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolVector3Array"> + <argument index="0" name="from" type="PackedVector3Array"> </argument> <description> - Constructs a new String from the given [PoolVector3Array]. + Constructs a new String from the given [PackedVector3Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolColorArray"> + <argument index="0" name="from" type="PackedColorArray"> </argument> <description> - Constructs a new String from the given [PoolColorArray]. + Constructs a new String from the given [PackedColorArray]. </description> </method> <method name="begins_with"> @@ -236,7 +308,7 @@ </description> </method> <method name="bigrams"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the bigrams (pairs of consecutive letters) of this string. @@ -322,6 +394,8 @@ </description> </method> <method name="erase"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <argument index="1" name="chars" type="int"> @@ -597,7 +671,7 @@ </description> </method> <method name="md5_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the MD5 hash of the string as an array of bytes. @@ -732,7 +806,7 @@ </description> </method> <method name="rsplit"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> </argument> @@ -764,7 +838,7 @@ </description> </method> <method name="sha1_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the SHA-1 hash of the string as an array of bytes. @@ -778,7 +852,7 @@ </description> </method> <method name="sha256_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the SHA-256 hash of the string as an array of bytes. @@ -801,7 +875,7 @@ </description> </method> <method name="split"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> </argument> @@ -823,7 +897,7 @@ </description> </method> <method name="split_floats"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="delimiter" type="String"> </argument> @@ -864,10 +938,10 @@ </description> </method> <method name="to_ascii"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> - Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. + Converts the String (which is a character array) to [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. </description> </method> <method name="to_float"> @@ -899,10 +973,10 @@ </description> </method> <method name="to_utf8"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> - Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. + Converts the String (which is an array of characters) to [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. </description> </method> <method name="trim_prefix"> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml new file mode 100644 index 0000000000..f323a4bb6a --- /dev/null +++ b/doc/classes/StringName.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StringName" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="StringName"> + <return type="StringName"> + </return> + <argument index="0" name="from" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index 0e9add964d..8ed94c8c26 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -119,14 +119,14 @@ <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> Modulates the color of the texture when this style box is drawn. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map"> The normal map to use when drawing this style box. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> The texture to use when drawing this style box. </member> </members> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index ef9666b5ec..4304a8df5e 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -22,7 +22,7 @@ <method name="add_bones"> <return type="void"> </return> - <argument index="0" name="bones" type="PoolIntArray"> + <argument index="0" name="bones" type="PackedInt32Array"> </argument> <description> Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. @@ -76,15 +76,15 @@ <method name="add_triangle_fan"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector3Array"> + <argument index="0" name="vertices" type="PackedVector3Array"> </argument> - <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> - <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )"> + <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )"> </argument> - <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> - <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )"> + <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )"> </argument> <argument index="5" name="tangents" type="Array" default="[ ]"> </argument> @@ -123,7 +123,7 @@ <method name="add_weights"> <return type="void"> </return> - <argument index="0" name="weights" type="PoolRealArray"> + <argument index="0" name="weights" type="PackedFloat32Array"> </argument> <description> Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. @@ -163,7 +163,7 @@ </return> <argument index="0" name="existing" type="ArrayMesh" default="null"> </argument> - <argument index="1" name="flags" type="int" default="97280"> + <argument index="1" name="flags" type="int" default="31744"> </argument> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index ee26be472c..3c4fd4c41a 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -59,12 +59,12 @@ </description> </method> <method name="get_tab_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="tab_idx" type="int"> </argument> <description> - Returns the [Texture] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture]. + Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D]. </description> </method> <method name="get_tab_title" qualifiers="const"> @@ -109,7 +109,7 @@ </return> <argument index="0" name="tab_idx" type="int"> </argument> - <argument index="1" name="icon" type="Texture"> + <argument index="1" name="icon" type="Texture2D"> </argument> <description> Sets an icon for the tab at index [code]tab_idx[/code]. @@ -186,9 +186,9 @@ </constant> </constants> <theme_items> - <theme_item name="decrement" type="Texture"> + <theme_item name="decrement" type="Texture2D"> </theme_item> - <theme_item name="decrement_highlight" type="Texture"> + <theme_item name="decrement_highlight" type="Texture2D"> </theme_item> <theme_item name="font" type="Font"> </theme_item> @@ -200,17 +200,13 @@ </theme_item> <theme_item name="hseparation" type="int" default="4"> </theme_item> - <theme_item name="increment" type="Texture"> + <theme_item name="increment" type="Texture2D"> </theme_item> - <theme_item name="increment_highlight" type="Texture"> + <theme_item name="increment_highlight" type="Texture2D"> </theme_item> - <theme_item name="label_valign_bg" type="int" default="2"> + <theme_item name="menu" type="Texture2D"> </theme_item> - <theme_item name="label_valign_fg" type="int" default="0"> - </theme_item> - <theme_item name="menu" type="Texture"> - </theme_item> - <theme_item name="menu_highlight" type="Texture"> + <theme_item name="menu_highlight" type="Texture2D"> </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> @@ -222,7 +218,5 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> - <theme_item name="top_margin" type="int" default="24"> - </theme_item> </theme_items> </class> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index ae455f8043..8f31b24131 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -14,7 +14,7 @@ </return> <argument index="0" name="title" type="String" default=""""> </argument> - <argument index="1" name="icon" type="Texture" default="null"> + <argument index="1" name="icon" type="Texture2D" default="null"> </argument> <description> Adds a new tab. @@ -60,12 +60,12 @@ </description> </method> <method name="get_tab_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="tab_idx" type="int"> </argument> <description> - Returns the [Texture] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture]. + Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D]. </description> </method> <method name="get_tab_offset" qualifiers="const"> @@ -146,7 +146,7 @@ </return> <argument index="0" name="tab_idx" type="int"> </argument> - <argument index="1" name="icon" type="Texture"> + <argument index="1" name="icon" type="Texture2D"> </argument> <description> Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code]. @@ -265,11 +265,11 @@ </theme_item> <theme_item name="button_pressed" type="StyleBox"> </theme_item> - <theme_item name="close" type="Texture"> + <theme_item name="close" type="Texture2D"> </theme_item> - <theme_item name="decrement" type="Texture"> + <theme_item name="decrement" type="Texture2D"> </theme_item> - <theme_item name="decrement_highlight" type="Texture"> + <theme_item name="decrement_highlight" type="Texture2D"> </theme_item> <theme_item name="font" type="Font"> </theme_item> @@ -281,13 +281,9 @@ </theme_item> <theme_item name="hseparation" type="int" default="4"> </theme_item> - <theme_item name="increment" type="Texture"> + <theme_item name="increment" type="Texture2D"> </theme_item> - <theme_item name="increment_highlight" type="Texture"> - </theme_item> - <theme_item name="label_valign_bg" type="int" default="2"> - </theme_item> - <theme_item name="label_valign_fg" type="int" default="0"> + <theme_item name="increment_highlight" type="Texture2D"> </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> @@ -297,7 +293,5 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> - <theme_item name="top_margin" type="int" default="24"> - </theme_item> </theme_items> </class> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index eb3b72f627..d4eeb574eb 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -299,7 +299,7 @@ </description> </method> <method name="search" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="key" type="String"> </argument> @@ -311,7 +311,7 @@ </argument> <description> Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. - Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g: + Returns an empty [code]PackedInt32Array[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g: [codeblock] var result = search(key, flags, line, column) if result.size() > 0: @@ -592,9 +592,9 @@ </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> - <theme_item name="fold" type="Texture"> + <theme_item name="fold" type="Texture2D"> </theme_item> - <theme_item name="folded" type="Texture"> + <theme_item name="folded" type="Texture2D"> </theme_item> <theme_item name="font" type="Font"> Sets the default [Font]. @@ -632,12 +632,12 @@ <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> Sets the highlight [Color] of text selections. </theme_item> - <theme_item name="space" type="Texture"> + <theme_item name="space" type="Texture2D"> </theme_item> <theme_item name="symbol_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> - <theme_item name="tab" type="Texture"> - Sets a custom [Texture] for tab text characters. + <theme_item name="tab" type="Texture2D"> + Sets a custom [Texture2D] for tab text characters. </theme_item> <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )"> Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index 592f822ecc..e19d611ea9 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -1,139 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Texture" inherits="Resource" version="4.0"> <brief_description> - Texture for 2D and 3D. </brief_description> <description> - A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. - Textures are often created by loading them from a file. See [method @GDScript.load]. - [Texture] is a base for other resources. It cannot be used directly. </description> <tutorials> </tutorials> <methods> - <method name="draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> - <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="3" name="transpose" type="bool" default="false"> - </argument> - <argument index="4" name="normal_map" type="Texture" default="null"> - </argument> - <description> - Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at [code]position[/code] and the size of this [Texture]. - </description> - </method> - <method name="draw_rect" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="tile" type="bool"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> - <argument index="5" name="normal_map" type="Texture" default="null"> - </argument> - <description> - Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect]. - </description> - </method> - <method name="draw_rect_region" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="src_rect" type="Rect2"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> - <argument index="5" name="normal_map" type="Texture" default="null"> - </argument> - <argument index="6" name="clip_uv" type="bool" default="true"> - </argument> - <description> - Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region]. - </description> - </method> - <method name="get_data" qualifiers="const"> - <return type="Image"> - </return> - <description> - Returns an [Image] with the data from this [Texture]. [Image]s can be accessed and manipulated directly. - </description> - </method> - <method name="get_height" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the texture height. - </description> - </method> - <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> - <description> - Returns the texture size. - </description> - </method> - <method name="get_width" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the texture width. - </description> - </method> - <method name="has_alpha" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if this [Texture] has an alpha channel. - </description> - </method> </methods> - <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> - The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]. - </member> - </members> <constants> - <constant name="FLAGS_DEFAULT" value="7" enum="Flags"> - Default flags. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] and [constant FLAG_FILTER] are enabled. - </constant> - <constant name="FLAG_MIPMAPS" value="1" enum="Flags"> - Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. - </constant> - <constant name="FLAG_REPEAT" value="2" enum="Flags"> - Repeats the texture (instead of clamp to edge). - </constant> - <constant name="FLAG_FILTER" value="4" enum="Flags"> - Uses a magnifying filter, to enable smooth zooming in of the texture. - </constant> - <constant name="FLAG_ANISOTROPIC_FILTER" value="8" enum="Flags"> - Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. - This results in better-looking textures when viewed from oblique angles. - </constant> - <constant name="FLAG_CONVERT_TO_LINEAR" value="16" enum="Flags"> - Converts the texture to the sRGB color space. - </constant> - <constant name="FLAG_MIRRORED_REPEAT" value="32" enum="Flags"> - Repeats the texture with alternate sections mirrored. - </constant> - <constant name="FLAG_VIDEO_SURFACE" value="2048" enum="Flags"> - Texture is a video surface. - </constant> </constants> </class> diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml new file mode 100644 index 0000000000..63cdb0d90a --- /dev/null +++ b/doc/classes/Texture2D.xml @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Texture2D" inherits="Texture" version="4.0"> + <brief_description> + Texture for 2D and 3D. + </brief_description> + <description> + A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. + Textures are often created by loading them from a file. See [method @GDScript.load]. + [Texture2D] is a base for other resources. It cannot be used directly. + </description> + <tutorials> + </tutorials> + <methods> + <method name="draw" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="canvas_item" type="RID"> + </argument> + <argument index="1" name="position" type="Vector2"> + </argument> + <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="3" name="transpose" type="bool" default="false"> + </argument> + <argument index="4" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="5" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="6" name="specular_color_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="7" name="texture_filter" type="int" enum="VisualServer.CanvasItemTextureFilter" default="0"> + </argument> + <argument index="8" name="texture_repeat" type="int" enum="VisualServer.CanvasItemTextureRepeat" default="0"> + </argument> + <description> + Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. + </description> + </method> + <method name="draw_rect" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="canvas_item" type="RID"> + </argument> + <argument index="1" name="rect" type="Rect2"> + </argument> + <argument index="2" name="tile" type="bool"> + </argument> + <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="4" name="transpose" type="bool" default="false"> + </argument> + <argument index="5" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="6" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="7" name="specular_color_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="8" name="texture_filter" type="int" enum="VisualServer.CanvasItemTextureFilter" default="0"> + </argument> + <argument index="9" name="texture_repeat" type="int" enum="VisualServer.CanvasItemTextureRepeat" default="0"> + </argument> + <description> + Draws the texture using a [CanvasItem] with the [VisualServer] API. + </description> + </method> + <method name="draw_rect_region" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="canvas_item" type="RID"> + </argument> + <argument index="1" name="rect" type="Rect2"> + </argument> + <argument index="2" name="src_rect" type="Rect2"> + </argument> + <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="4" name="transpose" type="bool" default="false"> + </argument> + <argument index="5" name="normal_map" type="Texture2D" default="null"> + </argument> + <argument index="6" name="specular_map" type="Texture2D" default="null"> + </argument> + <argument index="7" name="specular_color_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="8" name="texture_filter" type="int" enum="VisualServer.CanvasItemTextureFilter" default="0"> + </argument> + <argument index="9" name="texture_repeat" type="int" enum="VisualServer.CanvasItemTextureRepeat" default="0"> + </argument> + <argument index="10" name="clip_uv" type="bool" default="true"> + </argument> + <description> + Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. + </description> + </method> + <method name="get_data" qualifiers="const"> + <return type="Image"> + </return> + <description> + Returns an [Image] with the data from this [Texture2D]. [Image]s can be accessed and manipulated directly. + </description> + </method> + <method name="get_height" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the texture height. + </description> + </method> + <method name="get_size" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the texture size. + </description> + </method> + <method name="get_width" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the texture width. + </description> + </method> + <method name="has_alpha" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if this [Texture2D] has an alpha channel. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml new file mode 100644 index 0000000000..657506120e --- /dev/null +++ b/doc/classes/Texture2DArray.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Texture2DArray" inherits="TextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml deleted file mode 100644 index bc16cd015f..0000000000 --- a/doc/classes/Texture3D.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="Texture3D" inherits="TextureLayered" version="4.0"> - <brief_description> - Texture with 3 dimensions. - </brief_description> - <description> - Texture3D is a 3-dimensional texture that has a width, height, and depth. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" override="true" default="{"depth": 0,"flags": 4,"format": 37,"height": 0,"layers": [ ],"width": 0}" /> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/TextureArray.xml b/doc/classes/TextureArray.xml deleted file mode 100644 index b652a1c6bc..0000000000 --- a/doc/classes/TextureArray.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureArray" inherits="TextureLayered" version="4.0"> - <brief_description> - Array of textures stored in a single primitive. - </brief_description> - <description> - [TextureArray]s store an array of images in a single [Texture] primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index be717e9817..0e2872755e 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -21,19 +21,19 @@ <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. </member> - <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture"> + <member name="texture_disabled" type="Texture2D" setter="set_disabled_texture" getter="get_disabled_texture"> Texture to display when the node is disabled. See [member BaseButton.disabled]. </member> - <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture"> + <member name="texture_focused" type="Texture2D" setter="set_focused_texture" getter="get_focused_texture"> Texture to display when the node has mouse or keyboard focus. </member> - <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture"> + <member name="texture_hover" type="Texture2D" setter="set_hover_texture" getter="get_hover_texture"> Texture to display when the mouse hovers the node. </member> - <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture"> + <member name="texture_normal" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture"> Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state. </member> - <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture"> + <member name="texture_pressed" type="Texture2D" setter="set_pressed_texture" getter="get_pressed_texture"> Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key. </member> </members> diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index f20f46b6c4..66e5b69ab4 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -1,36 +1,20 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureLayered" inherits="Resource" version="4.0"> +<class name="TextureLayered" inherits="Texture" version="4.0"> <brief_description> Base class for 3D texture types. </brief_description> <description> - Base class for [Texture3D] and [TextureArray]. Cannot be used directly, but contains all the functions necessary for accessing and using [Texture3D] and [TextureArray]. Data is set on a per-layer basis. For [Texture3D]s, the layer sepcifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for [TextureArray]s, the layer specifies the array layer. + Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Data is set on a per-layer basis. For [Texture2DArray]s, the layer specifies the array layer. </description> <tutorials> </tutorials> <methods> - <method name="create"> - <return type="void"> + <method name="create_from_images"> + <return type="int" enum="Error"> </return> - <argument index="0" name="width" type="int"> - </argument> - <argument index="1" name="height" type="int"> - </argument> - <argument index="2" name="depth" type="int"> - </argument> - <argument index="3" name="format" type="int" enum="Image.Format"> - </argument> - <argument index="4" name="flags" type="int" default="4"> + <argument index="0" name="images" type="Array"> </argument> <description> - Creates the [Texture3D] or [TextureArray] with specified [code]width[/code], [code]height[/code], and [code]depth[/code]. See [enum Image.Format] for [code]format[/code] options. See [enum Flags] enumerator for [code]flags[/code] options. - </description> - </method> - <method name="get_depth" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis). </description> </method> <method name="get_format" qualifiers="const"> @@ -56,31 +40,20 @@ Returns an [Image] resource with the data from specified [code]layer[/code]. </description> </method> - <method name="get_width" qualifiers="const"> + <method name="get_layers" qualifiers="const"> <return type="int"> </return> <description> - Returns the width of the texture. Width is typically represented by the X-axis. </description> </method> - <method name="set_data_partial"> - <return type="void"> + <method name="get_width" qualifiers="const"> + <return type="int"> </return> - <argument index="0" name="image" type="Image"> - </argument> - <argument index="1" name="x_offset" type="int"> - </argument> - <argument index="2" name="y_offset" type="int"> - </argument> - <argument index="3" name="layer" type="int"> - </argument> - <argument index="4" name="mipmap" type="int" default="0"> - </argument> <description> - Partially sets the data for a specified [code]layer[/code] by overwriting using the data of the specified [code]image[/code]. [code]x_offset[/code] and [code]y_offset[/code] determine where the [Image] is "stamped" over the texture. The [code]image[/code] must fit within the texture. + Returns the width of the texture. Width is typically represented by the X-axis. </description> </method> - <method name="set_layer_data"> + <method name="update_layer"> <return type="void"> </return> <argument index="0" name="image" type="Image"> @@ -88,30 +61,9 @@ <argument index="1" name="layer" type="int"> </argument> <description> - Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource. </description> </method> </methods> - <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"depth": 0,"flags": 4,"format": 37,"height": 0,"layers": [ ],"width": 0}"> - Returns a dictionary with all the data used by this texture. - </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> - Specifies which [enum Flags] apply to this texture. - </member> - </members> <constants> - <constant name="FLAG_MIPMAPS" value="1" enum="Flags"> - Texture will generate mipmaps on creation. - </constant> - <constant name="FLAG_REPEAT" value="2" enum="Flags"> - Texture will repeat when UV used is outside the 0-1 range. - </constant> - <constant name="FLAG_FILTER" value="4" enum="Flags"> - Use filtering when reading from texture. Filtering smooths out pixels. Turning filtering off is slightly faster and more appropriate when you need access to individual pixels. - </constant> - <constant name="FLAGS_DEFAULT" value="4" enum="Flags"> - Equivalent to [constant FLAG_FILTER]. - </constant> </constants> </class> diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 7f91206c2c..4937121ebf 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -58,15 +58,15 @@ <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The height of the 9-patch's top row. </member> - <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture"> - [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]. + <member name="texture_over" type="Texture2D" setter="set_over_texture" getter="get_over_texture"> + [Texture2D] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]. </member> - <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture"> - [Texture] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code]. + <member name="texture_progress" type="Texture2D" setter="set_progress_texture" getter="get_progress_texture"> + [Texture2D] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code]. The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value]. </member> - <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture"> - [Texture] that draws under the progress bar. The bar's background. + <member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture"> + [Texture2D] that draws under the progress bar. The bar's background. </member> <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color( 1, 1, 1, 1 )"> Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 17c413c9f2..709d87b858 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -24,8 +24,8 @@ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode" default="0"> Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - The node's [Texture] resource. + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + The node's [Texture2D] resource. </member> </members> <constants> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index f9beb5566d..70a4eda867 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -21,9 +21,9 @@ <method name="clear_color"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the [Color] at [code]name[/code] if the theme has [code]type[/code]. @@ -32,9 +32,9 @@ <method name="clear_constant"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the constant at [code]name[/code] if the theme has [code]type[/code]. @@ -43,9 +43,9 @@ <method name="clear_font"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the [Font] at [code]name[/code] if the theme has [code]type[/code]. @@ -54,9 +54,9 @@ <method name="clear_icon"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the icon at [code]name[/code] if the theme has [code]type[/code]. @@ -65,9 +65,9 @@ <method name="clear_stylebox"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. @@ -92,125 +92,125 @@ <method name="get_color" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. + Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. + Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. </description> </method> <method name="get_font" qualifiers="const"> <return type="Font"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. + Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> - Returns the icon [Texture] at [code]name[/code] if the theme has [code]type[/code]. + Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the theme has [code]type[/code]. + Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> <return type="StyleBox"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> - Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. + Returns all the types in [code]type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. </description> </method> <method name="has_color" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. @@ -220,9 +220,9 @@ <method name="has_constant" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. @@ -232,9 +232,9 @@ <method name="has_font" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. @@ -244,21 +244,21 @@ <method name="has_icon" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> - Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code]. + Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]type[/code]. Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. @@ -268,9 +268,9 @@ <method name="set_color"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="color" type="Color"> </argument> @@ -282,9 +282,9 @@ <method name="set_constant"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="constant" type="int"> </argument> @@ -296,9 +296,9 @@ <method name="set_font"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="font" type="Font"> </argument> @@ -310,23 +310,23 @@ <method name="set_icon"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> - <argument index="2" name="texture" type="Texture"> + <argument index="2" name="texture" type="Texture2D"> </argument> <description> - Sets the theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. + Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_stylebox"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="texture" type="StyleBox"> </argument> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index f616a9d9b1..3bb5797df5 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -29,7 +29,7 @@ </return> <argument index="0" name="instance" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="userdata" type="Variant" default="null"> </argument> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 7bf5d8a0fe..65988ae2b7 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -381,7 +381,7 @@ </description> </method> <method name="tile_get_normal_map" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="id" type="int"> </argument> @@ -480,7 +480,7 @@ </description> </method> <method name="tile_get_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="id" type="int"> </argument> @@ -586,7 +586,7 @@ </return> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="normal_map" type="Texture"> + <argument index="1" name="normal_map" type="Texture2D"> </argument> <description> Sets the tile's normal map texture. @@ -694,7 +694,7 @@ </return> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> Sets the tile's texture. diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 52025a1b04..c7f886b3f2 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -24,13 +24,13 @@ <member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask"> The button's bitmask. </member> - <member name="normal" type="Texture" setter="set_texture" getter="get_texture"> + <member name="normal" type="Texture2D" setter="set_texture" getter="get_texture"> The button's texture for the normal state. </member> <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false"> If [code]true[/code], pass-by presses are enabled. </member> - <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed"> + <member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed"> The button's texture for the pressed state. </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index e9d7208f66..72f9c5493a 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -149,21 +149,21 @@ </description> </method> <method name="xform"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform. + Transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform. </description> </method> <method name="xform_inv"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Inverse-transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform. + Inverse-transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform. </description> </method> </methods> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 9719326f59..164efd4e5e 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -151,21 +151,21 @@ </description> </method> <method name="xform"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform. + Transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform. </description> </method> <method name="xform_inv"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Inverse-transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform. + Inverse-transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform. </description> </method> </methods> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index f80e59f6f9..11245195bf 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -14,9 +14,9 @@ <method name="add_message"> <return type="void"> </return> - <argument index="0" name="src_message" type="String"> + <argument index="0" name="src_message" type="StringName"> </argument> - <argument index="1" name="xlated_message" type="String"> + <argument index="1" name="xlated_message" type="StringName"> </argument> <description> Adds a message if nonexistent, followed by its translation. @@ -25,16 +25,16 @@ <method name="erase_message"> <return type="void"> </return> - <argument index="0" name="src_message" type="String"> + <argument index="0" name="src_message" type="StringName"> </argument> <description> Erases a message. </description> </method> <method name="get_message" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="src_message" type="String"> + <argument index="0" name="src_message" type="StringName"> </argument> <description> Returns a message's translation. @@ -48,7 +48,7 @@ </description> </method> <method name="get_message_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns all the messages (keys). diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 8a2a8b9768..aaf7a4d160 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -69,9 +69,9 @@ </description> </method> <method name="translate" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="message" type="String"> + <argument index="0" name="message" type="StringName"> </argument> <description> Returns the current locale's translation for the given message (key). diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 54aa85ff48..5fa24100ae 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -386,10 +386,10 @@ </constant> </constants> <theme_items> - <theme_item name="arrow" type="Texture"> + <theme_item name="arrow" type="Texture2D"> The arrow icon used when a foldable item is not collapsed. </theme_item> - <theme_item name="arrow_collapsed" type="Texture"> + <theme_item name="arrow_collapsed" type="Texture2D"> The arrow icon used when a foldable item is collapsed. </theme_item> <theme_item name="bg" type="StyleBox"> @@ -404,7 +404,7 @@ <theme_item name="button_pressed" type="StyleBox"> [StyleBox] used when a button in the tree is pressed. </theme_item> - <theme_item name="checked" type="Texture"> + <theme_item name="checked" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> <theme_item name="cursor" type="StyleBox"> @@ -461,7 +461,7 @@ <theme_item name="scroll_speed" type="int" default="12"> The speed of border scrolling. </theme_item> - <theme_item name="select_arrow" type="Texture"> + <theme_item name="select_arrow" type="Texture2D"> The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> <theme_item name="selected" type="StyleBox"> @@ -485,10 +485,10 @@ <theme_item name="title_button_pressed" type="StyleBox"> [StyleBox] used when the title button is being pressed. </theme_item> - <theme_item name="unchecked" type="Texture"> + <theme_item name="unchecked" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. </theme_item> - <theme_item name="updown" type="Texture"> + <theme_item name="updown" type="Texture2D"> The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> <theme_item name="vseparation" type="int" default="4"> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index bd9f8d36b5..f498919f9e 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -14,7 +14,7 @@ </return> <argument index="0" name="column" type="int"> </argument> - <argument index="1" name="button" type="Texture"> + <argument index="1" name="button" type="Texture2D"> </argument> <argument index="2" name="button_idx" type="int" default="-1"> </argument> @@ -23,13 +23,14 @@ <argument index="4" name="tooltip" type="String" default=""""> </argument> <description> - Adds a button with [Texture] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code]. + Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip + [/code]. </description> </method> <method name="call_recursive" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. @@ -74,14 +75,14 @@ </description> </method> <method name="get_button" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="column" type="int"> </argument> <argument index="1" name="button_idx" type="int"> </argument> <description> - Returns the [Texture] of the button at index [code]button_idx[/code] in column [code]column[/code]. + Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="get_button_count" qualifiers="const"> @@ -148,12 +149,12 @@ </description> </method> <method name="get_icon" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <argument index="0" name="column" type="int"> </argument> <description> - Returns the given column's icon [Texture]. Error if no icon is set. + Returns the given column's icon [Texture2D]. Error if no icon is set. </description> </method> <method name="get_icon_max_width" qualifiers="const"> @@ -180,7 +181,7 @@ <argument index="0" name="column" type="int"> </argument> <description> - Returns the icon [Texture] region as [Rect2]. + Returns the icon [Texture2D] region as [Rect2]. </description> </method> <method name="get_metadata" qualifiers="const"> @@ -369,10 +370,10 @@ </argument> <argument index="1" name="button_idx" type="int"> </argument> - <argument index="2" name="button" type="Texture"> + <argument index="2" name="button" type="Texture2D"> </argument> <description> - Sets the given column's button [Texture] at index [code]button_idx[/code] to [code]button[/code]. + Sets the given column's button [Texture2D] at index [code]button_idx[/code] to [code]button[/code]. </description> </method> <method name="set_button_disabled"> @@ -451,7 +452,7 @@ </argument> <argument index="1" name="object" type="Object"> </argument> - <argument index="2" name="callback" type="String"> + <argument index="2" name="callback" type="StringName"> </argument> <description> Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code]. @@ -485,10 +486,10 @@ </return> <argument index="0" name="column" type="int"> </argument> - <argument index="1" name="texture" type="Texture"> + <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Sets the given column's icon [Texture]. + Sets the given column's icon [Texture2D]. </description> </method> <method name="set_icon_max_width"> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index e60dc07e99..342acaae96 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -25,13 +25,13 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="initial_val" type="Variant"> </argument> <argument index="3" name="target" type="Object"> </argument> - <argument index="4" name="target_method" type="String"> + <argument index="4" name="target_method" type="StringName"> </argument> <argument index="5" name="duration" type="float"> </argument> @@ -130,7 +130,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="initial_val" type="Variant"> </argument> @@ -186,7 +186,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified. @@ -204,7 +204,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified. @@ -222,7 +222,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified. @@ -265,7 +265,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified. @@ -283,11 +283,11 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="initial" type="Object"> </argument> - <argument index="3" name="initial_method" type="String"> + <argument index="3" name="initial_method" type="StringName"> </argument> <argument index="4" name="final_val" type="Variant"> </argument> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml new file mode 100644 index 0000000000..f3c865c392 --- /dev/null +++ b/doc/classes/UDPServer.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="UDPServer" inherits="Reference" version="4.0"> + <brief_description> + Helper class to implement a UDP server. + </brief_description> + <description> + A simple server that opens a UDP socket and returns connected [PacketPeerUDP] upon receiving new packets. See also [method PacketPeerUDP.connect_to_host]. + Below a small example of how it can be used: + [codeblock] + # server.gd + extends Node + + var server := UDPServer.new() + var peers = [] + + func _ready(): + server.listen(4242) + + func _process(delta): + if server.is_connection_available(): + var peer : PacketPeerUDP = server.take_connection() + var pkt = peer.get_packet() + print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()]) + print("Received data: %s" % [pkt.get_string_from_utf8()]) + # Reply so it knows we received the message. + peer.put_packet(pkt) + # Keep a reference so we can keep contacting the remote peer. + peers.append(peer) + + for i in range(0, peers.size()): + pass # Do something with the connected peers. + + [/codeblock] + [codeblock] + # client.gd + extends Node + + var udp := PacketPeerUDP.new() + var connected = false + + func _ready(): + udp.connect_to_host("127.0.0.1", 4242) + + func _process(delta): + if !connected: + # Try to contact server + udp.put_packet("The answer is... 42!".to_utf8()) + if udp.get_available_packet_count() > 0: + print("Connected: %s" % udp.get_packet().get_string_from_utf8()) + connected = true + [/codeblock] + </description> + <tutorials> + </tutorials> + <methods> + <method name="is_connection_available" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if a packet with a new address/port combination is received on the socket. + </description> + </method> + <method name="is_listening" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the socket is open and listening on a port. + </description> + </method> + <method name="listen"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="port" type="int"> + </argument> + <argument index="1" name="bind_address" type="String" default=""*""> + </argument> + <description> + Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.listen]. + </description> + </method> + <method name="stop"> + <return type="void"> + </return> + <description> + Stops the server, closing the UDP socket if open. Will not disconnect any connected [PacketPeerUDP]. + </description> + </method> + <method name="take_connection"> + <return type="PacketPeerUDP"> + </return> + <description> + Returns a [PacketPeerUDP] connected to the address/port combination of the first packet in queue. Will return [code]null[/code] if no packet is in queue. See also [method PacketPeerUDP.connect_to_host]. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 06fcb1ca03..766ebf7e32 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -36,7 +36,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Register a method that will be called when the action is committed. @@ -47,7 +47,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -69,7 +69,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Register a method that will be called when the action is undone. @@ -80,7 +80,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index dddbbb219b..727e32961c 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -17,10 +17,10 @@ <constants> </constants> <theme_items> - <theme_item name="decrement" type="Texture"> + <theme_item name="decrement" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="decrement_highlight" type="Texture"> + <theme_item name="decrement_highlight" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> <theme_item name="grabber" type="StyleBox"> @@ -32,10 +32,10 @@ <theme_item name="grabber_pressed" type="StyleBox"> Used when the grabber is being dragged. </theme_item> - <theme_item name="increment" type="Texture"> + <theme_item name="increment" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="increment_highlight" type="Texture"> + <theme_item name="increment_highlight" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> <theme_item name="scroll" type="StyleBox"> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 9e0b2e0453..cbc4ac1a13 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -17,17 +17,17 @@ <constants> </constants> <theme_items> - <theme_item name="grabber" type="Texture"> + <theme_item name="grabber" type="Texture2D"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> - <theme_item name="grabber_disabled" type="Texture"> + <theme_item name="grabber_disabled" type="Texture2D"> </theme_item> - <theme_item name="grabber_highlight" type="Texture"> + <theme_item name="grabber_highlight" type="Texture2D"> </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> - <theme_item name="tick" type="Texture"> + <theme_item name="tick" type="Texture2D"> </theme_item> </theme_items> </class> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 2dba120a4f..0e659408d7 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -17,7 +17,7 @@ </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> - <theme_item name="grabber" type="Texture"> + <theme_item name="grabber" type="Texture2D"> </theme_item> <theme_item name="separation" type="int" default="12"> </theme_item> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 4eef103d1f..7b02a1a4c9 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Vector2" version="4.0"> <brief_description> - Vector used for 2D math. + Vector used for 2D math using floating point coordinates. </brief_description> <description> 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. + It uses floating point coordinates. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -13,12 +14,21 @@ <method name="Vector2"> <return type="Vector2"> </return> + <argument index="0" name="from" type="Vector2i"> + </argument> + <description> + Constructs a new [Vector2] from [Vector2i]. + </description> + </method> + <method name="Vector2"> + <return type="Vector2"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> </argument> <description> - Constructs a new Vector2 from the given [code]x[/code] and [code]y[/code]. + Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code]. </description> </method> <method name="abs"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml new file mode 100644 index 0000000000..a516eb01dd --- /dev/null +++ b/doc/classes/Vector2i.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Vector2i" version="4.0"> + <brief_description> + Vector used for 2D math using integer coordinates. + </brief_description> + <description> + 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. + It uses integer coordinates. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + </tutorials> + <methods> + <method name="Vector2i"> + <return type="Vector2i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <description> + Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. + </description> + </method> + <method name="Vector2i"> + <return type="Vector2i"> + </return> + <argument index="0" name="from" type="Vector2"> + </argument> + <description> + Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated. + </description> + </method> + </methods> + <constants> + <constant name="AXIS_X" value="0"> + Enumerated value for the X axis. + </constant> + <constant name="AXIS_Y" value="1"> + Enumerated value for the Y axis. + </constant> + <constant name="ZERO" value="Vector2i( 0, 0 )"> + Zero vector. + </constant> + <constant name="ONE" value="Vector2i( 1, 1 )"> + One vector. + </constant> + <constant name="LEFT" value="Vector2i( -1, 0 )"> + Left unit vector. + </constant> + <constant name="RIGHT" value="Vector2i( 1, 0 )"> + Right unit vector. + </constant> + <constant name="UP" value="Vector2i( 0, -1 )"> + Up unit vector. + </constant> + <constant name="DOWN" value="Vector2i( 0, 1 )"> + Down unit vector. + </constant> + </constants> +</class> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 7ae89cc450..600c03ba7d 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Vector3" version="4.0"> <brief_description> - Vector used for 3D math. + Vector used for 3D math using floating point coordinates. </brief_description> <description> 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. + It uses floating point coordinates. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -13,6 +14,15 @@ <method name="Vector3"> <return type="Vector3"> </return> + <argument index="0" name="from" type="Vector3i"> + </argument> + <description> + Constructs a new [Vector3] from [Vector3i]. + </description> + </method> + <method name="Vector3"> + <return type="Vector3"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> @@ -20,7 +30,7 @@ <argument index="2" name="z" type="float"> </argument> <description> - Returns a Vector3 with the given components. + Returns a [Vector3] with the given components. </description> </method> <method name="abs"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml new file mode 100644 index 0000000000..4f5a658b89 --- /dev/null +++ b/doc/classes/Vector3i.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Vector3i" version="4.0"> + <brief_description> + Vector used for 3D math using integer coordinates. + </brief_description> + <description> + 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. + It uses integer coordinates. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + </tutorials> + <methods> + <method name="Vector3i"> + <return type="Vector3i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="z" type="int"> + </argument> + <description> + Returns a [Vector3i] with the given components. + </description> + </method> + <method name="Vector3i"> + <return type="Vector3i"> + </return> + <argument index="0" name="from" type="Vector3"> + </argument> + <description> + Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated. + </description> + </method> + </methods> + <constants> + <constant name="AXIS_X" value="0"> + Enumerated value for the X axis. + </constant> + <constant name="AXIS_Y" value="1"> + Enumerated value for the Y axis. + </constant> + <constant name="AXIS_Z" value="2"> + Enumerated value for the Z axis. + </constant> + <constant name="ZERO" value="Vector3i( 0, 0, 0 )"> + Zero vector. + </constant> + <constant name="ONE" value="Vector3i( 1, 1, 1 )"> + One vector. + </constant> + <constant name="LEFT" value="Vector3i( -1, 0, 0 )"> + Left unit vector. + </constant> + <constant name="RIGHT" value="Vector3i( 1, 0, 0 )"> + Right unit vector. + </constant> + <constant name="UP" value="Vector3i( 0, 1, 0 )"> + Up unit vector. + </constant> + <constant name="DOWN" value="Vector3i( 0, -1, 0 )"> + Down unit vector. + </constant> + <constant name="FORWARD" value="Vector3i( 0, 0, -1 )"> + Forward unit vector. + </constant> + <constant name="BACK" value="Vector3i( 0, 0, 1 )"> + Back unit vector. + </constant> + </constants> +</class> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 73c5a1d232..91c8ad0a77 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -18,10 +18,10 @@ </description> </method> <method name="get_video_texture" qualifiers="const"> - <return type="Texture"> + <return type="Texture2D"> </return> <description> - Returns the current frame as a [Texture]. + Returns the current frame as a [Texture2D]. </description> </method> <method name="is_playing" qualifiers="const"> @@ -58,7 +58,7 @@ <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500"> Amount of time in milliseconds to store in buffer while playing. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Audio bus to use for sound playback. </member> <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 3c6ff1939e..0632be28e1 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -88,7 +88,7 @@ </return> <description> Returns the viewport's texture. - [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example: + [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_data] to flip it back, for example: [codeblock] var img = get_viewport().get_texture().get_data() img.flip_y() @@ -226,15 +226,16 @@ <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" default="false"> If [code]true[/code], the viewport will process 3D audio streams. </member> + <member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1"> + </member> + <member name="canvas_item_default_texture_repeat" type="int" setter="set_default_canvas_item_texture_repeat" getter="get_default_canvas_item_texture_repeat" enum="Viewport.DefaultCanvasItemTextureRepeat" default="0"> + </member> <member name="canvas_transform" type="Transform2D" setter="set_canvas_transform" getter="get_canvas_transform"> The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport. </member> <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw" default="0"> The overlay mode for test rendered geometry in debug purposes. </member> - <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false"> - If [code]true[/code], the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. - </member> <member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform"> The global canvas transform of the viewport. The canvas transform is relative to this. </member> @@ -246,12 +247,6 @@ </member> <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true"> </member> - <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true"> - If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number. - </member> - <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false"> - If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. - </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> @@ -270,9 +265,6 @@ <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode" default="2"> The update mode when viewport used as a render target. </member> - <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" default="false"> - If [code]true[/code], the result of rendering will be flipped vertically. - </member> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> The subdivision amount of the first quadrant on the shadow atlas. </member> @@ -298,9 +290,6 @@ <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false"> If [code]true[/code], the viewport should render its background as transparent. </member> - <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage" default="2"> - The rendering mode of viewport. - </member> <member name="world" type="World" setter="set_world" getter="get_world"> The custom [World] which can be used as 3D environment source. </member> @@ -386,12 +375,26 @@ <constant name="DEBUG_DRAW_UNSHADED" value="1" enum="DebugDraw"> Objects are displayed without light information. </constant> - <constant name="DEBUG_DRAW_OVERDRAW" value="2" enum="DebugDraw"> + <constant name="DEBUG_DRAW_OVERDRAW" value="3" enum="DebugDraw"> Objected are displayed semi-transparent with additive blending so you can see where they intersect. </constant> - <constant name="DEBUG_DRAW_WIREFRAME" value="3" enum="DebugDraw"> + <constant name="DEBUG_DRAW_WIREFRAME" value="4" enum="DebugDraw"> Objects are displayed in wireframe style. </constant> + <constant name="DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS" value="10" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_SCENE_LUMINANCE" value="11" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_SSAO" value="12" enum="DebugDraw"> + </constant> <constant name="MSAA_DISABLED" value="0" enum="MSAA"> Multisample anti-aliasing mode disabled. This is the default value. </constant> @@ -407,18 +410,6 @@ <constant name="MSAA_16X" value="4" enum="MSAA"> Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. </constant> - <constant name="USAGE_2D" value="0" enum="Usage"> - Allocates all buffers needed for drawing 2D scenes. This takes less VRAM than the 3D usage modes. - </constant> - <constant name="USAGE_2D_NO_SAMPLING" value="1" enum="Usage"> - Allocates buffers needed for 2D scenes without allocating a buffer for screen copy. Accordingly, you cannot read from the screen. Of the [enum Usage] types, this requires the least VRAM. - </constant> - <constant name="USAGE_3D" value="2" enum="Usage"> - Allocates full buffers for drawing 3D scenes and all 3D effects including buffers needed for 2D scenes and effects. - </constant> - <constant name="USAGE_3D_NO_EFFECTS" value="3" enum="Usage"> - Allocates buffers needed for drawing 3D scenes. But does not allocate buffers needed for reading from the screen and post-processing effects. Saves some VRAM. - </constant> <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode"> Always clear the render target before drawing. </constant> @@ -428,5 +419,23 @@ <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode"> Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER]. </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="1" enum="DefaultCanvasItemTextureFilter"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="2" enum="DefaultCanvasItemTextureFilter"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="DefaultCanvasItemTextureFilter"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX" value="4" enum="DefaultCanvasItemTextureFilter"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED" value="0" enum="DefaultCanvasItemTextureRepeat"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED" value="1" enum="DefaultCanvasItemTextureRepeat"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR" value="2" enum="DefaultCanvasItemTextureRepeat"> + </constant> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="3" enum="DefaultCanvasItemTextureRepeat"> + </constant> </constants> </class> diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml index e65d44f0f4..14b460a43b 100644 --- a/doc/classes/ViewportTexture.xml +++ b/doc/classes/ViewportTexture.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ViewportTexture" inherits="Texture" version="4.0"> +<class name="ViewportTexture" inherits="Texture2D" version="4.0"> <brief_description> Texture which displays the content of a [Viewport]. </brief_description> <description> - Displays the content of a [Viewport] node as a dynamic [Texture]. This can be used to mix controls, 2D, and 3D elements in the same scene. + Displays the content of a [Viewport] node as a dynamic [Texture2D]. This can be used to mix controls, 2D, and 3D elements in the same scene. To create a ViewportTexture in code, use the [method Viewport.get_texture] method on the target viewport. </description> <tutorials> @@ -12,7 +12,6 @@ <methods> </methods> <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" /> <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" /> <member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" default="NodePath("")"> The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture. diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 2a830abcb2..ca2058ddbb 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -155,289 +155,6 @@ Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> - <method name="canvas_item_add_circle"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="radius" type="float"> - </argument> - <argument index="3" name="color" type="Color"> - </argument> - <description> - Adds a circle command to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_clip_ignore"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="ignore" type="bool"> - </argument> - <description> - If ignore is [code]true[/code], the VisualServer does not perform clipping. - </description> - </method> - <method name="canvas_item_add_line"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="from" type="Vector2"> - </argument> - <argument index="2" name="to" type="Vector2"> - </argument> - <argument index="3" name="color" type="Color"> - </argument> - <argument index="4" name="width" type="float" default="1.0"> - </argument> - <argument index="5" name="antialiased" type="bool" default="false"> - </argument> - <description> - Adds a line command to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_mesh"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mesh" type="RID"> - </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="4" name="texture" type="RID"> - </argument> - <argument index="5" name="normal_map" type="RID"> - </argument> - <description> - Adds a mesh command to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_multimesh"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mesh" type="RID"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> - <argument index="3" name="normal_map" type="RID"> - </argument> - <description> - Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment. - </description> - </method> - <method name="canvas_item_add_nine_patch"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="source" type="Rect2"> - </argument> - <argument index="3" name="texture" type="RID"> - </argument> - <argument index="4" name="topleft" type="Vector2"> - </argument> - <argument index="5" name="bottomright" type="Vector2"> - </argument> - <argument index="6" name="x_axis_mode" type="int" enum="VisualServer.NinePatchAxisMode" default="0"> - </argument> - <argument index="7" name="y_axis_mode" type="int" enum="VisualServer.NinePatchAxisMode" default="0"> - </argument> - <argument index="8" name="draw_center" type="bool" default="true"> - </argument> - <argument index="9" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="10" name="normal_map" type="RID"> - </argument> - <description> - Adds a nine patch image to the [CanvasItem]'s draw commands. - See [NinePatchRect] for more explanation. - </description> - </method> - <method name="canvas_item_add_particles"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="particles" type="RID"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> - <argument index="3" name="normal_map" type="RID"> - </argument> - <description> - Adds a particle system to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_polygon"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="points" type="PoolVector2Array"> - </argument> - <argument index="2" name="colors" type="PoolColorArray"> - </argument> - <argument index="3" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> - </argument> - <argument index="4" name="texture" type="RID"> - </argument> - <argument index="5" name="normal_map" type="RID"> - </argument> - <argument index="6" name="antialiased" type="bool" default="false"> - </argument> - <description> - Adds a polygon to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_polyline"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="points" type="PoolVector2Array"> - </argument> - <argument index="2" name="colors" type="PoolColorArray"> - </argument> - <argument index="3" name="width" type="float" default="1.0"> - </argument> - <argument index="4" name="antialiased" type="bool" default="false"> - </argument> - <description> - Adds a polyline, which is a line from multiple points with a width, to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_primitive"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="points" type="PoolVector2Array"> - </argument> - <argument index="2" name="colors" type="PoolColorArray"> - </argument> - <argument index="3" name="uvs" type="PoolVector2Array"> - </argument> - <argument index="4" name="texture" type="RID"> - </argument> - <argument index="5" name="width" type="float" default="1.0"> - </argument> - <argument index="6" name="normal_map" type="RID"> - </argument> - <description> - Adds a primitive to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_rect"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> - <description> - Adds a rectangle to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_set_transform"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> - <description> - Adds a [Transform2D] command to the [CanvasItem]'s draw commands. - This sets the extra_matrix uniform when executed. This affects the later commands of the canvas item. - </description> - </method> - <method name="canvas_item_add_texture_rect"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> - <argument index="3" name="tile" type="bool" default="false"> - </argument> - <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="5" name="transpose" type="bool" default="false"> - </argument> - <argument index="6" name="normal_map" type="RID"> - </argument> - <description> - Adds a textured rect to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_texture_rect_region"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> - <argument index="3" name="src_rect" type="Rect2"> - </argument> - <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - </argument> - <argument index="5" name="transpose" type="bool" default="false"> - </argument> - <argument index="6" name="normal_map" type="RID"> - </argument> - <argument index="7" name="clip_uv" type="bool" default="true"> - </argument> - <description> - Adds a texture rect with region setting to the [CanvasItem]'s draw commands. - </description> - </method> - <method name="canvas_item_add_triangle_array"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="indices" type="PoolIntArray"> - </argument> - <argument index="2" name="points" type="PoolVector2Array"> - </argument> - <argument index="3" name="colors" type="PoolColorArray"> - </argument> - <argument index="4" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> - </argument> - <argument index="5" name="bones" type="PoolIntArray" default="PoolIntArray( )"> - </argument> - <argument index="6" name="weights" type="PoolRealArray" default="PoolRealArray( )"> - </argument> - <argument index="7" name="texture" type="RID"> - </argument> - <argument index="8" name="count" type="int" default="-1"> - </argument> - <argument index="9" name="normal_map" type="RID"> - </argument> - <argument index="10" name="antialiased" type="bool" default="false"> - </argument> - <argument index="11" name="antialiasing_use_indices" type="bool" default="false"> - </argument> - <description> - Adds a triangle array to the [CanvasItem]'s draw commands. - </description> - </method> <method name="canvas_item_clear"> <return type="void"> </return> @@ -447,25 +164,6 @@ Clears the [CanvasItem] and removes all commands in it. </description> </method> - <method name="canvas_item_create"> - <return type="RID"> - </return> - <description> - Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - </description> - </method> - <method name="canvas_item_set_clip"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="clip" type="bool"> - </argument> - <description> - Sets clipping for the [CanvasItem]. - </description> - </method> <method name="canvas_item_set_copy_to_backbuffer"> <return type="void"> </return> @@ -479,41 +177,6 @@ Sets the [CanvasItem] to copy a rect to the backbuffer. </description> </method> - <method name="canvas_item_set_custom_rect"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="use_custom_rect" type="bool"> - </argument> - <argument index="2" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )"> - </argument> - <description> - Defines a custom drawing rectangle for the [CanvasItem]. - </description> - </method> - <method name="canvas_item_set_distance_field_mode"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - Enables the use of distance fields for GUI elements that are rendering distance field based fonts. - </description> - </method> - <method name="canvas_item_set_draw_behind_parent"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - Sets [CanvasItem] to be drawn behind its parent. - </description> - </method> <method name="canvas_item_set_draw_index"> <return type="void"> </return> @@ -525,17 +188,6 @@ Sets the index for the [CanvasItem]. </description> </method> - <method name="canvas_item_set_light_mask"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> - <description> - The light mask. See [LightOccluder2D] for more information on light masks. - </description> - </method> <method name="canvas_item_set_material"> <return type="void"> </return> @@ -547,61 +199,6 @@ Sets a new material to the [CanvasItem]. </description> </method> - <method name="canvas_item_set_modulate"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <description> - Sets the color that modulates the [CanvasItem] and its children. - </description> - </method> - <method name="canvas_item_set_parent"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="parent" type="RID"> - </argument> - <description> - Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. - </description> - </method> - <method name="canvas_item_set_self_modulate"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <description> - Sets the color that modulates the [CanvasItem] without children. - </description> - </method> - <method name="canvas_item_set_sort_children_by_y"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - Sets if [CanvasItem]'s children should be sorted by y-position. - </description> - </method> - <method name="canvas_item_set_transform"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> - <description> - Sets the [CanvasItem]'s [Transform2D]. - </description> - </method> <method name="canvas_item_set_use_parent_material"> <return type="void"> </return> @@ -613,17 +210,6 @@ Sets if the [CanvasItem] uses its parent's material. </description> </method> - <method name="canvas_item_set_visible"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="visible" type="bool"> - </argument> - <description> - Sets if the canvas item (including its children) is visible. - </description> - </method> <method name="canvas_item_set_z_as_relative_to_parent"> <return type="void"> </return> @@ -873,17 +459,6 @@ Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. </description> </method> - <method name="canvas_light_set_shadow_gradient_length"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="length" type="float"> - </argument> - <description> - Sets the length of the shadow's gradient. - </description> - </method> <method name="canvas_light_set_shadow_smooth"> <return type="void"> </return> @@ -965,7 +540,7 @@ </return> <argument index="0" name="occluder_polygon" type="RID"> </argument> - <argument index="1" name="shape" type="PoolVector2Array"> + <argument index="1" name="shape" type="PackedVector2Array"> </argument> <argument index="2" name="closed" type="bool"> </argument> @@ -978,7 +553,7 @@ </return> <argument index="0" name="occluder_polygon" type="RID"> </argument> - <argument index="1" name="shape" type="PoolVector2Array"> + <argument index="1" name="shape" type="PackedVector2Array"> </argument> <description> Sets the shape of the occluder polygon as lines. @@ -1017,17 +592,6 @@ To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. </description> </method> - <method name="draw"> - <return type="void"> - </return> - <argument index="0" name="swap_buffers" type="bool" default="true"> - </argument> - <argument index="1" name="frame_step" type="float" default="0.0"> - </argument> - <description> - Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead. - </description> - </method> <method name="environment_create"> <return type="RID"> </return> @@ -1062,12 +626,17 @@ </argument> <argument index="1" name="color" type="Color"> </argument> - <argument index="2" name="energy" type="float" default="1.0"> + <argument index="2" name="ambient" type="int" enum="VisualServer.EnvironmentAmbientSource" default="0"> + </argument> + <argument index="3" name="energy" type="float" default="1.0"> + </argument> + <argument index="4" name="sky_contibution" type="float" default="0.0"> + </argument> + <argument index="5" name="reflection_source" type="int" enum="VisualServer.EnvironmentReflectionSource" default="0"> </argument> - <argument index="3" name="sky_contibution" type="float" default="0.0"> + <argument index="6" name="ao_color" type="Color" default="Color( 0, 0, 0, 1 )"> </argument> <description> - Sets the ambient light parameters. See [Environment] for more details. </description> </method> <method name="environment_set_background"> @@ -1114,44 +683,6 @@ Sets the maximum layer to use if using Canvas background mode. </description> </method> - <method name="environment_set_dof_blur_far"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="distance" type="float"> - </argument> - <argument index="3" name="transition" type="float"> - </argument> - <argument index="4" name="far_amount" type="float"> - </argument> - <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> - </argument> - <description> - Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details. - </description> - </method> - <method name="environment_set_dof_blur_near"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="distance" type="float"> - </argument> - <argument index="3" name="transition" type="float"> - </argument> - <argument index="4" name="far_amount" type="float"> - </argument> - <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> - </argument> - <description> - Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details. - </description> - </method> <method name="environment_set_fog"> <return type="void"> </return> @@ -1220,20 +751,21 @@ </argument> <argument index="4" name="strength" type="float"> </argument> - <argument index="5" name="bloom_threshold" type="float"> + <argument index="5" name="mix" type="float"> + </argument> + <argument index="6" name="bloom_threshold" type="float"> </argument> - <argument index="6" name="blend_mode" type="int" enum="VisualServer.EnvironmentGlowBlendMode"> + <argument index="7" name="blend_mode" type="int" enum="VisualServer.EnvironmentGlowBlendMode"> </argument> - <argument index="7" name="hdr_bleed_threshold" type="float"> + <argument index="8" name="hdr_bleed_threshold" type="float"> </argument> - <argument index="8" name="hdr_bleed_scale" type="float"> + <argument index="9" name="hdr_bleed_scale" type="float"> </argument> - <argument index="9" name="hdr_luminance_cap" type="float"> + <argument index="10" name="hdr_luminance_cap" type="float"> </argument> - <argument index="10" name="bicubic_upscale" type="bool"> + <argument index="11" name="bicubic_upscale" type="bool"> </argument> <description> - Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_sky"> @@ -1244,7 +776,7 @@ <argument index="1" name="sky" type="RID"> </argument> <description> - Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]. + Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.sky]. </description> </method> <method name="environment_set_sky_custom_fov"> @@ -1255,7 +787,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> - Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]. + Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov]. </description> </method> <method name="environment_set_sky_orientation"> @@ -1266,7 +798,7 @@ <argument index="1" name="orientation" type="Basis"> </argument> <description> - Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]. + Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis]. </description> </method> <method name="environment_set_ssao"> @@ -1280,26 +812,17 @@ </argument> <argument index="3" name="intensity" type="float"> </argument> - <argument index="4" name="radius2" type="float"> - </argument> - <argument index="5" name="intensity2" type="float"> - </argument> - <argument index="6" name="bias" type="float"> + <argument index="4" name="bias" type="float"> </argument> - <argument index="7" name="light_affect" type="float"> + <argument index="5" name="light_affect" type="float"> </argument> - <argument index="8" name="ao_channel_affect" type="float"> + <argument index="6" name="ao_channel_affect" type="float"> </argument> - <argument index="9" name="color" type="Color"> + <argument index="7" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur"> </argument> - <argument index="10" name="quality" type="int" enum="VisualServer.EnvironmentSSAOQuality"> - </argument> - <argument index="11" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur"> - </argument> - <argument index="12" name="bilateral_sharpness" type="float"> + <argument index="8" name="bilateral_sharpness" type="float"> </argument> <description> - Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr"> @@ -1428,240 +951,11 @@ Returns the id of a white texture. Creates one if none exists. </description> </method> - <method name="gi_probe_create"> - <return type="RID"> - </return> - <description> - Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]gi_probe_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID. - </description> - </method> - <method name="gi_probe_get_bias" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]. - </description> - </method> - <method name="gi_probe_get_bounds" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the axis-aligned bounding box that covers the full extent of the GI probe. - </description> - </method> - <method name="gi_probe_get_cell_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the cell size set by [method gi_probe_set_cell_size]. - </description> - </method> - <method name="gi_probe_get_dynamic_data" qualifiers="const"> - <return type="PoolIntArray"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the data used by the GI probe. - </description> - </method> - <method name="gi_probe_get_dynamic_range" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]. - </description> - </method> - <method name="gi_probe_get_energy" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]. - </description> - </method> - <method name="gi_probe_get_normal_bias" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]. - </description> - </method> - <method name="gi_probe_get_propagation" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]. - </description> - </method> - <method name="gi_probe_get_to_cell_xform" qualifiers="const"> - <return type="Transform"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns the Transform set by [method gi_probe_set_to_cell_xform]. - </description> - </method> - <method name="gi_probe_is_compressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]. - </description> - </method> - <method name="gi_probe_is_interior" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <description> - Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]. - </description> - </method> - <method name="gi_probe_set_bias"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="bias" type="float"> - </argument> - <description> - Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]. - </description> - </method> - <method name="gi_probe_set_bounds"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="bounds" type="AABB"> - </argument> - <description> - Sets the axis-aligned bounding box that covers the extent of the GI probe. - </description> - </method> - <method name="gi_probe_set_cell_size"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="range" type="float"> - </argument> - <description> - Sets the size of individual cells within the GI probe. - </description> - </method> - <method name="gi_probe_set_compress"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <description> - Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]. - </description> - </method> - <method name="gi_probe_set_dynamic_data"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="data" type="PoolIntArray"> - </argument> - <description> - Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself. - </description> - </method> - <method name="gi_probe_set_dynamic_range"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="range" type="int"> - </argument> - <description> - Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range]. - </description> - </method> - <method name="gi_probe_set_energy"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> - <description> - Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]. - </description> - </method> - <method name="gi_probe_set_interior"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <description> - Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior]. - </description> - </method> - <method name="gi_probe_set_normal_bias"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="bias" type="float"> - </argument> - <description> - Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias]. - </description> - </method> - <method name="gi_probe_set_propagation"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="propagation" type="float"> - </argument> - <description> - Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]. - </description> - </method> - <method name="gi_probe_set_to_cell_xform"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="xform" type="Transform"> - </argument> - <description> - Sets the to cell [Transform] for this GI probe. - </description> - </method> <method name="has_changed" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if changes have been made to the VisualServer's data. [method draw] is usually called if this happens. + Returns [code]true[/code] if changes have been made to the VisualServer's data. [method force_draw] is usually called if this happens. </description> </method> <method name="has_feature" qualifiers="const"> @@ -2130,17 +1424,6 @@ Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. </description> </method> - <method name="light_omni_set_shadow_detail"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail"> - </argument> - <description> - Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail]. - </description> - </method> <method name="light_omni_set_shadow_mode"> <return type="void"> </return> @@ -2281,7 +1564,7 @@ </description> </method> <method name="lightmap_capture_get_octree" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="capture" type="RID"> </argument> @@ -2315,7 +1598,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> - Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]. + Sets the size of the area covered by the lightmap capture. </description> </method> <method name="lightmap_capture_set_energy"> @@ -2326,7 +1609,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> - Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]. + Sets the energy multiplier for this lightmap capture. </description> </method> <method name="lightmap_capture_set_octree"> @@ -2334,10 +1617,10 @@ </return> <argument index="0" name="capture" type="RID"> </argument> - <argument index="1" name="octree" type="PoolByteArray"> + <argument index="1" name="octree" type="PackedByteArray"> </argument> <description> - Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]. + Sets the octree to be used by this lightmap capture. </description> </method> <method name="lightmap_capture_set_octree_cell_subdiv"> @@ -2348,7 +1631,7 @@ <argument index="1" name="subdiv" type="int"> </argument> <description> - Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]. + Sets the subdivision level of this lightmap capture's octree. </description> </method> <method name="lightmap_capture_set_octree_cell_transform"> @@ -2359,7 +1642,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> - Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]. + Sets the octree cell transform for this lightmap capture's octree. </description> </method> <method name="make_sphere_mesh"> @@ -2388,43 +1671,12 @@ </return> <argument index="0" name="material" type="RID"> </argument> - <argument index="1" name="parameter" type="String"> + <argument index="1" name="parameter" type="StringName"> </argument> <description> Returns the value of a certain material's parameter. </description> </method> - <method name="material_get_param_default" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="material" type="RID"> - </argument> - <argument index="1" name="parameter" type="String"> - </argument> - <description> - Returns the default value for the param if available. Otherwise returns an empty [Variant]. - </description> - </method> - <method name="material_get_shader" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="shader_material" type="RID"> - </argument> - <description> - Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader. - </description> - </method> - <method name="material_set_line_width"> - <return type="void"> - </return> - <argument index="0" name="material" type="RID"> - </argument> - <argument index="1" name="width" type="float"> - </argument> - <description> - Sets a material's line width. - </description> - </method> <method name="material_set_next_pass"> <return type="void"> </return> @@ -2441,7 +1693,7 @@ </return> <argument index="0" name="material" type="RID"> </argument> - <argument index="1" name="parameter" type="String"> + <argument index="1" name="parameter" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -2482,10 +1734,13 @@ </argument> <argument index="3" name="blend_shapes" type="Array" default="[ ]"> </argument> - <argument index="4" name="compress_format" type="int" default="97280"> + <argument index="4" name="lods" type="Dictionary" default="{ + +}"> + </argument> + <argument index="5" name="compress_format" type="int" default="31744"> </argument> <description> - Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types. </description> </method> <method name="mesh_clear"> @@ -2542,28 +1797,6 @@ Returns a mesh's number of surfaces. </description> </method> - <method name="mesh_remove_surface"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <description> - Removes a mesh's surface. - </description> - </method> - <method name="mesh_set_blend_shape_count"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="amount" type="int"> - </argument> - <description> - Sets a mesh's blend shape count. - </description> - </method> <method name="mesh_set_blend_shape_mode"> <return type="void"> </return> @@ -2586,50 +1819,6 @@ Sets a mesh's custom aabb. </description> </method> - <method name="mesh_surface_get_aabb" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns a mesh's surface's aabb. - </description> - </method> - <method name="mesh_surface_get_array" qualifiers="const"> - <return type="PoolByteArray"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns a mesh's surface's vertex buffer. - </description> - </method> - <method name="mesh_surface_get_array_index_len" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns a mesh's surface's amount of indices. - </description> - </method> - <method name="mesh_surface_get_array_len" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns a mesh's surface's amount of vertices. - </description> - </method> <method name="mesh_surface_get_arrays" qualifiers="const"> <return type="Array"> </return> @@ -2652,17 +1841,6 @@ Returns a mesh's surface's arrays for blend shapes. </description> </method> - <method name="mesh_surface_get_format" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns the format of a mesh's surface. - </description> - </method> <method name="mesh_surface_get_format_offset" qualifiers="const"> <return type="int"> </return> @@ -2691,17 +1869,6 @@ Function is unused in Godot 3.x. </description> </method> - <method name="mesh_surface_get_index_array" qualifiers="const"> - <return type="PoolByteArray"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns a mesh's surface's index buffer. - </description> - </method> <method name="mesh_surface_get_material" qualifiers="const"> <return type="RID"> </return> @@ -2713,28 +1880,6 @@ Returns a mesh's surface's material. </description> </method> - <method name="mesh_surface_get_primitive_type" qualifiers="const"> - <return type="int" enum="VisualServer.PrimitiveType"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns the primitive type of a mesh's surface. - </description> - </method> - <method name="mesh_surface_get_skeleton_aabb" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <description> - Returns the aabb of a mesh's surface's skeleton. - </description> - </method> <method name="mesh_surface_set_material"> <return type="void"> </return> @@ -2757,7 +1902,7 @@ </argument> <argument index="2" name="offset" type="int"> </argument> - <argument index="3" name="data" type="PoolByteArray"> + <argument index="3" name="data" type="PackedByteArray"> </argument> <description> Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. @@ -2772,12 +1917,11 @@ </argument> <argument index="2" name="transform_format" type="int" enum="VisualServer.MultimeshTransformFormat"> </argument> - <argument index="3" name="color_format" type="int" enum="VisualServer.MultimeshColorFormat"> + <argument index="3" name="color_format" type="bool" default="false"> </argument> - <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0"> + <argument index="4" name="custom_data_format" type="bool" default="false"> </argument> <description> - Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count]. </description> </method> <method name="multimesh_create"> @@ -2798,6 +1942,14 @@ Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. </description> </method> + <method name="multimesh_get_buffer" qualifiers="const"> + <return type="PackedFloat32Array"> + </return> + <argument index="0" name="multimesh" type="RID"> + </argument> + <description> + </description> + </method> <method name="multimesh_get_instance_count" qualifiers="const"> <return type="int"> </return> @@ -2921,19 +2073,14 @@ Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. </description> </method> - <method name="multimesh_set_as_bulk_array"> + <method name="multimesh_set_buffer"> <return type="void"> </return> <argument index="0" name="multimesh" type="RID"> </argument> - <argument index="1" name="array" type="PoolRealArray"> + <argument index="1" name="buffer" type="PackedFloat32Array"> </argument> <description> - Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. - - All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc. - - [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. </description> </method> <method name="multimesh_set_mesh"> @@ -3356,7 +2503,7 @@ </return> <argument index="0" name="where" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="userdata" type="Variant"> </argument> @@ -3407,19 +2554,6 @@ Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. </description> </method> - <method name="scenario_set_reflection_atlas_size"> - <return type="void"> - </return> - <argument index="0" name="scenario" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> - <argument index="2" name="subdiv" type="int"> - </argument> - <description> - Sets the size of the reflection atlas shared by all reflection probes in this scenario. - </description> - </method> <method name="set_boot_image"> <return type="void"> </return> @@ -3475,12 +2609,22 @@ </return> <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <description> Returns a default texture from a shader searched by name. </description> </method> + <method name="shader_get_param_default" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="material" type="RID"> + </argument> + <argument index="1" name="parameter" type="StringName"> + </argument> + <description> + </description> + </method> <method name="shader_get_param_list" qualifiers="const"> <return type="Array"> </return> @@ -3506,7 +2650,7 @@ </return> <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <argument index="2" name="texture" type="RID"> </argument> @@ -3605,12 +2749,9 @@ </return> <argument index="0" name="sky" type="RID"> </argument> - <argument index="1" name="cube_map" type="RID"> - </argument> - <argument index="2" name="radiance_size" type="int"> + <argument index="1" name="panorama" type="RID"> </argument> <description> - Sets a sky's texture. </description> </method> <method name="spot_light_create"> @@ -3622,247 +2763,20 @@ To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. </description> </method> - <method name="sync"> - <return type="void"> - </return> - <description> - Not implemented in Godot 3.x. - </description> - </method> - <method name="texture_allocate"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="width" type="int"> - </argument> - <argument index="2" name="height" type="int"> - </argument> - <argument index="3" name="depth_3d" type="int"> - </argument> - <argument index="4" name="format" type="int" enum="Image.Format"> - </argument> - <argument index="5" name="type" type="int" enum="VisualServer.TextureType"> - </argument> - <argument index="6" name="flags" type="int" default="7"> - </argument> - <description> - Allocates the GPU memory for the texture. - </description> - </method> - <method name="texture_bind"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="number" type="int"> - </argument> - <description> - Binds the texture to a texture slot. - </description> - </method> - <method name="texture_create"> - <return type="RID"> - </return> - <description> - Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - </description> - </method> - <method name="texture_create_from_image"> + <method name="texture_2d_create"> <return type="RID"> </return> <argument index="0" name="image" type="Image"> </argument> - <argument index="1" name="flags" type="int" default="7"> - </argument> - <description> - Creates a texture, allocates the space for an image, and fills in the image. - </description> - </method> - <method name="texture_debug_usage"> - <return type="Array"> - </return> <description> - Returns a list of all the textures and their information. </description> </method> - <method name="texture_get_data" qualifiers="const"> + <method name="texture_2d_get" qualifiers="const"> <return type="Image"> </return> <argument index="0" name="texture" type="RID"> </argument> - <argument index="1" name="cube_side" type="int" default="0"> - </argument> - <description> - Returns a copy of a texture's image unless it's a CubeMap, in which case it returns the [RID] of the image at one of the cubes sides. - </description> - </method> - <method name="texture_get_depth" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the depth of the texture. - </description> - </method> - <method name="texture_get_flags" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the flags of a texture. - </description> - </method> - <method name="texture_get_format" qualifiers="const"> - <return type="int" enum="Image.Format"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the format of the texture's image. - </description> - </method> - <method name="texture_get_height" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the texture's height. - </description> - </method> - <method name="texture_get_path" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the texture's path. - </description> - </method> - <method name="texture_get_texid" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the opengl id of the texture's image. - </description> - </method> - <method name="texture_get_type" qualifiers="const"> - <return type="int" enum="VisualServer.TextureType"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the type of the texture, can be any of the [enum TextureType]. - </description> - </method> - <method name="texture_get_width" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <description> - Returns the texture's width. - </description> - </method> - <method name="texture_set_data"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="image" type="Image"> - </argument> - <argument index="2" name="layer" type="int" default="0"> - </argument> - <description> - Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side. - </description> - </method> - <method name="texture_set_data_partial"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="image" type="Image"> - </argument> - <argument index="2" name="src_x" type="int"> - </argument> - <argument index="3" name="src_y" type="int"> - </argument> - <argument index="4" name="src_w" type="int"> - </argument> - <argument index="5" name="src_h" type="int"> - </argument> - <argument index="6" name="dst_x" type="int"> - </argument> - <argument index="7" name="dst_y" type="int"> - </argument> - <argument index="8" name="dst_mip" type="int"> - </argument> - <argument index="9" name="layer" type="int" default="0"> - </argument> - <description> - Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly. - </description> - </method> - <method name="texture_set_flags"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="flags" type="int"> - </argument> - <description> - Sets the texture's flags. See [enum TextureFlags] for options. - </description> - </method> - <method name="texture_set_path"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="path" type="String"> - </argument> - <description> - Sets the texture's path. - </description> - </method> - <method name="texture_set_shrink_all_x2_on_set_data"> - <return type="void"> - </return> - <argument index="0" name="shrink" type="bool"> - </argument> - <description> - If [code]true[/code], sets internal processes to shrink all image data to half the size. - </description> - </method> - <method name="texture_set_size_override"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="width" type="int"> - </argument> - <argument index="2" name="height" type="int"> - </argument> - <argument index="3" name="depth" type="int"> - </argument> <description> - Resizes the texture to the specified dimensions. - </description> - </method> - <method name="textures_keep_original"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - If [code]true[/code], the image will be stored in the texture's images array if overwritten. </description> </method> <method name="viewport_attach_camera"> @@ -4017,17 +2931,6 @@ Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options. </description> </method> - <method name="viewport_set_disable_3d"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> - <description> - If [code]true[/code], a viewport's 3D rendering is disabled. - </description> - </method> <method name="viewport_set_disable_environment"> <return type="void"> </return> @@ -4050,17 +2953,6 @@ Sets the viewport's global transformation matrix. </description> </method> - <method name="viewport_set_hdr"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - If [code]true[/code], the viewport renders to hdr. - </description> - </method> <method name="viewport_set_hide_canvas"> <return type="void"> </return> @@ -4187,17 +3079,6 @@ Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options. </description> </method> - <method name="viewport_set_usage"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="usage" type="int" enum="VisualServer.ViewportUsage"> - </argument> - <description> - Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options. - </description> - </method> <method name="viewport_set_use_arvr"> <return type="void"> </return> @@ -4209,17 +3090,6 @@ If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. </description> </method> - <method name="viewport_set_vflip"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - If [code]true[/code], the viewport's rendering is flipped vertically. - </description> - </method> </methods> <signals> <signal name="frame_post_draw"> @@ -4258,60 +3128,23 @@ <constant name="MATERIAL_RENDER_PRIORITY_MAX" value="127"> The maximum renderpriority of all materials. </constant> - <constant name="CUBEMAP_LEFT" value="0" enum="CubeMapSide"> - Marks the left side of a cubemap. - </constant> - <constant name="CUBEMAP_RIGHT" value="1" enum="CubeMapSide"> - Marks the right side of a cubemap. - </constant> - <constant name="CUBEMAP_BOTTOM" value="2" enum="CubeMapSide"> - Marks the bottom side of a cubemap. - </constant> - <constant name="CUBEMAP_TOP" value="3" enum="CubeMapSide"> - Marks the top side of a cubemap. - </constant> - <constant name="CUBEMAP_FRONT" value="4" enum="CubeMapSide"> - Marks the front side of a cubemap. - </constant> - <constant name="CUBEMAP_BACK" value="5" enum="CubeMapSide"> - Marks the back side of a cubemap. + <constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType"> </constant> - <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType"> - Normal texture with 2 dimensions, width and height. + <constant name="TEXTURE_LAYERED_CUBEMAP" value="1" enum="TextureLayeredType"> </constant> - <constant name="TEXTURE_TYPE_CUBEMAP" value="1" enum="TextureType"> - Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader. + <constant name="TEXTURE_LAYERED_CUBEMAP_ARRAY" value="2" enum="TextureLayeredType"> </constant> - <constant name="TEXTURE_TYPE_2D_ARRAY" value="2" enum="TextureType"> - An array of 2-dimensional textures. + <constant name="CUBEMAP_LAYER_LEFT" value="0" enum="CubeMapLayer"> </constant> - <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType"> - A 3-dimensional texture with width, height, and depth. + <constant name="CUBEMAP_LAYER_RIGHT" value="1" enum="CubeMapLayer"> </constant> - <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags"> - Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. + <constant name="CUBEMAP_LAYER_BOTTOM" value="2" enum="CubeMapLayer"> </constant> - <constant name="TEXTURE_FLAG_REPEAT" value="2" enum="TextureFlags"> - Repeats the texture (instead of clamp to edge). + <constant name="CUBEMAP_LAYER_TOP" value="3" enum="CubeMapLayer"> </constant> - <constant name="TEXTURE_FLAG_FILTER" value="4" enum="TextureFlags"> - Uses a magnifying filter, to enable smooth zooming in of the texture. + <constant name="CUBEMAP_LAYER_FRONT" value="4" enum="CubeMapLayer"> </constant> - <constant name="TEXTURE_FLAG_ANISOTROPIC_FILTER" value="8" enum="TextureFlags"> - Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. - This results in better-looking textures when viewed from oblique angles. - </constant> - <constant name="TEXTURE_FLAG_CONVERT_TO_LINEAR" value="16" enum="TextureFlags"> - Converts the texture to the sRGB color space. - </constant> - <constant name="TEXTURE_FLAG_MIRRORED_REPEAT" value="32" enum="TextureFlags"> - Repeats the texture with alternate sections mirrored. - </constant> - <constant name="TEXTURE_FLAG_USED_FOR_STREAMING" value="2048" enum="TextureFlags"> - Texture is a video surface. - </constant> - <constant name="TEXTURE_FLAGS_DEFAULT" value="7" enum="TextureFlags"> - Default flags. [constant TEXTURE_FLAG_MIPMAPS], [constant TEXTURE_FLAG_REPEAT] and [constant TEXTURE_FLAG_FILTER] are enabled. + <constant name="CUBEMAP_LAYER_BACK" value="5" enum="CubeMapLayer"> </constant> <constant name="SHADER_SPATIAL" value="0" enum="ShaderMode"> Shader is a 3D shader. @@ -4382,9 +3215,6 @@ <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> Flag used to mark an index array. </constant> - <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat"> - Flag used to mark a compressed (half float) vertex array. - </constant> <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> Flag used to mark a compressed (half float) normal array. </constant> @@ -4400,23 +3230,16 @@ <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> - <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> - Flag used to mark a compressed bone array. - </constant> - <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> - Flag used to mark a compressed (half float) weight array. - </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat"> - Flag used to mark that the array uses 16-bit bones instead of 8-bit. + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="1048576" enum="ArrayFormat"> </constant> - <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat"> - Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly. + <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat"> + Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. </constant> <constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType"> Primitive to draw consists of points. @@ -4427,19 +3250,13 @@ <constant name="PRIMITIVE_LINE_STRIP" value="2" enum="PrimitiveType"> Primitive to draw consists of a line strip from start to end. </constant> - <constant name="PRIMITIVE_LINE_LOOP" value="3" enum="PrimitiveType"> - Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex). - </constant> - <constant name="PRIMITIVE_TRIANGLES" value="4" enum="PrimitiveType"> + <constant name="PRIMITIVE_TRIANGLES" value="3" enum="PrimitiveType"> Primitive to draw consists of triangles. </constant> - <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5" enum="PrimitiveType"> + <constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType"> Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). </constant> - <constant name="PRIMITIVE_TRIANGLE_FAN" value="6" enum="PrimitiveType"> - Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle). - </constant> - <constant name="PRIMITIVE_MAX" value="7" enum="PrimitiveType"> + <constant name="PRIMITIVE_MAX" value="5" enum="PrimitiveType"> Represents the size of the [enum PrimitiveType] enum. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> @@ -4448,6 +3265,12 @@ <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> Blend shapes are relative to base weight. </constant> + <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> + Use [Transform2D] to store MultiMesh transform. + </constant> + <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> + Use [Transform] to store MultiMesh transform. + </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. </constant> @@ -4460,6 +3283,8 @@ <constant name="LIGHT_PARAM_ENERGY" value="0" enum="LightParam"> The light's energy. </constant> + <constant name="LIGHT_PARAM_INDIRECT_ENERGY" value="1" enum="LightParam"> + </constant> <constant name="LIGHT_PARAM_SPECULAR" value="2" enum="LightParam"> The light's influence on specularity. </constant> @@ -4490,16 +3315,18 @@ <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam"> Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. </constant> - <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="12" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_FADE_START" value="12" enum="LightParam"> + </constant> + <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="13" enum="LightParam"> Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. </constant> - <constant name="LIGHT_PARAM_SHADOW_BIAS" value="13" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_BIAS" value="14" enum="LightParam"> Bias the shadow lookup to fix self-shadowing artifacts. </constant> - <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="LightParam"> + <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="15" enum="LightParam"> Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. </constant> - <constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam"> + <constant name="LIGHT_PARAM_MAX" value="16" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode"> @@ -4508,12 +3335,6 @@ <constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode"> Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. </constant> - <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail"> - Use more detail vertically when computing shadow map. - </constant> - <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail"> - Use more detail horizontally when computing shadow map. - </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode"> Use orthogonal shadow projection for directional light. </constant> @@ -4529,6 +3350,21 @@ <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode"> Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. </constant> + <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> + Reflection probe will update reflections once and then stop. + </constant> + <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> + Reflection probe will update each frame. This mode is necessary to capture moving objects. + </constant> + <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder"> + Draw particles in the order that they appear in the particles array. + </constant> + <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> + Sort particles based on their lifetime. + </constant> + <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + Sort particles based on their distance to the camera. + </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> Do not update the viewport. </constant> @@ -4571,18 +3407,6 @@ <constant name="VIEWPORT_MSAA_EXT_4X" value="6" enum="ViewportMSAA"> Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). </constant> - <constant name="VIEWPORT_USAGE_2D" value="0" enum="ViewportUsage"> - The Viewport does not render 3D but samples. - </constant> - <constant name="VIEWPORT_USAGE_2D_NO_SAMPLING" value="1" enum="ViewportUsage"> - The Viewport does not render 3D and does not sample. - </constant> - <constant name="VIEWPORT_USAGE_3D" value="2" enum="ViewportUsage"> - The Viewport renders 3D with effects. - </constant> - <constant name="VIEWPORT_USAGE_3D_NO_EFFECTS" value="3" enum="ViewportUsage"> - The Viewport renders 3D but without effects. - </constant> <constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo"> Number of objects drawn in a single frame. </constant> @@ -4610,12 +3434,130 @@ <constant name="VIEWPORT_DEBUG_DRAW_UNSHADED" value="1" enum="ViewportDebugDraw"> Debug draw sets objects to unshaded. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="2" enum="ViewportDebugDraw"> + <constant name="VIEWPORT_DEBUG_DRAW_LIGHTING" value="2" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="3" enum="ViewportDebugDraw"> Overwrites clear color to [code](0,0,0,0)[/code]. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="3" enum="ViewportDebugDraw"> + <constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="4" enum="ViewportDebugDraw"> Debug draw draws objects in wireframe. </constant> + <constant name="VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS" value="10" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE" value="11" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_SSAO" value="12" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_ROUGHNESS_LIMITER" value="13" enum="ViewportDebugDraw"> + </constant> + <constant name="SKY_MODE_QUALITY" value="0" enum="SkyMode"> + </constant> + <constant name="SKY_MODE_REALTIME" value="1" enum="SkyMode"> + </constant> + <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG"> + Use the clear color as background. + </constant> + <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG"> + Use a specified color as the background. + </constant> + <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG"> + Use a sky resource for the background. + </constant> + <constant name="ENV_BG_CANVAS" value="3" enum="EnvironmentBG"> + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. + </constant> + <constant name="ENV_BG_KEEP" value="4" enum="EnvironmentBG"> + Do not clear the background, use whatever was rendered last frame as the background. + </constant> + <constant name="ENV_BG_CAMERA_FEED" value="5" enum="EnvironmentBG"> + Displays a camera feed in the background. + </constant> + <constant name="ENV_BG_MAX" value="6" enum="EnvironmentBG"> + Represents the size of the [enum EnvironmentBG] enum. + </constant> + <constant name="ENV_AMBIENT_SOURCE_BG" value="0" enum="EnvironmentAmbientSource"> + </constant> + <constant name="ENV_AMBIENT_SOURCE_DISABLED" value="1" enum="EnvironmentAmbientSource"> + </constant> + <constant name="ENV_AMBIENT_SOURCE_COLOR" value="2" enum="EnvironmentAmbientSource"> + </constant> + <constant name="ENV_AMBIENT_SOURCE_SKY" value="3" enum="EnvironmentAmbientSource"> + </constant> + <constant name="ENV_REFLECTION_SOURCE_BG" value="0" enum="EnvironmentReflectionSource"> + </constant> + <constant name="ENV_REFLECTION_SOURCE_DISABLED" value="1" enum="EnvironmentReflectionSource"> + </constant> + <constant name="ENV_REFLECTION_SOURCE_SKY" value="2" enum="EnvironmentReflectionSource"> + </constant> + <constant name="ENV_GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode"> + </constant> + <constant name="ENV_GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode"> + </constant> + <constant name="ENV_GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode"> + </constant> + <constant name="ENV_GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode"> + </constant> + <constant name="ENV_GLOW_BLEND_MODE_MIX" value="4" enum="EnvironmentGlowBlendMode"> + </constant> + <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> + Output color as they came in. + </constant> + <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> + Use the Reinhard tonemapper. + </constant> + <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> + Use the filmic tonemapper. + </constant> + <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> + Use the ACES tonemapper. + </constant> + <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> + Disables the blur set for SSAO. Will make SSAO look noisier. + </constant> + <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> + Perform a 1x1 blur on the SSAO output. + </constant> + <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> + Performs a 2x2 blur on the SSAO output. + </constant> + <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. + </constant> + <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> + Lowest quality of screen space ambient occlusion. + </constant> + <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> + Medium quality screen space ambient occlusion. + </constant> + <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> + Highest quality screen space ambient occlusion. + </constant> + <constant name="ENV_SSAO_QUALITY_ULTRA" value="3" enum="EnvironmentSSAOQuality"> + </constant> + <constant name="DOF_BLUR_QUALITY_VERY_LOW" value="0" enum="DOFBlurQuality"> + </constant> + <constant name="DOF_BLUR_QUALITY_LOW" value="1" enum="DOFBlurQuality"> + </constant> + <constant name="DOF_BLUR_QUALITY_MEDIUM" value="2" enum="DOFBlurQuality"> + </constant> + <constant name="DOF_BLUR_QUALITY_HIGH" value="3" enum="DOFBlurQuality"> + </constant> + <constant name="DOF_BOKEH_BOX" value="0" enum="DOFBokehShape"> + </constant> + <constant name="DOF_BOKEH_HEXAGON" value="1" enum="DOFBokehShape"> + </constant> + <constant name="DOF_BOKEH_CIRCLE" value="2" enum="DOFBokehShape"> + </constant> <constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode"> Do not use a debug mode. </constant> @@ -4664,10 +3606,12 @@ <constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags"> Allows the instance to be used in baked lighting. </constant> - <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags"> + <constant name="INSTANCE_FLAG_USE_DYNAMIC_GI" value="1" enum="InstanceFlags"> + </constant> + <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="InstanceFlags"> When set, manually requests to draw geometry on next frame. </constant> - <constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags"> + <constant name="INSTANCE_FLAG_MAX" value="3" enum="InstanceFlags"> Represents the size of the [enum InstanceFlags] enum. </constant> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> @@ -4691,6 +3635,32 @@ <constant name="NINE_PATCH_TILE_FIT" value="2" enum="NinePatchAxisMode"> The nine patch gets filled with tiles where needed and stretches them a bit if needed. </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_DEFAULT" value="0" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="1" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="2" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_MAX" value="7" enum="CanvasItemTextureFilter"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT" value="0" enum="CanvasItemTextureRepeat"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_REPEAT_DISABLED" value="1" enum="CanvasItemTextureRepeat"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_REPEAT_ENABLED" value="2" enum="CanvasItemTextureRepeat"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_REPEAT_MIRROR" value="3" enum="CanvasItemTextureRepeat"> + </constant> + <constant name="CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="4" enum="CanvasItemTextureRepeat"> + </constant> <constant name="CANVAS_LIGHT_MODE_ADD" value="0" enum="CanvasLightMode"> Adds light color additive to the canvas. </constant> @@ -4706,21 +3676,14 @@ <constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter"> Do not apply a filter to canvas light shadows. </constant> - <constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter"> - Use PCF3 filtering to filter canvas light shadows. - </constant> - <constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter"> + <constant name="CANVAS_LIGHT_FILTER_PCF5" value="1" enum="CanvasLightShadowFilter"> Use PCF5 filtering to filter canvas light shadows. </constant> - <constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter"> - Use PCF7 filtering to filter canvas light shadows. - </constant> - <constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter"> - Use PCF9 filtering to filter canvas light shadows. - </constant> - <constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter"> + <constant name="CANVAS_LIGHT_FILTER_PCF13" value="2" enum="CanvasLightShadowFilter"> Use PCF13 filtering to filter canvas light shadows. </constant> + <constant name="CANVAS_LIGHT_FILTER_MAX" value="3" enum="CanvasLightShadowFilter"> + </constant> <constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode"> Culling of the canvas occluder is disabled. </constant> @@ -4749,7 +3712,7 @@ The amount of draw calls in frame. </constant> <constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="6" enum="RenderInfo"> - Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0. + Unimplemented in the GLES2 rendering backend, always returns 0. </constant> <constant name="INFO_VIDEO_MEM_USED" value="7" enum="RenderInfo"> The amount of video memory used, i.e. texture and vertex memory combined. @@ -4766,119 +3729,5 @@ <constant name="FEATURE_MULTITHREADED" value="1" enum="Features"> Hardware supports multithreading. This enum is currently unused in Godot 3.x. </constant> - <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> - Use [Transform2D] to store MultiMesh transform. - </constant> - <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> - Use [Transform] to store MultiMesh transform. - </constant> - <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat"> - MultiMesh does not use per-instance color. - </constant> - <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat"> - MultiMesh color uses 8 bits per component. This packs the color into a single float. - </constant> - <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> - MultiMesh color uses a float per channel. - </constant> - <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> - MultiMesh does not use custom data. - </constant> - <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat"> - MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float. - </constant> - <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> - MultiMesh custom data uses a float per component. - </constant> - <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> - Reflection probe will update reflections once and then stop. - </constant> - <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> - Reflection probe will update each frame. This mode is necessary to capture moving objects. - </constant> - <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder"> - Draw particles in the order that they appear in the particles array. - </constant> - <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> - Sort particles based on their lifetime. - </constant> - <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> - Sort particles based on their distance to the camera. - </constant> - <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG"> - Use the clear color as background. - </constant> - <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG"> - Use a specified color as the background. - </constant> - <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG"> - Use a sky resource for the background. - </constant> - <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG"> - Use a custom color for background, but use a sky for shading and reflections. - </constant> - <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG"> - Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. - </constant> - <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG"> - Do not clear the background, use whatever was rendered last frame as the background. - </constant> - <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG"> - Represents the size of the [enum EnvironmentBG] enum. - </constant> - <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality"> - Use lowest blur quality. Fastest, but may look bad. - </constant> - <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality"> - Use medium blur quality. - </constant> - <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality"> - Used highest blur quality. Looks the best, but is the slowest. - </constant> - <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode"> - Add the effect of the glow on top of the scene. - </constant> - <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode"> - Blends the glow effect with the screen. Does not get as bright as additive. - </constant> - <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode"> - Produces a subtle color disturbance around objects. - </constant> - <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode"> - Shows the glow effect by itself without the underlying scene. - </constant> - <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> - Output color as they came in. - </constant> - <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> - Use the Reinhard tonemapper. - </constant> - <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> - Use the filmic tonemapper. - </constant> - <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> - Use the ACES tonemapper. - </constant> - <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> - Lowest quality of screen space ambient occlusion. - </constant> - <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> - Medium quality screen space ambient occlusion. - </constant> - <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> - Highest quality screen space ambient occlusion. - </constant> - <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> - Disables the blur set for SSAO. Will make SSAO look noisier. - </constant> - <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> - Perform a 1x1 blur on the SSAO output. - </constant> - <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> - Performs a 2x2 blur on the SSAO output. - </constant> - <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> - Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. - </constant> </constants> </class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 44e843f8a5..0dd8ec0064 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -107,7 +107,7 @@ </description> </method> <method name="get_node_list" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="type" type="int" enum="VisualShader.Type"> </argument> @@ -183,6 +183,8 @@ <member name="code" type="String" setter="set_code" getter="get_code" override="true" default=""shader_type spatial;void vertex() {// Output:0}void fragment() {// Output:0}void light() {// Output:0}"" /> <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> </member> + <member name="version" type="String" setter="set_version" getter="get_version" default=""""> + </member> </members> <constants> <constant name="TYPE_VERTEX" value="0" enum="Type"> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index bed97565ff..72ce743656 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -53,7 +53,7 @@ <signals> <signal name="editor_refresh_request"> <description> - Emitted when the node requests an editor refresh. Currently called only in setter of [member VisualShaderNodeTexture.source], [VisualShaderNodeTexture], and [VisualShaderNodeCubeMap] (and their derivatives). + Emitted when the node requests an editor refresh. Currently called only in setter of [member VisualShaderNodeTexture.source], [VisualShaderNodeTexture], and [VisualShaderNodeCubemap] (and their derivatives). </description> </signal> </signals> @@ -61,19 +61,22 @@ <constant name="PORT_TYPE_SCALAR" value="0" enum="PortType"> Floating-point scalar. Translated to [code]float[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR" value="1" enum="PortType"> + <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType"> + Integer scalar. Translated to [code]int[/code] type in shader code. + </constant> + <constant name="PORT_TYPE_VECTOR" value="2" enum="PortType"> 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. </constant> - <constant name="PORT_TYPE_BOOLEAN" value="2" enum="PortType"> + <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType"> Boolean type. Translated to [code]bool[/code] type in shader code. </constant> - <constant name="PORT_TYPE_TRANSFORM" value="3" enum="PortType"> + <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType"> Transform type. Translated to [code]mat4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_SAMPLER" value="4" enum="PortType"> + <constant name="PORT_TYPE_SAMPLER" value="5" enum="PortType"> Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. </constant> - <constant name="PORT_TYPE_MAX" value="5" enum="PortType"> + <constant name="PORT_TYPE_MAX" value="6" enum="PortType"> Represents the size of the [enum PortType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index f207cba0a5..9c2331edea 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -25,13 +25,16 @@ <constant name="CTYPE_SCALAR" value="0" enum="ComparisonType"> A floating-point scalar. </constant> - <constant name="CTYPE_VECTOR" value="1" enum="ComparisonType"> + <constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType"> + An integer scalar. + </constant> + <constant name="CTYPE_VECTOR" value="2" enum="ComparisonType"> A 3D vector type. </constant> - <constant name="CTYPE_BOOLEAN" value="2" enum="ComparisonType"> + <constant name="CTYPE_BOOLEAN" value="3" enum="ComparisonType"> A boolean type. </constant> - <constant name="CTYPE_TRANSFORM" value="3" enum="ComparisonType"> + <constant name="CTYPE_TRANSFORM" value="4" enum="ComparisonType"> A transform ([code]mat4[/code]) type. </constant> <constant name="FUNC_EQUAL" value="0" enum="Function"> @@ -50,7 +53,7 @@ Comparison for less than ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function"> - Comparison for less than or equal ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. + Comparison for less than or equal ([code]a <= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="COND_ALL" value="0" enum="Condition"> The result will be true if all of component in vector satisfy the comparison condition. diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubemap.xml index 8b9cec968c..b6813bdae8 100644 --- a/doc/classes/VisualShaderNodeCubeMap.xml +++ b/doc/classes/VisualShaderNodeCubemap.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeCubeMap" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeCubemap" inherits="VisualShaderNode" version="4.0"> <brief_description> - A [CubeMap] sampling node to be used within the visual shader graph. + A [Cubemap] sampling node to be used within the visual shader graph. </brief_description> <description> Translated to [code]texture(cubemap, vec3)[/code] in the shader language. Returns a color vector and alpha channel as scalar. @@ -11,22 +11,22 @@ <methods> </methods> <members> - <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map"> - The [CubeMap] texture to sample when using [constant SOURCE_TEXTURE] as [member source]. + <member name="cube_map" type="Cubemap" setter="set_cube_map" getter="get_cube_map"> + The [Cubemap] texture to sample when using [constant SOURCE_TEXTURE] as [member source]. </member> - <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubeMap.Source" default="0"> + <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubemap.Source" default="0"> Defines which source should be used for the sampling. See [enum Source] for options. </member> - <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0"> + <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubemap.TextureType" default="0"> Defines the type of data provided by the source texture. See [enum TextureType] for options. </member> </members> <constants> <constant name="SOURCE_TEXTURE" value="0" enum="Source"> - Use the [CubeMap] set via [member cube_map]. If this is set to [member source], the [code]samplerCube[/code] port is ignored. + Use the [Cubemap] set via [member cube_map]. If this is set to [member source], the [code]samplerCube[/code] port is ignored. </constant> <constant name="SOURCE_PORT" value="1" enum="Source"> - Use the [CubeMap] sampler reference passed via the [code]samplerCube[/code] port. If this is set to [member source], the [member cube_map] texture is ignored. + Use the [Cubemap] sampler reference passed via the [code]samplerCube[/code] port. If this is set to [member source], the [member cube_map] texture is ignored. </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> No hints are added to the uniform declaration. diff --git a/doc/classes/VisualShaderNodeCubeMapUniform.xml b/doc/classes/VisualShaderNodeCubemapUniform.xml index c5cb6ed938..d4bcdc9006 100644 --- a/doc/classes/VisualShaderNodeCubeMapUniform.xml +++ b/doc/classes/VisualShaderNodeCubemapUniform.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeCubeMapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0"> +<class name="VisualShaderNodeCubemapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0"> <brief_description> - A [CubeMap] uniform node to be used within the visual shader graph. + A [Cubemap] uniform node to be used within the visual shader graph. </brief_description> <description> - Translated to [code]uniform samplerCube[/code] in the shader language. The output value can be used as port for [VisualShaderNodeCubeMap]. + Translated to [code]uniform samplerCube[/code] in the shader language. The output value can be used as port for [VisualShaderNodeCubemap]. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 9ccdf0d3c4..5bd8ec38ed 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -20,8 +20,8 @@ <return type="String"> </return> <description> - Override this method to define the category of the associated custom node in the Visual Shader Editor's members dialog. - Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Custom" category. + Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may looks like [code]"MyGame/MyFunctions/Noise"[/code]. + Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category. </description> </method> <method name="_get_code" qualifiers="virtual"> @@ -72,7 +72,7 @@ </description> </method> <method name="_get_input_port_name" qualifiers="virtual"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="port" type="int"> </argument> @@ -108,7 +108,7 @@ </description> </method> <method name="_get_output_port_name" qualifiers="virtual"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="port" type="int"> </argument> @@ -135,12 +135,12 @@ Defining this method is [b]optional[/b]. If not overridden, no return icon is shown. </description> </method> - <method name="_get_subcategory" qualifiers="virtual"> - <return type="String"> + <method name="_is_highend" qualifiers="virtual"> + <return type="bool"> </return> <description> - Override this method to define the subcategory of the associated custom node in the Visual Shader Editor's members dialog. - Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the root of the main category (see [method _get_category]). + Override this method to enable high-end mark in the Visual Shader Editor's members dialog. + Defining this method is [b]optional[/b]. If not overridden, it's false. </description> </method> </methods> diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml index f7b94d9e39..3ba9ff07d3 100644 --- a/doc/classes/VisualShaderNodeScalarConstant.xml +++ b/doc/classes/VisualShaderNodeFloatConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> + A scalar floating-point constant to be used within the visual shader graph. </brief_description> <description> + Translated to [code]float[/code] in the shader language. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0"> + A floating-point constant which represents a state of this node. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml new file mode 100644 index 0000000000..bb7486e8cf --- /dev/null +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A scalar floating-point function to be used within the visual shader graph. + </brief_description> + <description> + Accept a floating-point scalar ([code]x[/code]) to the input port and transform it according to [member function]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13"> + A function to be applied to the scalar. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_SIN" value="0" enum="Function"> + Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_COS" value="1" enum="Function"> + Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_TAN" value="2" enum="Function"> + Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ASIN" value="3" enum="Function"> + Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ACOS" value="4" enum="Function"> + Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ATAN" value="5" enum="Function"> + Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SINH" value="6" enum="Function"> + Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_COSH" value="7" enum="Function"> + Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_TANH" value="8" enum="Function"> + Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_LOG" value="9" enum="Function"> + Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_EXP" value="10" enum="Function"> + Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SQRT" value="11" enum="Function"> + Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ABS" value="12" enum="Function"> + Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SIGN" value="13" enum="Function"> + Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_FLOOR" value="14" enum="Function"> + Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ROUND" value="15" enum="Function"> + Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_CEIL" value="16" enum="Function"> + Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_FRAC" value="17" enum="Function"> + Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SATURATE" value="18" enum="Function"> + Clamps the value between [code]0.0[/code] and [code]1.0[/code] using [code]min(max(x, 0.0), 1.0)[/code]. + </constant> + <constant name="FUNC_NEGATE" value="19" enum="Function"> + Negates the [code]x[/code] using [code]-(x)[/code]. + </constant> + <constant name="FUNC_ACOSH" value="20" enum="Function"> + Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ASINH" value="21" enum="Function"> + Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ATANH" value="22" enum="Function"> + Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_DEGREES" value="23" enum="Function"> + Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_EXP2" value="24" enum="Function"> + Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function"> + Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_LOG2" value="26" enum="Function"> + Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_RADIANS" value="27" enum="Function"> + Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_RECIPROCAL" value="28" enum="Function"> + Finds reciprocal value of dividing 1 by [code]x[/code] (i.e. [code]1 / x[/code]). + </constant> + <constant name="FUNC_ROUNDEVEN" value="29" enum="Function"> + Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_TRUNC" value="30" enum="Function"> + Returns a value equal to the nearest integer to [code]x[/code] whose absolute value is not larger than the absolute value of [code]x[/code]. Translates to [code]trunc(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ONEMINUS" value="31" enum="Function"> + Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]). + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml new file mode 100644 index 0000000000..2c9ebabb89 --- /dev/null +++ b/doc/classes/VisualShaderNodeFloatOp.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A floating-point scalar operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + Sums two numbers using [code]a + b[/code]. + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + Subtracts two numbers using [code]a - b[/code]. + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + Multiplies two numbers using [code]a * b[/code]. + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + Divides two numbers using [code]a / b[/code]. + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_POW" value="5" enum="Operator"> + Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MAX" value="6" enum="Operator"> + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MIN" value="7" enum="Operator"> + Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_ATAN2" value="8" enum="Operator"> + Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_STEP" value="9" enum="Operator"> + Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index fab766d3f9..33ece8ac1b 100644 --- a/doc/classes/VisualShaderNodeScalarUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" version="4.0"> +<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> - A scalar uniform to be used within the visual shader graph. + A scalar float uniform to be used within the visual shader graph. </brief_description> <description> Translated to [code]uniform float[/code] in the shader language. @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeScalarUniform.Hint" default="0"> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0"> A hint applied to the uniform, which controls the values it can take when set through the inspector. </member> <member name="max" type="float" setter="set_max" getter="get_max" default="1.0"> diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml index 0a8fdcfd4d..1ebd945d42 100644 --- a/doc/classes/VisualShaderNodeIf.xml +++ b/doc/classes/VisualShaderNodeIf.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0"> <brief_description> + Compares two floating-point numbers in order to return a required vector within the visual shader graph. </brief_description> <description> + First two ports are scalar floatin-point numbers to compare, third is tolerance comparsion amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a > b[/code] and [code]a < b[/code] respectivly. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 1c8d8d84c4..ed629508d0 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0"> <brief_description> + Represents the input shader parameter within the visual shader graph. </brief_description> <description> </description> @@ -11,16 +12,19 @@ <return type="String"> </return> <description> + Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code]. </description> </method> </methods> <members> <member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default=""[None]""> + One of the several input constants in lower-case style like: "vertex"([/code]VERTEX[code]) or "point_size"([code]POINT_SIZE[/code]). </member> </members> <signals> <signal name="input_type_changed"> <description> + Emitted when input is changed via [member input_name]. </description> </signal> </signals> diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml new file mode 100644 index 0000000000..1c407b21ca --- /dev/null +++ b/doc/classes/VisualShaderNodeIntConstant.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A scalar integer constant to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]int[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0"> + An integer constant which represents a state of this node. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml new file mode 100644 index 0000000000..5c68c0ec71 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A scalar integer function to be used within the visual shader graph. + </brief_description> + <description> + Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="3"> + A function to be applied to the scalar. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_ABS" value="0" enum="Function"> + Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_CLAMP" value="1" enum="Function"> + Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_NEGATE" value="2" enum="Function"> + Negates the [code]x[/code] using [code]-(x)[/code]. + </constant> + <constant name="FUNC_SIGN" value="3" enum="Function"> + Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml new file mode 100644 index 0000000000..fc9a0a9a0a --- /dev/null +++ b/doc/classes/VisualShaderNodeIntOp.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + An integer scalar operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two integer inputs: [code]a[/code] and [code]b[/code]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + Sums two numbers using [code]a + b[/code]. + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + Subtracts two numbers using [code]a - b[/code]. + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + Multiplies two numbers using [code]a * b[/code]. + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + Divides two numbers using [code]a / b[/code]. + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + Calculates the remainder of two numbers using [code]a % b[/code]. + </constant> + <constant name="OP_MAX" value="5" enum="Operator"> + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MIN" value="6" enum="Operator"> + Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml new file mode 100644 index 0000000000..8c7c288177 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0"> + <brief_description> + A scalar integer uniform to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]uniform int[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0"> + A hint applied to the uniform, which controls the values it can take when set through the inspector. + </member> + <member name="max" type="int" setter="set_max" getter="get_max" default="100"> + Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="min" type="int" setter="set_min" getter="get_min" default="0"> + Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="step" type="int" setter="set_step" getter="get_step" default="1"> + Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP]. + </member> + </members> + <constants> + <constant name="HINT_NONE" value="0" enum="Hint"> + No hint used. + </constant> + <constant name="HINT_RANGE" value="1" enum="Hint"> + A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code. + </constant> + <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> + A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml deleted file mode 100644 index b306d198f6..0000000000 --- a/doc/classes/VisualShaderNodeScalarFunc.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13"> - </member> - </members> - <constants> - <constant name="FUNC_SIN" value="0" enum="Function"> - </constant> - <constant name="FUNC_COS" value="1" enum="Function"> - </constant> - <constant name="FUNC_TAN" value="2" enum="Function"> - </constant> - <constant name="FUNC_ASIN" value="3" enum="Function"> - </constant> - <constant name="FUNC_ACOS" value="4" enum="Function"> - </constant> - <constant name="FUNC_ATAN" value="5" enum="Function"> - </constant> - <constant name="FUNC_SINH" value="6" enum="Function"> - </constant> - <constant name="FUNC_COSH" value="7" enum="Function"> - </constant> - <constant name="FUNC_TANH" value="8" enum="Function"> - </constant> - <constant name="FUNC_LOG" value="9" enum="Function"> - </constant> - <constant name="FUNC_EXP" value="10" enum="Function"> - </constant> - <constant name="FUNC_SQRT" value="11" enum="Function"> - </constant> - <constant name="FUNC_ABS" value="12" enum="Function"> - </constant> - <constant name="FUNC_SIGN" value="13" enum="Function"> - </constant> - <constant name="FUNC_FLOOR" value="14" enum="Function"> - </constant> - <constant name="FUNC_ROUND" value="15" enum="Function"> - </constant> - <constant name="FUNC_CEIL" value="16" enum="Function"> - </constant> - <constant name="FUNC_FRAC" value="17" enum="Function"> - </constant> - <constant name="FUNC_SATURATE" value="18" enum="Function"> - </constant> - <constant name="FUNC_NEGATE" value="19" enum="Function"> - </constant> - <constant name="FUNC_ACOSH" value="20" enum="Function"> - </constant> - <constant name="FUNC_ASINH" value="21" enum="Function"> - </constant> - <constant name="FUNC_ATANH" value="22" enum="Function"> - </constant> - <constant name="FUNC_DEGREES" value="23" enum="Function"> - </constant> - <constant name="FUNC_EXP2" value="24" enum="Function"> - </constant> - <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function"> - </constant> - <constant name="FUNC_LOG2" value="26" enum="Function"> - </constant> - <constant name="FUNC_RADIANS" value="27" enum="Function"> - </constant> - <constant name="FUNC_RECIPROCAL" value="28" enum="Function"> - </constant> - <constant name="FUNC_ROUNDEVEN" value="29" enum="Function"> - </constant> - <constant name="FUNC_TRUNC" value="30" enum="Function"> - </constant> - <constant name="FUNC_ONEMINUS" value="31" enum="Function"> - </constant> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml deleted file mode 100644 index f13f16cdd2..0000000000 --- a/doc/classes/VisualShaderNodeScalarOp.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0"> - </member> - </members> - <constants> - <constant name="OP_ADD" value="0" enum="Operator"> - </constant> - <constant name="OP_SUB" value="1" enum="Operator"> - </constant> - <constant name="OP_MUL" value="2" enum="Operator"> - </constant> - <constant name="OP_DIV" value="3" enum="Operator"> - </constant> - <constant name="OP_MOD" value="4" enum="Operator"> - </constant> - <constant name="OP_POW" value="5" enum="Operator"> - </constant> - <constant name="OP_MAX" value="6" enum="Operator"> - </constant> - <constant name="OP_MIN" value="7" enum="Operator"> - </constant> - <constant name="OP_ATAN2" value="8" enum="Operator"> - </constant> - <constant name="OP_STEP" value="9" enum="Operator"> - </constant> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index e1c12c69b6..a28a7f5c65 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -11,7 +11,7 @@ <members> <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0"> </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType" default="0"> </member> diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml index befa820f9b..16b8085df3 100644 --- a/doc/classes/WindowDialog.xml +++ b/doc/classes/WindowDialog.xml @@ -28,11 +28,11 @@ <constants> </constants> <theme_items> - <theme_item name="close" type="Texture"> + <theme_item name="close" type="Texture2D"> </theme_item> <theme_item name="close_h_ofs" type="int" default="18"> </theme_item> - <theme_item name="close_highlight" type="Texture"> + <theme_item name="close_highlight" type="Texture2D"> </theme_item> <theme_item name="close_v_ofs" type="int" default="18"> </theme_item> diff --git a/doc/classes/World.xml b/doc/classes/World.xml index 361ec9b764..48596c87d0 100644 --- a/doc/classes/World.xml +++ b/doc/classes/World.xml @@ -12,6 +12,8 @@ <methods> </methods> <members> + <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> + </member> <member name="direct_space_state" type="PhysicsDirectSpaceState" setter="" getter="get_direct_space_state"> The World's physics direct space state, used for making various queries. Might be used only during [code]_physics_process[/code]. </member> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index 9c062ecfd0..73500868a8 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -14,6 +14,8 @@ <methods> </methods> <members> + <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> + </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The [Environment] resource used by this [WorldEnvironment], defining the default properties. </member> diff --git a/doc/classes/PlaneShape.xml b/doc/classes/WorldMarginShape.xml index b40e133d00..54f76a066b 100644 --- a/doc/classes/PlaneShape.xml +++ b/doc/classes/WorldMarginShape.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PlaneShape" inherits="Shape" version="4.0"> +<class name="WorldMarginShape" inherits="Shape" version="4.0"> <brief_description> Infinite plane shape for 3D collisions. </brief_description> <description> - An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [PlaneShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane. + An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane. </description> <tutorials> </tutorials> @@ -12,7 +12,7 @@ </methods> <members> <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )"> - The [Plane] used by the [PlaneShape] for collision. + The [Plane] used by the [WorldMarginShape] for collision. </member> </members> <constants> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 8140fde62d..2849ea62ab 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -115,7 +115,7 @@ <method name="open_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Opens an XML raw buffer for parsing. This returns an error code. |