diff options
Diffstat (limited to 'doc/classes')
242 files changed, 2386 insertions, 857 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 9a28a0d085..2b1770f12b 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -27,6 +27,9 @@ <member name="Engine" type="Engine" setter="" getter=""> The [Engine] singleton. </member> + <member name="EngineDebugger" type="EngineDebugger" setter="" getter=""> + The [EngineDebugger] singleton. + </member> <member name="Geometry2D" type="Geometry2D" setter="" getter=""> The [Geometry2D] singleton. </member> @@ -353,16 +356,16 @@ Right Direction key. </constant> <constant name="KEY_BACK" value="16777280" enum="KeyList"> - Back key. + Media back key. Not to be confused with the Back button on an Android device. </constant> <constant name="KEY_FORWARD" value="16777281" enum="KeyList"> - Forward key. + Media forward key. </constant> <constant name="KEY_STOP" value="16777282" enum="KeyList"> - Stop key. + Media stop key. </constant> <constant name="KEY_REFRESH" value="16777283" enum="KeyList"> - Refresh key. + Media refresh key. </constant> <constant name="KEY_VOLUMEDOWN" value="16777284" enum="KeyList"> Volume down key. @@ -898,7 +901,7 @@ <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask"> Ctrl key mask. </constant> - <constant name="KEY_MASK_CMD" value="268435456" enum="KeyModifierMask"> + <constant name="KEY_MASK_CMD" value="platform-dependent" enum="KeyModifierMask"> Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly. </constant> <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 3f2f27d121..cbc04ca672 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -7,7 +7,7 @@ AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="AABB"> @@ -18,7 +18,14 @@ <argument index="1" name="size" type="Vector3"> </argument> <description> - Optional constructor, accepts position and size. + Constructs an [AABB] from a position and size. + </description> + </method> + <method name="abs"> + <return type="AABB"> + </return> + <description> + Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive. </description> </method> <method name="encloses"> @@ -197,13 +204,14 @@ </methods> <members> <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Ending corner. This is calculated as [code]position + size[/code]. Changing this property changes [member size] accordingly. + Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size. </member> <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Beginning corner. + Beginning corner. Typically has values lower than [member end]. </member> <member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Size from position to end. + Size from [member position] to [member end]. Typically all components are positive. + If the size is negative, you can use [method abs] to fix it. </member> </members> <constants> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml index ab4d0e0bc3..ff433370bd 100644 --- a/doc/classes/AESContext.xml +++ b/doc/classes/AESContext.xml @@ -51,7 +51,7 @@ <return type="PackedByteArray"> </return> <description> - Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this funciton. + Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function. Note: This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. </description> </method> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 99b566e74f..6b1864b679 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -67,6 +67,7 @@ <member name="dialog_text" type="String" setter="set_text" getter="get_text" default=""""> The text displayed by the dialog. </member> + <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" override="true" default="true" /> <member name="title" type="String" setter="set_title" getter="get_title" override="true" default=""Alert!"" /> <member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" /> <member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" /> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index 8d0534ccd2..e23a4fe9f8 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -5,8 +5,10 @@ </brief_description> <description> Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. + [b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps. </description> <tutorials> + <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link> </tutorials> <methods> <method name="is_playing" qualifiers="const"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index ad9706a52a..e1fb78e5b5 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -7,6 +7,7 @@ Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. </description> <tutorials> + <link title="2D Sprite animation (also applies to 3D)">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link> </tutorials> <methods> <method name="is_playing" qualifiers="const"> diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index 285e0d5f39..5774842144 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -6,7 +6,8 @@ <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 [AnimatedSprite2D], 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. + [AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. + [b]Note:[/b] AnimatedTexture doesn't support using [AtlasTexture]s. Each frame needs to be a separate [Texture2D]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 09811d5617..0a2925e6d5 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -7,17 +7,17 @@ An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. [codeblock] # This creates an animation that makes the node "Enemy" move to the right by - # 100 pixels in 1 second. + # 100 pixels in 0.5 seconds. var animation = Animation.new() var track_index = animation.add_track(Animation.TYPE_VALUE) - animation.track_set_path(track_index, "Enemy:position.x") + animation.track_set_path(track_index, "Enemy:position:x") 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] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> + <link title="Animation tutorial index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> </tutorials> <methods> <method name="add_track"> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 3d6ebd5934..8204b456d9 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -8,7 +8,7 @@ Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_input"> diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index 48983a624e..63127ade9a 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 1bfebc91fc..94a6ae4221 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -11,7 +11,7 @@ - A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index ab44148c15..d8ac5413fd 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index 2b56167225..e2cd12e685 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index 5a306a225d..7c81b37663 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -11,7 +11,7 @@ - A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 6e82f0afb7..263b59910b 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -10,7 +10,7 @@ You can set the extents of the axis using the [member min_space] and [member max_space]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_blend_point"> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index f8680ba8ec..460c11cc5e 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -9,7 +9,7 @@ You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_blend_point"> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 4a34d75ff9..8f87ce453f 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -7,7 +7,7 @@ This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_node"> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index 4ba0b82df6..d5793e5839 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="get_mix_mode" qualifiers="const"> diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml index 38b05eb650..7640f4dcfa 100644 --- a/doc/classes/AnimationNodeOutput.xml +++ b/doc/classes/AnimationNodeOutput.xml @@ -6,7 +6,7 @@ <description> </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 3b351a3345..9ea83d2c5e 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -12,7 +12,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_node"> diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index f4b89a5086..fec68d5b74 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -12,7 +12,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="get_current_node" qualifiers="const"> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index f0b7cc4099..fe0154acad 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -5,7 +5,7 @@ <description> </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml index 5c2e6cb692..334fdb0b95 100644 --- a/doc/classes/AnimationNodeTimeScale.xml +++ b/doc/classes/AnimationNodeTimeScale.xml @@ -7,7 +7,7 @@ Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index 0fef106da5..eb5335c792 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -7,7 +7,7 @@ This node can be used to cause a seek command to happen to any sub-children of the graph. After setting the time, this value returns to -1. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 11250c5b17..8338f0d39a 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -7,7 +7,7 @@ Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="get_input_caption" qualifiers="const"> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 1420b1bf64..8396cdb6cf 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -9,8 +9,9 @@ Updating the target properties of animations occurs at process time. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> + <link title="Animations">https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link> + <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link> + <link title="Animation tutorial index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> </tutorials> <methods> <method name="add_animation"> @@ -235,7 +236,8 @@ The name of the animation to play when the scene loads. </member> <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default=""""> - The name of the current animation, "" if not playing anything. When being set, does not restart the animation. See also [method play]. + The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. + [b]Note[/b]: while this property appears in the inspector, it's not meant to be edited and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. </member> <member name="current_animation_length" type="float" setter="" getter="get_current_animation_length"> The length (in seconds) of the currently being played animation. diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index dd04f4ce3f..cc8e83f509 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -7,8 +7,8 @@ Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> - <link>https://github.com/godotengine/tps-demo</link> + <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="Third-person shooter demo code repository">https://github.com/godotengine/tps-demo</link> </tutorials> <methods> <method name="advance"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 4190cbe6b9..e98c0af0d9 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -7,7 +7,7 @@ 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link> + <link title="Using Area2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link> </tutorials> <methods> <method name="get_collision_layer_bit" qualifiers="const"> @@ -97,10 +97,10 @@ If [code]true[/code], the area's audio bus overrides the default audio bus. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. + The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans to determine collision detection. + The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0"> The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index a94cecd879..ad9eff3a64 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -96,10 +96,10 @@ If [code]true[/code], the area's audio bus overrides the default audio bus. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. + The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans to determine collision detection. + The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8"> The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 9a3eccd8dc..61df5e092e 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -119,7 +119,7 @@ <return type="Variant"> </return> <description> - Returns the last element of the array, or [code]null[/code] if the array is empty. + Returns the last element of the array. Throws an error and returns [code]null[/code] if the array is empty. </description> </method> <method name="bsearch"> @@ -216,7 +216,7 @@ <return type="Variant"> </return> <description> - Returns the first element of the array, or [code]null[/code] if the array is empty. + Returns the first element of the array. Throws an error and returns [code]null[/code] if the array is empty. </description> </method> <method name="has"> @@ -227,10 +227,10 @@ <description> Returns [code]true[/code] if the array contains the given value. [codeblock] - ["inside", 7].has("inside") == true - ["inside", 7].has("outside") == false - ["inside", 7].has(7) == true - ["inside", 7].has("7") == false + print(["inside", 7].has("inside")) # True + print(["inside", 7].has("outside")) # False + print(["inside", 7].has(7)) # True + print(["inside", 7].has("7")) # False [/codeblock] [b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows: [codeblock] diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index b45716544a..4ec39ecc2f 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -26,7 +26,7 @@ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link> + <link title="Procedural geometry using the ArrayMesh">https://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link> </tutorials> <methods> <method name="add_blend_shape"> diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index a217342d98..6617d16290 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -7,7 +7,7 @@ Allows the user to record sound from a microphone. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link> + <link title="Recording with microphone">https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link> </tutorials> <methods> <method name="get_recording" qualifiers="const"> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 49c6f5bb34..d5fd5d8f00 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -7,7 +7,7 @@ [AudioServer] is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> + <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> <methods> <method name="add_bus"> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index d5c8e42515..58768dc008 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -7,7 +7,7 @@ Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> + <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <methods> <method name="get_length" qualifiers="const"> diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index e93da411cd..51254f9305 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -5,7 +5,7 @@ <description> </description> <tutorials> - <link>https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> + <link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index e3e17b8a93..cd8e8735b6 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -5,7 +5,7 @@ <description> </description> <tutorials> - <link>https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> + <link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> </tutorials> <methods> <method name="can_push_buffer" qualifiers="const"> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index dbc3d3e21b..86048ca8c1 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -7,7 +7,7 @@ Plays an audio stream non-positionally. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> + <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <methods> <method name="get_playback_position"> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 844e2316ba..d8b9385736 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -7,7 +7,7 @@ Plays audio that dampens with distance from screen center. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> + <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <methods> <method name="get_playback_position"> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index bd90e3bd1a..aadbc865bb 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -5,9 +5,10 @@ </brief_description> <description> Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. + By default, audio is heard from the camera position. This can be changed by adding a [Listener3D] node to the scene and enabling it by calling [method Listener3D.make_current] on it. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> + <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <methods> <method name="get_playback_position"> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 5e908b0e53..3812b45b13 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -13,7 +13,7 @@ <return type="void"> </return> <description> - Called when the button is pressed. + Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead. </description> </method> <method name="_toggled" qualifiers="virtual"> @@ -89,6 +89,7 @@ <signal name="pressed"> <description> Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise. + If you need to know the button's pressed state (and [member toggle_mode] is active), use [signal toggled] instead. </description> </signal> <signal name="toggled"> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 1da4e23437..0cb0b7e57e 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -7,7 +7,7 @@ This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/spatial_material.html</link> + <link title="Spatial material">https://docs.godotengine.org/en/latest/tutorials/3d/spatial_material.html</link> </tutorials> <methods> <method name="get_feature" qualifiers="const"> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 3952ea2d27..c614a281ae 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -4,11 +4,14 @@ 3×3 matrix datatype. </brief_description> <description> - 3×3 matrix used for 3D rotation and scale. Contains 3 vector fields X, Y and Z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized (due to scaling). Almost always used as an orthogonal basis for a [Transform]. - For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). + 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a Transform. + Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). + Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling). + For more information, read the "Matrices and transforms" documentation article. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> + <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link> + <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> </tutorials> <methods> <method name="Basis"> @@ -17,7 +20,7 @@ <argument index="0" name="from" type="Quat"> </argument> <description> - Create a rotation matrix from the given quaternion. + Constructs a pure rotation basis matrix from the given quaternion. </description> </method> <method name="Basis"> @@ -26,7 +29,8 @@ <argument index="0" name="from" type="Vector3"> </argument> <description> - Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X angle, Y angle, Z angle). + Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). + Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. </description> </method> <method name="Basis"> @@ -37,7 +41,7 @@ <argument index="1" name="phi" type="float"> </argument> <description> - Create a rotation matrix which rotates around the given axis by the specified angle, in radians. The axis must be a normalized vector. + Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector. </description> </method> <method name="Basis"> @@ -50,28 +54,30 @@ <argument index="2" name="z_axis" type="Vector3"> </argument> <description> - Create a matrix from 3 axis vectors. + Constructs a basis matrix from 3 axis vectors (matrix columns). </description> </method> <method name="determinant"> <return type="float"> </return> <description> - Returns the determinant of the matrix. + Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale. + A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid. </description> </method> <method name="get_euler"> <return type="Vector3"> </return> <description> - Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See [method get_rotation_quat] if you need a quaternion instead. + Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles. </description> </method> <method name="get_orthogonal_index"> <return type="int"> </return> <description> - This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to the Godot source code. + This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code. </description> </method> <method name="get_rotation_quat"> @@ -193,25 +199,26 @@ <argument index="0" name="v" type="Vector3"> </argument> <description> - Returns a vector transformed (multiplied) by the transposed matrix. + Returns a vector transformed (multiplied) by the transposed basis matrix. [b]Note:[/b] This results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. </description> </method> </methods> <members> <member name="x" type="Vector3" setter="" getter="" default="Vector3( 1, 0, 0 )"> - The basis matrix's X vector. + The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code]. </member> <member name="y" type="Vector3" setter="" getter="" default="Vector3( 0, 1, 0 )"> - The basis matrix's Y vector. + The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code]. </member> <member name="z" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 1 )"> - The basis matrix's Z vector. + The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code]. </member> </members> <constants> <constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> - The identity basis. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer. + The identity basis, with no rotation or scaling applied. + This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#. </constant> <constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )"> The basis that will flip something along the X axis when used in a transformation. diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index f0ac7d1160..27ead07e6f 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -60,6 +60,7 @@ <argument index="1" name="rect" type="Rect2"> </argument> <description> + Applies morphological dilation to the bitmap. The first argument is the dilation amount, Rect2 is the area where the dilation will be applied. </description> </method> <method name="opaque_to_polygons" qualifiers="const"> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 675441d842..de05cfcd13 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -5,6 +5,18 @@ </brief_description> <description> Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme]. + [b]Example of creating a button and assigning an action when pressed by code:[/b] + [codeblock] + func _ready(): + var button = Button.new() + button.text = "Click me" + button.connect("pressed", self, "_button_pressed") + add_child(button) + + func _button_pressed(): + print("Hello world!") + [/codeblock] + Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. </description> <tutorials> </tutorials> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index df3ef71a2a..7244da56ca 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -8,7 +8,7 @@ See also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link> + <link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link> </tutorials> <methods> <method name="convert_from_particles"> diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml index ea9ab85b80..7a874d31db 100644 --- a/doc/classes/CameraEffects.xml +++ b/doc/classes/CameraEffects.xml @@ -34,9 +34,9 @@ The length of the transition between the near blur and no-blur area. </member> <member name="override_exposure" type="float" setter="set_override_exposure" getter="get_override_exposure" default="1.0"> - The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enable] is [code]true[/code]. + The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enabled] is [code]true[/code]. </member> - <member name="override_exposure_enable" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false"> + <member name="override_exposure_enabled" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false"> If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure]. </member> </members> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index b3a3722836..0eecada4fe 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -12,8 +12,8 @@ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> </tutorials> <methods> <method name="_draw" qualifiers="virtual"> @@ -285,9 +285,9 @@ </return> <argument index="0" name="position" type="Vector2"> </argument> - <argument index="1" name="rotation" type="float"> + <argument index="1" name="rotation" type="float" default="0.0"> </argument> - <argument index="2" name="scale" type="Vector2"> + <argument index="2" name="scale" type="Vector2" default="Vector2( 1, 1 )"> </argument> <description> Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. @@ -316,7 +316,16 @@ <argument index="4" name="clip_w" type="int" default="-1"> </argument> <description> - Draws a string using a custom font. + Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + [b]Example using the default project font:[/b] + [codeblock] + # If using this method in a script that redraws constantly, move the + # `default_font` declaration to a member variable assigned in `_ready()` + # so the Control is only created once. + var default_font = Control.new().get_font("font") + draw_string(default_font, Vector2(64, 64), "Hello world") + [/codeblock] + See also [method Font.draw]. </description> </method> <method name="draw_style_box"> @@ -525,7 +534,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and its inherited visibility is also [code]true[/code]. + Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. </description> </method> <method name="make_canvas_position_local" qualifiers="const"> @@ -617,7 +626,8 @@ If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> - If [code]true[/code], this [CanvasItem] is drawn. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. + If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). + [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. </member> </members> <signals> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 8202a29d44..89cd28b617 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -7,8 +7,8 @@ Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link> + <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link title="Canvas layers">https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link> </tutorials> <methods> <method name="get_canvas" qualifiers="const"> diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index c16e448498..a988035c36 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -7,8 +7,8 @@ By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> - <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> + <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> </methods> diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml index 58ecec828d..de90247536 100644 --- a/doc/classes/ClippedCamera3D.xml +++ b/doc/classes/ClippedCamera3D.xml @@ -90,7 +90,7 @@ If [code]true[/code], the camera stops on contact with [PhysicsBody3D]s. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. + The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The camera's collision margin. The camera can't get closer than this distance to a colliding object. diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml new file mode 100644 index 0000000000..7a1dad547b --- /dev/null +++ b/doc/classes/CodeHighlighter.xml @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_color_region"> + <return type="void"> + </return> + <argument index="0" name="p_start_key" type="String"> + </argument> + <argument index="1" name="p_end_key" type="String"> + </argument> + <argument index="2" name="p_color" type="Color"> + </argument> + <argument index="3" name="p_line_only" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="add_keyword_color"> + <return type="void"> + </return> + <argument index="0" name="keyword" type="String"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="add_member_keyword_color"> + <return type="void"> + </return> + <argument index="0" name="member_keyword" type="String"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="clear_color_regions"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="clear_keyword_colors"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="clear_member_keyword_colors"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_keyword_color" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="keyword" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_member_keyword_color" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="member_keyword" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_color_region" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="p_start_key" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_keyword_color" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="keyword" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_member_keyword_color" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="member_keyword" type="String"> + </argument> + <description> + </description> + </method> + <method name="remove_color_region"> + <return type="void"> + </return> + <argument index="0" name="p_start_key" type="String"> + </argument> + <description> + </description> + </method> + <method name="remove_keyword_color"> + <return type="void"> + </return> + <argument index="0" name="keyword" type="String"> + </argument> + <description> + </description> + </method> + <method name="remove_member_keyword_color"> + <return type="void"> + </return> + <argument index="0" name="member_keyword" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}"> + </member> + <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )"> + </member> + <member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}"> + </member> + <member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}"> + </member> + <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )"> + </member> + <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )"> + </member> + <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index e32ce9c9f9..b4fcf9cd88 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -7,13 +7,13 @@ Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> </methods> <members> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> - A disabled collision shape has no effect in the world. + A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> Sets whether this collision shape should only detect collision on one side (top or bottom). diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml index 76515a65a7..05851e445e 100644 --- a/doc/classes/CollisionShape3D.xml +++ b/doc/classes/CollisionShape3D.xml @@ -7,7 +7,7 @@ Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> <method name="make_convex_from_brothers"> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 17b474531e..fcaba99eb7 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Color" version="4.0"> <brief_description> - Color in RGBA format with some support for ARGB format. + Color in RGBA format using floats on the range of 0 to 1. </brief_description> <description> - A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1. + A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8]. [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code]. @@ -18,13 +18,21 @@ <argument index="0" name="from" type="String"> </argument> <description> - Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN]. + Constructs a color from an HTML hexadecimal color string in RGB or RGBA format. See also [method @GDScript.ColorN]. [codeblock] # Each of the following creates the same color RGBA(178, 217, 10, 255). - var c1 = Color("#ffb2d90a") # ARGB format with "#". - var c2 = Color("ffb2d90a") # ARGB format. var c3 = Color("#b2d90a") # RGB format with "#". var c4 = Color("b2d90a") # RGB format. + var c1 = Color("#b2d90aff") # RGBA format with "#". + var c2 = Color("b2d90aff") # RGBA format. + [/codeblock] + You can also use the "web color" short-hand form by only using 3 or 4 digits. + [codeblock] + # Each of the following creates the same color RGBA(17, 34, 51, 255). + var c3 = Color("#123") # RGB format with "#". + var c4 = Color("123") # RGB format. + var c1 = Color("#123f") # RGBA format with "#". + var c2 = Color("123f") # RGBA format. [/codeblock] </description> </method> @@ -243,11 +251,11 @@ <argument index="0" name="with_alpha" type="bool" default="true"> </argument> <description> - Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). - Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string. + Returns the color's HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]). + Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format). [codeblock] var c = Color(1, 1, 1, 0.5) - var s1 = c.to_html() # Returns "7fffffff" + var s1 = c.to_html() # Returns "ffffff7f" var s2 = c.to_html(false) # Returns "ffffff" [/codeblock] </description> @@ -277,37 +285,37 @@ </methods> <members> <member name="a" type="float" setter="" getter="" default="1.0"> - Alpha value (range 0 to 1). + The color's alpha (transparency) component, typically on the range of 0 to 1. </member> <member name="a8" type="int" setter="" getter="" default="255"> - Alpha value (range 0 to 255). + Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1. </member> <member name="b" type="float" setter="" getter="" default="0.0"> - Blue value (range 0 to 1). + The color's blue component, typically on the range of 0 to 1. </member> <member name="b8" type="int" setter="" getter="" default="0"> - Blue value (range 0 to 255). + Wrapper for [member b] that uses the range 0 to 255 instead of 0 to 1. </member> <member name="g" type="float" setter="" getter="" default="0.0"> - Green value (range 0 to 1). + The color's green component, typically on the range of 0 to 1. </member> <member name="g8" type="int" setter="" getter="" default="0"> - Green value (range 0 to 255). + Wrapper for [member g] that uses the range 0 to 255 instead of 0 to 1. </member> <member name="h" type="float" setter="" getter="" default="0.0"> - HSV hue value (range 0 to 1). + The HSV hue of this color, on the range 0 to 1. </member> <member name="r" type="float" setter="" getter="" default="0.0"> - Red value (range 0 to 1). + The color's red component, typically on the range of 0 to 1. </member> <member name="r8" type="int" setter="" getter="" default="0"> - Red value (range 0 to 255). + Wrapper for [member r] that uses the range 0 to 255 instead of 0 to 1. </member> <member name="s" type="float" setter="" getter="" default="0.0"> - HSV saturation value (range 0 to 1). + The HSV saturation of this color, on the range 0 to 1. </member> <member name="v" type="float" setter="" getter="" default="0.0"> - HSV value (range 0 to 1). + The HSV value (brightness) of this color, on the range 0 to 1. </member> </members> <constants> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 9dbb843902..c8e37d7d7b 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -13,10 +13,11 @@ Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus. Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector. + [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link> + <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> </tutorials> <methods> <method name="_clips_input" qualifiers="virtual"> @@ -97,7 +98,17 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. If the [code]color[/code] is empty or invalid, the override is cleared and the color from assigned [Theme] is used. + Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. + [b]Note:[/b] Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color. + [b]Example of overriding a label's color and resetting it later:[/b] + [codeblock] + # Override the child node "MyLabel"'s font color to orange. + $MyLabel.add_theme_color_override("font_color", Color(1, 0.5, 0)) + + # Reset the color by creating a new node to get the default value: + var default_label_color = Label.new().get_theme_color("font_color") + $MyLabel.add_theme_color_override("font_color", default_label_color) + [/codeblock] </description> </method> <method name="add_theme_constant_override"> @@ -108,7 +119,7 @@ <argument index="1" name="constant" type="int"> </argument> <description> - Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is empty or invalid, the override is cleared and the constant from assigned [Theme] is used. + Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is [code]0[/code], the override is cleared and the constant from assigned [Theme] is used. </description> </method> <method name="add_theme_font_override"> @@ -119,7 +130,7 @@ <argument index="1" name="font" type="Font"> </argument> <description> - Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is empty or invalid, the override is cleared and the font from assigned [Theme] is used. + Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is [code]null[/code] or invalid, the override is cleared and the font from assigned [Theme] is used. </description> </method> <method name="add_theme_icon_override"> @@ -130,7 +141,7 @@ <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. + Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is [code]null[/code] or invalid, the override is cleared and the icon from assigned [Theme] is used. </description> </method> <method name="add_theme_shader_override"> @@ -141,7 +152,7 @@ <argument index="1" name="shader" type="Shader"> </argument> <description> - Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is empty or invalid, the override is cleared and the shader from assigned [Theme] is used. + Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is [code]null[/code] or invalid, the override is cleared and the shader from assigned [Theme] is used. </description> </method> <method name="add_theme_stylebox_override"> @@ -153,6 +164,19 @@ </argument> <description> Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. If [code]stylebox[/code] is empty or invalid, the override is cleared and the [StyleBox] from assigned [Theme] is used. + [b]Example of modifying a property in a StyleBox by duplicating it:[/b] + [codeblock] + # The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. + # Resources are shared across instances, so we need to duplicate it + # to avoid modifying the appearance of all other buttons. + var new_stylebox_normal = $MyButton.get_theme_stylebox("normal").duplicate() + new_stylebox_normal.border_width_top = 3 + new_stylebox_normal.border_color = Color(0, 1, 0.5) + $MyButton.add_theme_stylebox_override("normal", new_stylebox_normal) + + # Remove the stylebox override: + $MyButton.add_theme_stylebox_override("normal", null) + [/codeblock] </description> </method> <method name="can_drop_data" qualifiers="virtual"> @@ -856,7 +880,9 @@ The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. </member> <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> - The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. + The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value. + [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. + [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property. </member> <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml index f7329d1537..f9baa3b09a 100644 --- a/doc/classes/Decal.xml +++ b/doc/classes/Decal.xml @@ -17,7 +17,7 @@ <argument index="0" name="type" type="int" enum="Decal.DecalTexture"> </argument> <description> - Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. + Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. For example, instead of [code]albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO)[/code], use [code]albedo_tex = $Decal.texture_albedo[/code]. One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: [codeblock] @@ -34,7 +34,7 @@ <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. + Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. For example, instead of [code]$Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex)[/code], use [code]$Decal.texture_albedo = albedo_tex[/code]. One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: [codeblock] diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 5413fa33c6..7123deb206 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -73,7 +73,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link> + <link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link> </tutorials> <methods> <method name="clear"> diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index fc7ce94a2b..afd85a9cb7 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -7,7 +7,7 @@ A directional light is a type of [Light3D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> + <link title="Lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index ed4257a809..bcdadcd970 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -5,7 +5,7 @@ </brief_description> <description> Directory type. It is used to manage directories and their content (not restricted to the project folder). - When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking. + When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code]. Here is an example on how to iterate through the files of a directory: [codeblock] func dir_contents(path): @@ -24,7 +24,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> + <link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> </tutorials> <methods> <method name="change_dir"> @@ -63,6 +63,7 @@ </argument> <description> Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. + If the [Directory] is not open, the path is relative to [code]res://[/code]. </description> </method> <method name="file_exists"> @@ -72,6 +73,7 @@ </argument> <description> Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. + If the [Directory] is not open, the path is relative to [code]res://[/code]. </description> </method> <method name="get_current_dir"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index f8306cbd72..814c232668 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -44,9 +44,9 @@ </return> <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode"> </argument> - <argument index="1" name="rect" type="int"> + <argument index="1" name="flags" type="int"> </argument> - <argument index="2" name="arg2" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )"> + <argument index="2" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )"> </argument> <description> </description> @@ -139,7 +139,7 @@ <description> </description> </method> - <method name="get_swap_ok_cancel"> + <method name="get_swap_cancel_ok"> <return type="bool"> </return> <description> @@ -523,6 +523,15 @@ <description> </description> </method> + <method name="screen_get_max_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + Return the greatest scale factor of all screens. + [b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases. + [b]Note:[/b] This method is implemented on macOS. + </description> + </method> <method name="screen_get_orientation" qualifiers="const"> <return type="int" enum="DisplayServer.ScreenOrientation"> </return> @@ -545,6 +554,9 @@ <argument index="0" name="screen" type="int" default="-1"> </argument> <description> + Return the scale factor of the specified screen by index. + [b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="screen_get_size" qualifiers="const"> @@ -615,12 +627,14 @@ <return type="int"> </return> <description> + Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. </description> </method> <method name="virtual_keyboard_hide"> <return type="void"> </return> <description> + Hides the virtual keyboard if it is shown, does nothing otherwise. </description> </method> <method name="virtual_keyboard_show"> @@ -630,13 +644,23 @@ </argument> <argument index="1" name="position" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> </argument> - <argument index="2" name="max_length" type="int" default="-1"> + <argument index="2" name="multiline" type="bool" default="false"> + </argument> + <argument index="3" name="max_length" type="int" default="-1"> </argument> - <argument index="3" name="cursor_start" type="int" default="-1"> + <argument index="4" name="cursor_start" type="int" default="-1"> </argument> - <argument index="4" name="cursor_end" type="int" default="-1"> + <argument index="5" name="cursor_end" type="int" default="-1"> </argument> <description> + Shows the virtual keyboard if the platform has one. + [code]existing_text[/code] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + [code]position[/code] parameter is the screen space [Rect2] of the edited text. + [code]multiline[/code] parameter needs to be set to [code]true[/code] to be able to enter multiple lines of text, as in [TextEdit]. + [code]max_length[/code] limits the number of characters that can be entered if different from [code]-1[/code]. + [code]cursor_start[/code] can optionally define the current text cursor position if [code]cursor_end[/code] is not set. + [code]cursor_start[/code] and [code]cursor_end[/code] can optionally define the current text selection. + [b]Note:[/b] This method is implemented on Android, iOS and UWP. </description> </method> <method name="vsync_is_enabled" qualifiers="const"> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 0864c3ba36..b0635892be 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -4,7 +4,7 @@ DynamicFont renders vector font files at runtime. </brief_description> <description> - DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallbacks fonts, which will be used when displaying a character not supported by the main font. + DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallback fonts, which will be used when displaying a character not supported by the main font. DynamicFont uses the [url=https://www.freetype.org/]FreeType[/url] library for rasterization. [codeblock] var dynamic_font = DynamicFont.new() @@ -12,7 +12,7 @@ dynamic_font.size = 64 $"Label".set("custom_fonts/font", dynamic_font) [/codeblock] - [b]Note:[/b] DynamicFont doesn't support features such as right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File > Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font. + [b]Note:[/b] DynamicFont doesn't support features such as kerning, right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File > Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font. </description> <tutorials> </tutorials> @@ -26,6 +26,14 @@ Adds a fallback font. </description> </method> + <method name="get_available_chars" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns a string containing all the characters available in the main and all the fallback fonts. + If a given character is included in more than one font, it appears only once in the returned string. + </description> + </method> <method name="get_fallback" qualifiers="const"> <return type="DynamicFontData"> </return> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml new file mode 100644 index 0000000000..b97933e582 --- /dev/null +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorDebuggerPlugin" inherits="Control" version="4.0"> + <brief_description> + A base class to implement debugger plugins. + </brief_description> + <description> + All debugger plugin scripts must extend [EditorDebuggerPlugin]. It provides functions related to editor side of debugger. + You don't need to instantiate this class. That is handled by the debugger itself. [Control] nodes can be added as child nodes to provide a GUI front-end for the plugin. + Do not queue_free/reparent it's instance otherwise the instance becomes unusable. + </description> + <tutorials> + </tutorials> + <methods> + <method name="has_capture"> + <return type="bool"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Returns [code]true[/code] if a message capture with given name is present otherwise [code]false[/code]. + </description> + </method> + <method name="is_breaked"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the game is in break state otherwise [code]false[/code]. + </description> + </method> + <method name="is_debuggable"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the game can be debugged otherwise [code]false[/code]. + </description> + </method> + <method name="is_session_active"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code]. + </description> + </method> + <method name="register_message_capture"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <argument index="1" name="callable" type="Callable"> + </argument> + <description> + Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable. + Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. + </description> + </method> + <method name="send_message"> + <return type="void"> + </return> + <argument index="0" name="message" type="String"> + </argument> + <argument index="1" name="data" type="Array"> + </argument> + <description> + Sends a message with given [code]message[/code] and [code]data[/code] array. + </description> + </method> + <method name="unregister_message_capture"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Unregisters the message capture with given name. + </description> + </method> + </methods> + <signals> + <signal name="breaked"> + <argument index="0" name="can_debug" type="bool"> + </argument> + <description> + Emitted when the game enters a break state. + </description> + </signal> + <signal name="continued"> + <description> + Emitted when the game exists a break state. + </description> + </signal> + <signal name="started"> + <description> + Emitted when the debugging starts. + </description> + </signal> + <signal name="stopped"> + <description> + Emitted when the debugging stops. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 8cfd3b63d6..9ef2bd21cc 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -70,12 +70,24 @@ <description> </description> </method> + <method name="add_ios_embedded_framework"> + <return type="void"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. + [b]Note:[/b] For static libraries (*.a) works in same way as [code]add_ios_framework[/code]. + This method should not be used for System libraries as they are already present on the device. + </description> + </method> <method name="add_ios_framework"> <return type="void"> </return> <argument index="0" name="path" type="String"> </argument> <description> + Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project. </description> </method> <method name="add_ios_linker_flags"> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 9bb51af2d0..5461dccd27 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -97,6 +97,7 @@ <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> + Emitted if at least one resource is reloaded when the filesystem is scanned. </description> </signal> <signal name="sources_changed"> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index 096fe5df8f..b852ae1063 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -67,6 +67,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the base class of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_script_class_name" qualifiers="const"> @@ -75,6 +76,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the name of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_type" qualifiers="const"> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 0aac59c727..b290557336 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -49,7 +49,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> + <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> </tutorials> <methods> <method name="get_import_options" qualifiers="virtual"> @@ -83,6 +83,16 @@ <argument index="1" name="options" type="Dictionary"> </argument> <description> + This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: + [codeblock] + func get_option_visibility(option, options): + # Only show the lossy quality setting if the compression mode is set to "Lossy". + if option == "compress/lossy_quality" and options.has("compress/mode"): + return int(options["compress/mode"]) == COMPRESS_LOSSY + + return true + [/codeblock] + Return [code]true[/code] to make all options always visible. </description> </method> <method name="get_preset_count" qualifiers="virtual"> @@ -150,6 +160,8 @@ <argument index="4" name="gen_files" type="Array"> </argument> <description> + Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function. + This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. </description> </method> </methods> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 2f62fe9e40..6f03165a97 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -14,6 +14,8 @@ <return type="void"> </return> <description> + Refreshes the inspector. + [b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.) </description> </method> </methods> @@ -25,30 +27,35 @@ <argument index="0" name="id" type="int"> </argument> <description> + Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector. </description> </signal> <signal name="property_deleted"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is removed from the inspector. </description> </signal> <signal name="property_edited"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is edited in the inspector. </description> </signal> <signal name="property_keyed"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. </description> </signal> <signal name="property_selected"> <argument index="0" name="property" type="String"> </argument> <description> + Emitted when a property is selected in the inspector. </description> </signal> <signal name="property_toggled"> @@ -57,6 +64,8 @@ <argument index="1" name="checked" type="bool"> </argument> <description> + Emitted when a boolean property is toggled in the inspector. + [b]Note:[/b] This signal is never emitted if the internal [code]autoclear[/code] property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. </description> </signal> <signal name="resource_selected"> @@ -65,10 +74,12 @@ <argument index="1" name="prop" type="String"> </argument> <description> + Emitted when a resource is selected in the inspector. </description> </signal> <signal name="restart_requested"> <description> + Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. </description> </signal> </signals> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index dbe725f08b..9da36b51f9 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -23,13 +23,14 @@ <return type="Control"> </return> <description> - Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. + Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. </description> </method> <method name="get_current_path" qualifiers="const"> <return type="String"> </return> <description> + Returns the current path being viewed in the [FileSystemDock]. </description> </method> <method name="get_edited_scene_root"> @@ -43,26 +44,29 @@ <return type="EditorSettings"> </return> <description> - Returns the [EditorSettings]. + Returns the editor's [EditorSettings] instance. </description> </method> <method name="get_editor_viewport"> <return type="Control"> </return> <description> - Returns the editor [Viewport]. + Returns the main editor control. Use this as a parent for main screens. + [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically. </description> </method> <method name="get_file_system_dock"> <return type="FileSystemDock"> </return> <description> + Returns the editor's [FileSystemDock] instance. </description> </method> <method name="get_inspector" qualifiers="const"> <return type="EditorInspector"> </return> <description> + Returns the editor's [EditorInspector] instance. </description> </method> <method name="get_open_scenes" qualifiers="const"> @@ -72,38 +76,46 @@ Returns an [Array] with the file paths of the currently opened scenes. </description> </method> + <method name="get_playing_scene" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. + </description> + </method> <method name="get_resource_filesystem"> <return type="EditorFileSystem"> </return> <description> - Returns the [EditorFileSystem]. + Returns the editor's [EditorFileSystem] instance. </description> </method> <method name="get_resource_previewer"> <return type="EditorResourcePreview"> </return> <description> - Returns the [EditorResourcePreview]. + Returns the editor's [EditorResourcePreview] instance. </description> </method> <method name="get_script_editor"> <return type="ScriptEditor"> </return> <description> - Returns the [ScriptEditor]. + Returns the editor's [ScriptEditor] instance. </description> </method> <method name="get_selected_path" qualifiers="const"> <return type="String"> </return> <description> + Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. </description> </method> <method name="get_selection"> <return type="EditorSelection"> </return> <description> - Returns the [EditorSelection]. + Returns the editor's [EditorSelection] instance. </description> </method> <method name="inspect_object"> @@ -114,7 +126,14 @@ <argument index="1" name="for_property" type="String" default=""""> </argument> <description> - Shows the given property on the given [code]object[/code] in the Editor's Inspector dock. + Shows the given property on the given [code]object[/code] in the editor's Inspector dock. + </description> + </method> + <method name="is_playing_scene" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if a scene is currently being played, [code]false[/code] otherwise. Paused scenes are considered as being played. </description> </method> <method name="is_plugin_enabled" qualifiers="const"> @@ -123,7 +142,7 @@ <argument index="0" name="plugin" type="String"> </argument> <description> - Returns the enabled status of a plugin. The plugin name is the same as its directory name. + Returns [code]true[/code] if the specified [code]plugin[/code] is enabled. The plugin name is the same as its directory name. </description> </method> <method name="make_mesh_previews"> @@ -146,6 +165,29 @@ Opens the scene at the given path. </description> </method> + <method name="play_current_scene"> + <return type="void"> + </return> + <description> + Plays the currently active scene. + </description> + </method> + <method name="play_custom_scene"> + <return type="void"> + </return> + <argument index="0" name="scene_filepath" type="String"> + </argument> + <description> + Plays the scene specified by its filepath. + </description> + </method> + <method name="play_main_scene"> + <return type="void"> + </return> + <description> + Plays the main scene. + </description> + </method> <method name="reload_scene_from_path"> <return type="void"> </return> @@ -188,6 +230,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Sets the editor's current main screen to the one specified in [code]name[/code]. [code]name[/code] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]). </description> </method> <method name="set_plugin_enabled"> @@ -201,9 +244,17 @@ Sets the enabled status of a plugin. The plugin name is the same as its directory name. </description> </method> + <method name="stop_playing_scene"> + <return type="void"> + </return> + <description> + Stops the scene that is currently playing. + </description> + </method> </methods> <members> <member name="distraction_free_mode" type="bool" setter="set_distraction_free_mode" getter="is_distraction_free_mode_enabled"> + If [code]true[/code], enables distraction-free mode which hides side docks to increase the space available for the main view. </member> </members> <constants> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index 6d695ddeea..45541b9263 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -15,6 +15,7 @@ <argument index="0" name="segments" type="PackedVector3Array"> </argument> <description> + Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method redraw]. </description> </method> <method name="add_collision_triangles"> @@ -69,6 +70,7 @@ <argument index="3" name="material" type="Material" default="null"> </argument> <description> + Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method redraw]. </description> </method> <method name="add_unscaled_billboard"> @@ -88,6 +90,7 @@ <return type="void"> </return> <description> + Removes everything in the gizmo including meshes, collisions and handles. </description> </method> <method name="commit_handle" qualifiers="virtual"> @@ -143,14 +146,14 @@ <argument index="0" name="index" type="int"> </argument> <description> - Gets whether a handle is highlighted or not. + Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse. </description> </method> <method name="redraw" qualifiers="virtual"> <return type="void"> </return> <description> - This function is called when the Node3D this gizmo refers to changes (the [method Node3D.update_gizmo] is called). + This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called). </description> </method> <method name="set_handle" qualifiers="virtual"> @@ -173,6 +176,7 @@ <argument index="0" name="hidden" type="bool"> </argument> <description> + Sets the gizmo's hidden state. If [code]true[/code], the gizmo will be hidden. If [code]false[/code], it will be shown. </description> </method> <method name="set_spatial_node"> @@ -181,6 +185,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> + Sets the reference [Node3D] node for the gizmo. [code]node[/code] must inherit from [Node3D]. </description> </method> </methods> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index ca75b47fbf..8865939eb1 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -7,7 +7,7 @@ EditorNode3DGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorNode3DGizmoPlugin] for the simpler gizmos, or creating a new [EditorNode3DGizmo] type. See the tutorial in the documentation for more info. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> + <link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> </tutorials> <methods> <method name="add_material"> @@ -139,6 +139,8 @@ <return type="String"> </return> <description> + Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used. + All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically override built-in gizmos. </description> </method> <method name="has_gizmo" qualifiers="virtual"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 2fa791a9df..6a64a7aa55 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -7,7 +7,7 @@ Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also [EditorScript] to add functions to the editor. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link> + <link title="Editor plugins tutorial index">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link> </tutorials> <methods> <method name="add_autoload_singleton"> @@ -76,6 +76,15 @@ During run-time, this will be a simple object with a script so this function does not need to be called then. </description> </method> + <method name="add_debugger_plugin"> + <return type="void"> + </return> + <argument index="0" name="script" type="Script"> + </argument> + <description> + Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin]. + </description> + </method> <method name="add_export_plugin"> <return type="void"> </return> @@ -142,6 +151,15 @@ Adds a custom submenu under [b]Project > Tools >[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. This submenu should be cleaned up using [code]remove_tool_menu_item(name)[/code]. </description> </method> + <method name="add_translation_parser_plugin"> + <return type="void"> + </return> + <argument index="0" name="parser" type="EditorTranslationParserPlugin"> + </argument> + <description> + Registers a custom translation parser plugin for extracting translatable strings from custom files. + </description> + </method> <method name="apply_changes" qualifiers="virtual"> <return type="void"> </return> @@ -415,6 +433,15 @@ Removes a custom type added by [method add_custom_type]. </description> </method> + <method name="remove_debugger_plugin"> + <return type="void"> + </return> + <argument index="0" name="script" type="Script"> + </argument> + <description> + Removes the debugger plugin with given script fromm the Debugger. + </description> + </method> <method name="remove_export_plugin"> <return type="void"> </return> @@ -464,6 +491,15 @@ Removes a menu [code]name[/code] from [b]Project > Tools[/b]. </description> </method> + <method name="remove_translation_parser_plugin"> + <return type="void"> + </return> + <argument index="0" name="parser" type="EditorTranslationParserPlugin"> + </argument> + <description> + Removes a registered custom translation parser plugin. + </description> + </method> <method name="save_external_data" qualifiers="virtual"> <return type="void"> </return> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 4da3b58b94..f568263ff8 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -73,24 +73,25 @@ </methods> <members> <member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false"> - Used by the inspector, set when property is checkable. + Used by the inspector, set to [code]true[/code] when the property is checkable. </member> <member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false"> - Used by the inspector, when the property is checked. + Used by the inspector, set to [code]true[/code] when the property is checked. </member> <member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false"> + Used by the inspector, set to [code]true[/code] when the property can be deleted by the user. </member> <member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false"> - Used by the inspector, when the property must draw with error color. + Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties. </member> <member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false"> - Used by the inspector, when the property can add keys for animation. + Used by the inspector, set to [code]true[/code] when the property can add keys for animation. </member> <member name="label" type="String" setter="set_label" getter="get_label" default=""""> - Sets this property to change the label (if you want to show one). + Set this property to change the label (if you want to show one). </member> <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> - Used by the inspector, when the property is read-only. + Used by the inspector, set to [code]true[/code] when the property is read-only. </member> </members> <signals> @@ -134,6 +135,7 @@ <argument index="0" name="property" type="StringName"> </argument> <description> + Emitted when a property was deleted. Used internally. </description> </signal> <signal name="property_keyed"> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 56fc0e3d1a..cb1f5d2e77 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -26,7 +26,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link> + <link title="Importing 3D scenes: Custom script">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link> </tutorials> <methods> <method name="get_source_file" qualifiers="const"> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 19921ff5c8..0c6a2d61cd 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -5,11 +5,16 @@ </brief_description> <description> Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor > Editor Settings[/b] menu. - Accessing the settings is done by using the regular [Object] API, such as: + Property names use slash delimiters to distinguish sections. Setting values can be of any [Variant] type. It's recommended to use [code]snake_case[/code] for editor settings to be consistent with the Godot editor itself. + Accessing the settings can be done using the following methods, such as: [codeblock] - settings.set(prop,value) - settings.get(prop) - list_of_settings = settings.get_property_list() + # `settings.set("some/property", value)` also works as this class overrides `_set()` internally. + settings.set_setting("some/property",value) + + # `settings.get("some/property", value)` also works as this class overrides `_get()` internally. + settings.get_setting("some/property") + + var list_of_settings = settings.get_property_list() [/codeblock] [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_settings]. </description> @@ -47,14 +52,14 @@ <argument index="0" name="property" type="String"> </argument> <description> - Erase a given setting (pass full property path). + Erases the setting whose name is specified by [code]property[/code]. </description> </method> <method name="get_favorites" qualifiers="const"> <return type="PackedStringArray"> </return> <description> - Gets the list of favorite files and directories for this project. + Returns the list of favorite files and directories for this project. </description> </method> <method name="get_project_metadata" qualifiers="const"> @@ -67,20 +72,21 @@ <argument index="2" name="default" type="Variant" default="null"> </argument> <description> + Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata]. </description> </method> <method name="get_project_settings_dir" qualifiers="const"> <return type="String"> </return> <description> - Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. + Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved. </description> </method> <method name="get_recent_dirs" qualifiers="const"> <return type="PackedStringArray"> </return> <description> - Gets the list of recently visited folders in the file dialog for this project. + Returns the list of recently visited folders in the file dialog for this project. </description> </method> <method name="get_setting" qualifiers="const"> @@ -89,6 +95,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance. </description> </method> <method name="get_settings_dir" qualifiers="const"> @@ -106,6 +113,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise. </description> </method> <method name="property_can_revert"> @@ -114,6 +122,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the setting specified by [code]name[/code] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings. </description> </method> <method name="property_get_revert"> @@ -122,6 +131,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings. </description> </method> <method name="set_favorites"> @@ -143,6 +153,7 @@ <argument index="2" name="update_current" type="bool"> </argument> <description> + Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well. </description> </method> <method name="set_project_metadata"> @@ -155,6 +166,7 @@ <argument index="2" name="data" type="Variant"> </argument> <description> + Sets project-specific metadata with the [code]section[/code], [code]key[/code] and [code]data[/code] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. </description> </method> <method name="set_recent_dirs"> @@ -174,19 +186,20 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Sets the [code]value[/code] of the setting specified by [code]name[/code]. This is equivalent to using [method Object.set] on the EditorSettings instance. </description> </method> </methods> <signals> <signal name="settings_changed"> <description> - Emitted when editor settings change. + Emitted after any editor setting has changed. </description> </signal> </signals> <constants> <constant name="NOTIFICATION_EDITOR_SETTINGS_CHANGED" value="10000"> - Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes. + Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. </constant> </constants> </class> diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml new file mode 100644 index 0000000000..103d95e1d6 --- /dev/null +++ b/doc/classes/EditorSyntaxHighlighter.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="_get_name" qualifiers="virtual"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="_get_supported_extentions" qualifiers="virtual"> + <return type="Array"> + </return> + <description> + </description> + </method> + <method name="_get_supported_languages" qualifiers="virtual"> + <return type="Array"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml new file mode 100644 index 0000000000..f5204e7bab --- /dev/null +++ b/doc/classes/EditorTranslationParserPlugin.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorTranslationParserPlugin" inherits="Reference" version="4.0"> + <brief_description> + Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.). + </brief_description> + <description> + Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method parse_file] method in script. + Add the extracted strings to argument [code]msgids[/code] or [code]msgids_context_plural[/code] if context or plural is used. + When adding to [code]msgids_context_plural[/code], you must add the data using the format [code]["A", "B", "C"][/code], where [code]A[/code] represents the extracted string, [code]B[/code] represents the context, and [code]C[/code] represents the plural version of the extracted string. If you want to add only context but not plural, put [code]""[/code] for the plural slot. The idea is the same if you only want to add plural but not context. See the code below for concrete examples. + The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu. + Below shows an example of a custom parser that extracts strings from a CSV file to write into a POT. + [codeblock] + tool + extends EditorTranslationParserPlugin + + + func parse_file(path, msgids, msgids_context_plural): + var file = File.new() + file.open(path, File.READ) + var text = file.get_as_text() + var split_strs = text.split(",", false, 0) + for s in split_strs: + msgids.append(s) + #print("Extracted string: " + s) + + + func get_recognized_extensions(): + return ["csv"] + [/codeblock] + To add a translatable string associated with context or plural, add it to [code]msgids_context_plural[/code]: + [codeblock] + # This will add a message with msgid "Test 1", msgctxt "context", and msgid_plural "test 1 plurals". + msgids_context_plural.append(["Test 1", "context", "test 1 plurals"]) + # This will add a message with msgid "A test without context" and msgid_plural "plurals". + msgids_context_plural.append(["A test without context", "", "plurals"]) + # This will add a message with msgid "Only with context" and msgctxt "a friendly context". + msgids_context_plural.append(["Only with context", "a friendly context", ""]) + [/codeblock] + [b]Note:[/b] If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the [code]path[/code] argument using [method ResourceLoader.load]. This is because built-in scripts are loaded as [Resource] type, not [File] type. + For example: + [codeblock] + func parse_file(path, msgids, msgids_context_plural): + var res = ResourceLoader.load(path, "Script") + var text = res.get_source_code() + # Parsing logic. + + + func get_recognized_extensions(): + return ["gd"] + [/codeblock] + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_recognized_extensions" qualifiers="virtual"> + <return type="Array"> + </return> + <description> + Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code]. + </description> + </method> + <method name="parse_file" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="msgids" type="Array"> + </argument> + <argument index="2" name="msgids_context_plural" type="Array"> + </argument> + <description> + Override this method to define a custom parsing logic to extract the translatable strings. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 12701d8688..297cccaaac 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -34,7 +34,7 @@ </return> <description> Returns a Dictionary of Arrays of donor names. - {[code]platinum_sponsors[/code], [code]gold_sponsors[/code], [code]mini_sponsors[/code], [code]gold_donors[/code], [code]silver_donors[/code], [code]bronze_donors[/code]} + {[code]platinum_sponsors[/code], [code]gold_sponsors[/code], [code]silver_sponsors[/code], [code]bronze_sponsors[/code], [code]mini_sponsors[/code], [code]gold_donors[/code], [code]silver_donors[/code], [code]bronze_donors[/code]} </description> </method> <method name="get_frames_drawn"> diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml new file mode 100644 index 0000000000..7db36b89d0 --- /dev/null +++ b/doc/classes/EngineDebugger.xml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EngineDebugger" inherits="Object" version="4.0"> + <brief_description> + Exposes the internal debugger. + </brief_description> + <description> + [EngineDebugger] handles the communication between the editor and the running game. It is active in the running game. Messages can be sent/received through it. It also manages the profilers. + </description> + <tutorials> + </tutorials> + <methods> + <method name="has_capture"> + <return type="bool"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Returns [code]true[/code] if a capture with the given name is present otherwise [code]false[/code]. + </description> + </method> + <method name="has_profiler"> + <return type="bool"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Returns [code]true[/code] if a profiler with the given name is present otherwise [code]false[/code]. + </description> + </method> + <method name="is_active"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the debugger is active otherwise [code]false[/code]. + </description> + </method> + <method name="is_profiling"> + <return type="bool"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Returns [code]true[/code] if a profiler with the given name is present and active otherwise [code]false[/code]. + </description> + </method> + <method name="profiler_add_frame_data"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <argument index="1" name="data" type="Array"> + </argument> + <description> + Calls the [code]add[/code] callable of the profiler with given [code]name[/code] and [code]data[/code]. + </description> + </method> + <method name="profiler_enable"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <argument index="2" name="arguments" type="Array" default="[ ]"> + </argument> + <description> + Calls the [code]toggle[/code] callable of the profiler with given [code]name[/code] and [code]arguments[/code]. Enables/Disables the same profiler depending on [code]enable[/code] argument. + </description> + </method> + <method name="register_message_capture"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <argument index="1" name="callable" type="Callable"> + </argument> + <description> + Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable. + Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. + </description> + </method> + <method name="register_profiler"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <argument index="1" name="toggle" type="Callable"> + </argument> + <argument index="2" name="add" type="Callable"> + </argument> + <argument index="3" name="tick" type="Callable"> + </argument> + <description> + Registers a profiler with the given [code]name[/code]. + [code]toggle[/code] callable is called when the profiler is enabled/disabled. It must take an argument array as an argument. + [code]add[/code] callable is called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. It must take a data array as argument. + [code]tick[/code] callable is called at every active profiler iteration. It must take frame time, idle time, physics time, and physics idle time as arguments. + </description> + </method> + <method name="send_message"> + <return type="void"> + </return> + <argument index="0" name="message" type="String"> + </argument> + <argument index="1" name="data" type="Array"> + </argument> + <description> + Sends a message with given [code]message[/code] and [code]data[/code] array. + </description> + </method> + <method name="unregister_message_capture"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Unregisters the message capture with given [code]name[/code]. + </description> + </method> + <method name="unregister_profiler"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Unregisters a profiler with given [code]name[/code]. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 3642d92771..caee6a0c07 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -11,8 +11,8 @@ - Adjustments </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link> + <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> + <link title="Light transport in game engines">https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link> </tutorials> <methods> <method name="is_glow_level_enabled" qualifiers="const"> @@ -24,7 +24,7 @@ Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise. </description> </method> - <method name="set_glow_level"> + <method name="set_glow_level_enabled"> <return type="void"> </return> <argument index="0" name="idx" type="int"> @@ -46,7 +46,7 @@ <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]. </member> - <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> + <member name="adjustment_enabled" type="bool" setter="set_adjustment_enabled" getter="is_adjustment_enabled" default="false"> If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> @@ -65,7 +65,7 @@ </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"> + <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure_enabled" getter="is_tonemap_auto_exposure_enabled" 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> <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> @@ -95,47 +95,20 @@ <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="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> - <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0"> - The fog's depth starting distance from the camera. - </member> - <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0"> - The fog depth's intensity curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. - </member> - <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true"> - If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). - </member> - <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="100.0"> - The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera3D.far] value. + <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.001"> </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> - If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog. + If [code]true[/code], fog effects are enabled. </member> - <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0"> - The height fog's intensity. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. + <member name="fog_height" type="float" setter="set_fog_height" getter="get_fog_height" default="0.0"> </member> - <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false"> - If [code]true[/code], the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader. + <member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0"> </member> - <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="0.0"> - The Y coordinate where the height fog will be the most intense. If this value is greater than [member fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom. + <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color( 0.5, 0.6, 0.7, 1 )"> </member> - <member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min" default="10.0"> - The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top. + <member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0"> </member> - <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0"> - The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight3D node in the scene. - </member> - <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )"> - The depth fog's [Color] when looking towards the sun. - </member> - <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0"> - The intensity of the fog light transmittance effect. Amount of light that the fog transmits. - </member> - <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false"> - Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life. + <member name="fog_sun_scatter" type="float" setter="set_fog_sun_scatter" getter="get_fog_sun_scatter" default="0.0"> </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> The glow blending mode. @@ -158,25 +131,25 @@ <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. </member> - <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> + <member name="glow_levels/1" type="bool" setter="set_glow_level_enabled" getter="is_glow_level_enabled" default="false"> If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry). </member> - <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> + <member name="glow_levels/2" type="bool" setter="set_glow_level_enabled" getter="is_glow_level_enabled" default="false"> If [code]true[/code], the 2th level of glow is enabled. </member> - <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> + <member name="glow_levels/3" type="bool" setter="set_glow_level_enabled" getter="is_glow_level_enabled" default="true"> If [code]true[/code], the 3th level of glow is enabled. </member> - <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> + <member name="glow_levels/4" type="bool" setter="set_glow_level_enabled" getter="is_glow_level_enabled" default="false"> If [code]true[/code], the 4th level of glow is enabled. </member> - <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> + <member name="glow_levels/5" type="bool" setter="set_glow_level_enabled" getter="is_glow_level_enabled" default="true"> If [code]true[/code], the 5th level of glow is enabled. </member> - <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> + <member name="glow_levels/6" type="bool" setter="set_glow_level_enabled" getter="is_glow_level_enabled" default="false"> If [code]true[/code], the 6th level of glow is enabled. </member> - <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> + <member name="glow_levels/7" type="bool" setter="set_glow_level_enabled" 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"> @@ -186,6 +159,30 @@ </member> <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> </member> + <member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8"> + </member> + <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1"> + </member> + <member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false"> + </member> + <member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0"> + </member> + <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="819.2"> + </member> + <member name="sdfgi_min_cell_size" type="float" setter="set_sdfgi_min_cell_size" getter="get_sdfgi_min_cell_size" default="0.2"> + </member> + <member name="sdfgi_normal_bias" type="float" setter="set_sdfgi_normal_bias" getter="get_sdfgi_normal_bias" default="1.1"> + </member> + <member name="sdfgi_probe_bias" type="float" setter="set_sdfgi_probe_bias" getter="get_sdfgi_probe_bias" default="1.1"> + </member> + <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="false"> + </member> + <member name="sdfgi_use_multi_bounce" type="bool" setter="set_sdfgi_use_multi_bounce" getter="is_sdfgi_using_multi_bounce" default="false"> + </member> + <member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false"> + </member> + <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="0"> + </member> <member name="sky" type="Sky" setter="set_sky" getter="get_sky"> The [Sky] resource used for this [Environment]. </member> @@ -241,6 +238,22 @@ <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. </member> + <member name="volumetric_fog_density" type="float" setter="set_volumetric_fog_density" getter="get_volumetric_fog_density" default="0.01"> + </member> + <member name="volumetric_fog_detail_spread" type="float" setter="set_volumetric_fog_detail_spread" getter="get_volumetric_fog_detail_spread" default="2.0"> + </member> + <member name="volumetric_fog_enabled" type="bool" setter="set_volumetric_fog_enabled" getter="is_volumetric_fog_enabled" default="false"> + </member> + <member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="0.0"> + </member> + <member name="volumetric_fog_length" type="float" setter="set_volumetric_fog_length" getter="get_volumetric_fog_length" default="64.0"> + </member> + <member name="volumetric_fog_light" type="Color" setter="set_volumetric_fog_light" getter="get_volumetric_fog_light" default="Color( 0, 0, 0, 1 )"> + </member> + <member name="volumetric_fog_light_energy" type="float" setter="set_volumetric_fog_light_energy" getter="get_volumetric_fog_light_energy" default="1.0"> + </member> + <member name="volumetric_fog_shadow_filter" type="int" setter="set_volumetric_fog_shadow_filter" getter="get_volumetric_fog_shadow_filter" enum="Environment.VolumetricFogShadowFilter" default="1"> + </member> </members> <constants> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> @@ -285,6 +298,18 @@ <constant name="REFLECTION_SOURCE_SKY" value="2" enum="ReflectionSource"> Use the [Sky] for reflections regardless of what the background is. </constant> + <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> + Linear tonemapper operator. Reads the linear data and passes it on unmodified. + </constant> + <constant name="TONE_MAPPER_REINHARDT" value="1" enum="ToneMapper"> + Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. + </constant> + <constant name="TONE_MAPPER_FILMIC" value="2" enum="ToneMapper"> + Filmic tonemapper operator. + </constant> + <constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper"> + Academy Color Encoding System tonemapper operator. + </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> @@ -300,18 +325,6 @@ <constant name="GLOW_BLEND_MODE_MIX" value="4" enum="GlowBlendMode"> Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. </constant> - <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> - Linear tonemapper operator. Reads the linear data and passes it on unmodified. - </constant> - <constant name="TONE_MAPPER_REINHARDT" value="1" enum="ToneMapper"> - Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. - </constant> - <constant name="TONE_MAPPER_FILMIC" value="2" enum="ToneMapper"> - Filmic tonemapper operator. - </constant> - <constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper"> - Academy Color Encoding System tonemapper operator. - </constant> <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur"> No blur for the screen-space ambient occlusion effect (fastest). </constant> @@ -324,5 +337,25 @@ <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur"> 3×3 blur for the screen-space ambient occlusion effect. Increases the radius of the blur for a smoother look, but can result in checkerboard-like artifacts. </constant> + <constant name="SDFGI_CASCADES_4" value="0" enum="SDFGICascades"> + </constant> + <constant name="SDFGI_CASCADES_6" value="1" enum="SDFGICascades"> + </constant> + <constant name="SDFGI_CASCADES_8" value="2" enum="SDFGICascades"> + </constant> + <constant name="SDFGI_Y_SCALE_DISABLED" value="0" enum="SDFGIYScale"> + </constant> + <constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale"> + </constant> + <constant name="SDFGI_Y_SCALE_50_PERCENT" value="2" enum="SDFGIYScale"> + </constant> + <constant name="VOLUMETRIC_FOG_SHADOW_FILTER_DISABLED" value="0" enum="VolumetricFogShadowFilter"> + </constant> + <constant name="VOLUMETRIC_FOG_SHADOW_FILTER_LOW" value="1" enum="VolumetricFogShadowFilter"> + </constant> + <constant name="VOLUMETRIC_FOG_SHADOW_FILTER_MEDIUM" value="2" enum="VolumetricFogShadowFilter"> + </constant> + <constant name="VOLUMETRIC_FOG_SHADOW_FILTER_HIGH" value="3" enum="VolumetricFogShadowFilter"> + </constant> </constants> </class> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index fcd1aa43c0..f2611dc850 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -5,7 +5,7 @@ </brief_description> <description> An expression can be made of any arithmetic operation, built-in math function call, method call of a passed instance, or built-in type construction call. - An example expression text using the built-in math functions could be [code]sqrt(pow(3,2) + pow(4,2))[/code]. + An example expression text using the built-in math functions could be [code]sqrt(pow(3, 2) + pow(4, 2))[/code]. In the following example we use a [LineEdit] node to write our expression and show the result. [codeblock] onready var expression = Expression.new() diff --git a/doc/classes/File.xml b/doc/classes/File.xml index b90039e496..1982406993 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -20,9 +20,10 @@ file.close() return content [/codeblock] + In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> + <link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> </tutorials> <methods> <method name="close"> @@ -256,6 +257,7 @@ </argument> <description> Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. + [b]Note:[/b] The provided key must be 32 bytes long. </description> </method> <method name="open_encrypted_with_pass"> @@ -449,16 +451,16 @@ </members> <constants> <constant name="READ" value="1" enum="ModeFlags"> - Opens the file for read operations. + Opens the file for read operations. The cursor is positioned at the beginning of the file. </constant> <constant name="WRITE" value="2" enum="ModeFlags"> - Opens the file for write operations. Create it if the file does not exist and truncate if it exists. + Opens the file for write operations. The file is created if it does not exist, and truncated if it does. </constant> <constant name="READ_WRITE" value="3" enum="ModeFlags"> - Opens the file for read and write operations. Does not truncate the file. + Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file. </constant> <constant name="WRITE_READ" value="7" enum="ModeFlags"> - Opens the file for read and write operations. Create it if the file does not exist and truncate if it exists. + Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. </constant> <constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode"> Uses the [url=http://fastlz.org/]FastLZ[/url] compression method. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index eaaccbd0dd..b4afee7610 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -57,6 +57,7 @@ <members> <member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access" default="0"> The file system access scope. See enum [code]Access[/code] constants. + [b]Warning:[/b] Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url]. </member> <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir" default=""res://""> The current working directory of the file dialog. diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml index fdf29f89b2..c553f90e37 100644 --- a/doc/classes/FileSystemDock.xml +++ b/doc/classes/FileSystemDock.xml @@ -10,11 +10,11 @@ <method name="can_drop_data_fw" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="arg0" type="Vector2"> + <argument index="0" name="position" type="Vector2"> </argument> - <argument index="1" name="arg1" type="Variant"> + <argument index="1" name="data" type="Variant"> </argument> - <argument index="2" name="arg2" type="Control"> + <argument index="2" name="from" type="Control"> </argument> <description> </description> @@ -22,11 +22,11 @@ <method name="drop_data_fw"> <return type="void"> </return> - <argument index="0" name="arg0" type="Vector2"> + <argument index="0" name="position" type="Vector2"> </argument> - <argument index="1" name="arg1" type="Variant"> + <argument index="1" name="data" type="Variant"> </argument> - <argument index="2" name="arg2" type="Control"> + <argument index="2" name="from" type="Control"> </argument> <description> </description> @@ -34,9 +34,9 @@ <method name="get_drag_data_fw"> <return type="Variant"> </return> - <argument index="0" name="arg0" type="Vector2"> + <argument index="0" name="position" type="Vector2"> </argument> - <argument index="1" name="arg1" type="Control"> + <argument index="1" name="from" type="Control"> </argument> <description> </description> @@ -44,7 +44,7 @@ <method name="navigate_to_path"> <return type="void"> </return> - <argument index="0" name="arg0" type="String"> + <argument index="0" name="path" type="String"> </argument> <description> </description> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 30b8c1fe76..f49fbf0d2a 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -5,6 +5,8 @@ </brief_description> <description> Font contains a Unicode-compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. + [b]Note:[/b] If a DynamicFont doesn't contain a character used in a string, the character in question will be replaced with codepoint [code]0xfffd[/code] if it's available in the DynamicFont. If this replacement character isn't available in the DynamicFont, the character will be hidden without displaying any replacement character in the string. + [b]Note:[/b] If a BitmapFont doesn't contain a character used in a string, the character in question will be hidden without displaying any replacement character in the string. </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </argument> <description> Draw [code]string[/code] into a canvas item using the font at a given position, with [code]modulate[/code] color, and optionally clipping the width. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + See also [method CanvasItem.draw_string]. </description> </method> <method name="draw_char" qualifiers="const"> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 23dd562653..9199468ab3 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -8,7 +8,7 @@ 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> + <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> </tutorials> <methods> <method name="bake"> @@ -19,7 +19,7 @@ <argument index="1" name="create_visual_debug" type="bool" default="false"> </argument> <description> - Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. + Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. </description> </method> <method name="debug_bake"> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index ee67b5052c..5bed28aaf7 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -8,7 +8,7 @@ Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link> + <link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link> </tutorials> <methods> <method name="capture_rect" qualifiers="const"> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index add8f28bf8..3e17963407 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -8,7 +8,7 @@ Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link> + <link title="Controlling thousands of fish with Particles">https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link> </tutorials> <methods> <method name="capture_aabb" qualifiers="const"> diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index ffd4bd108d..86dc8e864a 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -200,6 +200,13 @@ Inflates or deflates [code]polygon[/code] by [code]delta[/code] units (pixels). If [code]delta[/code] is positive, makes the polygon grow outward. If [code]delta[/code] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [code]delta[/code] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType]. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + [b]Note:[/b] To translate the polygon's vertices specifically, use the [method Transform2D.xform] method: + [codeblock] + var polygon = PackedVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)]) + var offset = Vector2(50, 50) + polygon = Transform2D(0, offset).xform(polygon) + print(polygon) # prints [Vector2(50, 50), Vector2(150, 50), Vector2(150, 150), Vector2(50, 150)] + [/codeblock] </description> </method> <method name="offset_polyline"> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 05aebef9de..abb105a41c 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -20,7 +20,7 @@ Adds the specified color to the end of the ramp, with the specified offset. </description> </method> - <method name="get_color" qualifiers="const"> + <method name="get_color"> <return type="Color"> </return> <argument index="0" name="point" type="int"> @@ -29,7 +29,7 @@ Returns the color of the ramp color at index [code]point[/code]. </description> </method> - <method name="get_offset" qualifiers="const"> + <method name="get_offset"> <return type="float"> </return> <argument index="0" name="point" type="int"> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index afe9d10d2e..0cbb4fd455 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -5,6 +5,7 @@ </brief_description> <description> Horizontal slider. See [Slider]. This one goes from left (min) to right (max). + [b]Note:[/b] The [signal Range.changed] and [signal Range.value_changed] signals are part of the [Range] class which this class inherits from. </description> <tutorials> </tutorials> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 76153ae041..9dc38b018a 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -1,17 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="HTTPClient" inherits="Reference" version="4.0"> <brief_description> - Hyper-text transfer protocol client. + Low-level hyper-text transfer protocol client. </brief_description> <description> - Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. See [HTTPRequest] for an higher-level alternative. + Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. [b]See the [HTTPRequest] node for an higher-level alternative.[/b] [b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). + [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> + <link title="HTTP client class">https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link> + <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> </tutorials> <methods> <method name="close"> @@ -151,6 +152,7 @@ var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())] var result = http_client.request(http_client.METHOD_POST, "index.php", headers, query_string) [/codeblock] + [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example. </description> </method> <method name="request_raw"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 53ca1fc6a9..4801af07d3 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -14,11 +14,19 @@ add_child(http_request) http_request.connect("request_completed", self, "_http_request_completed") - # Perform the HTTP request. The URL below returns some JSON as of writing. + # Perform a GET request. The URL below returns JSON as of writing. var error = http_request.request("https://httpbin.org/get") if error != OK: push_error("An error occurred in the HTTP request.") + # Perform a POST request. The URL below returns JSON as of writing. + # Note: Don't make simultaneous requests using a single HTTPRequest node. + # The snippet below is provided for reference only. + var body = {"name": "Godette"} + var error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body) + if error != OK: + push_error("An error occurred in the HTTP request.") + # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): @@ -56,10 +64,11 @@ add_child(texture_rect) texture_rect.texture = texture [/codeblock] + [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> + <link title="Making HTTP requests">https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link> + <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> </tutorials> <methods> <method name="cancel_request"> @@ -107,6 +116,7 @@ <description> Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. + [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example. </description> </method> </methods> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index d29fcfd96f..5aa5de1dae 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -364,6 +364,15 @@ Loads an image from the binary contents of a PNG file. </description> </method> + <method name="load_tga_from_buffer"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="buffer" type="PackedByteArray"> + </argument> + <description> + Loads an image from the binary contents of a TGA file. + </description> + </method> <method name="load_webp_from_buffer"> <return type="int" enum="Error"> </return> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index fc3c3776ce..b05ab5b4d6 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -7,7 +7,7 @@ A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or with the [InputMap] class. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link> + <link title="Inputs tutorial index">https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link> </tutorials> <methods> <method name="action_press"> @@ -47,8 +47,9 @@ <return type="Vector3"> </return> <description> - If the device has an accelerometer, this will return the acceleration. Otherwise, it returns an empty [Vector3]. + Returns the acceleration of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. + [b]Note:[/b] This method only works on iOS, Android, and UWP. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_action_strength" qualifiers="const"> @@ -78,14 +79,16 @@ <return type="Vector3"> </return> <description> - If the device has an accelerometer, this will return the gravity. Otherwise, it returns an empty [Vector3]. + Returns the gravity of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_gyroscope" qualifiers="const"> <return type="Vector3"> </return> <description> - If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's X, Y, and Z axes. Otherwise, it returns an empty [Vector3]. + Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + [b]Note:[/b] This method only works on Android. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_joy_axis" qualifiers="const"> @@ -182,7 +185,8 @@ <return type="Vector3"> </return> <description> - If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes. + Returns the the magnetic field strength in micro-Tesla for all axes of the device's magnetometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + [b]Note:[/b] This method only works on Android and UWP. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_mouse_button_mask" qualifiers="const"> @@ -417,7 +421,8 @@ Makes the mouse cursor hidden if it is visible. </constant> <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode"> - Captures the mouse. The mouse will be hidden and unable to leave the game window, but it will still register movement and mouse button presses. On Windows and Linux, the mouse will use raw input mode, which means the reported movement will be unaffected by the OS' mouse acceleration settings. + Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. + [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> Makes the mouse cursor visible but confines it to the game window. diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 413e217b45..3663ee98cc 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -7,8 +7,8 @@ Base class of all sort of input event. See [method Node._input]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> </tutorials> <methods> <method name="accumulate"> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 1c38ff8e8f..e0d3e47219 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -7,7 +7,7 @@ Contains a generic action which can be targeted from several types of inputs. Actions can be created from the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b] menu. See [method Node._input]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link> + <link title="InputEvent: Actions">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index 7876bace75..6ab4942f85 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -7,7 +7,7 @@ Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see [InputEventJoypadMotion]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index bfd961ce1f..2d7787b568 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -7,7 +7,7 @@ Stores information about joystick motions. One [InputEventJoypadMotion] represents one axis at a time. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 767e67c615..fe91b9c13e 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -7,7 +7,7 @@ Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> <method name="get_keycode_with_modifiers" qualifiers="const"> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index e3c9d688d2..31e82bbaed 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -7,7 +7,7 @@ Stores general mouse events information. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index b83588a877..d7b64a9a2d 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -7,7 +7,7 @@ Contains mouse click information. See [method Node._input]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> + <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 97b9d5247a..3e64fd63ab 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -5,9 +5,10 @@ </brief_description> <description> Contains mouse and pen motion information. Supports relative, absolute positions and speed. See [method Node._input]. + [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> + <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> </tutorials> <methods> </methods> @@ -16,7 +17,7 @@ Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code]. </member> <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )"> - The mouse position relative to the previous position (position at the last frame). + The mouse position relative to the previous position (position at the last frame). [b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse. </member> <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )"> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index a315e4ddfb..d69f175be8 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -7,7 +7,7 @@ Contains screen drag information. See [method Node._input]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 16a3cf8353..f497f2fecc 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -8,7 +8,7 @@ Stores multi-touch press/release information. Supports touch press, touch release and [member index] for multi-touch count and order. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index cc7de2ca32..667879a922 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -7,7 +7,7 @@ Contains keys events information with modifiers support like [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See [method Node._input]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 03212538c9..062ac3869d 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -7,7 +7,7 @@ Manages all [InputEventAction] which can be created/modified from the project settings menu [b]Project > Project Settings > Input Map[/b] or in code with [method add_action] and [method action_add_event]. See [method Node._input]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link> + <link title="InputEvent: InputMap">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link> </tutorials> <methods> <method name="action_add_event"> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index 7bd2edcb1c..a9fb50c262 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -15,7 +15,7 @@ <argument index="0" name="json" type="String"> </argument> <description> - Parses a JSON encoded string and returns a [JSONParseResult] containing the result. + Parses a JSON-encoded string and returns a [JSONParseResult] containing the result. </description> </method> <method name="print"> @@ -29,6 +29,29 @@ </argument> <description> Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. + [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types. + Use [code]indent[/code] parameter to pretty print the output. + [b]Example output:[/b] + [codeblock] + ## JSON.print(my_dictionary) + {"name":"my_dictionary","version":"1.0.0","entities":[{"name":"entity_0","value":"value_0"},{"name":"entity_1","value":"value_1"}]} + + ## JSON.print(my_dictionary, "\t") + { + "name": "my_dictionary", + "version": "1.0.0", + "entities": [ + { + "name": "entity_0", + "value": "value_0" + }, + { + "name": "entity_1", + "value": "value_1" + } + ] + } + [/codeblock] </description> </method> </methods> diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index 4444e08593..4dbceb35e9 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -15,21 +15,21 @@ The error type if the JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1"> - The line number where the error occurred if JSON source was not successfully parsed. + The line number where the error occurred if the JSON source was not successfully parsed. </member> <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default=""""> - The error message if JSON source was not successfully parsed. See the [enum Error] constants. + The error message if the JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> - A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned. - [b]Note:[/b] The JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types. + A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned. + [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types. [b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements: [codeblock] var p = JSON.parse('["hello", "world", "!"]') if typeof(p.result) == TYPE_ARRAY: print(p.result[0]) # Prints "hello" else: - print("unexpected results") + push_error("Unexpected results.") [/codeblock] </member> </members> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index 68f6c32a53..d2cb558385 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -7,7 +7,7 @@ The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> + <link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> </tutorials> <methods> <method name="eval"> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index f0f4d83821..5a1b4630d0 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -10,7 +10,7 @@ </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> + <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> </tutorials> <methods> <method name="get_floor_normal" qualifiers="const"> @@ -104,7 +104,7 @@ <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. + [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml index 5477c6bab6..5d9c7fd896 100644 --- a/doc/classes/KinematicBody3D.xml +++ b/doc/classes/KinematicBody3D.xml @@ -9,7 +9,7 @@ [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> + <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> </tutorials> <methods> <method name="get_axis_lock" qualifiers="const"> @@ -106,7 +106,7 @@ <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. + [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index 2862190d4d..c5f0c2df8c 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -8,7 +8,7 @@ [b]Note:[/b] Light2D can also be used as a mask. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> + <link title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index dda6faa80a..c022e56a39 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -7,7 +7,7 @@ Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> + <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <methods> <method name="get_param" qualifiers="const"> @@ -77,6 +77,8 @@ <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false"> If [code]true[/code], the light will cast shadows. </member> + <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="1.0"> + </member> <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="2.0"> Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible. </member> @@ -138,22 +140,21 @@ <constant name="PARAM_SHADOW_BLUR" value="16" enum="Param"> Constant for accessing [member shadow_blur]. </constant> - <constant name="PARAM_TRANSMITTANCE_BIAS" value="17" enum="Param"> + <constant name="PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="17" enum="Param"> + </constant> + <constant name="PARAM_TRANSMITTANCE_BIAS" value="18" enum="Param"> Constant for accessing [member shadow_transmittance_bias]. </constant> - <constant name="PARAM_MAX" value="18" enum="Param"> + <constant name="PARAM_MAX" value="19" enum="Param"> Represents the size of the [enum Param] enum. </constant> <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> Light is ignored when baking. [b]Note:[/b] Hiding a light does [i]not[/i] affect baking. </constant> - <constant name="BAKE_INDIRECT" value="1" enum="BakeMode"> - Only indirect lighting will be baked (default). + <constant name="BAKE_DYNAMIC" value="1" enum="BakeMode"> </constant> - <constant name="BAKE_ALL" value="2" enum="BakeMode"> - Both direct and indirect light will be baked. - [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked). + <constant name="BAKE_STATIC" value="2" enum="BakeMode"> </constant> </constants> </class> diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index a02f7a0f75..9f128e5942 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -7,7 +7,7 @@ Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> + <link title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index cfd23b28bd..22fe4f6194 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -85,7 +85,7 @@ The style for the points between the start and the end. </member> <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. + The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors. </member> <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8"> The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index c1c54dd11b..f08a15d873 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -122,6 +122,8 @@ <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> + <member name="caret_force_displayed" type="bool" setter="cursor_set_force_displayed" getter="cursor_get_force_displayed" default="false"> + </member> <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position" default="0"> The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> @@ -167,6 +169,9 @@ String value of the [LineEdit]. [b]Note:[/b] Changing text using this property won't emit the [signal text_changed] signal. </member> + <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true"> + If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. + </member> </members> <signals> <signal name="text_change_rejected"> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 7bb478fce2..55ae54d12b 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -142,13 +142,21 @@ Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Specific to the macOS platform. </constant> - <constant name="NOTIFICATION_APP_RESUMED" value="2014"> - Notification received from the OS when the app is resumed. + <constant name="NOTIFICATION_APPLICATION_RESUMED" value="2014"> + Notification received from the OS when the application is resumed. Specific to the Android platform. </constant> - <constant name="NOTIFICATION_APP_PAUSED" value="2015"> - Notification received from the OS when the app is paused. + <constant name="NOTIFICATION_APPLICATION_PAUSED" value="2015"> + Notification received from the OS when the application is paused. Specific to the Android platform. </constant> + <constant name="NOTIFICATION_APPLICATION_FOCUS_IN" value="2016"> + Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + Implemented on desktop platforms. + </constant> + <constant name="NOTIFICATION_APPLICATION_FOCUS_OUT" value="2017"> + Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + Implemented on desktop platforms. + </constant> </constants> </class> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 689f8d83e1..59b312f69a 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -7,7 +7,7 @@ Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite2D] via a tool in the editor toolbar. Select "Sprite2D" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link> + <link title="2D meshes">https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 0f56ab4b95..8a6c560cdd 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -10,8 +10,8 @@ Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> + <link title="Animating thousands of fish with MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> + <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> <method name="get_aabb" qualifiers="const"> diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml index cab17c952e..7d8035ba77 100644 --- a/doc/classes/MultiMeshInstance3D.xml +++ b/doc/classes/MultiMeshInstance3D.xml @@ -8,9 +8,9 @@ This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> + <link title="Animating thousands of fish with MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> + <link title="Using MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> + <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index 2de1f71867..f5f6308401 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -7,7 +7,7 @@ A synchronization mutex (mutual exclusion). This is used to synchronize multiple [Thread]s, and is equivalent to a binary [Semaphore]. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> + <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> </tutorials> <methods> <method name="lock"> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index ff97ea926d..7e2a9af59f 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -7,7 +7,7 @@ Manages the connection to network peers. Assigns unique IDs to each client connected to the server. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link> + <link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link> </tutorials> <methods> <method name="get_connection_status" qualifiers="const"> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 9617ee0437..b342fc0813 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -17,7 +17,7 @@ [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> + <link title="Scenes and nodes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> </tutorials> <methods> <method name="_enter_tree" qualifiers="virtual"> @@ -194,6 +194,7 @@ Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). [b]Note:[/b] It does not match against the full path, just against individual node names. If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. + [b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [method get_node] instead. To avoid using [method find_node] too often, consider caching the node reference into a variable. </description> </method> <method name="find_parent" qualifiers="const"> @@ -204,6 +205,7 @@ <description> Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). [b]Note:[/b] It does not match against the full path, just against individual node names. + [b]Note:[/b] As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using [method get_node] instead. To avoid using [method find_parent] too often, consider caching the node reference into a variable. </description> </method> <method name="get_child" qualifiers="const"> @@ -213,6 +215,7 @@ </argument> <description> Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. + Negative indices access the children from the last one. To access a child node via its name, use [method get_node]. </description> </method> @@ -918,6 +921,9 @@ <constant name="NOTIFICATION_INTERNAL_PHYSICS_PROCESS" value="26"> Notification received every frame when the internal physics process flag is set (see [method set_physics_process_internal]). </constant> + <constant name="NOTIFICATION_POST_ENTER_TREE" value="27"> + Notification received when the node is ready, just before [constant NOTIFICATION_READY] is received. Unlike the latter, it's sent every time the node enters tree, instead of only once. + </constant> <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002"> Notification received from the OS when the mouse enters the game window. Implemented on desktop and web platforms. @@ -926,13 +932,11 @@ Notification received from the OS when the mouse leaves the game window. Implemented on desktop and web platforms. </constant> - <constant name="NOTIFICATION_WM_FOCUS_IN" value="1004"> - Notification received from the OS when the game window is focused. - Implemented on all platforms. + <constant name="NOTIFICATION_WM_WINDOW_FOCUS_IN" value="1004"> + Notification received from the OS when the node's parent [Window] is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case [constant NOTIFICATION_APPLICATION_FOCUS_IN] is also emitted). </constant> - <constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005"> - Notification received from the OS when the game window is unfocused. - Implemented on all platforms. + <constant name="NOTIFICATION_WM_WINDOW_FOCUS_OUT" value="1005"> + Notification received from the OS when the node's parent [Window] is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case [constant NOTIFICATION_APPLICATION_FOCUS_OUT] is also emitted). </constant> <constant name="NOTIFICATION_WM_CLOSE_REQUEST" value="1006"> Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or [kbd]Alt + F4[/kbd]). @@ -963,14 +967,22 @@ Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Specific to the macOS platform. </constant> - <constant name="NOTIFICATION_APP_RESUMED" value="2014"> - Notification received from the OS when the app is resumed. + <constant name="NOTIFICATION_APPLICATION_RESUMED" value="2014"> + Notification received from the OS when the application is resumed. Specific to the Android platform. </constant> - <constant name="NOTIFICATION_APP_PAUSED" value="2015"> - Notification received from the OS when the app is paused. + <constant name="NOTIFICATION_APPLICATION_PAUSED" value="2015"> + Notification received from the OS when the application is paused. Specific to the Android platform. </constant> + <constant name="NOTIFICATION_APPLICATION_FOCUS_IN" value="2016"> + Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + Implemented on desktop platforms. + </constant> + <constant name="NOTIFICATION_APPLICATION_FOCUS_OUT" value="2017"> + Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + Implemented on desktop platforms. + </constant> <constant name="PAUSE_MODE_INHERIT" value="0" enum="PauseMode"> Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default. </constant> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index d29c556216..987a18f367 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -7,7 +7,7 @@ A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> </tutorials> <methods> <method name="apply_scale"> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 05d00b9f31..1ef875f606 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -9,7 +9,7 @@ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> + <link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> </tutorials> <methods> <method name="force_update_transform"> @@ -101,7 +101,7 @@ <return type="bool"> </return> <description> - Returns whether the node is visible, taking into consideration that its parents visibility. + Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. </description> </method> <method name="look_at"> @@ -323,7 +323,7 @@ Local translation of this node. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> - If [code]true[/code], this node is drawn. + If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). </member> </members> <signals> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 105def21ca..26110df335 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -112,7 +112,18 @@ <return type="PackedStringArray"> </return> <description> - Returns the command line arguments passed to the engine. + Returns the command-line arguments passed to the engine. + Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. + You can also incorporate environment variables using the [method get_environment] method. + You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project. + Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments: + [codeblock] + var arguments = {} + for argument in OS.get_cmdline_args(): + if argument.find("=") > -1: + var key_value = argument.split("=") + arguments[key_value[0].lstrip("--")] = key_value[1] + [/codeblock] </description> </method> <method name="get_connected_midi_inputs"> @@ -505,7 +516,7 @@ The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. </member> <member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default=""""> - The current tablet drvier in use. + The current tablet driver in use. </member> </members> <constants> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 8d08688b41..2395ccd211 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -17,8 +17,10 @@ [/codeblock] The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code]. Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. + [b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object]. </description> <tutorials> + <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link> </tutorials> <methods> <method name="_get" qualifiers="virtual"> @@ -97,6 +99,7 @@ [codeblock] call("set", "position", Vector2(42.0, 0.0)) [/codeblock] + [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="call_deferred" qualifiers="vararg"> @@ -109,6 +112,7 @@ [codeblock] call_deferred("set", "position", Vector2(42.0, 0.0)) [/codeblock] + [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="callv"> @@ -203,6 +207,7 @@ </argument> <description> Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code]. + [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="get_class" qualifiers="const"> @@ -402,6 +407,7 @@ </argument> <description> Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen. + [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="set_block_signals"> @@ -422,6 +428,7 @@ </argument> <description> Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code]. + [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="set_indexed"> @@ -479,13 +486,35 @@ </description> </method> <method name="tr" qualifiers="const"> - <return type="StringName"> + <return type="String"> </return> <argument index="0" name="message" type="StringName"> </argument> + <argument index="1" name="context" type="StringName" default=""""> + </argument> <description> - Translates a message using translation catalogs configured in the Project Settings. + Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation]. + See [url=https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method. + </description> + </method> + <method name="tr_n" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="message" type="StringName"> + </argument> + <argument index="1" name="plural_message" type="StringName"> + </argument> + <argument index="2" name="n" type="int"> + </argument> + <argument index="3" name="context" type="StringName" default=""""> + </argument> + <description> + Translates a message involving plurals using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. + Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation]. + The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. + [b]Note:[/b] Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, use [method tr]. + See [url=https://docs.godotengine.org/en/latest/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method. </description> </method> </methods> @@ -513,7 +542,7 @@ One-shot connections disconnect themselves after emission. </constant> <constant name="CONNECT_REFERENCE_COUNTED" value="8" enum="ConnectFlags"> - Connect a signal as reference counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left. + Connect a signal as reference-counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left. </constant> </constants> </class> diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml index 000d67e691..dfcb19a287 100644 --- a/doc/classes/OmniLight3D.xml +++ b/doc/classes/OmniLight3D.xml @@ -7,7 +7,7 @@ An Omnidirectional light is a type of [Light3D] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> + <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 39d974ec47..8c4bbd6716 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -217,7 +217,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Emitted the when user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument. + Emitted when the user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument. </description> </signal> <signal name="item_selected"> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index b08357e278..08f8558881 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -78,6 +78,15 @@ Returns a copy of the array's contents as [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="hex_encode"> <return type="String"> </return> @@ -152,6 +161,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> <method name="subarray"> <return type="PackedByteArray"> </return> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 06228e4dac..ec087e1b39 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -44,6 +44,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="Color"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -107,6 +116,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index ee82586cdb..a6b726944b 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -45,6 +45,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -108,6 +117,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index ce2300c65a..f867cda3b6 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -45,6 +45,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -108,6 +117,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index 176c624956..b796d9cacb 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -45,6 +45,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -108,6 +117,13 @@ Returns the array size. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index d8a8071590..3d0d9a1360 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -45,6 +45,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -108,6 +117,13 @@ Returns the array size. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 2d70dea012..bb56330248 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -7,6 +7,13 @@ A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). [b]Note:[/b] The node doesn't need to own itself. + [b]Example of loading a saved scene:[/b] + [codeblock] + # Use `load()` instead of `preload()` if the path isn't known at compile-time. + var scene = preload("res://scene.tscn").instance() + # Add the node as a child of the node the script is attached to. + add_child(scene) + [/codeblock] [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblock] # Create the objects. diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 9526f5899d..f36af66d6d 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -44,6 +44,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="String"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -107,6 +116,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 87f202357c..ecc535e488 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -44,6 +44,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="Vector2"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -107,6 +116,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 7bfa684ff5..f268fbcc83 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -44,6 +44,15 @@ Returns [code]true[/code] if the array is empty. </description> </method> + <method name="has"> + <return type="bool"> + </return> + <argument index="0" name="value" type="Vector3"> + </argument> + <description> + Returns [code]true[/code] if the array contains [code]value[/code]. + </description> + </method> <method name="insert"> <return type="int"> </return> @@ -107,6 +116,13 @@ Returns the size of the array. </description> </method> + <method name="sort"> + <return type="void"> + </return> + <description> + Sorts the elements of the array in ascending order. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 2a0c153267..0a9079ce71 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -5,12 +5,55 @@ </brief_description> <description> This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel. By using the [method get_monitor] method of this class, you can access this data from your code. + You can add custom monitors using the [method add_custom_monitor] method. Custom monitors are available in [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel together with built-in monitors. [b]Note:[/b] A few of these monitors are only available in debug mode and will always return 0 when used in a release build. [b]Note:[/b] Many of these monitors are not updated in real-time, so there may be a short delay between changes. + [b]Note:[/b] Custom monitors do not support negative values. Negative values are clamped to 0. </description> <tutorials> </tutorials> <methods> + <method name="add_custom_monitor"> + <return type="void"> + </return> + <argument index="0" name="id" type="StringName"> + </argument> + <argument index="1" name="callable" type="Callable"> + </argument> + <argument index="2" name="arguments" type="Array" default="[ ]"> + </argument> + <description> + Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". + [codeblock] + Performance.add_custom_monitor("MyCategory/MyMonitor", some_callable) # Adds monitor with name "MyName" to category "MyCategory" + Performance.add_custom_monitor("MyMonitor", some_callable) # Adds monitor with name "MyName" to category "Custom" + # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so above code is valid + Performance.add_custom_monitor("Custom/MyMonitor", some_callable) # Adds monitor with name "MyName" to category "Custom" + # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so above code is valid + Performance.add_custom_monitor("MyCategoryOne/MyCategoryTwo/MyMonitor", some_callable) # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom" + [/codeblock] + The debugger calls the callable to get the value of custom monitor. The callable must return a number. + Callables are called with arguments supplied in argument array. + [b]Note:[/b] It throws an error if given id is already present. + </description> + </method> + <method name="get_custom_monitor"> + <return type="Variant"> + </return> + <argument index="0" name="id" type="StringName"> + </argument> + <description> + Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. + [b]Note:[/b] It throws an error if the given id is absent. + </description> + </method> + <method name="get_custom_monitor_names"> + <return type="Array"> + </return> + <description> + Returns the names of active custom monitors in an array. + </description> + </method> <method name="get_monitor" qualifiers="const"> <return type="float"> </return> @@ -23,6 +66,32 @@ [/codeblock] </description> </method> + <method name="get_monitor_modification_time"> + <return type="int"> + </return> + <description> + Returns the last tick in which custom monitor was added/removed. + </description> + </method> + <method name="has_custom_monitor"> + <return type="bool"> + </return> + <argument index="0" name="id" type="StringName"> + </argument> + <description> + Returns true if custom monitor with the given id is present otherwise returns false. + </description> + </method> + <method name="remove_custom_monitor"> + <return type="void"> + </return> + <argument index="0" name="id" type="StringName"> + </argument> + <description> + Removes the custom monitor with given id. + [b]Note:[/b] It throws an error if the given id is already absent. + </description> + </method> </methods> <constants> <constant name="TIME_FPS" value="0" enum="Monitor"> diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 58930aae37..0808e4a724 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -18,9 +18,9 @@ <method name="apply_impulse"> <return type="void"> </return> - <argument index="0" name="position" type="Vector3"> + <argument index="0" name="impulse" type="Vector3"> </argument> - <argument index="1" name="impulse" type="Vector3"> + <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> </description> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 6afbd1ee8e..ca42f5801a 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -7,7 +7,7 @@ PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> <method name="add_collision_exception_with"> @@ -80,10 +80,10 @@ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans for collisions. + The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" /> <member name="layers" type="int" setter="_set_layers" getter="_get_layers"> diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index 2301a07a5c..7de65603f9 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -7,7 +7,7 @@ PhysicsBody3D is an abstract base class for implementing a physics body. All *Body types inherit from it. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> <method name="add_collision_exception_with"> @@ -80,10 +80,10 @@ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans for collisions. + The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> </members> <constants> diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index 46205fecd1..dfc0ab909a 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -7,7 +7,7 @@ Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="add_central_force"> @@ -22,9 +22,9 @@ <method name="add_force"> <return type="void"> </return> - <argument index="0" name="offset" type="Vector2"> + <argument index="0" name="force" type="Vector2"> </argument> - <argument index="1" name="force" type="Vector2"> + <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -51,9 +51,9 @@ <method name="apply_impulse"> <return type="void"> </return> - <argument index="0" name="offset" type="Vector2"> + <argument index="0" name="impulse" type="Vector2"> </argument> - <argument index="1" name="impulse" type="Vector2"> + <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index 1ee520fe5f..eea681e696 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -12,7 +12,7 @@ <method name="add_central_force"> <return type="void"> </return> - <argument index="0" name="force" type="Vector3"> + <argument index="0" name="force" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Adds a constant directional force without affecting rotation. @@ -24,7 +24,7 @@ </return> <argument index="0" name="force" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3"> + <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -42,7 +42,7 @@ <method name="apply_central_impulse"> <return type="void"> </return> - <argument index="0" name="j" type="Vector3"> + <argument index="0" name="impulse" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Applies a single directional impulse without affecting rotation. @@ -52,9 +52,9 @@ <method name="apply_impulse"> <return type="void"> </return> - <argument index="0" name="position" type="Vector3"> + <argument index="0" name="impulse" type="Vector3"> </argument> - <argument index="1" name="j" type="Vector3"> + <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. @@ -63,7 +63,7 @@ <method name="apply_torque_impulse"> <return type="void"> </return> - <argument index="0" name="j" type="Vector3"> + <argument index="0" name="impulse" type="Vector3"> </argument> <description> Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter. diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index d85d7794dd..676e33601a 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -7,7 +7,7 @@ Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-Casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="cast_motion"> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index ea094dcd90..789e8cc731 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -7,7 +7,7 @@ Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="cast_motion"> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index d7821b1045..6a1508b0e3 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -331,9 +331,9 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="offset" type="Vector2"> + <argument index="1" name="force" type="Vector2"> </argument> - <argument index="2" name="force" type="Vector2"> + <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. @@ -379,9 +379,9 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="position" type="Vector2"> + <argument index="1" name="impulse" type="Vector2"> </argument> - <argument index="2" name="impulse" type="Vector2"> + <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. @@ -804,6 +804,7 @@ </argument> <description> Sets a body state using one of the [enum BodyState] constants. + Note that the method doesn't take effect immediately. The state will change on the next physics frame. </description> </method> <method name="body_test_motion"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index e9e1552c92..5fd3ef5db2 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -334,7 +334,7 @@ </argument> <argument index="1" name="force" type="Vector3"> </argument> - <argument index="2" name="position" type="Vector3"> + <argument index="2" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> </description> @@ -379,9 +379,9 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="position" type="Vector3"> + <argument index="1" name="impulse" type="Vector3"> </argument> - <argument index="2" name="impulse" type="Vector3"> + <argument index="2" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code]. diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 9a162dabbb..93ca684b95 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -9,15 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="set_shape"> - <return type="void"> - </return> - <argument index="0" name="shape" type="Resource"> - </argument> - <description> - Sets the [Shape2D] that will be used for collision/intersection queries. - </description> - </method> </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> @@ -27,7 +18,7 @@ If [code]true[/code], the query will take [PhysicsBody2D]s into account. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> - The physics layer(s) the query will take into account (as a bitmask). + The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> The list of objects or object [RID]s that will be excluded from collisions. @@ -38,8 +29,24 @@ <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2( 0, 0 )"> The motion of the shape being queried for. </member> + <member name="shape" type="Resource" setter="set_shape" getter="get_shape"> + The [Shape2D] that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over [member shape_rid]. + </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> - The queried shape's [RID]. See also [method set_shape]. + The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API: + [codeblock] + var shape_rid = PhysicsServer2D.circle_shape_create() + var radius = 64 + PhysicsServer2D.shape_set_data(shape_rid, radius) + + var params = PhysicsShapeQueryParameters2D.new() + params.shape_rid = shape_rid + + # Execute physics queries here... + + # Release the shape when done with physics queries. + PhysicsServer2D.free_rid(shape_rid) + [/codeblock] </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> The queried shape's transform matrix. diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 6606cfbc59..167fb31bb3 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -9,15 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="set_shape"> - <return type="void"> - </return> - <argument index="0" name="shape" type="Resource"> - </argument> - <description> - Sets the [Shape3D] that will be used for collision/intersection queries. - </description> - </method> </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> @@ -27,7 +18,7 @@ If [code]true[/code], the query will take [PhysicsBody3D]s into account. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> - The physics layer(s) the query will take into account (as a bitmask). + The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> The list of objects or object [RID]s that will be excluded from collisions. @@ -35,8 +26,24 @@ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The collision margin for the shape. </member> + <member name="shape" type="Resource" setter="set_shape" getter="get_shape"> + The [Shape3D] that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over [member shape_rid]. + </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> - The queried shape's [RID]. See also [method set_shape]. + The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API: + [codeblock] + var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE) + var radius = 2.0 + PhysicsServer3D.shape_set_data(shape_rid, radius) + + var params = PhysicsShapeQueryParameters3D.new() + params.shape_rid = shape_rid + + # Execute physics queries here... + + # Release the shape when done with physics queries. + PhysicsServer3D.free_rid(shape_rid) + [/codeblock] </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> The queried shape's transform matrix. diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 292acd8b5d..d420e6ccdc 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -7,7 +7,7 @@ Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Plane"> @@ -65,13 +65,6 @@ Returns the shortest distance from the plane to the position [code]point[/code]. </description> </method> - <method name="get_any_point"> - <return type="Vector3"> - </return> - <description> - Returns a point on the plane. - </description> - </method> <method name="has_point"> <return type="bool"> </return> @@ -80,7 +73,7 @@ <argument index="1" name="epsilon" type="float" default="1e-05"> </argument> <description> - Returns [code]true[/code] if [code]point[/code] is inside the plane (by a very minimum [code]epsilon[/code] threshold). + Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold. </description> </method> <method name="intersect_3"> @@ -147,36 +140,38 @@ <argument index="0" name="point" type="Vector3"> </argument> <description> - Returns the orthogonal projection of point [code]p[/code] into a point in the plane. + Returns the orthogonal projection of [code]point[/code] into a point in the plane. </description> </method> </methods> <members> <member name="d" type="float" setter="" getter="" default="0.0"> - Distance from the origin to the plane, in the direction of [member normal]. + The distance from the origin to the plane, in the direction of [member normal]. This value is typically non-negative. + In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property. </member> <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - The normal of the plane. "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. + The normal of the plane, which must be normalized. + In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property. </member> <member name="x" type="float" setter="" getter="" default="0.0"> - The [member normal]'s X component. + The X component of the plane's [member normal] vector. </member> <member name="y" type="float" setter="" getter="" default="0.0"> - The [member normal]'s Y component. + The Y component of the plane's [member normal] vector. </member> <member name="z" type="float" setter="" getter="" default="0.0"> - The [member normal]'s Z component. + The Z component of the plane's [member normal] vector. </member> </members> <constants> <constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )"> - A plane that extends in the Y and Z axes. + A plane that extends in the Y and Z axes (normal vector points +X). </constant> <constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )"> - A plane that extends in the X and Z axes. + A plane that extends in the X and Z axes (normal vector points +Y). </constant> <constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )"> - A plane that extends in the X and Y axes. + A plane that extends in the X and Y axes (normal vector points +Z). </constant> </constants> </class> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index ce55c90c68..2af0f500a0 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -5,6 +5,8 @@ </brief_description> <description> [PopupMenu] is a [Control] that displays a list of options. They are popular in toolbars or context menus. + The size of a [PopupMenu] can be limited by using [member Window.max_size]. If the height of the list of items is larger than the maximum height of the [PopupMenu], a [ScrollContainer] within the popup will allow the user to scroll the contents. + If no maximum size is set, or if it is set to 0, the [PopupMenu] height will be limited by its parent rect. </description> <tutorials> </tutorials> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 77915bc538..9e7f26ed4f 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -13,7 +13,12 @@ <return type="Array"> </return> <description> - Returns mesh arrays used to constitute surface of [Mesh]. Mesh arrays can be used with [ArrayMesh] to create new surfaces. + Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example: + [codeblock] + var c := CylinderMesh.new() + var arr_mesh := ArrayMesh.new() + arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays()) + [/codeblock] </description> </method> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index af6105dab6..38d65f6338 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -208,7 +208,8 @@ Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon]. </member> <member name="application/config/name" type="String" setter="" getter="" default=""""> - The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. + The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. The window title will be set to match the project name automatically on startup. + [b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information. </member> <member name="application/config/project_settings_override" type="String" setter="" getter="" default=""""> Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. @@ -247,7 +248,7 @@ <member name="audio/default_bus_layout" type="String" setter="" getter="" default=""res://default_bus_layout.tres""> Default [AudioBusLayout] resource file to use in the project, unless overridden by the scene. </member> - <member name="audio/driver" type="String" setter="" getter="" default=""PulseAudio""> + <member name="audio/driver" type="String" setter="" getter=""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. </member> <member name="audio/enable_audio_input" type="bool" setter="" getter="" default="false"> @@ -259,6 +260,9 @@ <member name="audio/output_latency" type="int" setter="" getter="" default="15"> Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. </member> + <member name="audio/output_latency.web" type="int" setter="" getter="" default="50"> + Safer override for [member audio/output_latency] in the Web platform, to avoid audio issues especially on mobile devices. + </member> <member name="audio/video_delay_compensation_ms" type="int" setter="" getter="" default="0"> Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. </member> @@ -280,6 +284,10 @@ <member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter="" default="false"> If [code]true[/code], displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards. </member> + <member name="debug/gdscript/warnings/assert_always_false" type="bool" setter="" getter="" default="true"> + </member> + <member name="debug/gdscript/warnings/assert_always_true" type="bool" setter="" getter="" default="true"> + </member> <member name="debug/gdscript/warnings/constant_used_as_function" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a constant is used as a function. </member> @@ -292,15 +300,6 @@ <member name="debug/gdscript/warnings/exclude_addons" type="bool" setter="" getter="" default="true"> If [code]true[/code], scripts in the [code]res://addons[/code] folder will not generate warnings. </member> - <member name="debug/gdscript/warnings/function_conflicts_constant" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a function is declared with the same name as a constant. - </member> - <member name="debug/gdscript/warnings/function_conflicts_variable" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a function is declared with the same name as a variable. This will turn into an error in a future version when first-class functions become supported in GDScript. - </member> - <member name="debug/gdscript/warnings/function_may_yield" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a function assigned to a variable may yield and return a function state instead of a value. - </member> <member name="debug/gdscript/warnings/function_used_as_property" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when using a function as if it was a property. </member> @@ -316,12 +315,16 @@ <member name="debug/gdscript/warnings/property_used_as_function" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when using a property as if it was a function. </member> + <member name="debug/gdscript/warnings/redundant_await" type="bool" setter="" getter="" default="true"> + </member> <member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum. </member> <member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable). </member> + <member name="debug/gdscript/warnings/shadowed_variable_base_class" type="bool" setter="" getter="" default="true"> + </member> <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. </member> @@ -340,6 +343,8 @@ <member name="debug/gdscript/warnings/unreachable_code" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed). </member> + <member name="debug/gdscript/warnings/unreachable_pattern" type="bool" setter="" getter="" default="true"> + </member> <member name="debug/gdscript/warnings/unsafe_call_argument" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when using an expression whose type may not be compatible with the function parameter expected. </member> @@ -352,11 +357,11 @@ <member name="debug/gdscript/warnings/unsafe_property_access" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class. </member> - <member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a function parameter is unused. + <member name="debug/gdscript/warnings/unused_local_constant" type="bool" setter="" getter="" default="true"> </member> - <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables warnings when a member variable is unused. + <member name="debug/gdscript/warnings/unused_parameter" type="bool" setter="" getter="" default="true"> + </member> + <member name="debug/gdscript/warnings/unused_private_class_variable" type="bool" setter="" getter="" default="true"> </member> <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a signal is unused. @@ -364,9 +369,6 @@ <member name="debug/gdscript/warnings/unused_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a local variable is unused. </member> - <member name="debug/gdscript/warnings/variable_conflicts_function" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables warnings when a variable is declared with the same name as a function. This will turn into an error in a future version when first-class functions become supported in GDScript. - </member> <member name="debug/gdscript/warnings/void_assignment" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when assigning the result of a function that returns [code]void[/code] to a variable. </member> @@ -453,7 +455,7 @@ <member name="display/window/size/width" type="int" setter="" getter="" default="1024"> Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. </member> - <member name="display/window/tablet_driver" type="String" setter="" getter="" default=""""> + <member name="display/window/tablet_driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. </member> <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> @@ -472,8 +474,8 @@ <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0"> Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden. </member> - <member name="gui/common/swap_ok_cancel" type="bool" setter="" getter="" default="false"> - If [code]true[/code], swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions. + <member name="gui/common/swap_cancel_ok" type="bool" setter="" getter=""> + If [code]true[/code], swaps Cancel and OK buttons in dialogs on Windows and UWP to follow interface conventions. </member> <member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024"> </member> @@ -802,10 +804,12 @@ <member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false"> If [code]true[/code], logs all output to files. </member> - <member name="logging/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/log.txt""> + <member name="logging/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true"> + </member> + <member name="logging/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/godot.log""> Path to logs within the project. Using an [code]user://[/code] path is recommended. </member> - <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="10"> + <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="5"> Specifies the maximum amount of log files allowed (used for rotation). </member> <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="1024"> @@ -990,10 +994,6 @@ </member> <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> </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, 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> @@ -1042,6 +1042,9 @@ <member name="rendering/quality/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0"> Lower-end override for [member rendering/quality/glow/upscale_mode] on mobile devices, due to performance concerns or driver support. </member> + <member name="rendering/quality/glow/use_high_quality" type="bool" setter="" getter="" default="false"> + Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long. + </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> @@ -1081,13 +1084,13 @@ </member> <member name="rendering/quality/screen_filters/screen_space_aa" type="int" setter="" getter="" default="0"> Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. - Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter]. + Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter_enabled]. </member> - <member name="rendering/quality/screen_filters/screen_space_roughness_limiter" type="int" setter="" getter="" default="0"> - Enables the screen-space roughness limiter which increases material roughness in areas with a high normal frequency (i.e. when normals change a lot from pixel to pixel). This helps to reduce the amount of specular aliasing in a scene. Specular aliasing looks like random bright pixels that occur in reflections. + <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_amount" type="float" setter="" getter="" default="0.25"> </member> - <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_curve" type="float" setter="" getter="" default="1.0"> - Curves the amount of the roughness limited effect. A higher value limits the effect to very sharply curved surfaces, while a lower threshold extends the effect to smoother surfaces. + <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_enabled" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_limit" type="float" setter="" getter="" default="0.18"> </member> <member name="rendering/quality/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1"> Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. @@ -1155,9 +1158,23 @@ <member name="rendering/quality/texture_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/sdfgi/frames_to_converge" type="int" setter="" getter="" default="1"> + </member> + <member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2"> + </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/volumetric_fog/directional_shadow_shrink" type="int" setter="" getter="" default="512"> + </member> + <member name="rendering/volumetric_fog/positional_shadow_shrink" type="int" setter="" getter="" default="512"> + </member> + <member name="rendering/volumetric_fog/use_filter" type="int" setter="" getter="" default="0"> + </member> + <member name="rendering/volumetric_fog/volume_depth" type="int" setter="" getter="" default="128"> + </member> + <member name="rendering/volumetric_fog/volume_size" type="int" setter="" getter="" default="64"> + </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 Vulkan renderer. </member> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 327fa882e5..2218852dae 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -4,12 +4,12 @@ Quaternion. </brief_description> <description> - A unit quaternion used for representing 3D rotations. - It is similar to [Basis], which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. But due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. - Quaternions need to be (re)normalized. + A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. + It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quat only stores rotation. + Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> + <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> </tutorials> <methods> <method name="Quat"> @@ -18,7 +18,7 @@ <argument index="0" name="from" type="Basis"> </argument> <description> - Returns the rotation matrix corresponding to the given quaternion. + Constructs a quaternion from the given [Basis]. </description> </method> <method name="Quat"> @@ -27,7 +27,7 @@ <argument index="0" name="euler" type="Vector3"> </argument> <description> - Returns a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). + Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> <method name="Quat"> @@ -38,7 +38,7 @@ <argument index="1" name="angle" type="float"> </argument> <description> - Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. + Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. </description> </method> <method name="Quat"> @@ -53,7 +53,7 @@ <argument index="3" name="w" type="float"> </argument> <description> - Returns a quaternion defined by these values. + Constructs a quaternion defined by the given values. </description> </method> <method name="cubic_slerp"> @@ -68,7 +68,7 @@ <argument index="3" name="t" type="float"> </argument> <description> - Performs a cubic spherical-linear interpolation with another quaternion. + Performs a cubic spherical interpolation between quaternions [code]preA[/code], this vector, [code]b[/code], and [code]postB[/code], by the given amount [code]t[/code]. </description> </method> <method name="dot"> @@ -84,7 +84,7 @@ <return type="Vector3"> </return> <description> - Returns Euler angles (in the YXZ convention: first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). </description> </method> <method name="inverse"> @@ -148,7 +148,7 @@ <argument index="0" name="euler" type="Vector3"> </argument> <description> - Sets the quaternion to a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). + Sets the quaternion to a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> <method name="slerp"> @@ -159,7 +159,8 @@ <argument index="1" name="t" type="float"> </argument> <description> - Performs a spherical-linear interpolation with another quaternion. + Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code]. + [b]Note:[/b] Both quaternions must be normalized. </description> </method> <method name="slerpni"> @@ -170,7 +171,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Performs a spherical-linear interpolation with another quaterion without checking if the rotation path is not bigger than 90°. + Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees. </description> </method> <method name="xform"> @@ -179,27 +180,31 @@ <argument index="0" name="v" type="Vector3"> </argument> <description> - Transforms the vector [code]v[/code] by this quaternion. + Returns a vector transformed (multiplied) by this quaternion. </description> </method> </methods> <members> <member name="w" type="float" setter="" getter="" default="1.0"> - W component of the quaternion. + W component of the quaternion (real part). + Quaternion components should usually not be manipulated directly. </member> <member name="x" type="float" setter="" getter="" default="0.0"> - X component of the quaternion. + X component of the quaternion (imaginary [code]i[/code] axis part). + Quaternion components should usually not be manipulated directly. </member> <member name="y" type="float" setter="" getter="" default="0.0"> - Y component of the quaternion. + Y component of the quaternion (imaginary [code]j[/code] axis part). + Quaternion components should usually not be manipulated directly. </member> <member name="z" type="float" setter="" getter="" default="0.0"> - Z component of the quaternion. + Z component of the quaternion (imaginary [code]k[/code] axis part). + Quaternion components should usually not be manipulated directly. </member> </members> <constants> <constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )"> - The identity rotation. Equivalent to an identity matrix. If a vector is transformed by an identity quaternion, it will not change. + The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change. </constant> </constants> </class> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index 51f3f0334d..db4b9a0383 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -11,7 +11,7 @@ RayCast2D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="add_exception"> @@ -44,7 +44,7 @@ </return> <description> Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. - [b]Note:[/b] [code]enabled == true[/code] is not required for this to work. + [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work. </description> </method> <method name="get_collider" qualifiers="const"> @@ -133,9 +133,9 @@ If [code]true[/code], collision with [PhysicsBody2D]s will be reported. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. + The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="false"> + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> If [code]true[/code], collisions will be reported. </member> <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true"> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 08c6d6f40c..1e61664a7d 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -11,7 +11,7 @@ RayCast3D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="add_exception"> @@ -45,7 +45,7 @@ <description> Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. - [b]Note:[/b] [code]enabled == true[/code] is not required for this to work. + [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work. </description> </method> <method name="get_collider" qualifiers="const"> @@ -136,9 +136,9 @@ If [code]true[/code], collision with [PhysicsBody3D]s will be reported. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. + The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="false"> + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> If [code]true[/code], collisions will be reported. </member> <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true"> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index dbf461cdf1..fe05f14fa1 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -8,7 +8,7 @@ It uses floating point coordinates. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Rect2"> @@ -171,13 +171,14 @@ </methods> <members> <member name="end" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> - Ending corner. + Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size. </member> <member name="position" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> - Position (starting corner). + Beginning corner. Typically has values lower than [member end]. </member> <member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> - Size from position to end. + Size from [member position] to [member end]. Typically all components are positive. + If the size is negative, you can use [method abs] to fix it. </member> </members> <constants> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index f3a7ba0476..2fdfe7c24b 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -8,7 +8,7 @@ It uses integer coordinates. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Rect2i"> @@ -160,13 +160,14 @@ </methods> <members> <member name="end" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> - Ending corner. + Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size. </member> <member name="position" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> - Position (starting corner). + Beginning corner. Typically has values lower than [member end]. </member> <member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> - Size from position to end. + Size from [member position] to [member end]. Typically all components are positive. + If the size is negative, you can use [method abs] to fix it. </member> </members> <constants> diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml index 860a47798c..9c3d1d5d9d 100644 --- a/doc/classes/Reference.xml +++ b/doc/classes/Reference.xml @@ -5,10 +5,11 @@ </brief_description> <description> Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class. - References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free]. + Unlike [Object]s, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free]. In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. </description> <tutorials> + <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link> </tutorials> <methods> <method name="init_ref"> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 84f87c3e71..5458b496da 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -8,11 +8,17 @@ 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> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link> + <link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link> </tutorials> <methods> </methods> <members> + <member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color( 0, 0, 0, 1 )"> + </member> + <member name="ambient_color_energy" type="float" setter="set_ambient_color_energy" getter="get_ambient_color_energy" default="1.0"> + </member> + <member name="ambient_mode" type="int" setter="set_ambient_mode" getter="get_ambient_mode" enum="ReflectionProbe.AmbientMode" default="1"> + </member> <member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled" default="false"> If [code]true[/code], enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. </member> @@ -28,17 +34,8 @@ <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0"> Defines the reflection intensity. Intensity modulates the strength of the reflection. </member> - <member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient" default="Color( 0, 0, 0, 1 )"> - Sets the ambient light color to be used when this probe is set to [member interior_enable]. - </member> - <member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution" default="0.0"> - Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [member interior_enable]. Useful so that ambient light matches the color of the room. - </member> - <member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy" default="1.0"> - Sets the energy multiplier for this reflection probe's ambient light contribution when set to [member interior_enable]. - </member> - <member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false"> - If [code]true[/code], reflections will ignore sky contribution. Ambient lighting is then controlled by the [code]interior_ambient_*[/code] properties. + <member name="interior" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false"> + If [code]true[/code], reflections will ignore sky contribution. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> Sets the max distance away from the probe an object can be before it is culled. @@ -57,5 +54,11 @@ <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. </constant> + <constant name="AMBIENT_DISABLED" value="0" enum="AmbientMode"> + </constant> + <constant name="AMBIENT_ENVIRONMENT" value="1" enum="AmbientMode"> + </constant> + <constant name="AMBIENT_COLOR" value="2" enum="AmbientMode"> + </constant> </constants> </class> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 8a44d213e8..7e5df9c40d 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -152,6 +152,8 @@ </argument> <argument index="8" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> </argument> + <argument index="9" name="storage_textures" type="Array" default="[ ]"> + </argument> <description> </description> </method> @@ -188,6 +190,8 @@ </argument> <argument index="9" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )"> </argument> + <argument index="10" name="storage_textures" type="RID[]" default="[ ]"> + </argument> <description> </description> </method> @@ -293,6 +297,16 @@ <description> </description> </method> + <method name="framebuffer_create_empty"> + <return type="RID"> + </return> + <argument index="0" name="size" type="Vector2i"> + </argument> + <argument index="1" name="validate_with_format" type="int" default="-1"> + </argument> + <description> + </description> + </method> <method name="framebuffer_format_create"> <return type="int"> </return> @@ -301,6 +315,14 @@ <description> </description> </method> + <method name="framebuffer_format_create_empty"> + <return type="int"> + </return> + <argument index="0" name="size" type="Vector2i"> + </argument> + <description> + </description> + </method> <method name="framebuffer_format_get_texture_samples"> <return type="int" enum="RenderingDevice.TextureSamples"> </return> @@ -496,6 +518,8 @@ </argument> <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )"> </argument> + <argument index="2" name="usage" type="int" default="0"> + </argument> <description> </description> </method> @@ -1285,6 +1309,8 @@ </constant> <constant name="INDEX_BUFFER_FORMAT_UINT32" value="1" enum="IndexBufferFormat"> </constant> + <constant name="STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT" value="1" enum="StorageBufferUsage"> + </constant> <constant name="UNIFORM_TYPE_SAMPLER" value="0" enum="UniformType"> </constant> <constant name="UNIFORM_TYPE_SAMPLER_WITH_TEXTURE" value="1" enum="UniformType"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 8832c0ec4d..9c8c964967 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -15,7 +15,7 @@ In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> + <link title="Optimization using Servers">https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> </tutorials> <methods> <method name="black_bars_set_images"> @@ -690,52 +690,19 @@ </argument> <argument index="1" name="enable" type="bool"> </argument> - <argument index="2" name="color" type="Color"> - </argument> - <argument index="3" name="sun_color" type="Color"> - </argument> - <argument index="4" name="sun_amount" type="float"> - </argument> - <description> - Sets the variables to be used with the scene fog. See [Environment] for more details. - </description> - </method> - <method name="environment_set_fog_depth"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="depth_begin" type="float"> - </argument> - <argument index="3" name="depth_end" type="float"> - </argument> - <argument index="4" name="depth_curve" type="float"> - </argument> - <argument index="5" name="transmit" type="bool"> - </argument> - <argument index="6" name="transmit_curve" type="float"> + <argument index="2" name="light_color" type="Color"> </argument> - <description> - Sets the variables to be used with the fog depth effect. See [Environment] for more details. - </description> - </method> - <method name="environment_set_fog_height"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> + <argument index="3" name="light_energy" type="float"> </argument> - <argument index="1" name="enable" type="bool"> + <argument index="4" name="sun_scatter" type="float"> </argument> - <argument index="2" name="min_height" type="float"> + <argument index="5" name="density" type="float"> </argument> - <argument index="3" name="max_height" type="float"> + <argument index="6" name="height" type="float"> </argument> - <argument index="4" name="height_curve" type="float"> + <argument index="7" name="height_density" type="float"> </argument> <description> - Sets the variables to be used with the fog height effect. See [Environment] for more details. </description> </method> <method name="environment_set_glow"> @@ -1470,6 +1437,16 @@ Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode]. </description> </method> + <method name="light_set_bake_mode"> + <return type="void"> + </return> + <argument index="0" name="light" type="RID"> + </argument> + <argument index="1" name="bake_mode" type="int" enum="RenderingServer.LightBakeMode"> + </argument> + <description> + </description> + </method> <method name="light_set_color"> <return type="void"> </return> @@ -1560,17 +1537,6 @@ Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color]. </description> </method> - <method name="light_set_use_gi"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <description> - Sets whether GI probes capture light information from this light. - </description> - </method> <method name="make_sphere_mesh"> <return type="RID"> </return> @@ -2292,40 +2258,37 @@ To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. </description> </method> - <method name="reflection_probe_set_as_interior"> + <method name="reflection_probe_set_ambient_color"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="enable" type="bool"> + <argument index="1" name="color" type="Color"> </argument> <description> - If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. </description> </method> - <method name="reflection_probe_set_cull_mask"> + <method name="reflection_probe_set_ambient_energy"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="layers" type="int"> + <argument index="1" name="energy" type="float"> </argument> <description> - Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. </description> </method> - <method name="reflection_probe_set_enable_box_projection"> + <method name="reflection_probe_set_ambient_mode"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="enable" type="bool"> + <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeAmbientMode"> </argument> <description> - If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. </description> </method> - <method name="reflection_probe_set_enable_shadows"> + <method name="reflection_probe_set_as_interior"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> @@ -2333,62 +2296,62 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior]. </description> </method> - <method name="reflection_probe_set_extents"> + <method name="reflection_probe_set_cull_mask"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="extents" type="Vector3"> + <argument index="1" name="layers" type="int"> </argument> <description> - Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. </description> </method> - <method name="reflection_probe_set_intensity"> + <method name="reflection_probe_set_enable_box_projection"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="intensity" type="float"> + <argument index="1" name="enable" type="bool"> </argument> <description> - Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. </description> </method> - <method name="reflection_probe_set_interior_ambient"> + <method name="reflection_probe_set_enable_shadows"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="color" type="Color"> + <argument index="1" name="enable" type="bool"> </argument> <description> - Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. </description> </method> - <method name="reflection_probe_set_interior_ambient_energy"> + <method name="reflection_probe_set_extents"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="energy" type="float"> + <argument index="1" name="extents" type="Vector3"> </argument> <description> - Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. </description> </method> - <method name="reflection_probe_set_interior_ambient_probe_contribution"> + <method name="reflection_probe_set_intensity"> <return type="void"> </return> <argument index="0" name="probe" type="RID"> </argument> - <argument index="1" name="contrib" type="float"> + <argument index="1" name="intensity" type="float"> </argument> <description> - Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. </description> </method> <method name="reflection_probe_set_max_distance"> @@ -3256,11 +3219,17 @@ <constant name="LIGHT_PARAM_SHADOW_BLUR" value="16" enum="LightParam"> Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. </constant> - <constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="17" enum="LightParam"> + <constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="18" enum="LightParam"> </constant> - <constant name="LIGHT_PARAM_MAX" value="18" enum="LightParam"> + <constant name="LIGHT_PARAM_MAX" value="19" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> + <constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode"> + </constant> + <constant name="LIGHT_BAKE_DYNAMIC" value="1" enum="LightBakeMode"> + </constant> + <constant name="LIGHT_BAKE_STATIC" value="2" enum="LightBakeMode"> + </constant> <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode"> Use a dual paraboloid shadow map for omni lights. </constant> @@ -3288,6 +3257,12 @@ <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="REFLECTION_PROBE_AMBIENT_DISABLED" value="0" enum="ReflectionProbeAmbientMode"> + </constant> + <constant name="REFLECTION_PROBE_AMBIENT_ENVIRONMENT" value="1" enum="ReflectionProbeAmbientMode"> + </constant> + <constant name="REFLECTION_PROBE_AMBIENT_COLOR" value="2" enum="ReflectionProbeAmbientMode"> + </constant> <constant name="DECAL_TEXTURE_ALBEDO" value="0" enum="DecalTexture"> </constant> <constant name="DECAL_TEXTURE_NORMAL" value="1" enum="DecalTexture"> @@ -3412,18 +3387,21 @@ <constant name="VIEWPORT_DEBUG_DRAW_SSAO" value="12" enum="ViewportDebugDraw"> Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment]. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_ROUGHNESS_LIMITER" value="13" enum="ViewportDebugDraw"> - Draws the roughness limiter post process over the Viewport so you can see where it has an effect. It must be enabled in [member ProjectSettings.rendering/quality/screen_filters/screen_space_roughness_limiter] to work. - </constant> - <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="14" enum="ViewportDebugDraw"> + <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="13" enum="ViewportDebugDraw"> Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="15" enum="ViewportDebugDraw"> + <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="14" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="15" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="16" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw"> </constant> - <constant name="SKY_MODE_QUALITY" value="0" enum="SkyMode"> + <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples]. </constant> - <constant name="SKY_MODE_REALTIME" value="1" enum="SkyMode"> + <constant name="SKY_MODE_REALTIME" value="3" enum="SkyMode"> 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 256x256 cubemaps, so [member Sky.radiance_size] must be set to [constant Sky.RADIANCE_SIZE_256]. </constant> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 5bc34772c8..e79a2e0ea9 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -4,10 +4,11 @@ Base class for all resources. </brief_description> <description> - Resource is the base class for all Godot-specific resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. + Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Unlike [Object]s, they are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html</link> + <link title="Resources">https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html</link> + <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link> </tutorials> <methods> <method name="_setup_local_to_scene" qualifiers="virtual"> @@ -23,7 +24,8 @@ <argument index="0" name="subresources" type="bool" default="false"> </argument> <description> - Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing [code]true[/code] to the [code]subresources[/code] argument. + Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. + [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. </description> </method> <method name="get_local_scene" qualifiers="const"> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 34431c5153..726b26fbc7 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -13,8 +13,8 @@ [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> - <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> + <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> <method name="_process_custom_fx" qualifiers="virtual"> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index c44df72878..dc3c7c7dc0 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -6,9 +6,10 @@ <description> Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. [b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods. + [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> </tutorials> <methods> <method name="add_image"> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index a3fd2e81fd..f3d43b193e 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -9,6 +9,7 @@ [b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator]. + The center of mass is always located at the node's origin without taking into account the [CollisionShape2D] centroid offsets. </description> <tutorials> </tutorials> @@ -34,9 +35,9 @@ <method name="add_force"> <return type="void"> </return> - <argument index="0" name="offset" type="Vector2"> + <argument index="0" name="force" type="Vector2"> </argument> - <argument index="1" name="force" type="Vector2"> + <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. @@ -54,7 +55,7 @@ <method name="apply_central_impulse"> <return type="void"> </return> - <argument index="0" name="impulse" type="Vector2"> + <argument index="0" name="impulse" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Applies a directional impulse without affecting rotation. @@ -63,9 +64,9 @@ <method name="apply_impulse"> <return type="void"> </return> - <argument index="0" name="offset" type="Vector2"> + <argument index="0" name="impulse" type="Vector2"> </argument> - <argument index="1" name="impulse" type="Vector2"> + <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. @@ -84,7 +85,7 @@ <return type="Node2D[]"> </return> <description> - Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. + Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> @@ -128,12 +129,14 @@ </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. + [b]Note:[/b] A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> - The maximum number of contacts to report. + The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. + [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). </member> <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0"> Continuous collision detection mode. @@ -176,14 +179,14 @@ <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body enters into contact with this one. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code]. + Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. </description> </signal> <signal name="body_exited"> <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body exits contact with this one. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code]. + Emitted when a body exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. </description> </signal> <signal name="body_shape_entered"> @@ -196,7 +199,7 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code]. + Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. </description> </signal> <signal name="body_shape_exited"> @@ -209,7 +212,7 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. [member contact_monitor] must be [code]true[/code] and [member contacts_reported] greater than [code]0[/code]. + Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. </description> </signal> <signal name="sleeping_state_changed"> diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index 063cc3ca59..e9ebf33aa7 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -8,9 +8,10 @@ A RigidBody3D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. [b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator]. + With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> <method name="_integrate_forces" qualifiers="virtual"> @@ -37,7 +38,7 @@ </return> <argument index="0" name="force" type="Vector3"> </argument> - <argument index="1" name="position" type="Vector3"> + <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Adds a constant directional force (i.e. acceleration). @@ -66,9 +67,9 @@ <method name="apply_impulse"> <return type="void"> </return> - <argument index="0" name="position" type="Vector3"> + <argument index="0" name="impulse" type="Vector3"> </argument> - <argument index="1" name="impulse" type="Vector3"> + <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <description> Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. @@ -96,10 +97,17 @@ <return type="Array"> </return> <description> - Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. + Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> + <method name="get_inverse_inertia_tensor"> + <return type="Basis"> + </return> + <description> + Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. + </description> + </method> <method name="set_axis_lock"> <return type="void"> </return> @@ -148,12 +156,14 @@ </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. + [b]Note:[/b] A RigidBody3D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> - If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. + If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported]. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> - The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. + [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). </member> <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" default="false"> If [code]true[/code], continuous collision detection is used. @@ -193,14 +203,14 @@ <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. </description> </signal> <signal name="body_exited"> <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. </description> </signal> <signal name="body_shape_entered"> @@ -213,7 +223,7 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with. </description> </signal> @@ -227,7 +237,7 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with. </description> </signal> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 00ca5c6e9f..4ea457047f 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -9,8 +9,8 @@ [SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scene_tree.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html</link> + <link title="SceneTree">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scene_tree.html</link> + <link title="Multiple resolutions">https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html</link> </tutorials> <methods> <method name="call_group" qualifiers="vararg"> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 0d94453e52..56272760bd 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -8,7 +8,7 @@ The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting.html</link> + <link title="Scripting">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting.html</link> </tutorials> <methods> <method name="can_instance" qualifiers="const"> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index f0ad781f77..20b0750431 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -33,6 +33,12 @@ <description> </description> </method> + <method name="get_current_editor" qualifiers="const"> + <return type="ScriptEditorBase"> + </return> + <description> + </description> + </method> <method name="get_current_script"> <return type="Script"> </return> @@ -50,6 +56,12 @@ <description> </description> </method> + <method name="get_open_script_editors" qualifiers="const"> + <return type="Array"> + </return> + <description> + </description> + </method> <method name="get_open_scripts" qualifiers="const"> <return type="Array"> </return> @@ -76,6 +88,22 @@ <description> </description> </method> + <method name="register_syntax_highlighter"> + <return type="void"> + </return> + <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter"> + </argument> + <description> + </description> + </method> + <method name="unregister_syntax_highlighter"> + <return type="void"> + </return> + <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="editor_script_changed"> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml new file mode 100644 index 0000000000..9968ae06c3 --- /dev/null +++ b/doc/classes/ScriptEditorBase.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_syntax_highlighter" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="highlighter" type="Object"> + </argument> + <description> + </description> + </method> + </methods> + <signals> + <signal name="edited_script_changed"> + <description> + </description> + </signal> + <signal name="go_to_help"> + <argument index="0" name="what" type="String"> + </argument> + <description> + </description> + </signal> + <signal name="name_changed"> + <description> + </description> + </signal> + <signal name="replace_in_files_requested"> + <argument index="0" name="text" type="String"> + </argument> + <description> + </description> + </signal> + <signal name="request_help"> + <argument index="0" name="topic" type="String"> + </argument> + <description> + </description> + </signal> + <signal name="request_open_script_at_line"> + <argument index="0" name="script" type="Object"> + </argument> + <argument index="1" name="line" type="int"> + </argument> + <description> + </description> + </signal> + <signal name="request_save_history"> + <description> + </description> + </signal> + <signal name="search_in_files_requested"> + <argument index="0" name="text" type="String"> + </argument> + <description> + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index c9745acfcd..f311e1c72f 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -7,7 +7,7 @@ A synchronization semaphore which can be used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> + <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> </tutorials> <methods> <method name="post"> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 109c500a63..a717eba438 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -7,8 +7,8 @@ This class allows you to define a custom shader program that can be used by a [ShaderMaterial]. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/shading/your_first_shader/what_are_shaders.html</link> + <link title="Shading tutorial index">https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> + <link title="What are shaders?">https://docs.godotengine.org/en/latest/tutorials/shading/your_first_shader/what_are_shaders.html</link> </tutorials> <methods> <method name="get_default_texture_param" qualifiers="const"> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 7e0e1ce831..b1748703ff 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -7,7 +7,7 @@ A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> + <link title="Shading tutorial index">https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> </tutorials> <methods> <method name="get_shader_param" qualifiers="const"> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 5f41d05816..65a37314f6 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -7,7 +7,7 @@ Base class for all 2D shapes. All 2D shape types inherit from this. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> <method name="collide"> diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml index 1af6550dc5..2d8bb5d051 100644 --- a/doc/classes/Shape3D.xml +++ b/doc/classes/Shape3D.xml @@ -7,7 +7,7 @@ Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody3D] or [Area3D] objects. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index e1b7d60763..0ddbac9ba4 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -7,7 +7,7 @@ Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> + <link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> </tutorials> <methods> <method name="get_bone"> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 183fd5396f..7ec8fe12fb 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -239,7 +239,7 @@ </argument> <description> Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> @@ -263,7 +263,7 @@ <argument index="1" name="pose" type="Transform"> </argument> <description> - Returns the pose transform for bone [code]bone_idx[/code]. + Sets the pose transform for bone [code]bone_idx[/code]. [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml index 78c75d9c2b..a77515b3e6 100644 --- a/doc/classes/Sky.xml +++ b/doc/classes/Sky.xml @@ -48,11 +48,17 @@ <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"> + <constant name="PROCESS_MODE_AUTOMATIC" value="0" enum="ProcessMode"> + Automatically selects the appropriate process mode based on your sky shader. If your shader uses [code]TIME[/code] or [code]POSITION[/code], this will use [constant PROCESS_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant PROCESS_MODE_INCREMENTAL]. Otherwise, this defaults to [constant PROCESS_MODE_QUALITY]. + </constant> + <constant name="PROCESS_MODE_QUALITY" value="1" 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. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples]. </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. + <constant name="PROCESS_MODE_INCREMENTAL" value="2" enum="ProcessMode"> + Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/quality/reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly. + </constant> + <constant name="PROCESS_MODE_REALTIME" value="3" enum="ProcessMode"> + Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/quality/reflections/fast_filter_high_quality]. [b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_256]. </constant> </constants> diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index 68776df603..f18b2ce39f 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -5,6 +5,7 @@ </brief_description> <description> Base class for GUI sliders. + [b]Note:[/b] The [signal Range.changed] and [signal Range.value_changed] signals are part of the [Range] class which this class inherits from. </description> <tutorials> </tutorials> diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index 24d6609900..d3ab955570 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -7,7 +7,7 @@ A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link> + <link title="SoftBody">https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link> </tutorials> <methods> <method name="add_collision_exception_with"> @@ -82,10 +82,10 @@ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this SoftBody3D is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this SoftBody3D scans for collisions. + The physics layers this SoftBody3D scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index 423633e583..fc849baa8d 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -7,7 +7,7 @@ A Spotlight is a type of [Light3D] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light3D]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> + <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml index 8305494c2b..3ffdbebae8 100644 --- a/doc/classes/SpringArm3D.xml +++ b/doc/classes/SpringArm3D.xml @@ -32,7 +32,7 @@ <return type="float"> </return> <description> - Returns the proportion between the current arm length (after checking for collisions) and the [member spring_length]. Ranges from 0 to 1. + Returns the spring arm's current length. </description> </method> <method name="remove_excluded_object"> @@ -47,7 +47,7 @@ </methods> <members> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The layers against which the collision check shall be done. + The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.01"> When the collision check is made, a candidate length for the SpringArm3D is given. diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index 92f561d7b5..f218631038 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -44,10 +44,10 @@ If [code]true[/code], texture is flipped vertically. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> - Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. + Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )"> - Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] must be greater than 1. + Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index f59d5130c9..934471c445 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -13,10 +13,10 @@ </methods> <members> <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> - Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. + Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )"> - Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] must be greater than 1. + Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 6e1e1688f4..516ae25e92 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -5,6 +5,7 @@ </brief_description> <description> Sprite frame library for [AnimatedSprite2D]. Contains frames and animation data for playback. + [b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps. </description> <tutorials> </tutorials> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index 69e8f67a5e..6a06c0b3f4 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -7,7 +7,7 @@ SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> + <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> </tutorials> <methods> <method name="accept_stream"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 6d9def7ccb..e134ae03e0 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -4,10 +4,10 @@ Built-in string class. </brief_description> <description> - This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources. + This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference-counted and use a copy-on-write approach, so passing them around is cheap in resources. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html</link> + <link title="GDScript format strings">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html</link> </tutorials> <methods> <method name="String"> @@ -325,14 +325,15 @@ <return type="String"> </return> <description> - Returns a copy of the string with escaped characters replaced by their meanings according to the C language standard. + Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\?[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code]. + [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence. </description> </method> <method name="capitalize"> <return type="String"> </return> <description> - Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camelcase Mixed With Underscores[/code]. + Changes the case of some letters. Replaces underscores with spaces, adds spaces before in-word uppercase characters, converts all letters to lowercase, then capitalizes the first letter and every letter following a space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camel Case Mixed With Underscores[/code]. </description> </method> <method name="casecmp_to"> @@ -412,7 +413,7 @@ <argument index="1" name="from" type="int" default="0"> </argument> <description> - Finds the first occurrence of a substring. Returns the starting position of the substring or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + Returns the index of the [b]first[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string. [b]Note:[/b] If you just want to know whether a string contains a substring, use the [code]in[/code] operator as follows: [codeblock] # Will evaluate to `false`. @@ -421,15 +422,6 @@ [/codeblock] </description> </method> - <method name="find_last"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <description> - Finds the last occurrence of a substring. Returns the starting position of the substring or [code]-1[/code] if not found. - </description> - </method> <method name="findn"> <return type="int"> </return> @@ -438,7 +430,7 @@ <argument index="1" name="from" type="int" default="0"> </argument> <description> - Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + Returns the index of the [b]first[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string. </description> </method> <method name="format"> @@ -801,7 +793,7 @@ <argument index="1" name="from" type="int" default="-1"> </argument> <description> - Performs a case-sensitive search for a substring, but starts from the end of the string instead of the beginning. + Returns the index of the [b]last[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string. </description> </method> <method name="rfindn"> @@ -812,7 +804,7 @@ <argument index="1" name="from" type="int" default="-1"> </argument> <description> - Performs a case-insensitive search for a substring, but starts from the end of the string instead of the beginning. + Returns the index of the [b]last[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string. </description> </method> <method name="right"> @@ -903,8 +895,8 @@ <argument index="2" name="maxsplit" type="int" default="0"> </argument> <description> - Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. - If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of 0 means that all items are split. + Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length. + If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split. Example: [codeblock] var some_string = "One,Two,Three,Four" @@ -913,6 +905,7 @@ print(some_array[0]) # Prints "One" print(some_array[1]) # Prints "Two,Three,Four" [/codeblock] + If you need to split strings with more complex rules, use the [RegEx] class instead. </description> </method> <method name="split_floats"> diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml new file mode 100644 index 0000000000..2d6e3de02a --- /dev/null +++ b/doc/classes/SyntaxHighlighter.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SyntaxHighlighter" inherits="Resource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="_get_line_syntax_highlighting" qualifiers="virtual"> + <return type="Dictionary"> + </return> + <argument index="0" name="p_line" type="int"> + </argument> + <description> + </description> + </method> + <method name="_update_cache" qualifiers="virtual"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="clear_highlighting_cache"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_line_syntax_highlighting"> + <return type="Dictionary"> + </return> + <argument index="0" name="p_line" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_text_edit"> + <return type="TextEdit"> + </return> + <description> + </description> + </method> + <method name="update_cache"> + <return type="void"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 0c6615c53b..ccc99dc8e3 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -9,32 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="add_color_region"> - <return type="void"> - </return> - <argument index="0" name="begin_key" type="String"> - </argument> - <argument index="1" name="end_key" type="String"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> - <argument index="3" name="line_only" type="bool" default="false"> - </argument> - <description> - Adds color region (given the delimiters) and its colors. - </description> - </method> - <method name="add_keyword_color"> - <return type="void"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <description> - Adds a [code]keyword[/code] and its [Color]. - </description> - </method> <method name="can_fold" qualifiers="const"> <return type="bool"> </return> @@ -48,13 +22,7 @@ <return type="void"> </return> <description> - </description> - </method> - <method name="clear_colors"> - <return type="void"> - </return> - <description> - Clears all custom syntax coloring information previously added with [method add_color_region] or [method add_keyword_color]. + Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. </description> </method> <method name="clear_undo_history"> @@ -151,15 +119,6 @@ Returns an array containing the line number of each breakpoint. </description> </method> - <method name="get_keyword_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> - <description> - Returns the [Color] of the specified [code]keyword[/code]. - </description> - </method> <method name="get_line" qualifiers="const"> <return type="String"> </return> @@ -225,15 +184,6 @@ Returns a [String] text with the word under the mouse cursor location. </description> </method> - <method name="has_keyword_color" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> - <description> - Returns whether the specified [code]keyword[/code] has a color set to it or not. - </description> - </method> <method name="insert_text_at_cursor"> <return type="void"> </return> @@ -334,6 +284,7 @@ </argument> <description> Perform selection, from line/column to line/column. + If [member selecting_enabled] is [code]false[/code], no selection will occur. </description> </method> <method name="select_all"> @@ -341,6 +292,7 @@ </return> <description> Select all the text. + If [member selecting_enabled] is [code]false[/code], no selection will occur. </description> </method> <method name="set_line"> @@ -439,8 +391,10 @@ If [code]true[/code], the line containing the cursor is highlighted. </member> <member name="minimap_draw" type="bool" setter="draw_minimap" getter="is_drawing_minimap" default="false"> + If [code]true[/code], a minimap is shown, providing an outline of your source code. </member> <member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80"> + The width, in pixels, of the minimap. </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" /> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> @@ -450,14 +404,17 @@ If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> - The current horizontal scroll value. + If there is a horizontal scrollbar this determines the current horizontal scroll value in pixels. </member> <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> - The current vertical scroll value. + If there is a vertical scrollbar this determines the current vertical scroll value in line numbers, starting at 0 for the top line. </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> + If [code]true[/code], text can be selected. + If [code]false[/code], text can not be selected by the user or by the [method select] or [method select_all] methods. </member> <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> + If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled. </member> <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled" default="false"> If [code]true[/code], line numbers are displayed to the left of the text. @@ -465,8 +422,7 @@ <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false"> If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling. </member> - <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled" default="false"> - If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible. + <member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter"> </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [TextEdit]. @@ -474,6 +430,9 @@ <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0"> Vertical scroll sensitivity. </member> + <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true"> + If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. + </member> <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled" default="false"> If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible. </member> @@ -500,6 +459,12 @@ Emitted when the info icon is clicked. </description> </signal> + <signal name="line_edited_from"> + <argument index="0" name="line" type="int"> + </argument> + <description> + </description> + </signal> <signal name="request_completion"> <description> </description> @@ -619,8 +584,6 @@ <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> - <theme_item name="function_color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )"> - </theme_item> <theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )"> Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled. </theme_item> @@ -630,13 +593,9 @@ <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> Sets the [Color] of marked text. </theme_item> - <theme_item name="member_variable_color" type="Color" default="Color( 0.9, 0.31, 0.35, 1 )"> - </theme_item> <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> - <theme_item name="number_color" type="Color" default="Color( 0.92, 0.58, 0.2, 1 )"> - </theme_item> <theme_item name="read_only" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. </theme_item> @@ -647,8 +606,6 @@ </theme_item> <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="Texture2D"> Sets a custom [Texture2D] for tab text characters. </theme_item> diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index ffe806cef7..f283efdc3d 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -96,7 +96,7 @@ <return type="Image"> </return> <description> - Returns an [Image] with the data from this [Texture2D]. [Image]s can be accessed and manipulated directly. + Returns an [Image] that is a copy of data from this [Texture2D]. [Image]s can be accessed and manipulated directly. </description> </method> <method name="get_height" qualifiers="const"> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 0e2872755e..a5172586fe 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -15,6 +15,12 @@ <member name="expand" type="bool" setter="set_expand" getter="get_expand" default="false"> If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. </member> + <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false"> + If [code]true[/code], texture is flipped horizontally. + </member> + <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> + If [code]true[/code], texture is flipped vertically. + </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0"> Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [enum StretchMode] constants. See the constants to learn more. </member> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 70a4eda867..2824159f0e 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -8,7 +8,7 @@ Theme resources can alternatively be loaded by writing them in a [code].theme[/code] file, see the documentation for more information. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/gui/gui_skinning.html</link> + <link title="GUI skinning">https://docs.godotengine.org/en/latest/tutorials/gui/gui_skinning.html</link> </tutorials> <methods> <method name="clear"> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 4d6e89fa6f..46377ecf20 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -5,16 +5,18 @@ </brief_description> <description> A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex] or [Semaphore] is advised if working with shared objects. + [b]Note:[/b] Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> + <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> + <link title="Thread-safe APIs">https://docs.godotengine.org/en/latest/tutorials/threads/thread_safe_apis.html</link> </tutorials> <methods> <method name="get_id" qualifiers="const"> <return type="String"> </return> <description> - Returns the current [Thread]'s ID, uniquely identifying it among all threads. + Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] is not running this returns an empty string. </description> </method> <method name="is_active" qualifiers="const"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 9df2b656f4..2780545f55 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -7,7 +7,7 @@ Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> + <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> </tutorials> <methods> <method name="clear"> @@ -166,7 +166,7 @@ If you need these to be immediately updated, you can call [method update_dirty_quadrants]. Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed: [codeblock] - func set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord) + func set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2()) # Write your custom logic here. # To call the default method: .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord) @@ -287,10 +287,10 @@ Friction value for static body collisions (see [code]collision_use_kinematic[/code]). </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The collision layer(s) for all colliders in the TileMap. + The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The collision mask(s) for all colliders in the TileMap. + The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false"> If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 9a78e45d46..4991a1e58b 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -478,7 +478,17 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns an array of the tile's shapes. + Returns an array of dictionaries describing the tile's shapes. + [b]Dictionary structure in the array returned by this method:[/b] + [codeblock] + { + "autotile_coord": Vector2, + "one_way": bool, + "one_way_margin": int, + "shape": CollisionShape2D, + "shape_transform": Transform2D, + } + [/codeblock] </description> </method> <method name="tile_get_texture" qualifiers="const"> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index c1e5987a06..5d684755fa 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -5,6 +5,7 @@ </brief_description> <description> Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. + [b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer]. </description> <tutorials> </tutorials> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index c7f886b3f2..355804f2a3 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TouchScreenButton" inherits="Node2D" version="4.0"> <brief_description> - Button for touch screen devices. + Button for touch screen devices for gameplay use. </brief_description> <description> - Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices. + TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move. + This node inherits from [Node2D]. Unlike with [Control] nodes, you cannot set anchors on it. If you want to create menus or user interfaces, you may want to use [Button] nodes instead. To make button nodes react to touch events, you can enable the Emulate Mouse option in the Project Settings. + You can configure TouchScreenButton to be visible only on touch devices, helping you develop your game both for desktop and mobile devices. </description> <tutorials> </tutorials> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 4175f01eb4..09dfe56f8f 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -4,11 +4,13 @@ 3D transformation (3×4 matrix). </brief_description> <description> - Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [member basis] and an [member origin]. It is similar to a 3×4 matrix. + 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of a [member basis] (first 3 columns) and a [Vector3] for the [member origin] (last column). + For more information, read the "Matrices and transforms" documentation article. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link> + <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> </tutorials> <methods> <method name="Transform"> @@ -23,7 +25,7 @@ <argument index="3" name="origin" type="Vector3"> </argument> <description> - Constructs the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled). + Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> <method name="Transform"> @@ -34,7 +36,7 @@ <argument index="1" name="origin" type="Vector3"> </argument> <description> - Constructs the Transform from a [Basis] and [Vector3]. + Constructs a Transform from a [Basis] and [Vector3]. </description> </method> <method name="Transform"> @@ -43,7 +45,7 @@ <argument index="0" name="from" type="Transform2D"> </argument> <description> - Constructs the Transform from a [Transform2D]. + Constructs a Transform from a [Transform2D]. </description> </method> <method name="Transform"> @@ -52,7 +54,7 @@ <argument index="0" name="from" type="Quat"> </argument> <description> - Constructs the Transform from a [Quat]. The origin will be Vector3(0, 0, 0). + Constructs a Transform from a [Quat]. The origin will be [code]Vector3(0, 0, 0)[/code]. </description> </method> <method name="Transform"> @@ -79,7 +81,7 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Interpolates the transform to other Transform by weight amount (0-1). + Interpolates the transform to other Transform by weight amount (on the range of 0.0 to 1.0). </description> </method> <method name="inverse"> @@ -172,7 +174,7 @@ The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> <member name="origin" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - The translation offset of the transform. + The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code]. </member> </members> <constants> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index af93d4c654..5da88892fe 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -1,12 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Transform2D" version="4.0"> <brief_description> - 2D transformation (3×2 matrix). + 2D transformation (2×3 matrix). </brief_description> <description> - Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of two [member x] and [member y] [Vector2]s and an [member origin]. It is similar to a 3×2 matrix. + 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of a three [Vector2] values: [member x], [member y], and the [member origin]. + For more information, read the "Matrices and transforms" documentation article. </description> <tutorials> + <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link> </tutorials> <methods> <method name="Transform2D"> @@ -28,7 +30,7 @@ <argument index="2" name="origin" type="Vector2"> </argument> <description> - Constructs the transform from 3 [Vector2]s representing x, y, and origin. + Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors). </description> </method> <method name="Transform2D"> @@ -46,7 +48,7 @@ <return type="Transform2D"> </return> <description> - Returns the inverse of the matrix. + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. </description> </method> <method name="basis_xform"> @@ -55,7 +57,8 @@ <argument index="0" name="v" type="Vector2"> </argument> <description> - Transforms the given vector by this transform's basis (no translation). + Returns a vector transformed (multiplied) by the basis matrix. + This method does not account for translation (the origin vector). </description> </method> <method name="basis_xform_inv"> @@ -64,7 +67,8 @@ <argument index="0" name="v" type="Vector2"> </argument> <description> - Inverse-transforms the given vector by this transform's basis (no translation). + Returns a vector transformed (multiplied) by the inverse basis matrix. + This method does not account for translation (the origin vector). </description> </method> <method name="get_origin"> @@ -96,14 +100,14 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Returns a transform interpolated between this transform and another by a given weight (0-1). + Returns a transform interpolated between this transform and another by a given weight (on the range of 0.0 to 1.0). </description> </method> <method name="inverse"> <return type="Transform2D"> </return> <description> - Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling). </description> </method> <method name="is_equal_approx"> @@ -119,7 +123,7 @@ <return type="Transform2D"> </return> <description> - Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors. + Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). </description> </method> <method name="rotated"> @@ -171,24 +175,24 @@ </methods> <members> <member name="origin" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> - The transform's translation offset. + The origin vector (column 2, the third column). Equivalent to array index [code]2[/code]. The origin vector represents translation. </member> <member name="x" type="Vector2" setter="" getter="" default="Vector2( 1, 0 )"> - The X axis of 2×2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code]. </member> <member name="y" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> - The Y axis of 2×2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code]. </member> </members> <constants> <constant name="IDENTITY" value="Transform2D( 1, 0, 0, 1, 0, 0 )"> - [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. + The identity [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. </constant> <constant name="FLIP_X" value="Transform2D( -1, 0, 0, 1, 0, 0 )"> - [Transform2D] with mirroring applied parallel to the X axis. + The [Transform2D] that will flip something along the X axis. </constant> <constant name="FLIP_Y" value="Transform2D( 1, 0, 0, -1, 0, 0 )"> - [Transform2D] with mirroring applied parallel to the Y axis. + The [Transform2D] that will flip something along the Y axis. </constant> </constants> </class> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index 11245195bf..d286c6cf0c 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -7,8 +7,8 @@ Translations are resources that can be loaded and unloaded on demand. They map a string to another string. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link> + <link title="Internationalizing games">https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> + <link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link> </tutorials> <methods> <method name="add_message"> @@ -18,8 +18,25 @@ </argument> <argument index="1" name="xlated_message" type="StringName"> </argument> + <argument index="2" name="context" type="StringName" default=""""> + </argument> <description> Adds a message if nonexistent, followed by its translation. + An additional context could be used to specify the translation context or differentiate polysemic words. + </description> + </method> + <method name="add_plural_message"> + <return type="void"> + </return> + <argument index="0" name="src_message" type="StringName"> + </argument> + <argument index="1" name="xlated_messages" type="PackedStringArray"> + </argument> + <argument index="2" name="context" type="StringName" default=""""> + </argument> + <description> + Adds a message involving plural translation if nonexistent, followed by its translation. + An additional context could be used to specify the translation context or differentiate polysemic words. </description> </method> <method name="erase_message"> @@ -27,6 +44,8 @@ </return> <argument index="0" name="src_message" type="StringName"> </argument> + <argument index="1" name="context" type="StringName" default=""""> + </argument> <description> Erases a message. </description> @@ -36,6 +55,8 @@ </return> <argument index="0" name="src_message" type="StringName"> </argument> + <argument index="1" name="context" type="StringName" default=""""> + </argument> <description> Returns a message's translation. </description> @@ -54,6 +75,22 @@ Returns all the messages (keys). </description> </method> + <method name="get_plural_message" qualifiers="const"> + <return type="StringName"> + </return> + <argument index="0" name="src_message" type="StringName"> + </argument> + <argument index="1" name="src_plural_message" type="StringName"> + </argument> + <argument index="2" name="n" type="int"> + </argument> + <argument index="3" name="context" type="StringName" default=""""> + </argument> + <description> + Returns a message's translation involving plurals. + The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. + </description> + </method> </methods> <members> <member name="locale" type="String" setter="set_locale" getter="get_locale" default=""en""> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index aaf7a4d160..664cb3e2e3 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -7,8 +7,8 @@ Server that manages all translations. Translations can be set to it and removed from it. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link> + <link title="Internationalizing games">https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> + <link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link> </tutorials> <methods> <method name="add_translation"> @@ -50,6 +50,16 @@ Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]). </description> </method> + <method name="get_translation_object"> + <return type="Translation"> + </return> + <argument index="0" name="locale" type="String"> + </argument> + <description> + Returns the [Translation] instance based on the [code]locale[/code] passed in. + It will return a [code]nullptr[/code] if there is no [Translation] instance that matches the [code]locale[/code]. + </description> + </method> <method name="remove_translation"> <return type="void"> </return> @@ -73,8 +83,26 @@ </return> <argument index="0" name="message" type="StringName"> </argument> + <argument index="1" name="context" type="StringName" default=""""> + </argument> + <description> + Returns the current locale's translation for the given message (key) and context. + </description> + </method> + <method name="translate_plural" qualifiers="const"> + <return type="StringName"> + </return> + <argument index="0" name="message" type="StringName"> + </argument> + <argument index="1" name="plural_message" type="StringName"> + </argument> + <argument index="2" name="n" type="int"> + </argument> + <argument index="3" name="context" type="StringName" default=""""> + </argument> <description> - Returns the current locale's translation for the given message (key). + Returns the current locale's translation for the given message (key), plural_message and context. + The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. </description> </method> </methods> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 126d6b4180..22e643a51d 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -118,7 +118,7 @@ <return type="TreeItem"> </return> <description> - Returns the TreeItem's child items. + Returns the TreeItem's first child item or a null object if there is none. </description> </method> <method name="get_custom_bg_color" qualifiers="const"> @@ -196,7 +196,7 @@ <return type="TreeItem"> </return> <description> - Returns the next TreeItem in the tree. + Returns the next TreeItem in the tree or a null object if there is none. </description> </method> <method name="get_next_visible"> @@ -205,7 +205,7 @@ <argument index="0" name="wrap" type="bool" default="false"> </argument> <description> - Returns the next visible TreeItem in the tree. + Returns the next visible TreeItem in the tree or a null object if there is none. If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code]. </description> </method> @@ -213,14 +213,14 @@ <return type="TreeItem"> </return> <description> - Returns the parent TreeItem. + Returns the parent TreeItem or a null object if there is none. </description> </method> <method name="get_prev"> <return type="TreeItem"> </return> <description> - Returns the previous TreeItem in the tree. + Returns the previous TreeItem in the tree or a null object if there is none. </description> </method> <method name="get_prev_visible"> @@ -229,7 +229,7 @@ <argument index="0" name="wrap" type="bool" default="false"> </argument> <description> - Returns the previous visible TreeItem in the tree. + Returns the previous visible TreeItem in the tree or a null object if there is none. If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code]. </description> </method> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index f3c865c392..aabfed85f0 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -5,6 +5,7 @@ </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]. + After starting the server ([method listen]), you will need to [method poll] it at regular intervals (e.g. inside [method Node._process]) for it to process new packets, delivering them to the appropriate [PacketPeerUDP], and taking new connections. Below a small example of how it can be used: [codeblock] # server.gd @@ -17,6 +18,7 @@ server.listen(4242) func _process(delta): + server.poll() # Important! if server.is_connection_available(): var peer : PacketPeerUDP = server.take_connection() var pkt = peer.get_packet() @@ -57,7 +59,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if a packet with a new address/port combination is received on the socket. + Returns [code]true[/code] if a packet with a new address/port combination was received on the socket. </description> </method> <method name="is_listening" qualifiers="const"> @@ -78,21 +80,33 @@ 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="poll"> + <return type="int" enum="Error"> + </return> + <description> + Call this method at regular intervals (e.g. inside [method Node._process]) to process new packets. And packet from known address/port pair will be delivered to the appropriate [PacketPeerUDP], any packet received from an unknown address/port pair will be added as a pending connection (see [method is_connection_available], [method take_connection]). The maximum number of pending connection is defined via [member max_pending_connections]. + </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]. + Stops the server, closing the UDP socket if open. Will close all connected [PacketPeerUDP] accepted via [method take_connection] (remote peers will not be notified). </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]. + Returns the first pending connection (connected to the appropriate address/port). Will return [code]null[/code] if no new connection is available. See also [method is_connection_available], [method PacketPeerUDP.connect_to_host]. </description> </method> </methods> + <members> + <member name="max_pending_connections" type="int" setter="set_max_pending_connections" getter="get_max_pending_connections" default="16"> + Define the maximum number of pending connections, during [method poll], any new pending connection exceeding that value will be automatically dropped. Setting this value to [code]0[/code] effectively prevents any new pending connection to be accepted (e.g. when all your players have connected). + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 9394d6b430..5830c9eaf3 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -5,6 +5,7 @@ </brief_description> <description> Vertical slider. See [Slider]. This one goes from bottom (min) to top (max). + [b]Note:[/b] The [signal Range.changed] and [signal Range.value_changed] signals are part of the [Range] class which this class inherits from. </description> <tutorials> </tutorials> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 042c8d8e67..cd76689ffe 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -50,7 +50,7 @@ Modifications to a container will modify all references to it. A [Mutex] should be created to lock it if multi-threaded access is desired. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link> + <link title="Variant class">https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7f4a212679..52d719b6f7 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -9,7 +9,7 @@ [b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Vector2"> @@ -43,8 +43,9 @@ <return type="float"> </return> <description> - Returns the vector's angle in radians with respect to the X axis, or [code](1, 0)[/code] vector. - Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member x] and [member y] as parameters: [code]atan2(x, y)[/code]. + Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians. + For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees). + Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code]. </description> </method> <method name="angle_to"> @@ -53,7 +54,7 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> - Returns the angle in radians between the two vectors. + Returns the angle to the given vector, in radians. </description> </method> <method name="angle_to_point"> @@ -62,14 +63,14 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> - Returns the angle in radians between the line connecting the two points and the X coordinate. + Returns the angle between the line connecting the two points and the X axis, in radians. </description> </method> <method name="aspect"> <return type="float"> </return> <description> - Returns the ratio of [member x] to [member y]. + Returns the aspect ratio of this vector, the ratio of [member x] to [member y]. </description> </method> <method name="bounce"> @@ -85,7 +86,7 @@ <return type="Vector2"> </return> <description> - Returns the vector with all components rounded up. + Returns the vector with all components rounded up (towards positive infinity). </description> </method> <method name="clamped"> @@ -94,7 +95,7 @@ <argument index="0" name="length" type="float"> </argument> <description> - Returns the vector with a maximum length. + Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> <method name="cross"> @@ -103,7 +104,7 @@ <argument index="0" name="with" type="Vector2"> </argument> <description> - Returns the 2-dimensional analog of the cross product with the given vector. + Returns the cross product of this vector and [code]with[/code]. </description> </method> <method name="cubic_interpolate"> @@ -118,7 +119,7 @@ <argument index="3" name="t" type="float"> </argument> <description> - Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to"> @@ -136,7 +137,8 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> - Returns the squared distance to vector [code]b[/code]. Prefer this function over [method distance_to] if you need to sort vectors or need the squared distance for some formula. + Returns the squared distance between this vector and [code]b[/code]. + This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="distance_to"> @@ -145,7 +147,7 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> - Returns the distance to vector [code]b[/code]. + Returns the distance between this vector and [code]to[/code]. </description> </method> <method name="dot"> @@ -154,14 +156,17 @@ <argument index="0" name="with" type="Vector2"> </argument> <description> - Returns the dot product with vector [code]b[/code]. + Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. + The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. + When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned. + [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. </description> </method> <method name="floor"> <return type="Vector2"> </return> <description> - Returns the vector with all components rounded down. + Returns the vector with all components rounded down (towards negative infinity). </description> </method> <method name="is_equal_approx"> @@ -177,21 +182,22 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the vector is normalized. + Returns [code]true[/code] if the vector is normalized, and false otherwise. </description> </method> <method name="length"> <return type="float"> </return> <description> - Returns the vector's length. + Returns the length (magnitude) of this vector. </description> </method> <method name="length_squared"> <return type="float"> </return> <description> - Returns the vector's length squared. Prefer this method over [method length] if you need to sort vectors or need the squared length for some formula. + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="lerp"> @@ -202,7 +208,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="move_toward"> @@ -229,7 +235,7 @@ <argument index="0" name="mod" type="float"> </argument> <description> - Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]mod[/code]. + Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code]. </description> </method> <method name="posmodv"> @@ -238,7 +244,7 @@ <argument index="0" name="modv" type="Vector2"> </argument> <description> - Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]modv[/code]'s components. + Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components. </description> </method> <method name="project"> @@ -279,7 +285,7 @@ <return type="Vector2"> </return> <description> - Returns the vector with each component set to one or negative one, depending on the signs of the components. + Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GDScript.sign] on each component. </description> </method> <method name="slerp"> @@ -290,7 +296,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. [b]Note:[/b] Both vectors must be normalized. </description> </method> @@ -300,7 +306,7 @@ <argument index="0" name="n" type="Vector2"> </argument> <description> - Returns the component of the vector along a plane defined by the given normal. + Returns this vector slid along a plane defined by the given normal. </description> </method> <method name="snapped"> @@ -309,14 +315,14 @@ <argument index="0" name="by" type="Vector2"> </argument> <description> - Returns the vector snapped to a grid with the given size. + Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. </description> </method> <method name="tangent"> <return type="Vector2"> </return> <description> - Returns a perpendicular vector. + Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length. </description> </method> </methods> @@ -336,25 +342,25 @@ Enumerated value for the Y axis. </constant> <constant name="ZERO" value="Vector2( 0, 0 )"> - Zero vector. + Zero vector, a vector with all components set to [code]0[/code]. </constant> <constant name="ONE" value="Vector2( 1, 1 )"> - One vector. + One vector, a vector with all components set to [code]1[/code]. </constant> <constant name="INF" value="Vector2( inf, inf )"> - Infinity vector. + Infinity vector, a vector with all components set to [constant @GDScript.INF]. </constant> <constant name="LEFT" value="Vector2( -1, 0 )"> - Left unit vector. + Left unit vector. Represents the direction of left. </constant> <constant name="RIGHT" value="Vector2( 1, 0 )"> - Right unit vector. + Right unit vector. Represents the direction of right. </constant> <constant name="UP" value="Vector2( 0, -1 )"> - Up unit vector. + Up unit vector. Y is down in 2D, so this vector points -Y. </constant> <constant name="DOWN" value="Vector2( 0, 1 )"> - Down unit vector. + Down unit vector. Y is down in 2D, so this vector points +Y. </constant> </constants> </class> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 2f7ca985b2..3ad926210b 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -9,7 +9,7 @@ [b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Vector2i"> @@ -70,22 +70,22 @@ Enumerated value for the Y axis. </constant> <constant name="ZERO" value="Vector2i( 0, 0 )"> - Zero vector. + Zero vector, a vector with all components set to [code]0[/code]. </constant> <constant name="ONE" value="Vector2i( 1, 1 )"> - One vector. + One vector, a vector with all components set to [code]1[/code]. </constant> <constant name="LEFT" value="Vector2i( -1, 0 )"> - Left unit vector. + Left unit vector. Represents the direction of left. </constant> <constant name="RIGHT" value="Vector2i( 1, 0 )"> - Right unit vector. + Right unit vector. Represents the direction of right. </constant> <constant name="UP" value="Vector2i( 0, -1 )"> - Up unit vector. + Up unit vector. Y is down in 2D, so this vector points -Y. </constant> <constant name="DOWN" value="Vector2i( 0, 1 )"> - Down unit vector. + Down unit vector. Y is down in 2D, so this vector points +Y. </constant> </constants> </class> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 0c861e5ee2..608b976f6f 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -9,7 +9,7 @@ [b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Vector3"> @@ -47,7 +47,7 @@ <argument index="0" name="to" type="Vector3"> </argument> <description> - Returns the minimum angle to the given vector. + Returns the minimum angle to the given vector, in radians. </description> </method> <method name="bounce"> @@ -63,7 +63,7 @@ <return type="Vector3"> </return> <description> - Returns a new vector with all components rounded up. + Returns a new vector with all components rounded up (towards positive infinity). </description> </method> <method name="cross"> @@ -72,7 +72,7 @@ <argument index="0" name="b" type="Vector3"> </argument> <description> - Returns the cross product with [code]b[/code]. + Returns the cross product of this vector and [code]b[/code]. </description> </method> <method name="cubic_interpolate"> @@ -87,7 +87,7 @@ <argument index="3" name="t" type="float"> </argument> <description> - Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to"> @@ -105,7 +105,8 @@ <argument index="0" name="b" type="Vector3"> </argument> <description> - Returns the squared distance to [code]b[/code]. Prefer this function over [method distance_to] if you need to sort vectors or need the squared distance for some formula. + Returns the squared distance between this vector and [code]b[/code]. + This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="distance_to"> @@ -114,7 +115,7 @@ <argument index="0" name="b" type="Vector3"> </argument> <description> - Returns the distance to [code]b[/code]. + Returns the distance between this vector and [code]b[/code]. </description> </method> <method name="dot"> @@ -123,14 +124,17 @@ <argument index="0" name="b" type="Vector3"> </argument> <description> - Returns the dot product with [code]b[/code]. + Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. + The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. + When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned. + [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. </description> </method> <method name="floor"> <return type="Vector3"> </return> <description> - Returns a new vector with all components rounded down. + Returns a new vector with all components rounded down (towards negative infinity). </description> </method> <method name="inverse"> @@ -153,21 +157,22 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the vector is normalized. + Returns [code]true[/code] if the vector is normalized, and false otherwise. </description> </method> <method name="length"> <return type="float"> </return> <description> - Returns the vector's length. + Returns the length (magnitude) of this vector. </description> </method> <method name="length_squared"> <return type="float"> </return> <description> - Returns the vector's length squared. Prefer this function over [method length] if you need to sort vectors or need the squared length for some formula. + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="lerp"> @@ -178,21 +183,21 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.. + Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="max_axis"> <return type="int"> </return> <description> - Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. + Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> <method name="min_axis"> <return type="int"> </return> <description> - Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. + Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="move_toward"> @@ -203,7 +208,7 @@ <argument index="1" name="delta" type="float"> </argument> <description> - Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. + Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount. </description> </method> <method name="normalized"> @@ -228,7 +233,7 @@ <argument index="0" name="mod" type="float"> </argument> <description> - Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]mod[/code]. + Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code]. </description> </method> <method name="posmodv"> @@ -237,7 +242,7 @@ <argument index="0" name="modv" type="Vector3"> </argument> <description> - Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]modv[/code]'s components. + Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components. </description> </method> <method name="project"> @@ -246,7 +251,7 @@ <argument index="0" name="b" type="Vector3"> </argument> <description> - Returns the vector projected onto the vector [code]b[/code]. + Returns this vector projected onto another vector [code]b[/code]. </description> </method> <method name="reflect"> @@ -255,7 +260,7 @@ <argument index="0" name="n" type="Vector3"> </argument> <description> - Returns the vector reflected from a plane defined by the given normal. + Returns this vector reflected from a plane defined by the given normal. </description> </method> <method name="rotated"> @@ -266,21 +271,21 @@ <argument index="1" name="phi" type="float"> </argument> <description> - Rotates the vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector. + Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector. </description> </method> <method name="round"> <return type="Vector3"> </return> <description> - Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. + Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> <method name="sign"> <return type="Vector3"> </return> <description> - Returns the vector with each component set to one or negative one, depending on the signs of the components. + Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GDScript.sign] on each component. </description> </method> <method name="slerp"> @@ -291,7 +296,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. [b]Note:[/b] Both vectors must be normalized. </description> </method> @@ -301,7 +306,7 @@ <argument index="0" name="n" type="Vector3"> </argument> <description> - Returns the component of the vector along a plane defined by the given normal. + Returns this vector slid along a plane defined by the given normal. </description> </method> <method name="snapped"> @@ -310,7 +315,7 @@ <argument index="0" name="by" type="Vector3"> </argument> <description> - Returns the vector snapped to a grid with the given size. + Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. </description> </method> <method name="to_diagonal_matrix"> @@ -318,6 +323,7 @@ </return> <description> Returns a diagonal matrix with the vector as main diagonal. + This is equivalent to a Basis with no rotation or shearing and this vector's components set as the scale. </description> </method> </methods> @@ -343,19 +349,19 @@ Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis]. </constant> <constant name="ZERO" value="Vector3( 0, 0, 0 )"> - Zero vector. + Zero vector, a vector with all components set to [code]0[/code]. </constant> <constant name="ONE" value="Vector3( 1, 1, 1 )"> - One vector. + One vector, a vector with all components set to [code]1[/code]. </constant> <constant name="INF" value="Vector3( inf, inf, inf )"> - Infinity vector. + Infinity vector, a vector with all components set to [constant @GDScript.INF]. </constant> <constant name="LEFT" value="Vector3( -1, 0, 0 )"> - Left unit vector. + Left unit vector. Represents the local direction of left, and the global direction of west. </constant> <constant name="RIGHT" value="Vector3( 1, 0, 0 )"> - Right unit vector. + Right unit vector. Represents the local direction of right, and the global direction of east. </constant> <constant name="UP" value="Vector3( 0, 1, 0 )"> Up unit vector. @@ -364,10 +370,10 @@ Down unit vector. </constant> <constant name="FORWARD" value="Vector3( 0, 0, -1 )"> - Forward unit vector. + Forward unit vector. Represents the local direction of forward, and the global direction of north. </constant> <constant name="BACK" value="Vector3( 0, 0, 1 )"> - Back unit vector. + Back unit vector. Represents the local direction of back, and the global direction of south. </constant> </constants> </class> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 91d64ea609..bd7c354241 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -9,7 +9,7 @@ [b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> <method name="Vector3i"> @@ -38,14 +38,14 @@ <return type="int"> </return> <description> - Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. + Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> <method name="min_axis"> <return type="int"> </return> <description> - Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. + Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="sign"> @@ -78,16 +78,16 @@ Enumerated value for the Z axis. </constant> <constant name="ZERO" value="Vector3i( 0, 0, 0 )"> - Zero vector. + Zero vector, a vector with all components set to [code]0[/code]. </constant> <constant name="ONE" value="Vector3i( 1, 1, 1 )"> - One vector. + One vector, a vector with all components set to [code]1[/code]. </constant> <constant name="LEFT" value="Vector3i( -1, 0, 0 )"> - Left unit vector. + Left unit vector. Represents the local direction of left, and the global direction of west. </constant> <constant name="RIGHT" value="Vector3i( 1, 0, 0 )"> - Right unit vector. + Right unit vector. Represents the local direction of right, and the global direction of east. </constant> <constant name="UP" value="Vector3i( 0, 1, 0 )"> Up unit vector. @@ -96,10 +96,10 @@ Down unit vector. </constant> <constant name="FORWARD" value="Vector3i( 0, 0, -1 )"> - Forward unit vector. + Forward unit vector. Represents the local direction of forward, and the global direction of north. </constant> <constant name="BACK" value="Vector3i( 0, 0, 1 )"> - Back unit vector. + Back unit vector. Represents the local direction of back, and the global direction of south. </constant> </constants> </class> diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index b8b85ff605..5a2cce376e 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -6,6 +6,7 @@ <description> This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape3D] for the main body of your vehicle and add [VehicleWheel3D] nodes for the wheels. You should also add a [MeshInstance3D] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly. [b]Note:[/b] The origin point of your VehicleBody3D will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape3D] and [MeshInstance3D] upwards. + [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class. </description> <tutorials> </tutorials> diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml index c71d797eff..97b2abfa92 100644 --- a/doc/classes/VehicleWheel3D.xml +++ b/doc/classes/VehicleWheel3D.xml @@ -5,6 +5,7 @@ </brief_description> <description> This node needs to be used as a child node of [VehicleBody3D] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. + [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class. </description> <tutorials> </tutorials> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 3b52c80c9a..e42c4021ab 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -12,8 +12,8 @@ Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link> + <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link title="Viewports tutorial index">https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link> </tutorials> <methods> <method name="find_world_2d" qualifiers="const"> @@ -315,7 +315,7 @@ Do not perform any antialiasing in the full screen post-process. </constant> <constant name="SCREEN_SPACE_AA_FXAA" value="1" enum="ScreenSpaceAA"> - Use fast approximate antialiasing. FXAA is a popular screen-space antialising method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. + Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. </constant> <constant name="SCREEN_SPACE_AA_MAX" value="2" enum="ScreenSpaceAA"> Represents the size of the [enum ScreenSpaceAA] enum. @@ -377,15 +377,18 @@ <constant name="DEBUG_DRAW_SSAO" value="12" enum="DebugDraw"> Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment]. </constant> - <constant name="DEBUG_DRAW_ROUGHNESS_LIMITER" value="13" enum="DebugDraw"> - Draws the roughness limiter post process over the Viewport so you can see where it has an effect. It must be enabled in [member ProjectSettings.rendering/quality/screen_filters/screen_space_roughness_limiter] to work. - </constant> - <constant name="DEBUG_DRAW_PSSM_SPLITS" value="14" enum="DebugDraw"> + <constant name="DEBUG_DRAW_PSSM_SPLITS" value="13" enum="DebugDraw"> Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow. </constant> - <constant name="DEBUG_DRAW_DECAL_ATLAS" value="15" enum="DebugDraw"> + <constant name="DEBUG_DRAW_DECAL_ATLAS" value="14" enum="DebugDraw"> Draws the decal atlas used by [Decal]s and light projector textures in the upper left quadrant of the [Viewport]. </constant> + <constant name="DEBUG_DRAW_SDFGI" value="15" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_SDFGI_PROBES" value="16" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_GI_BUFFER" value="17" enum="DebugDraw"> + </constant> <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter"> The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. </constant> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index a5abf16a8d..02fe7a7cd0 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself. - [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. + If you just want to receive notifications, use [VisibilityNotifier2D] instead. + [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. [b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization. </description> <tutorials> diff --git a/doc/classes/VisibilityEnabler3D.xml b/doc/classes/VisibilityEnabler3D.xml index 342a37e7a4..d78ebb55f2 100644 --- a/doc/classes/VisibilityEnabler3D.xml +++ b/doc/classes/VisibilityEnabler3D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself. - [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node. + If you just want to receive notifications, use [VisibilityNotifier3D] instead. + [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. [b]Note:[/b] VisibilityEnabler3D will not affect nodes added after scene initialization. </description> <tutorials> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index 391163ef94..314a100989 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. - [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. + If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler2D] instead. + [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisibilityNotifier3D.xml b/doc/classes/VisibilityNotifier3D.xml index eb7bb91f26..e5d3116612 100644 --- a/doc/classes/VisibilityNotifier3D.xml +++ b/doc/classes/VisibilityNotifier3D.xml @@ -5,7 +5,8 @@ </brief_description> <description> The VisibilityNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view. - [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node. + If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler3D] instead. + [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot]. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 28d13a7d32..6327ab534f 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -6,7 +6,7 @@ <description> </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link> + <link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link> </tutorials> <methods> <method name="get_default_input_values" qualifiers="const"> diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanUniform.xml index 8313a8256e..7d72f13f9d 100644 --- a/doc/classes/VisualShaderNodeBooleanUniform.xml +++ b/doc/classes/VisualShaderNodeBooleanUniform.xml @@ -10,6 +10,14 @@ </tutorials> <methods> </methods> + <members> + <member name="default_value" type="bool" setter="set_default_value" getter="get_default_value" default="false"> + A default value to be assigned within the shader. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + Enables usage of the [member default_value]. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml index 6972ccefd9..90ef381b76 100644 --- a/doc/classes/VisualShaderNodeColorUniform.xml +++ b/doc/classes/VisualShaderNodeColorUniform.xml @@ -10,6 +10,14 @@ </tutorials> <methods> </methods> + <members> + <member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color( 1, 1, 1, 1 )"> + A default value to be assigned within the shader. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + Enables usage of the [member default_value]. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 5bd8ec38ed..3be9b803e9 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -13,7 +13,7 @@ [/codeblock] </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> + <link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> </tutorials> <methods> <method name="_get_category" qualifiers="virtual"> diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index 33ece8ac1b..705d5e8796 100644 --- a/doc/classes/VisualShaderNodeFloatUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -11,6 +11,12 @@ <methods> </methods> <members> + <member name="default_value" type="float" setter="set_default_value" getter="get_default_value" default="0.0"> + A default value to be assigned within the shader. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + Enables usage of the [member default_value]. + </member> <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> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 9261d0088d..8e819b011c 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -7,7 +7,7 @@ Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check [code]Tutorials[/code] section for link). </description> <tutorials> - <link>https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/index.html</link> + <link title="Shading reference index">https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/index.html</link> </tutorials> <methods> <method name="get_input_real_name" qualifiers="const"> diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml index 8c7c288177..e39eba865b 100644 --- a/doc/classes/VisualShaderNodeIntUniform.xml +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -11,6 +11,12 @@ <methods> </methods> <members> + <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0"> + A default value to be assigned within the shader. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + Enables usage of the [member default_value]. + </member> <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> diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml new file mode 100644 index 0000000000..ba79b3fe8f --- /dev/null +++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeMultiplyAdd" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Performs a fused multiply-add operation within the visual shader graph. + </brief_description> + <description> + Uses three operands to compute [code](a * b + c)[/code] expression. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="type" type="int" setter="set_type" getter="get_type" enum="VisualShaderNodeMultiplyAdd.Type" default="0"> + A type of operands and returned value. + </member> + </members> + <constants> + <constant name="TYPE_SCALAR" value="0" enum="Type"> + A scalar type. + </constant> + <constant name="TYPE_VECTOR" value="1" enum="Type"> + A vector type. + </constant> + <constant name="TYPE_MAX" value="2" enum="Type"> + Represents the size of the [enum Type] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml index 2b4aed9ae4..83da6f29f9 100644 --- a/doc/classes/VisualShaderNodeOutput.xml +++ b/doc/classes/VisualShaderNodeOutput.xml @@ -4,7 +4,7 @@ Represents the output shader parameters within the visual shader graph. </brief_description> <description> - This visual shader node is present in all shader graphs in form of "Output" block with mutliple output value ports. + This visual shader node is present in all shader graphs in form of "Output" block with multiple output value ports. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index 43696c8226..ff6246618d 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -10,6 +10,14 @@ </tutorials> <methods> </methods> + <members> + <member name="default_value" type="Transform" setter="set_default_value" getter="get_default_value" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + A default value to be assigned within the shader. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + Enables usage of the [member default_value]. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeUniformRef.xml b/doc/classes/VisualShaderNodeUniformRef.xml new file mode 100644 index 0000000000..db02e398ab --- /dev/null +++ b/doc/classes/VisualShaderNodeUniformRef.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUniformRef" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A reference to an existing [VisualShaderNodeUniform]. + </brief_description> + <description> + Creating a reference to a [VisualShaderNodeUniform] allows you to reuse this uniform in different shaders or shader stages easily. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default=""[None]""> + The name of the uniform which this reference points to. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml index c8b44fdc8d..cd1500f5a1 100644 --- a/doc/classes/VisualShaderNodeVec3Uniform.xml +++ b/doc/classes/VisualShaderNodeVec3Uniform.xml @@ -10,6 +10,14 @@ </tutorials> <methods> </methods> + <members> + <member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3( 0, 0, 0 )"> + A default value to be assigned within the shader. + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + Enables usage of the [member default_value]. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml index 0fa90a69cf..178c35f49a 100644 --- a/doc/classes/VisualShaderNodeVectorRefract.xml +++ b/doc/classes/VisualShaderNodeVectorRefract.xml @@ -4,7 +4,7 @@ Returns the [Vector3] that points in the direction of refraction. For use within the visual shader graph. </brief_description> <description> - Translated to [code]refract(I, N, eta)[/code] in the shader language, where [code]I[/code] is the incident vector, [code]N[/code] is the normal vector and [code]eta[/code] is the ratio of the indicies of the refraction. + Translated to [code]refract(I, N, eta)[/code] in the shader language, where [code]I[/code] is the incident vector, [code]N[/code] is the normal vector and [code]eta[/code] is the ratio of the indices of the refraction. </description> <tutorials> </tutorials> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index e1a0f1f22a..c1a991fca1 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -377,9 +377,9 @@ </constant> <constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode"> </constant> - <constant name="CONTENT_SCALE_MODE_OBJECTS" value="1" enum="ContentScaleMode"> + <constant name="CONTENT_SCALE_MODE_CANVAS_ITEMS" value="1" enum="ContentScaleMode"> </constant> - <constant name="CONTENT_SCALE_MODE_PIXELS" value="2" enum="ContentScaleMode"> + <constant name="CONTENT_SCALE_MODE_VIEWPORT" value="2" enum="ContentScaleMode"> </constant> <constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect"> </constant> diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index e66f21a0e7..b0bfd7f418 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -7,7 +7,7 @@ Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml index 6d3b94794e..d804485d4e 100644 --- a/doc/classes/World3D.xml +++ b/doc/classes/World3D.xml @@ -7,7 +7,7 @@ Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Node3D nodes register their resources into the current world. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index 92b75621c2..f9f0241365 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -9,7 +9,7 @@ The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> + <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml index 4d86e24daa..b2682f7a90 100644 --- a/doc/classes/XRCamera3D.xml +++ b/doc/classes/XRCamera3D.xml @@ -8,7 +8,7 @@ The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> + <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml index 8e80eb9a32..c0f64d9e27 100644 --- a/doc/classes/XRController3D.xml +++ b/doc/classes/XRController3D.xml @@ -9,7 +9,7 @@ The position of the controller node is automatically updated by the [XRServer]. This makes this node ideal to add child nodes to visualize the controller. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> + <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="get_controller_name" qualifiers="const"> diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml index 1985010223..034cb51be3 100644 --- a/doc/classes/XRInterface.xml +++ b/doc/classes/XRInterface.xml @@ -8,7 +8,7 @@ Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [XRServer]. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> + <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="get_camera_feed_id"> diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml index 57cf673d30..3e075e99b9 100644 --- a/doc/classes/XROrigin3D.xml +++ b/doc/classes/XROrigin3D.xml @@ -10,7 +10,7 @@ For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> + <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml index 2f7cc21703..0b57c9478f 100644 --- a/doc/classes/XRPositionalTracker.xml +++ b/doc/classes/XRPositionalTracker.xml @@ -9,7 +9,7 @@ The [XRController3D] and [XRAnchor3D] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> + <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="get_hand" qualifiers="const"> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index 5e6002aee3..75a05bef17 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -7,7 +7,7 @@ The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> + <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="center_on_hmd"> |