diff --git a/classes/class_@c#.rst b/classes/class_@c#.rst index acbc3e22a..99fd1a760 100644 --- a/classes/class_@c#.rst +++ b/classes/class_@c#.rst @@ -9,10 +9,5 @@ @C# === -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index cedc1c9fd..bef8d88f9 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -9,13 +9,13 @@ @GDScript ========= -**Category:** Core - -Brief Description ------------------ - Built-in GDScript functions. +Description +----------- + +List of core built-in GDScript functions. Math functions and other utilities. Everything else is provided by objects. (Keywords: builtin, built in, global functions.) + Methods ------- @@ -228,11 +228,6 @@ Constants The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0. -Description ------------ - -List of core built-in GDScript functions. Math functions and other utilities. Everything else is provided by objects. (Keywords: builtin, built in, global functions.) - Method Descriptions ------------------- diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 4c113d99f..7af03b2d9 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -9,13 +9,15 @@ @GlobalScope ============ -**Category:** Core - -Brief Description ------------------ - Global scope constants and variables. +Description +----------- + +Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. + +Singletons are also documented here, since they can be accessed from anywhere. + Properties ---------- @@ -2202,13 +2204,6 @@ Constants - **SPKEY** = **16777216** --- Scancodes with this bit applied are non-printable. -Description ------------ - -Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. - -Singletons are also documented here, since they can be accessed from anywhere. - Property Descriptions --------------------- diff --git a/classes/class_@nativescript.rst b/classes/class_@nativescript.rst index 24a0b6ee3..aa731484b 100644 --- a/classes/class_@nativescript.rst +++ b/classes/class_@nativescript.rst @@ -9,10 +9,5 @@ @NativeScript ============= -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_@visualscript.rst b/classes/class_@visualscript.rst index 6e3034292..323db2046 100644 --- a/classes/class_@visualscript.rst +++ b/classes/class_@visualscript.rst @@ -9,11 +9,6 @@ @VisualScript ============= -**Category:** Core - -Brief Description ------------------ - Built-in visual script functions. Description diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index d1edf51a3..42a4e06ef 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -9,13 +9,18 @@ AABB ==== -**Category:** Built-In Types - -Brief Description ------------------ - Axis-Aligned Bounding Box. +Description +----------- + +AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + +Tutorials +--------- + +- :doc:`../tutorials/math/index` + Properties ---------- @@ -76,16 +81,6 @@ Methods | :ref:`AABB` | :ref:`merge` **(** :ref:`AABB` with **)** | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. - -Tutorials ---------- - -- :doc:`../tutorials/math/index` - Property Descriptions --------------------- diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 87959d38f..1afa7a062 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -13,13 +13,13 @@ AcceptDialog **Inherited By:** :ref:`ConfirmationDialog` -**Category:** Core - -Brief Description ------------------ - Base dialog for user notification. +Description +----------- + +This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. + Properties ---------- @@ -65,11 +65,6 @@ Emitted when the dialog is accepted, i.e. the OK button is pressed. Emitted when a custom button is pressed. See :ref:`add_button`. -Description ------------ - -This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. - Property Descriptions --------------------- diff --git a/classes/class_animatedsprite.rst b/classes/class_animatedsprite.rst index a06a26a84..3326d9c42 100644 --- a/classes/class_animatedsprite.rst +++ b/classes/class_animatedsprite.rst @@ -11,13 +11,13 @@ AnimatedSprite **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Sprite node that can use multiple textures for animation. +Description +----------- + +Animations are created using a :ref:`SpriteFrames` resource, which can be configured in the editor via the SpriteFrames panel. + Properties ---------- @@ -69,11 +69,6 @@ Emitted when the animation is finished (when it plays the last frame). If the an Emitted when :ref:`frame` changed. -Description ------------ - -Animations are created using a :ref:`SpriteFrames` resource, which can be configured in the editor via the SpriteFrames panel. - Property Descriptions --------------------- diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index bca8bb773..a0c87abe2 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -11,13 +11,13 @@ AnimatedSprite3D **Inherits:** :ref:`SpriteBase3D` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - 2D sprite node in 3D world, that can use multiple 2D textures for animation. +Description +----------- + +Animations are created using a :ref:`SpriteFrames` resource, which can be configured in the editor via the SpriteFrames panel. + Properties ---------- @@ -51,11 +51,6 @@ Signals Emitted when :ref:`frame` changed. -Description ------------ - -Animations are created using a :ref:`SpriteFrames` resource, which can be configured in the editor via the SpriteFrames panel. - Property Descriptions --------------------- diff --git a/classes/class_animatedtexture.rst b/classes/class_animatedtexture.rst index a005cb514..4448421bb 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -11,13 +11,17 @@ AnimatedTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Proxy texture for simple frame-based animations. +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 :ref:`AnimationPlayer` or :ref:`AnimatedSprite`, it isn't a :ref:`Node`, but has the advantage of being usable anywhere a :ref:`Texture` resource can be used, e.g. in a :ref:`TileSet`. + +The playback of the animation is controlled by the :ref:`fps` property as well as each frame's optional delay (see :ref:`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 :ref:`AtlasTexture`. Each frame needs to be separate image. + Properties ---------- @@ -49,15 +53,6 @@ Constants - **MAX_FRAMES** = **256** --- The maximum number of frames supported by ``AnimatedTexture``. If you need more frames in your animation, use :ref:`AnimationPlayer` or :ref:`AnimatedSprite`. -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 :ref:`AnimationPlayer` or :ref:`AnimatedSprite`, it isn't a :ref:`Node`, but has the advantage of being usable anywhere a :ref:`Texture` resource can be used, e.g. in a :ref:`TileSet`. - -The playback of the animation is controlled by the :ref:`fps` property as well as each frame's optional delay (see :ref:`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 :ref:`AtlasTexture`. Each frame needs to be separate image. - Property Descriptions --------------------- diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 2aef00805..817c6ee5e 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -11,13 +11,30 @@ Animation **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Contains data used to animate everything in the engine. +Description +----------- + +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. + +:: + + # This creates an animation that makes the node "Enemy" move to the right by + # 100 pixels in 1 second. + var animation = Animation.new() + var track_index = animation.add_track(Animation.TYPE_VALUE) + 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) + +Animations are just data containers, and must be added to nodes such as an :ref:`AnimationPlayer` or :ref:`AnimationTreePlayer` to be played back. + +Tutorials +--------- + +- :doc:`../tutorials/animation/index` + Properties ---------- @@ -228,28 +245,6 @@ enum **UpdateMode**: - **UPDATE_CAPTURE** = **3** -Description ------------ - -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. - -:: - - # This creates an animation that makes the node "Enemy" move to the right by - # 100 pixels in 1 second. - var animation = Animation.new() - var track_index = animation.add_track(Animation.TYPE_VALUE) - 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) - -Animations are just data containers, and must be added to nodes such as an :ref:`AnimationPlayer` or :ref:`AnimationTreePlayer` to be played back. - -Tutorials ---------- - -- :doc:`../tutorials/animation/index` - Property Descriptions --------------------- diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 4a28f2fc9..d63b748d5 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -13,13 +13,15 @@ AnimationNode **Inherited By:** :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, :ref:`AnimationNodeOutput`, :ref:`AnimationNodeTimeScale`, :ref:`AnimationNodeTimeSeek`, :ref:`AnimationNodeTransition`, :ref:`AnimationRootNode` -**Category:** Core - -Brief Description ------------------ - Base resource for :ref:`AnimationTree` nodes. +Description +----------- + +Base resource for :ref:`AnimationTree` nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. + +Inherit this when creating nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. + Properties ---------- @@ -108,13 +110,6 @@ enum **FilterAction**: - **FILTER_BLEND** = **3** --- Paths matching the filter will be blended (by the blend value). -Description ------------ - -Base resource for :ref:`AnimationTree` nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. - -Inherit this when creating nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. - Property Descriptions --------------------- @@ -128,7 +123,7 @@ Property Descriptions | *Getter* | is_filter_enabled() | +----------+---------------------------+ -Returns whether filtering is enabled. +If ``true``, filtering is enabled. Method Descriptions ------------------- diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index 1f1cd1029..0371f3339 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -11,13 +11,13 @@ AnimationNodeAdd2 **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Blends two animations additively inside of an :ref:`AnimationNodeBlendTree`. +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations additively based on an amount value in the ``[0.0, 1.0]`` range. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`bool` | :ref:`sync` | false | +-------------------------+----------------------------------------------------+-------+ -Description ------------ - -A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations additively based on an amount value in the ``[0.0, 1.0]`` range. - Property Descriptions --------------------- diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index 3e9317459..956889930 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -11,20 +11,8 @@ AnimationNodeAdd3 **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Blends two of three animations additively inside of an :ref:`AnimationNodeBlendTree`. -Properties ----------- - -+-------------------------+----------------------------------------------------+-------+ -| :ref:`bool` | :ref:`sync` | false | -+-------------------------+----------------------------------------------------+-------+ - Description ----------- @@ -38,6 +26,13 @@ This node has three inputs: - A +add animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range +Properties +---------- + ++-------------------------+----------------------------------------------------+-------+ +| :ref:`bool` | :ref:`sync` | false | ++-------------------------+----------------------------------------------------+-------+ + Property Descriptions --------------------- diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index d346bc92e..74d06aeb9 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -11,13 +11,13 @@ AnimationNodeAnimation **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input animation to use in an :ref:`AnimationNodeBlendTree`. +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Only features one output set using the :ref:`animation` property. Use it as an input for :ref:`AnimationNode` that blend animations together. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`String` | :ref:`animation` | "" | +-----------------------------+-------------------------------------------------------------------+----+ -Description ------------ - -A resource to add to an :ref:`AnimationNodeBlendTree`. Only features one output set using the :ref:`animation` property. Use it as an input for :ref:`AnimationNode` that blend animations together. - Property Descriptions --------------------- diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index 087362c56..adbdb2069 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -11,13 +11,13 @@ AnimationNodeBlend2 **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Blends two animations linearly inside of an :ref:`AnimationNodeBlendTree`. +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations linearly based on an amount value in the ``[0.0, 1.0]`` range. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`bool` | :ref:`sync` | false | +-------------------------+------------------------------------------------------+-------+ -Description ------------ - -A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations linearly based on an amount value in the ``[0.0, 1.0]`` range. - Property Descriptions --------------------- diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index 00169fdbf..81a53fbd3 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -11,20 +11,8 @@ AnimationNodeBlend3 **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Blends two of three animations linearly inside of an :ref:`AnimationNodeBlendTree`. -Properties ----------- - -+-------------------------+------------------------------------------------------+-------+ -| :ref:`bool` | :ref:`sync` | false | -+-------------------------+------------------------------------------------------+-------+ - Description ----------- @@ -38,6 +26,13 @@ This node has three inputs: - A +blend animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range +Properties +---------- + ++-------------------------+------------------------------------------------------+-------+ +| :ref:`bool` | :ref:`sync` | false | ++-------------------------+------------------------------------------------------+-------+ + Property Descriptions --------------------- diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index f88e759b5..fc92b6d9e 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -11,13 +11,19 @@ AnimationNodeBlendSpace1D **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Blends linearly between two of any number of :ref:`AnimationNode` of any type placed on a virtual axis. +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. + +This is a virtual axis on which you can add any type of :ref:`AnimationNode` using :ref:`add_blend_point`. + +Outputs the linear blend of the two ``AnimationNode`` closest to the node's current ``value``. + +You can set the extents of the axis using the :ref:`min_space` and :ref:`max_space`. + Properties ---------- @@ -50,17 +56,6 @@ Methods | void | :ref:`set_blend_point_position` **(** :ref:`int` point, :ref:`float` pos **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A resource to add to an :ref:`AnimationNodeBlendTree`. - -This is a virtual axis on which you can add any type of :ref:`AnimationNode` using :ref:`add_blend_point`. - -Outputs the linear blend of the two ``AnimationNode`` closest to the node's current ``value``. - -You can set the extents of the axis using the :ref:`min_space` and :ref:`max_space`. - Property Descriptions --------------------- diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index f19bfb233..90081c71d 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -11,13 +11,17 @@ AnimationNodeBlendSpace2D **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Blends linearly between three :ref:`AnimationNode` of any type placed in a 2d space. +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. + +This node allows you to blend linearly between three animations using a :ref:`Vector2` weight. + +You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to create up the blend space by hand. + Properties ---------- @@ -92,15 +96,6 @@ enum **BlendMode**: - **BLEND_MODE_DISCRETE_CARRY** = **2** --- Similar to :ref:`BLEND_MODE_DISCRETE`, but starts the new animation at the last animation's playback position. -Description ------------ - -A resource to add to an :ref:`AnimationNodeBlendTree`. - -This node allows you to blend linearly between three animations using a :ref:`Vector2` weight. - -You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to create up the blend space by hand. - Property Descriptions --------------------- diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index c4fca11f1..35e838576 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -11,11 +11,6 @@ AnimationNodeBlendTree **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index e595fbe31..af6c80fb8 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -11,11 +11,6 @@ AnimationNodeOneShot **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index 2a1428f01..f446656fe 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -11,10 +11,5 @@ AnimationNodeOutput **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index e472238f0..5b305ffc2 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -11,13 +11,20 @@ AnimationNodeStateMachine **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - State machine for control of animations. +Description +----------- + +Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the :ref:`AnimationTree` node to control it programmatically. + +**Example:** + +:: + + var state_machine = $AnimationTree.get("parameters/playback") + state_machine.travel("some_state") + Methods ------- @@ -67,18 +74,6 @@ Methods | void | :ref:`set_start_node` **(** :ref:`String` name **)** | +---------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the :ref:`AnimationTree` node to control it programmatically. - -**Example:** - -:: - - var state_machine = $AnimationTree.get("parameters/playback") - state_machine.travel("some_state") - Method Descriptions ------------------- diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index 3c0285de9..a5f068e3f 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -11,13 +11,20 @@ AnimationNodeStateMachinePlayback **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Playback control for AnimationNodeStateMachine. +Description +----------- + +Allows control of :ref:`AnimationTree` state machines created with :ref:`AnimationNodeStateMachine`. Retrieve with ``$AnimationTree.get("parameters/playback")``. + +**Example:** + +:: + + var state_machine = $AnimationTree.get("parameters/playback") + state_machine.travel("some_state") + Properties ---------- @@ -42,18 +49,6 @@ Methods | void | :ref:`travel` **(** :ref:`String` to_node **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Allows control of :ref:`AnimationTree` state machines created with :ref:`AnimationNodeStateMachine`. Retrieve with ``$AnimationTree.get("parameters/playback")``. - -**Example:** - -:: - - var state_machine = $AnimationTree.get("parameters/playback") - state_machine.travel("some_state") - Method Descriptions ------------------- diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index fbd10e9ff..aed85a628 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -11,11 +11,6 @@ AnimationNodeStateMachineTransition **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index de59086a2..5748741c0 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -11,10 +11,5 @@ AnimationNodeTimeScale **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index 49fdecbdb..2895e2154 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -11,10 +11,5 @@ AnimationNodeTimeSeek **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index 7ff11d762..85e8562d4 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -11,11 +11,6 @@ AnimationNodeTransition **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 72bab8b7a..600cd325a 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -11,13 +11,22 @@ AnimationPlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Container and player of :ref:`Animation` resources. +Description +----------- + +An animation player is used for general-purpose playback of :ref:`Animation` resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. + +Updating the target properties of animations occurs at process time. + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/animations` + +- :doc:`../tutorials/animation/index` + Properties ---------- @@ -160,20 +169,6 @@ enum **AnimationMethodCallMode**: - **ANIMATION_METHOD_CALL_IMMEDIATE** = **1** --- Make method calls immediately when reached in the animation. -Description ------------ - -An animation player is used for general-purpose playback of :ref:`Animation` resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. - -Updating the target properties of animations occurs at process time. - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/animations` - -- :doc:`../tutorials/animation/index` - Property Descriptions --------------------- diff --git a/classes/class_animationrootnode.rst b/classes/class_animationrootnode.rst index 061eb18e9..ece1f97a6 100644 --- a/classes/class_animationrootnode.rst +++ b/classes/class_animationrootnode.rst @@ -13,10 +13,5 @@ AnimationRootNode **Inherited By:** :ref:`AnimationNodeAnimation`, :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeBlendTree`, :ref:`AnimationNodeStateMachine` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_animationtrackeditplugin.rst b/classes/class_animationtrackeditplugin.rst index de051ac3b..aa91f849a 100644 --- a/classes/class_animationtrackeditplugin.rst +++ b/classes/class_animationtrackeditplugin.rst @@ -11,10 +11,5 @@ AnimationTrackEditPlugin **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index a53cdba7f..93441c155 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -11,12 +11,14 @@ AnimationTree **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ +Tutorials +--------- + +- :doc:`../tutorials/animation/animation_tree` + +- `https://github.com/godotengine/tps-demo `_ Properties ---------- @@ -63,13 +65,6 @@ enum **AnimationProcessMode**: - **ANIMATION_PROCESS_MANUAL** = **2** -Tutorials ---------- - -- :doc:`../tutorials/animation/animation_tree` - -- `https://github.com/godotengine/tps-demo `_ - Property Descriptions --------------------- diff --git a/classes/class_animationtreeplayer.rst b/classes/class_animationtreeplayer.rst index 9c13e42cb..35b2ed9ac 100644 --- a/classes/class_animationtreeplayer.rst +++ b/classes/class_animationtreeplayer.rst @@ -11,13 +11,15 @@ AnimationTreePlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Animation Player that uses a node graph for blending Animations. +Description +----------- + +A node graph tool for blending multiple animations bound to an :ref:`AnimationPlayer`. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. + +It takes :ref:`Animation`\ s from an :ref:`AnimationPlayer` node and mixes them depending on the graph. + Properties ---------- @@ -211,13 +213,6 @@ enum **AnimationProcessMode**: - **ANIMATION_PROCESS_IDLE** = **1** --- Process animation during the idle process. -Description ------------ - -A node graph tool for blending multiple animations bound to an :ref:`AnimationPlayer`. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. - -It takes :ref:`Animation`\ s from an :ref:`AnimationPlayer` node and mixes them depending on the graph. - Property Descriptions --------------------- diff --git a/classes/class_area.rst b/classes/class_area.rst index c1d66924f..fba092745 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -11,13 +11,13 @@ Area **Inherits:** :ref:`CollisionObject` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - General-purpose area node for detection and 3D physics influence. +Description +----------- + +3D area that detects :ref:`CollisionObject` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). + Properties ---------- @@ -180,11 +180,6 @@ enum **SpaceOverride**: - **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. -Description ------------ - -3D area that detects :ref:`CollisionObject` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). - Property Descriptions --------------------- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index cc031378c..9c2f914f0 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -11,13 +11,18 @@ Area2D **Inherits:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - 2D area for detection and 2D physics influence. +Description +----------- + +2D area that detects :ref:`CollisionObject2D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). + +Tutorials +--------- + +- :doc:`../tutorials/physics/using_area_2d` + Properties ---------- @@ -172,16 +177,6 @@ enum **SpaceOverride**: - **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. -Description ------------ - -2D area that detects :ref:`CollisionObject2D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). - -Tutorials ---------- - -- :doc:`../tutorials/physics/using_area_2d` - Property Descriptions --------------------- diff --git a/classes/class_array.rst b/classes/class_array.rst index d61fddcd3..2e8ea2677 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -9,13 +9,26 @@ Array ===== -**Category:** Built-In Types - -Brief Description ------------------ - Generic array datatype. +Description +----------- + +Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). + +**Example:** + +:: + + var array = ["One", 2, 3, "Four"] + print(array[0]) # One + print(array[2]) # 3 + print(array[-1]) # Four + array[2] = "Three" + print(array[-2]) # Three + +Arrays are always passed by reference. + Methods ------- @@ -95,24 +108,6 @@ Methods | void | :ref:`sort_custom` **(** :ref:`Object` obj, :ref:`String` func **)** | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). - -**Example:** - -:: - - var array = ["One", 2, 3, "Four"] - print(array[0]) # One - print(array[2]) # 3 - print(array[-1]) # Four - array[2] = "Three" - print(array[-2]) # Three - -Arrays are always passed by reference. - Method Descriptions ------------------- @@ -411,18 +406,19 @@ Sorts the array. - void **sort_custom** **(** :ref:`Object` obj, :ref:`String` func **)** -Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return ``true`` if the first argument is less than the second, and return ``false`` otherwise. +Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either ``true`` or ``false``. **Note:** you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. :: class MyCustomSorter: - static func sort(a, b): + static func sort_ascending(a, b): if a[0] < b[0]: return true return false var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] - my_items.sort_custom(MyCustomSorter, "sort") + my_items.sort_custom(MyCustomSorter, "sort_ascending") + print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]] diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 9c472bf5e..3872eac5a 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -11,13 +11,31 @@ ArrayMesh **Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - :ref:`Mesh` type that provides utility for constructing a surface from arrays. +Description +----------- + +The ``ArrayMesh`` is used to construct a :ref:`Mesh` by specifying the attributes as arrays. The most basic example is the creation of a single triangle + +:: + + var vertices = PoolVector3Array() + vertices.push_back(Vector3(0, 1, 0)) + vertices.push_back(Vector3(1, 0, 0)) + vertices.push_back(Vector3(0, 0, 1)) + # Initialize the ArrayMesh. + var arr_mesh = ArrayMesh.new() + var arrays = [] + arrays.resize(ArrayMesh.ARRAY_MAX) + arrays[ArrayMesh.ARRAY_VERTEX] = vertices + # Create the Mesh. + arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) + var m = MeshInstance.new() + m.mesh = arr_mesh + +The ``MeshInstance`` is ready to be added to the SceneTree to be shown. + Properties ---------- @@ -166,29 +184,6 @@ Constants - **ARRAY_WEIGHTS_SIZE** = **4** --- Amount of weights/bone indices per vertex (always 4). -Description ------------ - -The ``ArrayMesh`` is used to construct a :ref:`Mesh` by specifying the attributes as arrays. The most basic example is the creation of a single triangle - -:: - - var vertices = PoolVector3Array() - vertices.push_back(Vector3(0, 1, 0)) - vertices.push_back(Vector3(1, 0, 0)) - vertices.push_back(Vector3(0, 0, 1)) - # Initialize the ArrayMesh. - var arr_mesh = ArrayMesh.new() - var arrays = [] - arrays.resize(ArrayMesh.ARRAY_MAX) - arrays[ArrayMesh.ARRAY_VERTEX] = vertices - # Create the Mesh. - arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) - var m = MeshInstance.new() - m.mesh = arr_mesh - -The ``MeshInstance`` is ready to be added to the SceneTree to be shown. - Property Descriptions --------------------- diff --git a/classes/class_arvranchor.rst b/classes/class_arvranchor.rst index cdee5697d..095fd7251 100644 --- a/classes/class_arvranchor.rst +++ b/classes/class_arvranchor.rst @@ -11,13 +11,17 @@ ARVRAnchor **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - An anchor point in AR space. +Description +----------- + +The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. + +This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized. + +Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. + Properties ---------- @@ -49,15 +53,6 @@ Signals Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being ``mesh_updated``. -Description ------------ - -The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. - -This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized. - -Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. - Property Descriptions --------------------- diff --git a/classes/class_arvrcamera.rst b/classes/class_arvrcamera.rst index 39848043d..d31bb8484 100644 --- a/classes/class_arvrcamera.rst +++ b/classes/class_arvrcamera.rst @@ -11,11 +11,6 @@ ARVRCamera **Inherits:** :ref:`Camera` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A camera node with a few overrules for AR/VR applied, such as location tracking. Description diff --git a/classes/class_arvrcontroller.rst b/classes/class_arvrcontroller.rst index 530ea5ca1..e42e9d348 100644 --- a/classes/class_arvrcontroller.rst +++ b/classes/class_arvrcontroller.rst @@ -11,13 +11,17 @@ ARVRController **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A spatial node representing a spatially-tracked controller. +Description +----------- + +This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. + +Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. + +The position of the controller node is automatically updated by the :ref:`ARVRServer`. This makes this node ideal to add child nodes to visualize the controller. + Properties ---------- @@ -71,15 +75,6 @@ Emitted when a button on this controller is released. Emitted when the mesh associated with the controller changes or when one becomes available. Generally speaking this will be a static mesh after becoming available. -Description ------------ - -This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. - -Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. - -The position of the controller node is automatically updated by the :ref:`ARVRServer`. This makes this node ideal to add child nodes to visualize the controller. - Property Descriptions --------------------- diff --git a/classes/class_arvrinterface.rst b/classes/class_arvrinterface.rst index f0cc0fe28..e96863109 100644 --- a/classes/class_arvrinterface.rst +++ b/classes/class_arvrinterface.rst @@ -13,13 +13,15 @@ ARVRInterface **Inherited By:** :ref:`ARVRInterfaceGDNative`, :ref:`MobileVRInterface` -**Category:** Core - -Brief Description ------------------ - Base class for an AR/VR interface implementation. +Description +----------- + +This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. + +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 :ref:`ARVRServer`. + Properties ---------- @@ -123,13 +125,6 @@ enum **Tracking_status**: - **ARVR_NOT_TRACKING** = **4** --- Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.) -Description ------------ - -This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. - -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 :ref:`ARVRServer`. - Property Descriptions --------------------- diff --git a/classes/class_arvrinterfacegdnative.rst b/classes/class_arvrinterfacegdnative.rst index ba2d14170..9a58256b2 100644 --- a/classes/class_arvrinterfacegdnative.rst +++ b/classes/class_arvrinterfacegdnative.rst @@ -11,11 +11,6 @@ ARVRInterfaceGDNative **Inherits:** :ref:`ARVRInterface` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - GDNative wrapper for an ARVR interface. Description diff --git a/classes/class_arvrorigin.rst b/classes/class_arvrorigin.rst index 77173657e..d03bf13c1 100644 --- a/classes/class_arvrorigin.rst +++ b/classes/class_arvrorigin.rst @@ -11,20 +11,8 @@ ARVROrigin **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - The origin point in AR/VR. -Properties ----------- - -+---------------------------+-----------------------------------------------------------+-----+ -| :ref:`float` | :ref:`world_scale` | 1.0 | -+---------------------------+-----------------------------------------------------------+-----+ - Description ----------- @@ -36,6 +24,13 @@ It is the position of this node that you update when your character needs to mov For example, if your character is driving a car, the ARVROrigin 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. +Properties +---------- + ++---------------------------+-----------------------------------------------------------+-----+ +| :ref:`float` | :ref:`world_scale` | 1.0 | ++---------------------------+-----------------------------------------------------------+-----+ + Property Descriptions --------------------- diff --git a/classes/class_arvrpositionaltracker.rst b/classes/class_arvrpositionaltracker.rst index f7ba28eb3..f680a98a1 100644 --- a/classes/class_arvrpositionaltracker.rst +++ b/classes/class_arvrpositionaltracker.rst @@ -11,13 +11,17 @@ ARVRPositionalTracker **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A tracked object. +Description +----------- + +An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally. + +As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the :ref:`ARVRServer`. + +The :ref:`ARVRController` and :ref:`ARVRAnchor` 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. + Properties ---------- @@ -69,15 +73,6 @@ enum **TrackerHand**: - **TRACKER_RIGHT_HAND** = **2** --- This tracker is the right hand controller. -Description ------------ - -An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally. - -As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the :ref:`ARVRServer`. - -The :ref:`ARVRController` and :ref:`ARVRAnchor` 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. - Property Descriptions --------------------- diff --git a/classes/class_arvrserver.rst b/classes/class_arvrserver.rst index 4ea937ab8..77fe03e46 100644 --- a/classes/class_arvrserver.rst +++ b/classes/class_arvrserver.rst @@ -11,13 +11,13 @@ ARVRServer **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - The AR/VR server. +Description +----------- + +The AR/VR server is the heart of our AR/VR solution and handles all the processing. + Properties ---------- @@ -138,11 +138,6 @@ enum **RotationMode**: - **DONT_RESET_ROTATION** = **2** --- Does not reset the orientation of the HMD, only the position of the player gets centered. -Description ------------ - -The AR/VR server is the heart of our AR/VR solution and handles all the processing. - Property Descriptions --------------------- diff --git a/classes/class_astar.rst b/classes/class_astar.rst index cf9ed9377..6c55e5f2d 100644 --- a/classes/class_astar.rst +++ b/classes/class_astar.rst @@ -11,13 +11,30 @@ AStar **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - An implementation of A\* to find shortest paths among connected points in space. +Description +----------- + +A\* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A\* implementation uses points in three-dimensional space and Euclidean distances by default. + +You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Then you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. + +It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. + +:: + + class MyAStar: + extends AStar + + func _compute_cost(u, v): + return abs(u - v) + + func _estimate_cost(u, v): + return min(0, abs(u - v) - 1) + +:ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom ``_compute_cost`` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. + Methods ------- @@ -73,28 +90,6 @@ Methods | void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A\* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A\* implementation uses points in three-dimensional space and Euclidean distances by default. - -You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Then you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. - -It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. - -:: - - class MyAStar: - extends AStar - - func _compute_cost(u, v): - return abs(u - v) - - func _estimate_cost(u, v): - return min(0, abs(u - v) - 1) - -:ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom ``_compute_cost`` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. - Method Descriptions ------------------- diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 872b1a449..c1bd22809 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -11,13 +11,13 @@ AStar2D **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - AStar class representation that uses 2d-vectors as edges. +Description +----------- + +This is a wrapper for the :ref:`AStar` class which uses 2D vectors instead of 3D vectors. + Methods ------- @@ -69,11 +69,6 @@ Methods | void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This is a wrapper for the :ref:`AStar` class which uses 2D vectors instead of 3D vectors. - Method Descriptions ------------------- diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index ac1366abe..38ce415f2 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -11,13 +11,13 @@ AtlasTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls. +Description +----------- + +:ref:`Texture` resource aimed at managing big textures files that pack multiple smaller textures. Consists of a :ref:`Texture`, a margin that defines the border width, and a region that defines the actual area of the AtlasTexture. + Properties ---------- @@ -33,11 +33,6 @@ Properties | :ref:`Rect2` | :ref:`region` | Rect2( 0, 0, 0, 0 ) | +-------------------------------+-------------------------------------------------------------+---------------------+ -Description ------------ - -:ref:`Texture` resource aimed at managing big textures files that pack multiple smaller textures. Consists of a :ref:`Texture`, a margin that defines the border width, and a region that defines the actual area of the AtlasTexture. - Property Descriptions --------------------- diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index 354e82590..b692b32ee 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -11,11 +11,6 @@ AudioBusLayout **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Stores information about the audio buses. Description diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index 2fe300415..10b6c3115 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -13,11 +13,6 @@ AudioEffect **Inherited By:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` -**Category:** Core - -Brief Description ------------------ - Audio effect for audio. Description diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index e2ce496ad..f2e4348ee 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -11,15 +11,15 @@ AudioEffectAmplify **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds an amplifying audio effect to an audio bus. Increases or decreases the volume of the selected audio bus. +Description +----------- + +Increases or decreases the volume being routed through the audio bus. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`volume_db` | 0.0 | +---------------------------+---------------------------------------------------------------+-----+ -Description ------------ - -Increases or decreases the volume being routed through the audio bus. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index e46a578bc..251edfe1e 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -11,11 +11,6 @@ AudioEffectBandLimitFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a band limit filter to the audio bus. Description diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 53fedfeda..c07d1c4d3 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -11,11 +11,6 @@ AudioEffectBandPassFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a band pass filter to the audio bus. Description diff --git a/classes/class_audioeffectchorus.rst b/classes/class_audioeffectchorus.rst index d03e8ea53..f18187ce7 100644 --- a/classes/class_audioeffectchorus.rst +++ b/classes/class_audioeffectchorus.rst @@ -11,13 +11,13 @@ AudioEffectChorus **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a chorus audio effect. +Description +----------- + +Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. + Properties ---------- @@ -106,11 +106,6 @@ Methods | void | :ref:`set_voice_rate_hz` **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** | +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectcompressor.rst b/classes/class_audioeffectcompressor.rst index 036056753..0efbd2b8d 100644 --- a/classes/class_audioeffectcompressor.rst +++ b/classes/class_audioeffectcompressor.rst @@ -11,15 +11,25 @@ AudioEffectCompressor **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a compressor audio effect to an audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. +Description +----------- + +Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB). + +Compressor has many uses in the mix: + +- In the Master bus to compress the whole output (although an :ref:`AudioEffectLimiter` is probably better). + +- In voice channels to ensure they sound as balanced as possible. + +- Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard. + +- Accentuates transients by using a wider attack, making effects sound more punchy. + Properties ---------- @@ -39,21 +49,6 @@ Properties | :ref:`float` | :ref:`threshold` | 0.0 | +-----------------------------+--------------------------------------------------------------------+-------+ -Description ------------ - -Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB). - -Compressor has many uses in the mix: - -- In the Master bus to compress the whole output (although an :ref:`AudioEffectLimiter` is probably better). - -- In voice channels to ensure they sound as balanced as possible. - -- Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard. - -- Accentuates transients by using a wider attack, making effects sound more punchy. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index 0e3184e3a..e063264fe 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -11,15 +11,15 @@ AudioEffectDelay **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. Two tap delay and feedback options. +Description +----------- + +Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. + Properties ---------- @@ -51,11 +51,6 @@ Properties | :ref:`float` | :ref:`tap2/pan` | -0.4 | +---------------------------+-----------------------------------------------------------------------------+---------+ -Description ------------ - -Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index 8d472c781..27548ffab 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -11,15 +11,17 @@ AudioEffectDistortion **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a distortion audio effect to an Audio bus. Modify the sound to make it dirty. +Description +----------- + +Modify the sound and make it dirty. Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. + +By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. + Properties ---------- @@ -62,13 +64,6 @@ enum **Mode**: - **MODE_WAVESHAPE** = **4** --- Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. -Description ------------ - -Modify the sound and make it dirty. Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. - -By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. - Property Descriptions --------------------- diff --git a/classes/class_audioeffecteq.rst b/classes/class_audioeffecteq.rst index f7d209ee0..1ca800425 100644 --- a/classes/class_audioeffecteq.rst +++ b/classes/class_audioeffecteq.rst @@ -13,15 +13,15 @@ AudioEffectEQ **Inherited By:** :ref:`AudioEffectEQ10`, :ref:`AudioEffectEQ21`, :ref:`AudioEffectEQ6` -**Category:** Core - -Brief Description ------------------ - Base class for audio equalizers. Gives you control over frequencies. Use it to create a custom equalizer if :ref:`AudioEffectEQ6`, :ref:`AudioEffectEQ10` or :ref:`AudioEffectEQ21` don't fit your needs. +Description +----------- + +AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). + Methods ------- @@ -33,11 +33,6 @@ Methods | void | :ref:`set_band_gain_db` **(** :ref:`int` band_idx, :ref:`float` volume_db **)** | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). - Method Descriptions ------------------- diff --git a/classes/class_audioeffecteq10.rst b/classes/class_audioeffecteq10.rst index e77766854..5148d9316 100644 --- a/classes/class_audioeffecteq10.rst +++ b/classes/class_audioeffecteq10.rst @@ -11,11 +11,6 @@ AudioEffectEQ10 **Inherits:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz. Each frequency can be modulated between -60/+24 dB. diff --git a/classes/class_audioeffecteq21.rst b/classes/class_audioeffecteq21.rst index 53b2e164f..501575136 100644 --- a/classes/class_audioeffecteq21.rst +++ b/classes/class_audioeffecteq21.rst @@ -11,11 +11,6 @@ AudioEffectEQ21 **Inherits:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz. Each frequency can be modulated between -60/+24 dB. diff --git a/classes/class_audioeffecteq6.rst b/classes/class_audioeffecteq6.rst index 93bf9f44a..e4677ee64 100644 --- a/classes/class_audioeffecteq6.rst +++ b/classes/class_audioeffecteq6.rst @@ -11,11 +11,6 @@ AudioEffectEQ6 **Inherits:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. Each frequency can be modulated between -60/+24 dB. diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 48916d5ae..91714df4d 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -13,13 +13,13 @@ AudioEffectFilter **Inherited By:** :ref:`AudioEffectBandLimitFilter`, :ref:`AudioEffectBandPassFilter`, :ref:`AudioEffectHighPassFilter`, :ref:`AudioEffectHighShelfFilter`, :ref:`AudioEffectLowPassFilter`, :ref:`AudioEffectLowShelfFilter`, :ref:`AudioEffectNotchFilter` -**Category:** Core - -Brief Description ------------------ - Adds a filter to the audio bus. +Description +----------- + +Allows frequencies other than the :ref:`cutoff_hz` to pass. + Properties ---------- @@ -56,11 +56,6 @@ enum **FilterDB**: - **FILTER_24DB** = **3** -Description ------------ - -Allows frequencies other than the :ref:`cutoff_hz` to pass. - Property Descriptions --------------------- diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index b37b8f057..c5a37b83f 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -11,11 +11,6 @@ AudioEffectHighPassFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a high-pass filter to the Audio Bus. Description diff --git a/classes/class_audioeffecthighshelffilter.rst b/classes/class_audioeffecthighshelffilter.rst index d7724ff10..1e24a4f49 100644 --- a/classes/class_audioeffecthighshelffilter.rst +++ b/classes/class_audioeffecthighshelffilter.rst @@ -11,10 +11,5 @@ AudioEffectHighShelfFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index a6a87abb9..5cc23c220 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -13,10 +13,5 @@ AudioEffectInstance **Inherited By:** :ref:`AudioEffectSpectrumAnalyzerInstance` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index c3441ed0b..5bd2c9d07 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -11,13 +11,15 @@ AudioEffectLimiter **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a soft-clip limiter audio effect to an Audio bus. +Description +----------- + +A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping. + +Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. + Properties ---------- @@ -31,13 +33,6 @@ Properties | :ref:`float` | :ref:`threshold_db` | 0.0 | +---------------------------+---------------------------------------------------------------------------+------+ -Description ------------ - -A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping. - -Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index 1d93d1797..53a9d49d1 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -11,11 +11,6 @@ AudioEffectLowPassFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a low-pass filter to the Audio bus. Description diff --git a/classes/class_audioeffectlowshelffilter.rst b/classes/class_audioeffectlowshelffilter.rst index 1fdf2ee84..aa0265432 100644 --- a/classes/class_audioeffectlowshelffilter.rst +++ b/classes/class_audioeffectlowshelffilter.rst @@ -11,10 +11,5 @@ AudioEffectLowShelfFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 737402f27..92adb4be8 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -11,11 +11,6 @@ AudioEffectNotchFilter **Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a notch filter to the Audio bus. Description diff --git a/classes/class_audioeffectpanner.rst b/classes/class_audioeffectpanner.rst index ff3211098..53c7f17c7 100644 --- a/classes/class_audioeffectpanner.rst +++ b/classes/class_audioeffectpanner.rst @@ -11,13 +11,13 @@ AudioEffectPanner **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a panner audio effect to an Audio bus. Pans sound left or right. +Description +----------- + +Determines how much of an audio signal is sent to the left and right buses. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`float` | :ref:`pan` | 0.0 | +---------------------------+--------------------------------------------------+-----+ -Description ------------ - -Determines how much of an audio signal is sent to the left and right buses. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index 96147fd5e..05365b2d0 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -11,15 +11,15 @@ AudioEffectPhaser **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a phaser audio effect to an Audio bus. Combines the original signal with a copy that is slightly out of phase with the original. +Description +----------- + +Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. + Properties ---------- @@ -35,11 +35,6 @@ Properties | :ref:`float` | :ref:`rate_hz` | 0.5 | +---------------------------+--------------------------------------------------------------------+--------+ -Description ------------ - -Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectpitchshift.rst b/classes/class_audioeffectpitchshift.rst index bc2fd4b0d..c99fbd0ef 100644 --- a/classes/class_audioeffectpitchshift.rst +++ b/classes/class_audioeffectpitchshift.rst @@ -11,15 +11,15 @@ AudioEffectPitchShift **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a pitch-shifting audio effect to an Audio bus. Raises or lowers the pitch of original sound. +Description +----------- + +Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. + Properties ---------- @@ -62,11 +62,6 @@ enum **FFT_Size**: - **FFT_SIZE_MAX** = **5** --- Represents the size of the :ref:`FFT_Size` enum. -Description ------------ - -Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index e3e053ef5..a112467b2 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -11,11 +11,6 @@ AudioEffectRecord **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index c8d262dcc..711f3a281 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -11,15 +11,15 @@ AudioEffectReverb **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Adds a reverberation audio effect to an Audio bus. Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. +Description +----------- + +Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room. + Properties ---------- @@ -41,11 +41,6 @@ Properties | :ref:`float` | :ref:`wet` | 0.5 | +---------------------------+------------------------------------------------------------------------------+-------+ -Description ------------ - -Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room. - Property Descriptions --------------------- diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 6c8858b59..c074719ed 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -11,11 +11,6 @@ AudioEffectSpectrumAnalyzer **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index e8f1306b2..5160d104a 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -11,11 +11,6 @@ AudioEffectSpectrumAnalyzerInstance **Inherits:** :ref:`AudioEffectInstance` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index 53e1ecf20..33c2e1a25 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -11,11 +11,6 @@ AudioEffectStereoEnhance **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 48c873e3d..575e7e44d 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -11,13 +11,18 @@ AudioServer **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Server interface for low-level audio access. +Description +----------- + +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. + +Tutorials +--------- + +- :doc:`../tutorials/audio/audio_buses` + Properties ---------- @@ -166,16 +171,6 @@ enum **SpeakerMode**: - **SPEAKER_SURROUND_71** = **3** --- A 7.1 channel surround setup was detected. -Description ------------ - -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. - -Tutorials ---------- - -- :doc:`../tutorials/audio/audio_buses` - Property Descriptions --------------------- diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index d9ac38c19..e4dab81c1 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -13,20 +13,8 @@ AudioStream **Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamOGGVorbis`, :ref:`AudioStreamRandomPitch`, :ref:`AudioStreamSample` -**Category:** Core - -Brief Description ------------------ - Base class for audio streams. -Methods -------- - -+---------------------------+--------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_length` **(** **)** const | -+---------------------------+--------------------------------------------------------------------------+ - Description ----------- @@ -37,6 +25,13 @@ Tutorials - :doc:`../tutorials/audio/audio_streams` +Methods +------- + ++---------------------------+--------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++---------------------------+--------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index 09efd3740..18cc53aca 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -11,12 +11,12 @@ AudioStreamGenerator **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ +Tutorials +--------- + +- `https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator `_ Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`mix_rate` | 44100.0 | +---------------------------+-------------------------------------------------------------------------+---------+ -Tutorials ---------- - -- `https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator `_ - Property Descriptions --------------------- diff --git a/classes/class_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index a349973f8..84ea1d1e9 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -11,12 +11,12 @@ AudioStreamGeneratorPlayback **Inherits:** :ref:`AudioStreamPlaybackResampled` **<** :ref:`AudioStreamPlayback` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ +Tutorials +--------- + +- `https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator `_ Methods ------- @@ -35,11 +35,6 @@ Methods | :ref:`bool` | :ref:`push_frame` **(** :ref:`Vector2` frame **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -Tutorials ---------- - -- `https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator `_ - Method Descriptions ------------------- diff --git a/classes/class_audiostreammicrophone.rst b/classes/class_audiostreammicrophone.rst index 279707b9d..8a4707c5c 100644 --- a/classes/class_audiostreammicrophone.rst +++ b/classes/class_audiostreammicrophone.rst @@ -11,10 +11,5 @@ AudioStreamMicrophone **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index e385dc93b..ec1de6540 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -11,10 +11,10 @@ AudioStreamOGGVorbis **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +OGG Vorbis audio stream driver. -Brief Description ------------------ +Description +----------- OGG Vorbis audio stream driver. @@ -29,11 +29,6 @@ Properties | :ref:`float` | :ref:`loop_offset` | 0.0 | +-------------------------------------------+---------------------------------------------------------------------+-------------------+ -Description ------------ - -OGG Vorbis audio stream driver. - Property Descriptions --------------------- @@ -65,6 +60,8 @@ Contains the audio data in bytes. | *Getter* | has_loop() | +-----------+-----------------+ +If ``true``, the stream will automatically loop when it reaches the end. + ---- .. _class_AudioStreamOGGVorbis_property_loop_offset: @@ -79,3 +76,5 @@ Contains the audio data in bytes. | *Getter* | get_loop_offset() | +-----------+------------------------+ +Time in seconds at which the stream starts after being looped. + diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 5a0fe36aa..4c54f31bb 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -13,11 +13,6 @@ AudioStreamPlayback **Inherited By:** :ref:`AudioStreamPlaybackResampled` -**Category:** Core - -Brief Description ------------------ - Meta class for playing back audio. Description diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index ee18babf2..d09ff003e 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -13,10 +13,5 @@ AudioStreamPlaybackResampled **Inherited By:** :ref:`AudioStreamGeneratorPlayback` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 4d3c51ae5..4c147be35 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -11,13 +11,18 @@ AudioStreamPlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Plays back audio non-positionally. +Description +----------- + +Plays an audio stream non-positionally. + +Tutorials +--------- + +- :doc:`../tutorials/audio/audio_streams` + Properties ---------- @@ -82,16 +87,6 @@ enum **MixTarget**: - **MIX_TARGET_CENTER** = **2** --- The audio will be played on the second channel, which is usually the center. -Description ------------ - -Plays an audio stream non-positionally. - -Tutorials ---------- - -- :doc:`../tutorials/audio/audio_streams` - Property Descriptions --------------------- @@ -199,6 +194,8 @@ The :ref:`AudioStream` object to be played. | *Getter* | get_stream_paused() | +-----------+--------------------------+ +If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. + ---- .. _class_AudioStreamPlayer_property_volume_db: @@ -230,6 +227,8 @@ Returns the position in the :ref:`AudioStream` in seconds. - :ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +Returns the :ref:`AudioStreamPlayback` object associated with this ``AudioStreamPlayer``. + ---- .. _class_AudioStreamPlayer_method_play: diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 82bcfa93d..213ae944f 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -11,13 +11,18 @@ AudioStreamPlayer2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Plays audio in 2D. +Description +----------- + +Plays audio that dampens with distance from screen center. + +Tutorials +--------- + +- :doc:`../tutorials/audio/audio_streams` + Properties ---------- @@ -67,16 +72,6 @@ Signals Emitted when the audio stops playing. -Description ------------ - -Plays audio that dampens with distance from screen center. - -Tutorials ---------- - -- :doc:`../tutorials/audio/audio_streams` - Property Descriptions --------------------- @@ -216,6 +211,8 @@ The :ref:`AudioStream` object to be played. | *Getter* | get_stream_paused() | +-----------+--------------------------+ +If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. + ---- .. _class_AudioStreamPlayer2D_property_volume_db: @@ -247,6 +244,8 @@ Returns the position in the :ref:`AudioStream`. - :ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +Returns the :ref:`AudioStreamPlayback` object associated with this ``AudioStreamPlayer2D``. + ---- .. _class_AudioStreamPlayer2D_method_play: diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 257959d52..d2452f35f 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -11,13 +11,18 @@ AudioStreamPlayer3D **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Plays 3D sound in 3D space. +Description +----------- + +Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. + +Tutorials +--------- + +- :doc:`../tutorials/audio/audio_streams` + Properties ---------- @@ -140,16 +145,6 @@ enum **DopplerTracking**: - **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Executes doppler tracking in physics step. -Description ------------ - -Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. - -Tutorials ---------- - -- :doc:`../tutorials/audio/audio_streams` - Property Descriptions --------------------- @@ -417,6 +412,8 @@ The :ref:`AudioStream` object to be played. | *Getter* | get_stream_paused() | +-----------+--------------------------+ +If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. + ---- .. _class_AudioStreamPlayer3D_property_unit_db: @@ -464,6 +461,8 @@ Returns the position in the :ref:`AudioStream`. - :ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +Returns the :ref:`AudioStreamPlayback` object associated with this ``AudioStreamPlayer3D``. + ---- .. _class_AudioStreamPlayer3D_method_play: diff --git a/classes/class_audiostreamrandompitch.rst b/classes/class_audiostreamrandompitch.rst index 9133ab5f5..ffb359760 100644 --- a/classes/class_audiostreamrandompitch.rst +++ b/classes/class_audiostreamrandompitch.rst @@ -11,13 +11,13 @@ AudioStreamRandomPitch **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Plays audio with random pitch shifting. +Description +----------- + +Randomly varies pitch on each start. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`random_pitch` | 1.1 | +---------------------------------------+-------------------------------------------------------------------------+-----+ -Description ------------ - -Randomly varies pitch on each start. - Property Descriptions --------------------- diff --git a/classes/class_audiostreamsample.rst b/classes/class_audiostreamsample.rst index 8f8878a6c..06596b8a5 100644 --- a/classes/class_audiostreamsample.rst +++ b/classes/class_audiostreamsample.rst @@ -11,13 +11,15 @@ AudioStreamSample **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Stores audio data loaded from WAV files. +Description +----------- + +AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an :ref:`AudioStreamPlayer` (for non-positional audio) or :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D` (for positional audio). The sound can be looped. + +This class can also be used to store dynamically-generated PCM audio data. + Properties ---------- @@ -85,13 +87,6 @@ enum **LoopMode**: - **LOOP_BACKWARD** = **3** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end` playing backward only. -Description ------------ - -AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an :ref:`AudioStreamPlayer` (for non-positional audio) or :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D` (for positional audio). The sound can be looped. - -This class can also be used to store dynamically-generated PCM audio data. - Property Descriptions --------------------- diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index e83319b67..826dcbebe 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -11,13 +11,13 @@ BackBufferCopy **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the ``texture(SCREEN_TEXTURE, ...)`` function. +Description +----------- + +Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the ``texture(SCREEN_TEXTURE, ...)`` function in your shader scripts to access the buffer. + Properties ---------- @@ -46,11 +46,6 @@ enum **CopyMode**: - **COPY_MODE_VIEWPORT** = **2** --- BackBufferCopy buffers the entire screen. -Description ------------ - -Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the ``texture(SCREEN_TEXTURE, ...)`` function in your shader scripts to access the buffer. - Property Descriptions --------------------- diff --git a/classes/class_bakedlightmap.rst b/classes/class_bakedlightmap.rst index 989f25983..f02f765e7 100644 --- a/classes/class_bakedlightmap.rst +++ b/classes/class_bakedlightmap.rst @@ -11,13 +11,18 @@ BakedLightmap **Inherits:** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Prerendered indirect light map for a scene. +Description +----------- + +Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the :ref:`GIProbe` approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time. + +Tutorials +--------- + +- :doc:`../tutorials/3d/baked_lightmaps` + Properties ---------- @@ -113,16 +118,6 @@ enum **BakeError**: - **BAKE_ERROR_USER_ABORTED** = **4** -Description ------------ - -Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the :ref:`GIProbe` approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time. - -Tutorials ---------- - -- :doc:`../tutorials/3d/baked_lightmaps` - Property Descriptions --------------------- diff --git a/classes/class_bakedlightmapdata.rst b/classes/class_bakedlightmapdata.rst index 8558a54f4..b235645ec 100644 --- a/classes/class_bakedlightmapdata.rst +++ b/classes/class_bakedlightmapdata.rst @@ -11,11 +11,6 @@ BakedLightmapData **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index d1786ba12..7f21f7285 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -13,13 +13,13 @@ BaseButton **Inherited By:** :ref:`Button`, :ref:`LinkButton`, :ref:`TextureButton` -**Category:** Core - -Brief Description ------------------ - Base class for different kinds of buttons. +Description +----------- + +BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it. + Properties ---------- @@ -118,7 +118,7 @@ enum **DrawMode**: - **DRAW_DISABLED** = **3** --- The state of buttons are disabled. -- **DRAW_HOVER_PRESSED** = **4** +- **DRAW_HOVER_PRESSED** = **4** --- The state of buttons are both hovered and pressed. ---- @@ -134,11 +134,6 @@ enum **ActionMode**: - **ACTION_MODE_BUTTON_RELEASE** = **1** --- Require a press and a subsequent release before considering the button clicked. -Description ------------ - -BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it. - Property Descriptions --------------------- diff --git a/classes/class_basis.rst b/classes/class_basis.rst index a18d77be3..b0eaa1f57 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -9,13 +9,20 @@ Basis ===== -**Category:** Built-In Types - -Brief Description ------------------ - 3×3 matrix datatype. +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 :ref:`Transform`. + +For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). + +Tutorials +--------- + +- :doc:`../tutorials/3d/using_transforms` + Properties ---------- @@ -93,18 +100,6 @@ Constants - **FLIP_Z** = **Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )** --- The basis that will flip something along the Z axis when used in a transformation. -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 :ref:`Transform`. - -For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). - -Tutorials ---------- - -- :doc:`../tutorials/3d/using_transforms` - Property Descriptions --------------------- diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index e3933a5ca..957545a75 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -11,13 +11,13 @@ BitMap **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Boolean matrix. +Description +----------- + +A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. + Methods ------- @@ -41,11 +41,6 @@ Methods | void | :ref:`set_bit_rect` **(** :ref:`Rect2` rect, :ref:`bool` bit **)** | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. - Method Descriptions ------------------- diff --git a/classes/class_bitmapfont.rst b/classes/class_bitmapfont.rst index b6c71f218..fca062796 100644 --- a/classes/class_bitmapfont.rst +++ b/classes/class_bitmapfont.rst @@ -11,15 +11,15 @@ BitmapFont **Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Renders text using fonts under the `BMFont `_ format. Handles files with the ``.fnt`` extension +Description +----------- + +Renders text using ``*.fnt`` fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see :ref:`DynamicFont`. + Properties ---------- @@ -56,11 +56,6 @@ Methods | :ref:`int` | :ref:`get_texture_count` **(** **)** const | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Renders text using ``*.fnt`` fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see :ref:`DynamicFont`. - Property Descriptions --------------------- diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index 5658cd7eb..f3c0a7fbb 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -11,13 +11,19 @@ Bone2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Joint used with :ref:`Skeleton2D` to control and animate other nodes. +Description +----------- + +Use a hierarchy of ``Bone2D`` bound to a :ref:`Skeleton2D` to control, and animate other :ref:`Node2D` nodes. + +You can use ``Bone2D`` and ``Skeleton2D`` nodes to animate 2D meshes created with the Polygon 2D UV editor. + +Each bone has a :ref:`rest` transform that you can reset to with :ref:`apply_rest`. These rest poses are relative to the bone's parent. + +If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. + Properties ---------- @@ -38,17 +44,6 @@ Methods | :ref:`Transform2D` | :ref:`get_skeleton_rest` **(** **)** const | +---------------------------------------+-------------------------------------------------------------------------------------------+ -Description ------------ - -Use a hierarchy of ``Bone2D`` bound to a :ref:`Skeleton2D` to control, and animate other :ref:`Node2D` nodes. - -You can use ``Bone2D`` and ``Skeleton2D`` nodes to animate 2D meshes created with the Polygon 2D UV editor. - -Each bone has a :ref:`rest` transform that you can reset to with :ref:`apply_rest`. These rest poses are relative to the bone's parent. - -If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. - Property Descriptions --------------------- diff --git a/classes/class_boneattachment.rst b/classes/class_boneattachment.rst index eb9730520..0a0f454aa 100644 --- a/classes/class_boneattachment.rst +++ b/classes/class_boneattachment.rst @@ -11,13 +11,13 @@ BoneAttachment **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A node that will attach to a bone. +Description +----------- + +This node must be the child of a :ref:`Skeleton` node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`String` | :ref:`bone_name` | "" | +-----------------------------+-----------------------------------------------------------+----+ -Description ------------ - -This node must be the child of a :ref:`Skeleton` node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. - Property Descriptions --------------------- diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 501b4afb6..290157fe2 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -9,13 +9,51 @@ bool ==== -**Category:** Built-In Types - -Brief Description ------------------ - Boolean built-in type. +Description +----------- + +Boolean is a built-in type. It can represent any data type that is either a true or false value. You can think of it as an switch with on or off (1 or 0) setting . It's often used as part of programming logic in condition statements like ``if`` statements. + +**Note:** In a code below ``if can_shoot`` is equivalent of ``if can_shoot == true``. It is good practice to follow the natural spoken language structure when possible. Use ``if can_shoot`` rather than ``if can_shoot == true`` and use ``if not can_shoot`` rather than ``if can_shoot == false``. + +:: + + var can_shoot = true + + func shoot(): + if can_shoot: + # Perform shooting actions here. + +The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if ``can_shoot`` is ``true``. + +**Note:** ``Input.is_action_pressed("shoot")`` is also a boolean that is ``true`` when "shoot" is pressed and ``false`` when "shoot" isn't pressed. + +:: + + var can_shoot = true + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + +The following code will set ``can_shoot`` to ``false`` and start a timer. This will prevent player from shooting until the timer runs out. Next ``can_shoot`` will be set to ``true`` again allowing player to shoot once again. + +:: + + var can_shoot = true + onready var cool_down = $CoolDownTimer + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + can_shoot = false + cool_down.start() + + func _on_CoolDownTimer_timeout(): + can_shoot = true + Methods ------- @@ -27,11 +65,6 @@ Methods | :ref:`bool` | :ref:`bool` **(** :ref:`String` from **)** | +-------------------------+----------------------------------------------------------------------------------+ -Description ------------ - -Boolean built-in type. - Method Descriptions ------------------- diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 981060314..926489911 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -13,13 +13,13 @@ BoxContainer **Inherited By:** :ref:`ColorPicker`, :ref:`HBoxContainer`, :ref:`VBoxContainer` -**Category:** Core - -Brief Description ------------------ - Base class for box containers. +Description +----------- + +Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes. + Properties ---------- @@ -55,11 +55,6 @@ enum **AlignMode**: - **ALIGN_END** = **2** --- Aligns children with the end of the container. -Description ------------ - -Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes. - Property Descriptions --------------------- diff --git a/classes/class_boxshape.rst b/classes/class_boxshape.rst index 74ba0a203..4523129c9 100644 --- a/classes/class_boxshape.rst +++ b/classes/class_boxshape.rst @@ -11,13 +11,13 @@ BoxShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Box shape resource. +Description +----------- + +3D box shape that can be a child of a :ref:`PhysicsBody` or :ref:`Area`. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Vector3` | :ref:`extents` | Vector3( 1, 1, 1 ) | +-------------------------------+-------------------------------------------------+--------------------+ -Description ------------ - -3D box shape that can be a child of a :ref:`PhysicsBody` or :ref:`Area`. - Property Descriptions --------------------- diff --git a/classes/class_bulletphysicsdirectbodystate.rst b/classes/class_bulletphysicsdirectbodystate.rst index 64f070847..088dd91b7 100644 --- a/classes/class_bulletphysicsdirectbodystate.rst +++ b/classes/class_bulletphysicsdirectbodystate.rst @@ -11,10 +11,5 @@ BulletPhysicsDirectBodyState **Inherits:** :ref:`PhysicsDirectBodyState` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_bulletphysicsserver.rst b/classes/class_bulletphysicsserver.rst index 3fa69fcba..47ef924ed 100644 --- a/classes/class_bulletphysicsserver.rst +++ b/classes/class_bulletphysicsserver.rst @@ -11,10 +11,5 @@ BulletPhysicsServer **Inherits:** :ref:`PhysicsServer` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_button.rst b/classes/class_button.rst index 0d7a96826..c0b2e7b47 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -13,13 +13,13 @@ Button **Inherited By:** :ref:`CheckBox`, :ref:`CheckButton`, :ref:`ColorPickerButton`, :ref:`MenuButton`, :ref:`OptionButton`, :ref:`ToolButton` -**Category:** Core - -Brief Description ------------------ - Standard themed Button. +Description +----------- + +Button is the standard themed button. It can contain text and an icon, and will display them according to the current :ref:`Theme`. + Properties ---------- @@ -83,11 +83,6 @@ enum **TextAlign**: - **ALIGN_RIGHT** = **2** --- Align the text to the right. -Description ------------ - -Button is the standard themed button. It can contain text and an icon, and will display them according to the current :ref:`Theme`. - Property Descriptions --------------------- diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index 2260a60ba..2458759c8 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -11,13 +11,15 @@ ButtonGroup **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Group of Buttons. +Description +----------- + +Group of :ref:`Button`. All direct and indirect children buttons become radios. Only one allows being pressed. + +:ref:`BaseButton.toggle_mode` should be ``true``. + Properties ---------- @@ -34,13 +36,6 @@ Methods | :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** | +-------------------------------------+------------------------------------------------------------------------------------+ -Description ------------ - -Group of :ref:`Button`. All direct and indirect children buttons become radios. Only one allows being pressed. - -:ref:`BaseButton.toggle_mode` should be ``true``. - Method Descriptions ------------------- diff --git a/classes/class_camera.rst b/classes/class_camera.rst index 68829c9ac..ca553ea46 100644 --- a/classes/class_camera.rst +++ b/classes/class_camera.rst @@ -13,13 +13,13 @@ Camera **Inherited By:** :ref:`ARVRCamera`, :ref:`ClippedCamera`, :ref:`InterpolatedCamera` -**Category:** Core - -Brief Description ------------------ - Camera node, displays from a point of view. +Description +----------- + +Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. + Properties ---------- @@ -139,11 +139,6 @@ enum **DopplerTracking**: - **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Simulate `Doppler effect `_ by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). -Description ------------ - -Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. - Property Descriptions --------------------- diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 8fb4d5cc1..39d6c2eb2 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -11,13 +11,15 @@ Camera2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Camera node for 2D scenes. +Description +----------- + +Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of :ref:`CanvasItem`-based nodes. + +This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from :ref:`Node2D` and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in :ref:`Viewport`. + Properties ---------- @@ -129,13 +131,6 @@ enum **Camera2DProcessMode**: - **CAMERA2D_PROCESS_IDLE** = **1** --- The camera updates with the ``_process`` callback. -Description ------------ - -Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of :ref:`CanvasItem`-based nodes. - -This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from :ref:`Node2D` and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in :ref:`Viewport`. - Property Descriptions --------------------- diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 0c64e8f07..49e0f2e5b 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -11,13 +11,15 @@ CameraFeed **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A camera feed gives you access to a single physical camera attached to your device. +Description +----------- + +A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. + +**Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. + Properties ---------- @@ -79,13 +81,6 @@ enum **FeedPosition**: - **FEED_BACK** = **2** --- Camera is mounted at the back of the device. -Description ------------ - -A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. - -**Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. - Property Descriptions --------------------- diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index 48b79940e..fe8cdf87c 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -11,11 +11,6 @@ CameraServer **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. Methods diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst index c931f7602..121895d59 100644 --- a/classes/class_cameratexture.rst +++ b/classes/class_cameratexture.rst @@ -11,11 +11,6 @@ CameraTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - This texture gives access to the camera texture provided by a :ref:`CameraFeed`. **Note:** Many cameras supply YCbCr images which need to be converted in a shader. diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index b7ee0931f..d9607768a 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -13,13 +13,28 @@ CanvasItem **Inherited By:** :ref:`Control`, :ref:`Node2D` -**Category:** Core - -Brief Description ------------------ - Base class of anything 2D. +Description +----------- + +Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. CanvasItem is extended by :ref:`Control` for anything GUI-related, and by :ref:`Node2D` for anything related to the 2D engine. + +Any CanvasItem can draw. For this, :ref:`update` must be called, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see ``draw_*`` functions). However, they can only be used inside the :ref:`Object._notification`, signal or :ref:`_draw` virtual functions. + +Canvas items are drawn in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything. This behavior can be changed on a per-item basis. + +A CanvasItem can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. + +Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. + +Tutorials +--------- + +- :doc:`../tutorials/2d/2d_transforms` + +- :doc:`../tutorials/2d/custom_drawing_in_2d` + Properties ---------- @@ -225,26 +240,6 @@ Constants - **NOTIFICATION_EXIT_CANVAS** = **33** --- The CanvasItem has exited the canvas. -Description ------------ - -Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. CanvasItem is extended by :ref:`Control` for anything GUI-related, and by :ref:`Node2D` for anything related to the 2D engine. - -Any CanvasItem can draw. For this, :ref:`update` must be called, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see ``draw_*`` functions). However, they can only be used inside the :ref:`Object._notification`, signal or :ref:`_draw` virtual functions. - -Canvas items are drawn in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything. This behavior can be changed on a per-item basis. - -A CanvasItem can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. - -Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. - -Tutorials ---------- - -- :doc:`../tutorials/2d/2d_transforms` - -- :doc:`../tutorials/2d/custom_drawing_in_2d` - Property Descriptions --------------------- @@ -379,6 +374,8 @@ Called (if exists) to draw the canvas item. - void **draw_arc** **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** +Draws an arc between the given angles. The larger the value of ``point_count``, the smoother the curve. + ---- .. _class_CanvasItem_method_draw_char: diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index b3ea2d7bb..3d519f648 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -11,13 +11,13 @@ CanvasItemMaterial **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A material for :ref:`CanvasItem`\ s. +Description +----------- + +``CanvasItemMaterial``\ s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a :ref:`ShaderMaterial` to more fully customize a material's interactions with a :ref:`CanvasItem`. + Properties ---------- @@ -80,11 +80,6 @@ enum **LightMode**: - **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light. -Description ------------ - -``CanvasItemMaterial``\ s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a :ref:`ShaderMaterial` to more fully customize a material's interactions with a :ref:`CanvasItem`. - Property Descriptions --------------------- diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 349896056..4075f235a 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -13,13 +13,20 @@ CanvasLayer **Inherited By:** :ref:`ParallaxBackground` -**Category:** Core - -Brief Description ------------------ - Canvas drawing layer. +Description +----------- + +Canvas drawing layer. :ref:`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). + +Tutorials +--------- + +- :doc:`../tutorials/2d/2d_transforms` + +- :doc:`../tutorials/2d/canvas_layers` + Properties ---------- @@ -50,18 +57,6 @@ Methods | :ref:`RID` | :ref:`get_canvas` **(** **)** const | +-----------------------+--------------------------------------------------------------------------+ -Description ------------ - -Canvas drawing layer. :ref:`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). - -Tutorials ---------- - -- :doc:`../tutorials/2d/2d_transforms` - -- :doc:`../tutorials/2d/canvas_layers` - Property Descriptions --------------------- diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index b9f4ca8da..daaf761b0 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -11,13 +11,13 @@ CanvasModulate **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Tint the entire canvas. +Description +----------- + +``CanvasModulate`` tints the canvas elements using its assigned :ref:`color`. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Color` | :ref:`color` | Color( 1, 1, 1, 1 ) | +---------------------------+---------------------------------------------------+---------------------+ -Description ------------ - -``CanvasModulate`` tints the canvas elements using its assigned :ref:`color`. - Property Descriptions --------------------- diff --git a/classes/class_capsulemesh.rst b/classes/class_capsulemesh.rst index e2fb890f0..a18951b62 100644 --- a/classes/class_capsulemesh.rst +++ b/classes/class_capsulemesh.rst @@ -11,10 +11,10 @@ CapsuleMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Class representing a capsule-shaped :ref:`PrimitiveMesh`. -Brief Description ------------------ +Description +----------- Class representing a capsule-shaped :ref:`PrimitiveMesh`. @@ -31,11 +31,6 @@ Properties | :ref:`int` | :ref:`rings` | 8 | +---------------------------+--------------------------------------------------------------------+-----+ -Description ------------ - -Class representing a capsule-shaped :ref:`PrimitiveMesh`. - Property Descriptions --------------------- diff --git a/classes/class_capsuleshape.rst b/classes/class_capsuleshape.rst index cb079a302..c5c35dd98 100644 --- a/classes/class_capsuleshape.rst +++ b/classes/class_capsuleshape.rst @@ -11,10 +11,10 @@ CapsuleShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Capsule shape for collisions. -Brief Description ------------------ +Description +----------- Capsule shape for collisions. @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`radius` | 1.0 | +---------------------------+---------------------------------------------------+-----+ -Description ------------ - -Capsule shape for collisions. - Property Descriptions --------------------- diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 3de79daa5..603f7ab05 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -11,10 +11,10 @@ CapsuleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Capsule shape for 2D collisions. -Brief Description ------------------ +Description +----------- Capsule shape for 2D collisions. @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`radius` | 10.0 | +---------------------------+-----------------------------------------------------+------+ -Description ------------ - -Capsule shape for 2D collisions. - Property Descriptions --------------------- diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index c478dc41f..1e7937f38 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -11,13 +11,13 @@ CenterContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Keeps children controls centered. +Description +----------- + +CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`bool` | :ref:`use_top_left` | false | +-------------------------+------------------------------------------------------------------+-------+ -Description ------------ - -CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. - Property Descriptions --------------------- diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 5a688a26a..6e5e97e0e 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -11,13 +11,20 @@ CharFXTransform **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Controls how an individual character will be displayed in a :ref:`RichTextEffect`. +Description +----------- + +By setting various properties on this object, you can control how individual characters will be displayed in a :ref:`RichTextEffect`. + +Tutorials +--------- + +- :doc:`../tutorials/gui/bbcode_in_richtextlabel` + +- `https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project `_ + Properties ---------- @@ -39,18 +46,6 @@ Properties | :ref:`bool` | :ref:`visible` | true | +-------------------------------------+----------------------------------------------------------------------+---------------------+ -Description ------------ - -By setting various properties on this object, you can control how individual characters will be displayed in a :ref:`RichTextEffect`. - -Tutorials ---------- - -- :doc:`../tutorials/gui/bbcode_in_richtextlabel` - -- `https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project `_ - Property Descriptions --------------------- diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 9f617bc1c..415dfbba6 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -11,13 +11,13 @@ CheckBox **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Binary choice user interface widget. +Description +----------- + +A checkbox allows the user to make a binary choice (choosing only one of two possible options). + Properties ---------- @@ -68,8 +68,3 @@ Theme Properties | :ref:`Texture` | unchecked | | +---------------------------------+--------------------------+------------------------------+ -Description ------------ - -A checkbox allows the user to make a binary choice (choosing only one of two possible options). - diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index 9f3fd30b8..66118c64e 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -11,13 +11,13 @@ CheckButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Checkable button. +Description +----------- + +CheckButton is a toggle button displayed as a check field. + Properties ---------- @@ -68,8 +68,3 @@ Theme Properties | :ref:`StyleBox` | pressed | | +---------------------------------+--------------------------+------------------------------+ -Description ------------ - -CheckButton is a toggle button displayed as a check field. - diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index c12105cdf..2360ef236 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -11,13 +11,13 @@ CircleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Circular shape for 2D collisions. +Description +----------- + +Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`float` | :ref:`radius` | 10.0 | +---------------------------+----------------------------------------------------+------+ -Description ------------ - -Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. - Property Descriptions --------------------- diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 71c4b1cb9..e8ba1aa71 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -11,13 +11,13 @@ ClassDB **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Class information repository. +Description +----------- + +Provides access to metadata stored for every available class. + Methods ------- @@ -63,11 +63,6 @@ Methods | :ref:`bool` | :ref:`is_parent_class` **(** :ref:`String` class, :ref:`String` inherits **)** const | +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Provides access to metadata stored for every available class. - Method Descriptions ------------------- diff --git a/classes/class_clippedcamera.rst b/classes/class_clippedcamera.rst index d3c5e083d..0c262478a 100644 --- a/classes/class_clippedcamera.rst +++ b/classes/class_clippedcamera.rst @@ -11,13 +11,13 @@ ClippedCamera **Inherits:** :ref:`Camera` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A :ref:`Camera` that includes collision. +Description +----------- + +This node extends :ref:`Camera` to add collisions with :ref:`Area` and/or :ref:`PhysicsBody` nodes. The camera cannot move through colliding objects. + Properties ---------- @@ -69,11 +69,6 @@ enum **ProcessMode**: - **CLIP_PROCESS_IDLE** = **1** --- The camera updates with the ``_process`` callback. -Description ------------ - -This node extends :ref:`Camera` to add collisions with :ref:`Area` and/or :ref:`PhysicsBody` nodes. The camera cannot move through colliding objects. - Property Descriptions --------------------- diff --git a/classes/class_collisionobject.rst b/classes/class_collisionobject.rst index b2b7f5100..2c768dd60 100644 --- a/classes/class_collisionobject.rst +++ b/classes/class_collisionobject.rst @@ -13,13 +13,13 @@ CollisionObject **Inherited By:** :ref:`Area`, :ref:`PhysicsBody` -**Category:** Core - -Brief Description ------------------ - Base node for collision objects. +Description +----------- + +CollisionObject is the base class for physics objects. It can hold any number of collision :ref:`Shape`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. + Properties ---------- @@ -93,11 +93,6 @@ Emitted when the mouse pointer enters any of this object's shapes. Emitted when the mouse pointer exits all this object's shapes. -Description ------------ - -CollisionObject is the base class for physics objects. It can hold any number of collision :ref:`Shape`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. - Property Descriptions --------------------- diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index d2235d36a..fabcb3057 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -13,13 +13,13 @@ CollisionObject2D **Inherited By:** :ref:`Area2D`, :ref:`PhysicsBody2D` -**Category:** Core - -Brief Description ------------------ - Base node for 2D collision objects. +Description +----------- + +CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision :ref:`Shape2D`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. + Properties ---------- @@ -99,11 +99,6 @@ Emitted when the mouse pointer enters any of this object's shapes. Requires :ref Emitted when the mouse pointer exits all this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one ``collision_layer`` bit to be set. -Description ------------ - -CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision :ref:`Shape2D`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. - Property Descriptions --------------------- @@ -152,6 +147,8 @@ Returns the object's :ref:`RID`. - :ref:`float` **get_shape_owner_one_way_collision_margin** **(** :ref:`int` owner_id **)** const +Returns the ``one_way_collision_margin`` of the shape owner identified by given ``owner_id``. + ---- .. _class_CollisionObject2D_method_get_shape_owners: @@ -278,6 +275,8 @@ If ``enable`` is ``true``, collisions for the shape owner originating from this - void **shape_owner_set_one_way_collision_margin** **(** :ref:`int` owner_id, :ref:`float` margin **)** +Sets the ``one_way_collision_margin`` of the shape owner identified by given ``owner_id`` to ``margin`` pixels. + ---- .. _class_CollisionObject2D_method_shape_owner_set_transform: diff --git a/classes/class_collisionpolygon.rst b/classes/class_collisionpolygon.rst index 919275db5..2245adc0a 100644 --- a/classes/class_collisionpolygon.rst +++ b/classes/class_collisionpolygon.rst @@ -11,13 +11,13 @@ CollisionPolygon **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Editor-only class for defining a collision polygon in 3D space. +Description +----------- + +Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a :ref:`Shape` for gameplay. Properties modified during gameplay will have no effect. + Properties ---------- @@ -29,11 +29,6 @@ Properties | :ref:`PoolVector2Array` | :ref:`polygon` | PoolVector2Array( ) | +-------------------------------------------------+-----------------------------------------------------------+----------------------+ -Description ------------ - -Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a :ref:`Shape` for gameplay. Properties modified during gameplay will have no effect. - Property Descriptions --------------------- diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 80f5dedd3..e0495e2f4 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -11,13 +11,13 @@ CollisionPolygon2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Defines a 2D collision polygon. +Description +----------- + +Provides a 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. + Properties ---------- @@ -48,11 +48,6 @@ enum **BuildMode**: - **BUILD_SEGMENTS** = **1** --- Collisions will only include the polygon edges. -Description ------------ - -Provides a 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. - Property Descriptions --------------------- diff --git a/classes/class_collisionshape.rst b/classes/class_collisionshape.rst index e90e259f2..b51f8c477 100644 --- a/classes/class_collisionshape.rst +++ b/classes/class_collisionshape.rst @@ -11,13 +11,18 @@ CollisionShape **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node that represents collision shape data in 3D space. +Description +----------- + +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 :ref:`Area` to give it a detection shape, or add it to a :ref:`PhysicsBody` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject.shape_owner_get_shape` to get the actual shape. + +Tutorials +--------- + +- :doc:`../tutorials/physics/physics_introduction` + Properties ---------- @@ -36,16 +41,6 @@ Methods | void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | +------+----------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -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 :ref:`Area` to give it a detection shape, or add it to a :ref:`PhysicsBody` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject.shape_owner_get_shape` to get the actual shape. - -Tutorials ---------- - -- :doc:`../tutorials/physics/physics_introduction` - Property Descriptions --------------------- diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 0f064bc57..f337c1249 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -11,13 +11,18 @@ CollisionShape2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node that represents collision shape data in 2D space. +Description +----------- + +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 :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. + +Tutorials +--------- + +- :doc:`../tutorials/physics/physics_introduction` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`Shape2D` | :ref:`shape` | | +-------------------------------+-------------------------------------------------------------------------------------------+-------+ -Description ------------ - -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 :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. - -Tutorials ---------- - -- :doc:`../tutorials/physics/physics_introduction` - Property Descriptions --------------------- diff --git a/classes/class_color.rst b/classes/class_color.rst index 8f474a0f5..d5299f1b3 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -9,13 +9,15 @@ Color ===== -**Category:** Built-In Types - -Brief Description ------------------ - Color in RGBA format with some support for ARGB format. +Description +----------- + +A color is represented by red, green, and blue ``(r, g, b)`` components. Additionally, ``a`` represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as :ref:`CanvasItem.modulate`) may accept values greater than 1. + +You can also create a color from standardized color names by using :ref:`@GDScript.ColorN`. + Properties ---------- @@ -675,13 +677,6 @@ Constants - **yellowgreen** = **Color( 0.6, 0.8, 0.2, 1 )** -Description ------------ - -A color is represented by red, green, and blue ``(r, g, b)`` components. Additionally, ``a`` represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as :ref:`CanvasItem.modulate`) may accept values greater than 1. - -You can also create a color from standardized color names by using :ref:`@GDScript.ColorN`. - Property Descriptions --------------------- diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 019f7dce9..755d82450 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -11,13 +11,13 @@ ColorPicker **Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Color picker control. +Description +----------- + +:ref:`Control` node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace. + Properties ---------- @@ -100,11 +100,6 @@ Emitted when a preset is added. Emitted when a preset is removed. -Description ------------ - -:ref:`Control` node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace. - Property Descriptions --------------------- diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index 12a1e6246..843b8fe80 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -11,13 +11,13 @@ ColorPickerButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Button that pops out a :ref:`ColorPicker`. +Description +----------- + +Encapsulates a :ref:`ColorPicker` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker` visibility. + Properties ---------- @@ -82,16 +82,15 @@ Emitted when the color changes. - **picker_created** **(** **)** +Emitted when the :ref:`ColorPicker` is created (the button is pressed for the first time). + ---- .. _class_ColorPickerButton_signal_popup_closed: - **popup_closed** **(** **)** -Description ------------ - -Encapsulates a :ref:`ColorPicker` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker` visibility. +Emitted when the :ref:`ColorPicker` is closed. Property Descriptions --------------------- diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index 540428117..57f3f3b80 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -11,13 +11,13 @@ ColorRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Colored rectangle. +Description +----------- + +Displays a colored rectangle. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Color` | :ref:`color` | Color( 1, 1, 1, 1 ) | +---------------------------+----------------------------------------------+---------------------+ -Description ------------ - -Displays a colored rectangle. - Property Descriptions --------------------- diff --git a/classes/class_concavepolygonshape.rst b/classes/class_concavepolygonshape.rst index 6bf4391a2..2f629ecd0 100644 --- a/classes/class_concavepolygonshape.rst +++ b/classes/class_concavepolygonshape.rst @@ -11,13 +11,13 @@ ConcavePolygonShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Concave polygon shape. +Description +----------- + +Concave polygon shape resource, which can be set into a :ref:`PhysicsBody` or area. This shape is created by feeding a list of triangles. + Methods ------- @@ -27,11 +27,6 @@ Methods | void | :ref:`set_faces` **(** :ref:`PoolVector3Array` faces **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Concave polygon shape resource, which can be set into a :ref:`PhysicsBody` or area. This shape is created by feeding a list of triangles. - Method Descriptions ------------------- diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index 92766bca2..21f579a07 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -11,20 +11,8 @@ ConcavePolygonShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Concave polygon 2D shape resource for physics. -Properties ----------- - -+-------------------------------------------------+----------------------------------------------------------------+----------------------+ -| :ref:`PoolVector2Array` | :ref:`segments` | PoolVector2Array( ) | -+-------------------------------------------------+----------------------------------------------------------------+----------------------+ - Description ----------- @@ -32,6 +20,13 @@ Concave polygon 2D shape resource for physics. It is made out of segments and is The main difference between a :ref:`ConvexPolygonShape2D` and a ``ConcavePolygonShape2D`` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. +Properties +---------- + ++-------------------------------------------------+----------------------------------------------------------------+----------------------+ +| :ref:`PoolVector2Array` | :ref:`segments` | PoolVector2Array( ) | ++-------------------------------------------------+----------------------------------------------------------------+----------------------+ + Property Descriptions --------------------- diff --git a/classes/class_conetwistjoint.rst b/classes/class_conetwistjoint.rst index 29e188eb6..6effb9416 100644 --- a/classes/class_conetwistjoint.rst +++ b/classes/class_conetwistjoint.rst @@ -11,13 +11,17 @@ ConeTwistJoint **Inherits:** :ref:`Joint` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A twist joint between two 3D bodies. +Description +----------- + +The joint can rotate the bodies across an axis defined by the local x-axes of the :ref:`Joint`. + +The twist axis is initiated as the X axis of the :ref:`Joint`. + +Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. + Properties ---------- @@ -83,15 +87,6 @@ The higher, the faster. - **PARAM_MAX** = **5** --- Represents the size of the :ref:`Param` enum. -Description ------------ - -The joint can rotate the bodies across an axis defined by the local x-axes of the :ref:`Joint`. - -The twist axis is initiated as the X axis of the :ref:`Joint`. - -Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. - Property Descriptions --------------------- diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 3c1cf2592..cc444bf60 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -11,13 +11,39 @@ ConfigFile **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Helper class to handle INI-style files. +Description +----------- + +This helper class can be used to store :ref:`Variant` values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: + +:: + + [section] + some_key=42 + string_example="Hello World!" + a_vector=Vector3( 1, 0, 2 ) + +The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. + +The following example shows how to parse an INI-style file from the system, read its contents and store new values in it: + +:: + + var config = ConfigFile.new() + var err = config.load("user://settings.cfg") + if err == OK: # If not, something went wrong with the file loading + # Look for the display/width pair, and default to 1024 if missing + var screen_width = config.get_value("display", "width", 1024) + # Store a variable if and only if it hasn't been defined yet + if not config.has_section_key("audio", "mute"): + config.set_value("audio", "mute", false) + # Save the changes by overwriting the previous file + config.save("user://settings.cfg") + +Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. + Methods ------- @@ -51,37 +77,6 @@ Methods | void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This helper class can be used to store :ref:`Variant` values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: - -:: - - [section] - some_key=42 - string_example="Hello World!" - a_vector=Vector3( 1, 0, 2 ) - -The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. - -The following example shows how to parse an INI-style file from the system, read its contents and store new values in it: - -:: - - var config = ConfigFile.new() - var err = config.load("user://settings.cfg") - if err == OK: # If not, something went wrong with the file loading - # Look for the display/width pair, and default to 1024 if missing - var screen_width = config.get_value("display", "width", 1024) - # Store a variable if and only if it hasn't been defined yet - if not config.has_section_key("audio", "mute"): - config.set_value("audio", "mute", false) - # Save the changes by overwriting the previous file - config.save("user://settings.cfg") - -Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. - Method Descriptions ------------------- diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 9e2e708a7..7b2ceda2d 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -13,13 +13,19 @@ ConfirmationDialog **Inherited By:** :ref:`EditorFileDialog`, :ref:`FileDialog`, :ref:`ScriptCreateDialog` -**Category:** Core - -Brief Description ------------------ - Dialog for confirmation of actions. +Description +----------- + +Dialog for confirmation of actions. This dialog inherits from :ref:`AcceptDialog`, but has by default an OK and Cancel button (in host OS order). + +To get cancel action, you can use: + +:: + + get_cancel().connect("pressed", self, "cancelled"). + Properties ---------- @@ -36,17 +42,6 @@ Methods | :ref:`Button` | :ref:`get_cancel` **(** **)** | +-----------------------------+---------------------------------------------------------------------------+ -Description ------------ - -Dialog for confirmation of actions. This dialog inherits from :ref:`AcceptDialog`, but has by default an OK and Cancel button (in host OS order). - -To get cancel action, you can use: - -:: - - get_cancel().connect("pressed", self, "cancelled"). - Method Descriptions ------------------- diff --git a/classes/class_container.rst b/classes/class_container.rst index e29bca000..e0110e2f5 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -13,13 +13,15 @@ Container **Inherited By:** :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`GraphNode`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`TabContainer`, :ref:`ViewportContainer` -**Category:** Core - -Brief Description ------------------ - Base node for containers. +Description +----------- + +Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way. + +A Control can inherit this to create custom container classes. + Methods ------- @@ -45,13 +47,6 @@ Constants - **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately. -Description ------------ - -Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way. - -A Control can inherit this to create custom container classes. - Method Descriptions ------------------- diff --git a/classes/class_control.rst b/classes/class_control.rst index cae9f507e..7bdfe0b02 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -13,13 +13,32 @@ Control **Inherited By:** :ref:`BaseButton`, :ref:`ColorRect`, :ref:`Container`, :ref:`GraphEdit`, :ref:`ItemList`, :ref:`Label`, :ref:`LineEdit`, :ref:`NinePatchRect`, :ref:`Panel`, :ref:`Popup`, :ref:`Range`, :ref:`ReferenceRect`, :ref:`RichTextLabel`, :ref:`Separator`, :ref:`Tabs`, :ref:`TextEdit`, :ref:`TextureRect`, :ref:`Tree`, :ref:`VideoPlayer` -**Category:** Core - -Brief Description ------------------ - All user interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent. +Description +----------- + +Base class for all UI-related nodes. ``Control`` features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. + +For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from ``Control`` and :ref:`Container` nodes. + +**User Interface nodes and input** + +Godot sends input events to the scene's root node first, by calling :ref:`Node._input`. :ref:`Node._input` forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls :ref:`MainLoop._input_event`. Call :ref:`accept_event` so no other node receives the event. Once you accepted an input, it becomes handled so :ref:`Node._unhandled_input` will not process it. + +Only one ``Control`` node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call :ref:`grab_focus`. ``Control`` nodes lose focus when another node grabs it, or if you hide the node in focus. + +Sets :ref:`mouse_filter` to :ref:`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. + +:ref:`Theme` resources change the Control's appearance. If you change the :ref:`Theme` on a ``Control`` node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_*_override`` methods, like :ref:`add_font_override`. You can override the theme with the inspector. + +Tutorials +--------- + +- :doc:`../tutorials/gui/index` + +- :doc:`../tutorials/2d/custom_drawing_in_2d` + Properties ---------- @@ -605,30 +624,6 @@ Constants - **NOTIFICATION_SCROLL_END** = **48** --- Sent when this node is inside a :ref:`ScrollContainer` which has stopped being scrolled. -Description ------------ - -Base class for all UI-related nodes. ``Control`` features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. - -For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from ``Control`` and :ref:`Container` nodes. - -**User Interface nodes and input** - -Godot sends input events to the scene's root node first, by calling :ref:`Node._input`. :ref:`Node._input` forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls :ref:`MainLoop._input_event`. Call :ref:`accept_event` so no other node receives the event. Once you accepted an input, it becomes handled so :ref:`Node._unhandled_input` will not process it. - -Only one ``Control`` node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call :ref:`grab_focus`. ``Control`` nodes lose focus when another node grabs it, or if you hide the node in focus. - -Sets :ref:`mouse_filter` to :ref:`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. - -:ref:`Theme` resources change the Control's appearance. If you change the :ref:`Theme` on a ``Control`` node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_*_override`` methods, like :ref:`add_font_override`. You can override the theme with the inspector. - -Tutorials ---------- - -- :doc:`../tutorials/gui/index` - -- :doc:`../tutorials/2d/custom_drawing_in_2d` - Property Descriptions --------------------- @@ -1600,7 +1595,7 @@ Virtual method to be implemented by the user. Returns whether the given ``point` If not overridden, default behavior is checking if the point is within control's Rect. -**Node:** If you want to check if a point is inside the control, you can use ``get_rect().has_point(point)``. +**Note:** If you want to check if a point is inside the control, you can use ``get_rect().has_point(point)``. ---- diff --git a/classes/class_convexpolygonshape.rst b/classes/class_convexpolygonshape.rst index be1128592..cde6602e7 100644 --- a/classes/class_convexpolygonshape.rst +++ b/classes/class_convexpolygonshape.rst @@ -11,13 +11,13 @@ ConvexPolygonShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Convex polygon shape for 3D physics. +Description +----------- + +Convex polygon shape resource, which can be added to a :ref:`PhysicsBody` or area. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`PoolVector3Array` | :ref:`points` | PoolVector3Array( ) | +-------------------------------------------------+---------------------------------------------------------+----------------------+ -Description ------------ - -Convex polygon shape resource, which can be added to a :ref:`PhysicsBody` or area. - Property Descriptions --------------------- diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 629d29228..48ce3329f 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -11,13 +11,15 @@ ConvexPolygonShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Convex polygon shape for 2D physics. +Description +----------- + +Convex polygon shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). + +The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. + Properties ---------- @@ -32,13 +34,6 @@ Methods | void | :ref:`set_point_cloud` **(** :ref:`PoolVector2Array` point_cloud **)** | +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Convex polygon shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). - -The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. - Property Descriptions --------------------- diff --git a/classes/class_cpuparticles.rst b/classes/class_cpuparticles.rst index 9e25263a6..d2c7f2bf7 100644 --- a/classes/class_cpuparticles.rst +++ b/classes/class_cpuparticles.rst @@ -11,13 +11,15 @@ CPUParticles **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - CPU-based 3D particle emitter. +Description +----------- + +CPU-based 3D particle node used to create a variety of particle systems and effects. + +See also :ref:`Particles`, which provides the same functionality with hardware acceleration, but may not run on older devices. + Properties ---------- @@ -301,13 +303,6 @@ enum **EmissionShape**: - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. -Description ------------ - -CPU-based 3D particle node used to create a variety of particle systems and effects. - -See also :ref:`Particles`, which provides the same functionality with hardware acceleration, but may not run on older devices. - Property Descriptions --------------------- diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index ac42b0eb5..f55069052 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -11,13 +11,20 @@ CPUParticles2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - CPU-based 2D particle emitter. +Description +----------- + +CPU-based 2D particle node used to create a variety of particle systems and effects. + +See also :ref:`Particles2D`, which provides the same functionality with hardware acceleration, but may not run on older devices. + +Tutorials +--------- + +- :doc:`../tutorials/2d/particle_systems_2d` + Properties ---------- @@ -295,18 +302,6 @@ enum **EmissionShape**: - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. -Description ------------ - -CPU-based 2D particle node used to create a variety of particle systems and effects. - -See also :ref:`Particles2D`, which provides the same functionality with hardware acceleration, but may not run on older devices. - -Tutorials ---------- - -- :doc:`../tutorials/2d/particle_systems_2d` - Property Descriptions --------------------- diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index df7370904..8d7053e8b 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -11,24 +11,8 @@ Crypto **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Access to advanced cryptographic functionalities. -Methods -------- - -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolByteArray` | :ref:`generate_random_bytes` **(** :ref:`int` size **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CryptoKey` | :ref:`generate_rsa` **(** :ref:`int` size **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`X509Certificate` | :ref:`generate_self_signed_certificate` **(** :ref:`CryptoKey` key, :ref:`String` issuer_name="CN=myserver,O=myorganisation,C=IT", :ref:`String` not_before="20140101000000", :ref:`String` not_after="20340101000000" **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -53,6 +37,19 @@ For now, this includes generating cryptographically secure random bytes, and RSA key.save("user://generated.key") cert.save("user://generated.crt") +**Note:** Not available in HTML5 exports. + +Methods +------- + ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolByteArray` | :ref:`generate_random_bytes` **(** :ref:`int` size **)** | ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CryptoKey` | :ref:`generate_rsa` **(** :ref:`int` size **)** | ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`X509Certificate` | :ref:`generate_self_signed_certificate` **(** :ref:`CryptoKey` key, :ref:`String` issuer_name="CN=myserver,O=myorganisation,C=IT", :ref:`String` not_before="20140101000000", :ref:`String` not_after="20340101000000" **)** | ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index fc48b9c1b..a45ca8801 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -11,13 +11,17 @@ CryptoKey **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A cryptographic key (RSA). +Description +----------- + +The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other :ref:`Resource`. + +They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate` and as private key in :ref:`StreamPeerSSL.accept_stream` along with the appropriate certificate. + +**Note:** Not available in HTML5 exports. + Methods ------- @@ -27,13 +31,6 @@ Methods | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | +---------------------------------------+---------------------------------------------------------------------------------------+ -Description ------------ - -The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other :ref:`Resource`. - -They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate` and as private key in :ref:`StreamPeerSSL.accept_stream` along with the appropriate certificate. - Method Descriptions ------------------- diff --git a/classes/class_csgbox.rst b/classes/class_csgbox.rst index eb969ec1d..f91f42374 100644 --- a/classes/class_csgbox.rst +++ b/classes/class_csgbox.rst @@ -11,13 +11,13 @@ CSGBox **Inherits:** :ref:`CSGPrimitive` **<** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CSG Box shape. +Description +----------- + +This node allows you to create a box for use with the CSG system. + Properties ---------- @@ -31,11 +31,6 @@ Properties | :ref:`float` | :ref:`width` | 2.0 | +---------------------------------+-------------------------------------------------+-----+ -Description ------------ - -This node allows you to create a box for use with the CSG system. - Property Descriptions --------------------- diff --git a/classes/class_csgcombiner.rst b/classes/class_csgcombiner.rst index f33f47fbc..740d8691d 100644 --- a/classes/class_csgcombiner.rst +++ b/classes/class_csgcombiner.rst @@ -11,11 +11,6 @@ CSGCombiner **Inherits:** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CSG node that allows you to combine other CSG modifiers. Description diff --git a/classes/class_csgcylinder.rst b/classes/class_csgcylinder.rst index dbccc3b4c..4915f752f 100644 --- a/classes/class_csgcylinder.rst +++ b/classes/class_csgcylinder.rst @@ -11,13 +11,13 @@ CSGCylinder **Inherits:** :ref:`CSGPrimitive` **<** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CSG Cylinder shape. +Description +----------- + +This node allows you to create a cylinder (or cone) for use with the CSG system. + Properties ---------- @@ -35,11 +35,6 @@ Properties | :ref:`bool` | :ref:`smooth_faces` | true | +---------------------------------+--------------------------------------------------------------+-------+ -Description ------------ - -This node allows you to create a cylinder (or cone) for use with the CSG system. - Property Descriptions --------------------- diff --git a/classes/class_csgmesh.rst b/classes/class_csgmesh.rst index 8fb662ce3..83fb350f9 100644 --- a/classes/class_csgmesh.rst +++ b/classes/class_csgmesh.rst @@ -11,13 +11,13 @@ CSGMesh **Inherits:** :ref:`CSGPrimitive` **<** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CSG Mesh shape that uses a mesh resource. +Description +----------- + +This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more then two faces. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`Mesh` | :ref:`mesh` | +---------------------------------+--------------------------------------------------+ -Description ------------ - -This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more then two faces. - Property Descriptions --------------------- diff --git a/classes/class_csgpolygon.rst b/classes/class_csgpolygon.rst index e1854fae9..032b2b87d 100644 --- a/classes/class_csgpolygon.rst +++ b/classes/class_csgpolygon.rst @@ -11,13 +11,13 @@ CSGPolygon **Inherits:** :ref:`CSGPrimitive` **<** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Extrudes a 2D polygon shape to create a 3D mesh. +Description +----------- + +This node takes a 2D polygon shape and extrudes it to create a 3D mesh. + Properties ---------- @@ -86,11 +86,6 @@ enum **PathRotation**: - **PATH_ROTATION_PATH_FOLLOW** = **2** --- Slice is rotate to match the path exactly. -Description ------------ - -This node takes a 2D polygon shape and extrudes it to create a 3D mesh. - Property Descriptions --------------------- diff --git a/classes/class_csgprimitive.rst b/classes/class_csgprimitive.rst index f29abe4be..2077106bf 100644 --- a/classes/class_csgprimitive.rst +++ b/classes/class_csgprimitive.rst @@ -13,11 +13,6 @@ CSGPrimitive **Inherited By:** :ref:`CSGBox`, :ref:`CSGCylinder`, :ref:`CSGMesh`, :ref:`CSGPolygon`, :ref:`CSGSphere`, :ref:`CSGTorus` -**Category:** Core - -Brief Description ------------------ - Base class for CSG primitives. Properties diff --git a/classes/class_csgshape.rst b/classes/class_csgshape.rst index ffa3c82ee..c26451f35 100644 --- a/classes/class_csgshape.rst +++ b/classes/class_csgshape.rst @@ -13,13 +13,13 @@ CSGShape **Inherited By:** :ref:`CSGCombiner`, :ref:`CSGPrimitive` -**Category:** Core - -Brief Description ------------------ - The CSG base class. +Description +----------- + +This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. + Properties ---------- @@ -73,11 +73,6 @@ enum **Operation**: - **OPERATION_SUBTRACTION** = **2** --- The second shape is subtracted from the first, leaving a dent with its shape. -Description ------------ - -This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. - Property Descriptions --------------------- diff --git a/classes/class_csgsphere.rst b/classes/class_csgsphere.rst index 4e50dd77f..32a61aa55 100644 --- a/classes/class_csgsphere.rst +++ b/classes/class_csgsphere.rst @@ -11,13 +11,13 @@ CSGSphere **Inherits:** :ref:`CSGPrimitive` **<** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CSG Sphere shape. +Description +----------- + +This node allows you to create a sphere for use with the CSG system. + Properties ---------- @@ -33,11 +33,6 @@ Properties | :ref:`bool` | :ref:`smooth_faces` | true | +---------------------------------+------------------------------------------------------------------+------+ -Description ------------ - -This node allows you to create a sphere for use with the CSG system. - Property Descriptions --------------------- diff --git a/classes/class_csgtorus.rst b/classes/class_csgtorus.rst index c76ca9b45..2ed370f6c 100644 --- a/classes/class_csgtorus.rst +++ b/classes/class_csgtorus.rst @@ -11,13 +11,13 @@ CSGTorus **Inherits:** :ref:`CSGPrimitive` **<** :ref:`CSGShape` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CSG Torus shape. +Description +----------- + +This node allows you to create a torus for use with the CSG system. + Properties ---------- @@ -35,11 +35,6 @@ Properties | :ref:`bool` | :ref:`smooth_faces` | true | +---------------------------------+-----------------------------------------------------------+------+ -Description ------------ - -This node allows you to create a torus for use with the CSG system. - Property Descriptions --------------------- diff --git a/classes/class_csharpscript.rst b/classes/class_csharpscript.rst index db171a59c..5f92e9369 100644 --- a/classes/class_csharpscript.rst +++ b/classes/class_csharpscript.rst @@ -11,11 +11,6 @@ CSharpScript **Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index b6edb38d0..e730784db 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -11,13 +11,13 @@ CubeMap **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A CubeMap is a 6-sided 3D texture. +Description +----------- + +A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. + Properties ---------- @@ -113,11 +113,6 @@ enum **Flags**: - **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. -Description ------------ - -A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. - Property Descriptions --------------------- diff --git a/classes/class_cubemesh.rst b/classes/class_cubemesh.rst index 1e1f05406..0d53af9b4 100644 --- a/classes/class_cubemesh.rst +++ b/classes/class_cubemesh.rst @@ -11,13 +11,15 @@ CubeMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Generate an axis-aligned cuboid :ref:`PrimitiveMesh`. -Brief Description ------------------ +Description +----------- Generate an axis-aligned cuboid :ref:`PrimitiveMesh`. +The cube's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to ``Vector3(3, 2, 1)``. + Properties ---------- @@ -31,13 +33,6 @@ Properties | :ref:`int` | :ref:`subdivide_width` | 0 | +-------------------------------+-------------------------------------------------------------------+--------------------+ -Description ------------ - -Generate an axis-aligned cuboid :ref:`PrimitiveMesh`. - -The cube's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to ``Vector3(3, 2, 1)``. - Property Descriptions --------------------- diff --git a/classes/class_curve.rst b/classes/class_curve.rst index c8e44fb18..ca3736a74 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -11,13 +11,13 @@ Curve **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A mathematic curve. +Description +----------- + +A curve that can be saved and re-used for other objects. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. + Properties ---------- @@ -100,11 +100,6 @@ enum **TangentMode**: - **TANGENT_MODE_COUNT** = **2** --- The total number of available tangent modes. -Description ------------ - -A curve that can be saved and re-used for other objects. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. - Property Descriptions --------------------- diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 1ae8794da..ec90e938a 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -11,13 +11,15 @@ Curve2D **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Describes a Bézier curve in 2D space. +Description +----------- + +This class describes a Bézier curve in 2D space. It is mainly used to give a shape to a :ref:`Path2D`, but can be manually sampled for other purposes. + +It keeps a cache of precalculated points along the curve, to speed up further calculations. + Properties ---------- @@ -66,13 +68,6 @@ Methods | :ref:`PoolVector2Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This class describes a Bézier curve in 2D space. It is mainly used to give a shape to a :ref:`Path2D`, but can be manually sampled for other purposes. - -It keeps a cache of precalculated points along the curve, to speed up further calculations. - Property Descriptions --------------------- diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index b117c3ee9..068f3bec7 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -11,13 +11,15 @@ Curve3D **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Describes a Bézier curve in 3D space. +Description +----------- + +This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a :ref:`Path`, but can be manually sampled for other purposes. + +It keeps a cache of precalculated points along the curve, to speed up further calculations. + Properties ---------- @@ -78,13 +80,6 @@ Methods | :ref:`PoolVector3Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a :ref:`Path`, but can be manually sampled for other purposes. - -It keeps a cache of precalculated points along the curve, to speed up further calculations. - Property Descriptions --------------------- diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index a4a60b338..53751c698 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -11,13 +11,13 @@ CurveTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A texture that shows a curve. +Description +----------- + +Renders a given :ref:`Curve` provided to it. Simplifies the task of drawing curves and/or saving them as image files. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`int` | :ref:`width` | 2048 | +---------------------------+-------------------------------------------------+------+ -Description ------------ - -Renders a given :ref:`Curve` provided to it. Simplifies the task of drawing curves and/or saving them as image files. - Property Descriptions --------------------- diff --git a/classes/class_cylindermesh.rst b/classes/class_cylindermesh.rst index 73199fbe2..93ca694cf 100644 --- a/classes/class_cylindermesh.rst +++ b/classes/class_cylindermesh.rst @@ -11,13 +11,13 @@ CylinderMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Class representing a cylindrical :ref:`PrimitiveMesh`. +Description +----------- + +Class representing a cylindrical :ref:`PrimitiveMesh`. This class can be used to create cones by setting either the :ref:`top_radius` or :ref:`bottom_radius` properties to 0.0. + Properties ---------- @@ -33,11 +33,6 @@ Properties | :ref:`float` | :ref:`top_radius` | 1.0 | +---------------------------+---------------------------------------------------------------------+-----+ -Description ------------ - -Class representing a cylindrical :ref:`PrimitiveMesh`. This class can be used to create cones by setting either the :ref:`top_radius` or :ref:`bottom_radius` properties to 0.0. - Property Descriptions --------------------- diff --git a/classes/class_cylindershape.rst b/classes/class_cylindershape.rst index 899dd6cd9..969ffd044 100644 --- a/classes/class_cylindershape.rst +++ b/classes/class_cylindershape.rst @@ -11,10 +11,10 @@ CylinderShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Cylinder shape for collisions. -Brief Description ------------------ +Description +----------- Cylinder shape for collisions. @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`radius` | 1.0 | +---------------------------+----------------------------------------------------+-----+ -Description ------------ - -Cylinder shape for collisions. - Property Descriptions --------------------- diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index 9887e7dac..b6acb814e 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -11,13 +11,13 @@ DampedSpringJoint2D **Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Damped spring constraint for 2D physics. +Description +----------- + +Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. + Properties ---------- @@ -31,11 +31,6 @@ Properties | :ref:`float` | :ref:`stiffness` | 20.0 | +---------------------------+--------------------------------------------------------------------+------+ -Description ------------ - -Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. - Property Descriptions --------------------- diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index ee48216b5..6ad76da20 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -9,13 +9,33 @@ Dictionary ========== -**Category:** Built-In Types - -Brief Description ------------------ - Dictionary type. +Description +----------- + +Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. + +Erasing elements while iterating over them **is not supported**. + +Creating a dictionary: + +:: + + var d = {4: 5, "A key": "A value", 28: [1, 2, 3]} + +To add a key to an existing dictionary, access it like an existing key and assign to it: + +:: + + d[4] = "hello" # Add integer 4 as a key and assign the String "hello" as its value. + d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it. + +Tutorials +--------- + +- `#dictionary <../getting_started/scripting/gdscript/gdscript_basics.html#dictionary>`_ in :doc:`../getting_started/scripting/gdscript/gdscript_basics` + Methods ------- @@ -43,31 +63,6 @@ Methods | :ref:`Array` | :ref:`values` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. - -Erasing elements while iterating over them **is not supported**. - -Creating a dictionary: - -:: - - var d = {4: 5, "A key": "A value", 28: [1, 2, 3]} - -To add a key to an existing dictionary, access it like an existing key and assign to it: - -:: - - d[4] = "hello" # Add integer 4 as a key and assign the String "hello" as its value. - d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it. - -Tutorials ---------- - -- `#dictionary <../getting_started/scripting/gdscript/gdscript_basics.html#dictionary>`_ in :doc:`../getting_started/scripting/gdscript/gdscript_basics` - Method Descriptions ------------------- diff --git a/classes/class_directionallight.rst b/classes/class_directionallight.rst index 48e88dcec..9eecabff5 100644 --- a/classes/class_directionallight.rst +++ b/classes/class_directionallight.rst @@ -11,13 +11,18 @@ DirectionalLight **Inherits:** :ref:`Light` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Directional light from a distance, as from the Sun. +Description +----------- + +A directional light is a type of :ref:`Light` 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 DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction. + +Tutorials +--------- + +- :doc:`../tutorials/3d/lights_and_shadows` + Properties ---------- @@ -76,16 +81,6 @@ enum **ShadowDepthRange**: - **SHADOW_DEPTH_RANGE_OPTIMIZED** = **1** --- Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. -Description ------------ - -A directional light is a type of :ref:`Light` 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 DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction. - -Tutorials ---------- - -- :doc:`../tutorials/3d/lights_and_shadows` - Property Descriptions --------------------- diff --git a/classes/class_directory.rst b/classes/class_directory.rst index 1abbae351..fb6cdf3e3 100644 --- a/classes/class_directory.rst +++ b/classes/class_directory.rst @@ -11,13 +11,38 @@ Directory **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Type used to handle the filesystem. +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 ``res://``. This may change in the future, so it is advised to always use :ref:`open` to initialize your ``Directory`` where you want to operate, with explicit error checking. + +Here is an example on how to iterate through the files of a directory: + +:: + + func dir_contents(path): + var dir = Directory.new() + if dir.open(path) == OK: + dir.list_dir_begin() + var file_name = dir.get_next() + while (file_name != ""): + if dir.current_is_dir(): + print("Found directory: " + file_name) + else: + print("Found file: " + file_name) + file_name = dir.get_next() + else: + print("An error occurred when trying to access the path.") + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/filesystem` + Methods ------- @@ -59,34 +84,6 @@ Methods | :ref:`Error` | :ref:`rename` **(** :ref:`String` from, :ref:`String` to **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Directory type. It is used to manage directories and their content (not restricted to the project folder). - -Here is an example on how to iterate through the files of a directory: - -:: - - func dir_contents(path): - var dir = Directory.new() - if dir.open(path) == OK: - dir.list_dir_begin() - var file_name = dir.get_next() - while (file_name != ""): - if dir.current_is_dir(): - print("Found directory: " + file_name) - else: - print("Found file: " + file_name) - file_name = dir.get_next() - else: - print("An error occurred when trying to access the path.") - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/filesystem` - Method Descriptions ------------------- diff --git a/classes/class_dynamicfont.rst b/classes/class_dynamicfont.rst index 4ad17f058..e69206b2a 100644 --- a/classes/class_dynamicfont.rst +++ b/classes/class_dynamicfont.rst @@ -11,13 +11,22 @@ DynamicFont **Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - DynamicFont renders vector font files at runtime. +Description +----------- + +DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like :ref:`BitmapFont`. This trades the faster loading time of :ref:`BitmapFont`\ s for the ability to change font parameters like size and spacing during runtime. :ref:`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 uses the `FreeType `_ library for rasterization. + +:: + + var dynamic_font = DynamicFont.new() + dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf") + dynamic_font.size = 64 + $"Label".set("custom_fonts/font", dynamic_font) + Properties ---------- @@ -85,20 +94,6 @@ enum **SpacingType**: - **SPACING_SPACE** = **3** --- Space spacing. -Description ------------ - -DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like :ref:`BitmapFont`. This trades the faster loading time of :ref:`BitmapFont`\ s for the ability to change font parameters like size and spacing during runtime. :ref:`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 uses the `FreeType `_ library for rasterization. - -:: - - var dynamic_font = DynamicFont.new() - dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf") - dynamic_font.size = 64 - $"Label".set("custom_fonts/font", dynamic_font) - Property Descriptions --------------------- diff --git a/classes/class_dynamicfontdata.rst b/classes/class_dynamicfontdata.rst index 72d672f80..3548078ff 100644 --- a/classes/class_dynamicfontdata.rst +++ b/classes/class_dynamicfontdata.rst @@ -11,13 +11,13 @@ DynamicFontData **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Used with :ref:`DynamicFont` to describe the location of a font file. +Description +----------- + +Used with :ref:`DynamicFont` to describe the location of a vector font file for dynamic rendering at runtime. + Properties ---------- @@ -48,11 +48,6 @@ enum **Hinting**: - **HINTING_NORMAL** = **2** --- Use the default font hinting mode (crisper but less smooth). -Description ------------ - -Used with :ref:`DynamicFont` to describe the location of a vector font file for dynamic rendering at runtime. - Property Descriptions --------------------- @@ -68,7 +63,7 @@ Property Descriptions | *Getter* | is_antialiased() | +-----------+------------------------+ -Controls whether the font should be rendered with anti-aliasing. +If ``true``, the font is rendered with anti-aliasing. ---- @@ -100,5 +95,5 @@ The path to the vector font file. | *Getter* | get_hinting() | +-----------+--------------------+ -The font hinting mode used by FreeType. +The font hinting mode used by FreeType. See :ref:`Hinting` for options. diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 7e94edff4..5dd8528b6 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -11,11 +11,6 @@ EditorExportPlugin **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 4bd96e31c..86982ba69 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -11,11 +11,6 @@ EditorFeatureProfile **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 27ad1b8e6..de856c666 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -11,11 +11,6 @@ EditorFileDialog **Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`WindowDialog` **<** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 49ed03ade..e08ce3e5e 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -11,13 +11,13 @@ EditorFileSystem **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Resource filesystem, as the editor sees it. +Description +----------- + +This object holds information of all resources in the filesystem, their types, etc. + Methods ------- @@ -72,11 +72,6 @@ Remitted if a resource is reimported. Emitted if the source of any imported file changed. -Description ------------ - -This object holds information of all resources in the filesystem, their types, etc. - Method Descriptions ------------------- diff --git a/classes/class_editorfilesystemdirectory.rst b/classes/class_editorfilesystemdirectory.rst index f99f4fd02..749bc26d8 100644 --- a/classes/class_editorfilesystemdirectory.rst +++ b/classes/class_editorfilesystemdirectory.rst @@ -11,13 +11,13 @@ EditorFileSystemDirectory **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A directory for the resource filesystem. +Description +----------- + +A more generalized, low-level variation of the directory concept. + Methods ------- @@ -51,11 +51,6 @@ Methods | :ref:`int` | :ref:`get_subdir_count` **(** **)** const | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A more generalized, low-level variation of the directory concept. - Method Descriptions ------------------- diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index ddbb4e7ca..95d449fd8 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -11,42 +11,8 @@ EditorImportPlugin **Inherits:** :ref:`ResourceImporter` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type. -Methods -------- - -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_import_options` **(** :ref:`int` preset **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_import_order` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_importer_name` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_option_visibility` **(** :ref:`String` option, :ref:`Dictionary` options **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_preset_count` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_preset_name` **(** :ref:`int` preset **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_priority` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_recognized_extensions` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_resource_type` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_save_extension` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_visible_name` **(** **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`import` **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`Array` platform_variants, :ref:`Array` gen_files **)** virtual | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -102,6 +68,35 @@ Tutorials - :doc:`../tutorials/plugins/editor/import_plugins` +Methods +------- + ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_import_options` **(** :ref:`int` preset **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_import_order` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_importer_name` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_option_visibility` **(** :ref:`String` option, :ref:`Dictionary` options **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_preset_count` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_preset_name` **(** :ref:`int` preset **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_priority` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_recognized_extensions` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_resource_type` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_save_extension` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_visible_name` **(** **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`import` **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`Array` platform_variants, :ref:`Array` gen_files **)** virtual | ++-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index 99c971653..46cb9cff1 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -11,11 +11,6 @@ EditorInspector **Inherits:** :ref:`ScrollContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index fe80d97c0..144a82f7d 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -11,13 +11,25 @@ EditorInspectorPlugin **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Plugin for adding custom property editors on inspector. +Description +----------- + +This plugins allows adding custom property editors to :ref:`EditorInspector`. + +Plugins are registered via :ref:`EditorPlugin.add_inspector_plugin`. + +When an object is edited, the :ref:`can_handle` function is called and must return ``true`` if the object type is supported. + +If supported, the function :ref:`parse_begin` will be called, allowing to place custom controls at the beginning of the class. + +Subsequently, the :ref:`parse_category` and :ref:`parse_property` are called for every category and property. They offer the ability to add custom controls to the inspector too. + +Finally :ref:`parse_end` will be called. + +On each of these calls, the "add" functions can be called. + Methods ------- @@ -39,23 +51,6 @@ Methods | :ref:`bool` | :ref:`parse_property` **(** :ref:`Object` object, :ref:`int` type, :ref:`String` path, :ref:`int` hint, :ref:`String` hint_text, :ref:`int` usage **)** virtual | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This plugins allows adding custom property editors to :ref:`EditorInspector`. - -Plugins are registered via :ref:`EditorPlugin.add_inspector_plugin`. - -When an object is edited, the :ref:`can_handle` function is called and must return ``true`` if the object type is supported. - -If supported, the function :ref:`parse_begin` will be called, allowing to place custom controls at the beginning of the class. - -Subsequently, the :ref:`parse_category` and :ref:`parse_property` are called for every category and property. They offer the ability to add custom controls to the inspector too. - -Finally :ref:`parse_end` will be called. - -On each of these calls, the "add" functions can be called. - Method Descriptions ------------------- diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 7f86cdb83..88825766d 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -11,13 +11,13 @@ EditorInterface **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Godot editor's interface. +Description +----------- + +EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. + Methods ------- @@ -71,11 +71,6 @@ Methods | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. - Method Descriptions ------------------- diff --git a/classes/class_editornavigationmeshgenerator.rst b/classes/class_editornavigationmeshgenerator.rst index abddbbd52..de28b01ce 100644 --- a/classes/class_editornavigationmeshgenerator.rst +++ b/classes/class_editornavigationmeshgenerator.rst @@ -11,11 +11,6 @@ EditorNavigationMeshGenerator **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index f1f460499..5dbdc1c4f 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -11,13 +11,18 @@ EditorPlugin **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Used by the editor to extend its functionality. +Description +----------- + +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 :ref:`EditorScript` to add functions to the editor. + +Tutorials +--------- + +- :doc:`../tutorials/plugins/editor/index` + Methods ------- @@ -257,16 +262,6 @@ enum **DockSlot**: - **DOCK_SLOT_MAX** = **8** --- Represents the size of the :ref:`DockSlot` enum. -Description ------------ - -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 :ref:`EditorScript` to add functions to the editor. - -Tutorials ---------- - -- :doc:`../tutorials/plugins/editor/index` - Method Descriptions ------------------- diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index a974a64be..8246ee20b 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -11,13 +11,13 @@ EditorProperty **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Custom control to edit properties for adding into the inspector. +Description +----------- + +This control allows property editing for one or multiple properties into :ref:`EditorInspector`. It is added via :ref:`EditorInspectorPlugin`. + Properties ---------- @@ -119,11 +119,6 @@ If you want a sub-resource to be edited, emit this signal with the resource. Emitted when selected. Used internally. -Description ------------ - -This control allows property editing for one or multiple properties into :ref:`EditorInspector`. It is added via :ref:`EditorInspectorPlugin`. - Property Descriptions --------------------- diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index 01498f4ca..0a7016cba 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -11,11 +11,6 @@ EditorResourceConversionPlugin **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index 6ba2a5f5b..b9c9122d0 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -11,13 +11,13 @@ EditorResourcePreview **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Helper to generate previews of resources or files. +Description +----------- + +This object is used to generate previews for resources of files. + Methods ------- @@ -42,11 +42,6 @@ Signals Emitted if a preview was invalidated (changed). ``path`` corresponds to the path of the preview. -Description ------------ - -This object is used to generate previews for resources of files. - Method Descriptions ------------------- diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index ae9212919..61de3a0b2 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -11,13 +11,13 @@ EditorResourcePreviewGenerator **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Custom generator of previews. +Description +----------- + +Custom code to generate previews. Please check ``file_dialog/thumbnail_size`` in :ref:`EditorSettings` to find out the right size to do previews at. + Methods ------- @@ -33,11 +33,6 @@ Methods | :ref:`bool` | :ref:`handles` **(** :ref:`String` type **)** virtual | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Custom code to generate previews. Please check ``file_dialog/thumbnail_size`` in :ref:`EditorSettings` to find out the right size to do previews at. - Method Descriptions ------------------- diff --git a/classes/class_editorsceneimporter.rst b/classes/class_editorsceneimporter.rst index 72ef933e5..e18cbacbb 100644 --- a/classes/class_editorsceneimporter.rst +++ b/classes/class_editorsceneimporter.rst @@ -13,11 +13,6 @@ EditorSceneImporter **Inherited By:** :ref:`EditorSceneImporterAssimp` -**Category:** Core - -Brief Description ------------------ - Imports scenes from third-parties' 3D files. Methods diff --git a/classes/class_editorsceneimporterassimp.rst b/classes/class_editorsceneimporterassimp.rst index 1a5fcbc4c..95db30a64 100644 --- a/classes/class_editorsceneimporterassimp.rst +++ b/classes/class_editorsceneimporterassimp.rst @@ -11,11 +11,6 @@ EditorSceneImporterAssimp **Inherits:** :ref:`EditorSceneImporter` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Multi-format 3D asset importer based on `Assimp `_. Description diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index 8780b4174..c8b485cba 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -11,24 +11,8 @@ EditorScenePostImport **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Post-processes scenes after import. -Methods -------- - -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_source_file` **(** **)** const | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_source_folder` **(** **)** const | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`post_import` **(** :ref:`Object` scene **)** virtual | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -60,6 +44,17 @@ Tutorials - `#custom-script <../getting_started/workflow/assets/importing_scenes.html#custom-script>`_ in :doc:`../getting_started/workflow/assets/importing_scenes` +Methods +------- + ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_source_file` **(** **)** const | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_source_folder` **(** **)** const | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`post_import` **(** :ref:`Object` scene **)** virtual | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 1d1d470e5..85d058734 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -11,26 +11,8 @@ EditorScript **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Base script that can be used to add extension functions to the editor. -Methods -------- - -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| void | :ref:`_run` **(** **)** virtual | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_root_node` **(** :ref:`Node` node **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_scene` **(** **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -50,6 +32,19 @@ Scripts extending this class and implementing its :ref:`_run` **(** **)** virtual | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_root_node` **(** :ref:`Node` node **)** | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_scene` **(** **)** | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst index f64cf9039..9f5ccc52f 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -11,13 +11,13 @@ EditorSelection **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Manages the SceneTree selection in the editor. +Description +----------- + +This object manages the SceneTree selection in the editor. + Methods ------- @@ -42,11 +42,6 @@ Signals Emitted when the selection changes. -Description ------------ - -This object manages the SceneTree selection in the editor. - Method Descriptions ------------------- diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 65916beb4..6a80bdb7c 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -11,13 +11,21 @@ EditorSettings **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Object that holds the project-independent editor settings. +Description +----------- + +Object that holds the project-independent editor settings. These settings are generally visible in the **Editor > Editor Settings** menu. + +Accessing the settings is done by using the regular :ref:`Object` API, such as: + +:: + + settings.set(prop,value) + settings.get(prop) + list_of_settings = settings.get_property_list() + Methods ------- @@ -71,19 +79,6 @@ Constants - **NOTIFICATION_EDITOR_SETTINGS_CHANGED** = **10000** --- Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes. -Description ------------ - -Object that holds the project-independent editor settings. These settings are generally visible in the **Editor > Editor Settings** menu. - -Accessing the settings is done by using the regular :ref:`Object` API, such as: - -:: - - settings.set(prop,value) - settings.get(prop) - list_of_settings = settings.get_property_list() - Method Descriptions ------------------- diff --git a/classes/class_editorspatialgizmo.rst b/classes/class_editorspatialgizmo.rst index c77294769..d3152d2f0 100644 --- a/classes/class_editorspatialgizmo.rst +++ b/classes/class_editorspatialgizmo.rst @@ -11,57 +11,52 @@ EditorSpatialGizmo **Inherits:** :ref:`SpatialGizmo` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Custom gizmo for editing Spatial objects. -Methods -------- - -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_segments` **(** :ref:`PoolVector3Array` segments **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_triangles` **(** :ref:`TriangleMesh` triangles **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_handles` **(** :ref:`PoolVector3Array` handles, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_lines` **(** :ref:`PoolVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_mesh` **(** :ref:`ArrayMesh` mesh, :ref:`bool` billboard=false, :ref:`SkinReference` skeleton=null, :ref:`Material` material=null **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_unscaled_billboard` **(** :ref:`Material` material, :ref:`float` default_scale=1 **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`commit_handle` **(** :ref:`int` index, :ref:`Variant` restore, :ref:`bool` cancel=false **)** virtual | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_handle_name` **(** :ref:`int` index **)** virtual | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_handle_value` **(** :ref:`int` index **)** virtual | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorSpatialGizmoPlugin` | :ref:`get_plugin` **(** **)** const | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Spatial` | :ref:`get_spatial_node` **(** **)** const | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_handle_highlighted` **(** :ref:`int` index **)** virtual | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`redraw` **(** **)** virtual | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_handle` **(** :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_spatial_node` **(** :ref:`Node` node **)** | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See :ref:`EditorSpatialGizmoPlugin` for more information. +Methods +------- + ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_segments` **(** :ref:`PoolVector3Array` segments **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_triangles` **(** :ref:`TriangleMesh` triangles **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_handles` **(** :ref:`PoolVector3Array` handles, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_lines` **(** :ref:`PoolVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color( 1, 1, 1, 1 ) **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_mesh` **(** :ref:`ArrayMesh` mesh, :ref:`bool` billboard=false, :ref:`SkinReference` skeleton=null, :ref:`Material` material=null **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_unscaled_billboard` **(** :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color( 1, 1, 1, 1 ) **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`commit_handle` **(** :ref:`int` index, :ref:`Variant` restore, :ref:`bool` cancel=false **)** virtual | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_handle_name` **(** :ref:`int` index **)** virtual | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_handle_value` **(** :ref:`int` index **)** virtual | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorSpatialGizmoPlugin` | :ref:`get_plugin` **(** **)** const | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Spatial` | :ref:`get_spatial_node` **(** **)** const | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_handle_highlighted` **(** :ref:`int` index **)** virtual | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`redraw` **(** **)** virtual | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_handle` **(** :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_spatial_node` **(** :ref:`Node` node **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- @@ -91,7 +86,7 @@ There are virtual functions which will be called upon editing of these handles. .. _class_EditorSpatialGizmo_method_add_lines: -- void **add_lines** **(** :ref:`PoolVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false **)** +- void **add_lines** **(** :ref:`PoolVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color( 1, 1, 1, 1 ) **)** Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during :ref:`redraw`. @@ -105,7 +100,7 @@ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines .. _class_EditorSpatialGizmo_method_add_unscaled_billboard: -- void **add_unscaled_billboard** **(** :ref:`Material` material, :ref:`float` default_scale=1 **)** +- void **add_unscaled_billboard** **(** :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color( 1, 1, 1, 1 ) **)** Adds an unscaled billboard for visualization. Call this function during :ref:`redraw`. diff --git a/classes/class_editorspatialgizmoplugin.rst b/classes/class_editorspatialgizmoplugin.rst index 5a6c95ad0..05b45b3f4 100644 --- a/classes/class_editorspatialgizmoplugin.rst +++ b/classes/class_editorspatialgizmoplugin.rst @@ -11,13 +11,18 @@ EditorSpatialGizmoPlugin **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Used by the editor to define Spatial gizmo types. +Description +----------- + +EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending ``EditorSpatialGizmoPlugin`` for the simpler gizmos, or creating a new :ref:`EditorSpatialGizmo` type. See the tutorial in the documentation for more info. + +Tutorials +--------- + +- :doc:`../tutorials/plugins/editor/spatial_gizmos` + Methods ------- @@ -57,16 +62,6 @@ Methods | void | :ref:`set_handle` **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending ``EditorSpatialGizmoPlugin`` for the simpler gizmos, or creating a new :ref:`EditorSpatialGizmo` type. See the tutorial in the documentation for more info. - -Tutorials ---------- - -- :doc:`../tutorials/plugins/editor/spatial_gizmos` - Method Descriptions ------------------- diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 131f1d4bd..7431ba02d 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -11,11 +11,6 @@ EditorSpinSlider **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index e22ded3e9..f05799d78 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -11,13 +11,13 @@ EditorVCSInterface **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Version Control System (VCS) interface which reads and writes to the local VCS in use. +Description +----------- + +Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDNative plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of ``EditorVCSInterface``. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. + Methods ------- @@ -45,11 +45,6 @@ Methods | void | :ref:`unstage_file` **(** :ref:`String` file_path **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDNative plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of ``EditorVCSInterface``. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. - Method Descriptions ------------------- diff --git a/classes/class_encodedobjectasid.rst b/classes/class_encodedobjectasid.rst index bd8382407..2088f70d9 100644 --- a/classes/class_encodedobjectasid.rst +++ b/classes/class_encodedobjectasid.rst @@ -11,20 +11,8 @@ EncodedObjectAsID **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Holds a reference to an :ref:`Object`'s instance ID. -Properties ----------- - -+-----------------------+--------------------------------------------------------------+---+ -| :ref:`int` | :ref:`object_id` | 0 | -+-----------------------+--------------------------------------------------------------+---+ - Description ----------- @@ -32,6 +20,13 @@ Utility class which holds a reference to the internal identifier of an :ref:`Obj This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs. +Properties +---------- + ++-----------------------+--------------------------------------------------------------+---+ +| :ref:`int` | :ref:`object_id` | 0 | ++-----------------------+--------------------------------------------------------------+---+ + Property Descriptions --------------------- diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 4ab21c123..613e6d4f8 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -11,13 +11,13 @@ Engine **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Access to basic engine properties. +Description +----------- + +The ``Engine`` class allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. + Properties ---------- @@ -47,12 +47,16 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_frames_per_second` **(** **)** const | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_idle_frames` **(** **)** const | ++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_license_info` **(** **)** const | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_license_text` **(** **)** const | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`MainLoop` | :ref:`get_main_loop` **(** **)** const | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_physics_frames` **(** **)** const | ++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_physics_interpolation_fraction` **(** **)** const | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_singleton` **(** :ref:`String` name **)** const | @@ -64,11 +68,6 @@ Methods | :ref:`bool` | :ref:`is_in_physics_frame` **(** **)** const | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -The ``Engine`` class allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. - Property Descriptions --------------------- @@ -116,6 +115,8 @@ The number of fixed iterations per second (for fixed process and physics). | *Getter* | get_physics_jitter_fix() | +-----------+-------------------------------+ +Controls how much physic ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. + ---- .. _class_Engine_property_target_fps: @@ -193,7 +194,7 @@ Returns a Dictionary of Arrays of donor names. - :ref:`int` **get_frames_drawn** **(** **)** -Returns the total number of frames drawn. +Returns the total number of frames drawn. If the render loop is disabled with ``--disable-render-loop`` via command line, this returns ``0``. See also :ref:`get_idle_frames`. ---- @@ -205,6 +206,14 @@ Returns the frames per second of the running game. ---- +.. _class_Engine_method_get_idle_frames: + +- :ref:`int` **get_idle_frames** **(** **)** const + +Returns the total number of frames passed since engine initialization which is advanced on each **idle frame**, regardless of whether the render loop is enabled. See also :ref:`get_frames_drawn`. + +---- + .. _class_Engine_method_get_license_info: - :ref:`Dictionary` **get_license_info** **(** **)** const @@ -229,6 +238,14 @@ Returns the main loop object (see :ref:`MainLoop` and :ref:`Scen ---- +.. _class_Engine_method_get_physics_frames: + +- :ref:`int` **get_physics_frames** **(** **)** const + +Returns the total number of frames passed since engine initialization which is advanced on each **physics frame**. + +---- + .. _class_Engine_method_get_physics_interpolation_fraction: - :ref:`float` **get_physics_interpolation_fraction** **(** **)** const @@ -241,6 +258,8 @@ Returns the fraction through the current physics tick we are at the time of rend - :ref:`Object` **get_singleton** **(** :ref:`String` name **)** const +Returns a global singleton with given ``name``. Often used for plugins, e.g. GodotPayments. + ---- .. _class_Engine_method_get_version_info: @@ -282,6 +301,8 @@ The ``hex`` value is encoded as follows, from left to right: one byte for the ma - :ref:`bool` **has_singleton** **(** :ref:`String` name **)** const +Returns ``true`` if a singleton with given ``name`` exists in global scope. + ---- .. _class_Engine_method_is_in_physics_frame: diff --git a/classes/class_environment.rst b/classes/class_environment.rst index f5b2cd07d..df2d114d6 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -11,13 +11,28 @@ Environment **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Resource for environment nodes (like :ref:`WorldEnvironment`) that define multiple rendering options. +Description +----------- + +Resource for environment nodes (like :ref:`WorldEnvironment`) that define multiple environment operations (such as background :ref:`Sky` or :ref:`Color`, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: + +- Depth of Field Blur + +- Glow + +- Tonemap (Auto Exposure) + +- Adjustments + +Tutorials +--------- + +- :doc:`../tutorials/3d/environment_and_post_processing` + +- :doc:`../tutorials/3d/high_dynamic_range` + Properties ---------- @@ -223,19 +238,19 @@ Enumerations enum **BGMode**: -- **BG_KEEP** = **5** --- Keep on screen every pixel drawn in the background. +- **BG_KEEP** = **5** --- Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. -- **BG_CLEAR_COLOR** = **0** --- Clear the background using the project's clear color. +- **BG_CLEAR_COLOR** = **0** --- Clears the background using the clear color defined in :ref:`ProjectSettings.rendering/environment/default_clear_color`. -- **BG_COLOR** = **1** --- Clear the background using a custom clear color. +- **BG_COLOR** = **1** --- Clears the background using a custom clear color. -- **BG_SKY** = **2** --- Display a user-defined sky in the background. +- **BG_SKY** = **2** --- Displays a user-defined sky in the background. -- **BG_COLOR_SKY** = **3** --- Clear the background using a custom clear color and allows defining a sky for shading and reflection. +- **BG_COLOR_SKY** = **3** --- Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than :ref:`BG_SKY` and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera). -- **BG_CANVAS** = **4** --- Display a :ref:`CanvasLayer` in the background. +- **BG_CANVAS** = **4** --- Displays a :ref:`CanvasLayer` in the background. -- **BG_CAMERA_FEED** = **6** --- Display a camera feed in the background. +- **BG_CAMERA_FEED** = **6** --- Displays a camera feed in the background. - **BG_MAX** = **7** --- Represents the size of the :ref:`BGMode` enum. @@ -257,9 +272,9 @@ enum **GlowBlendMode**: - **GLOW_BLEND_MODE_SCREEN** = **1** --- Screen glow blending mode. Increases brightness, used frequently with bloom. -- **GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. +- **GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). -- **GLOW_BLEND_MODE_REPLACE** = **3** --- Replace glow blending mode. Replaces all pixels' color by the glow value. +- **GLOW_BLEND_MODE_REPLACE** = **3** --- Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. ---- @@ -295,11 +310,11 @@ enum **ToneMapper**: enum **DOFBlurQuality**: -- **DOF_BLUR_QUALITY_LOW** = **0** --- Low depth-of-field blur quality. +- **DOF_BLUR_QUALITY_LOW** = **0** --- Low depth-of-field blur quality (fastest). - **DOF_BLUR_QUALITY_MEDIUM** = **1** --- Medium depth-of-field blur quality. -- **DOF_BLUR_QUALITY_HIGH** = **2** --- High depth-of-field blur quality. +- **DOF_BLUR_QUALITY_HIGH** = **2** --- High depth-of-field blur quality (slowest). ---- @@ -315,13 +330,13 @@ enum **DOFBlurQuality**: enum **SSAOBlur**: -- **SSAO_BLUR_DISABLED** = **0** +- **SSAO_BLUR_DISABLED** = **0** --- No blur for the screen-space ambient occlusion effect (fastest). -- **SSAO_BLUR_1x1** = **1** +- **SSAO_BLUR_1x1** = **1** --- 1×1 blur for the screen-space ambient occlusion effect. -- **SSAO_BLUR_2x2** = **2** +- **SSAO_BLUR_2x2** = **2** --- 2×2 blur for the screen-space ambient occlusion effect. -- **SSAO_BLUR_3x3** = **3** +- **SSAO_BLUR_3x3** = **3** --- 3×3 blur for the screen-space ambient occlusion effect (slowest). ---- @@ -335,31 +350,11 @@ enum **SSAOBlur**: enum **SSAOQuality**: -- **SSAO_QUALITY_LOW** = **0** +- **SSAO_QUALITY_LOW** = **0** --- Low quality for the screen-space ambient occlusion effect (fastest). -- **SSAO_QUALITY_MEDIUM** = **1** +- **SSAO_QUALITY_MEDIUM** = **1** --- Low quality for the screen-space ambient occlusion effect. -- **SSAO_QUALITY_HIGH** = **2** - -Description ------------ - -Resource for environment nodes (like :ref:`WorldEnvironment`) that define multiple environment operations (such as background :ref:`Sky` or :ref:`Color`, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: - -- Depth of Field Blur - -- Glow - -- Tonemap (Auto Exposure) - -- Adjustments - -Tutorials ---------- - -- :doc:`../tutorials/3d/environment_and_post_processing` - -- :doc:`../tutorials/3d/high_dynamic_range` +- **SSAO_QUALITY_HIGH** = **2** --- Low quality for the screen-space ambient occlusion effect (slowest). Property Descriptions --------------------- @@ -376,7 +371,7 @@ Property Descriptions | *Getter* | get_adjustment_brightness() | +-----------+----------------------------------+ -Global brightness value of the rendered scene (default value is 1). +The global brightness value of the rendered scene. Effective only if ``adjustment_enabled`` is ``true``. ---- @@ -390,7 +385,7 @@ Global brightness value of the rendered scene (default value is 1). | *Getter* | get_adjustment_color_correction() | +----------+----------------------------------------+ -Applies the provided :ref:`Texture` resource to affect the global color aspect of the rendered scene. +Applies the provided :ref:`Texture` resource to affect the global color aspect of the rendered scene. Effective only if ``adjustment_enabled`` is ``true``. ---- @@ -406,7 +401,7 @@ Applies the provided :ref:`Texture` resource to affect the global | *Getter* | get_adjustment_contrast() | +-----------+--------------------------------+ -Global contrast value of the rendered scene (default value is 1). +The global contrast value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``. ---- @@ -422,7 +417,7 @@ Global contrast value of the rendered scene (default value is 1). | *Getter* | is_adjustment_enabled() | +-----------+------------------------------+ -Enables the ``adjustment_*`` options provided by this resource. If ``false``, adjustments modifications will have no effect on the rendered scene. +If ``true``, enables the ``adjustment_*`` properties provided by this resource. If ``false``, modifications to the ``adjustment_*`` properties will have no effect on the rendered scene. ---- @@ -438,7 +433,7 @@ Enables the ``adjustment_*`` options provided by this resource. If ``false``, ad | *Getter* | get_adjustment_saturation() | +-----------+----------------------------------+ -Global color saturation value of the rendered scene (default value is 1). +The global color saturation value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``. ---- @@ -454,7 +449,7 @@ Global color saturation value of the rendered scene (default value is 1). | *Getter* | get_ambient_light_color() | +-----------+--------------------------------+ -:ref:`Color` of the ambient light. +The ambient light's :ref:`Color`. ---- @@ -470,7 +465,7 @@ Global color saturation value of the rendered scene (default value is 1). | *Getter* | get_ambient_light_energy() | +-----------+---------------------------------+ -Energy of the ambient light. The higher the value, the stronger the light. +The ambient light's energy. The higher the value, the stronger the light. ---- @@ -502,7 +497,7 @@ Defines the amount of light that the sky brings on the scene. A value of 0 means | *Getter* | get_tonemap_auto_exposure() | +-----------+----------------------------------+ -Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. +If ``true``, enables the tonemapping auto exposure mode of the scene renderer. If ``true``, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. ---- @@ -518,7 +513,7 @@ Enables the tonemapping auto exposure mode of the scene renderer. If activated, | *Getter* | get_tonemap_auto_exposure_max() | +-----------+--------------------------------------+ -Maximum luminance value for the auto exposure. +The maximum luminance value for the auto exposure. ---- @@ -534,7 +529,7 @@ Maximum luminance value for the auto exposure. | *Getter* | get_tonemap_auto_exposure_min() | +-----------+--------------------------------------+ -Minimum luminance value for the auto exposure. +The minimum luminance value for the auto exposure. ---- @@ -550,7 +545,7 @@ Minimum luminance value for the auto exposure. | *Getter* | get_tonemap_auto_exposure_grey() | +-----------+---------------------------------------+ -Scale of the auto exposure effect. Affects the intensity of auto exposure. +The scale of the auto exposure effect. Affects the intensity of auto exposure. ---- @@ -566,7 +561,7 @@ Scale of the auto exposure effect. Affects the intensity of auto exposure. | *Getter* | get_tonemap_auto_exposure_speed() | +-----------+----------------------------------------+ -Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. +The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. ---- @@ -582,7 +577,7 @@ Speed of the auto exposure effect. Affects the time needed for the camera to per | *Getter* | get_camera_feed_id() | +-----------+---------------------------+ -The id of the camera feed to show in the background. +The ID of the camera feed to show in the background. ---- @@ -598,7 +593,7 @@ The id of the camera feed to show in the background. | *Getter* | get_canvas_max_layer() | +-----------+-----------------------------+ -Maximum layer id (if using Layer background mode). +The maximum layer ID to display. Only effective when using the :ref:`BG_CANVAS` background mode. ---- @@ -614,7 +609,7 @@ Maximum layer id (if using Layer background mode). | *Getter* | get_bg_color() | +-----------+---------------------+ -Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). +The :ref:`Color` displayed for clear areas of the scene. Only effective when using the :ref:`BG_COLOR` or :ref:`BG_COLOR_SKY` background modes). ---- @@ -630,7 +625,7 @@ Color displayed for clear areas of the scene (if using Custom color or Color+Sky | *Getter* | get_bg_energy() | +-----------+----------------------+ -Power of light emitted by the background. +The power of the light emitted by the background. ---- @@ -646,7 +641,7 @@ Power of light emitted by the background. | *Getter* | get_background() | +-----------+-----------------------+ -Defines the mode of background. +The background mode. See :ref:`BGMode` for possible values. ---- @@ -660,7 +655,7 @@ Defines the mode of background. | *Getter* | get_sky() | +----------+----------------+ -:ref:`Sky` resource defined as background. +The :ref:`Sky` resource defined as background. ---- @@ -676,7 +671,7 @@ Defines the mode of background. | *Getter* | get_sky_custom_fov() | +-----------+---------------------------+ -:ref:`Sky` resource's custom field of view. +The :ref:`Sky` resource's custom field of view. ---- @@ -692,7 +687,7 @@ Defines the mode of background. | *Getter* | get_sky_orientation() | +-----------+------------------------------------+ -:ref:`Sky` resource's rotation expressed as a :ref:`Basis`. +The :ref:`Sky` resource's rotation expressed as a :ref:`Basis`. ---- @@ -708,7 +703,7 @@ Defines the mode of background. | *Getter* | get_sky_rotation() | +-----------+-------------------------+ -:ref:`Sky` resource's rotation expressed as Euler angles in radians. +The :ref:`Sky` resource's rotation expressed as Euler angles in radians. ---- @@ -724,7 +719,7 @@ Defines the mode of background. | *Getter* | get_sky_rotation_degrees() | +-----------+---------------------------------+ -:ref:`Sky` resource's rotation expressed as Euler angles in degrees. +The :ref:`Sky` resource's rotation expressed as Euler angles in degrees. ---- @@ -740,7 +735,7 @@ Defines the mode of background. | *Getter* | get_dof_blur_far_amount() | +-----------+--------------------------------+ -Amount of far blur. +The amount of far blur for the depth-of-field effect. ---- @@ -756,7 +751,7 @@ Amount of far blur. | *Getter* | get_dof_blur_far_distance() | +-----------+----------------------------------+ -Distance from the camera where the far blur effect affects the rendering. +The distance from the camera where the far blur effect affects the rendering. ---- @@ -772,7 +767,7 @@ Distance from the camera where the far blur effect affects the rendering. | *Getter* | is_dof_blur_far_enabled() | +-----------+---------------------------------+ -Enables the far blur effect. +If ``true``, enables the depth-of-field far blur effect. ---- @@ -788,7 +783,7 @@ Enables the far blur effect. | *Getter* | get_dof_blur_far_quality() | +-----------+---------------------------------+ -Quality of the far blur quality. +The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. ---- @@ -804,7 +799,7 @@ Quality of the far blur quality. | *Getter* | get_dof_blur_far_transition() | +-----------+------------------------------------+ -Transition between no-blur area and far blur. +The length of the transition between the no-blur area and far blur. ---- @@ -820,7 +815,7 @@ Transition between no-blur area and far blur. | *Getter* | get_dof_blur_near_amount() | +-----------+---------------------------------+ -Amount of near blur. +The amount of near blur for the depth-of-field effect. ---- @@ -852,7 +847,7 @@ Distance from the camera where the near blur effect affects the rendering. | *Getter* | is_dof_blur_near_enabled() | +-----------+----------------------------------+ -Enables the near blur effect. +If ``true``, enables the depth-of-field near blur effect. ---- @@ -868,7 +863,7 @@ Enables the near blur effect. | *Getter* | get_dof_blur_near_quality() | +-----------+----------------------------------+ -Quality of the near blur quality. +The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. ---- @@ -884,7 +879,7 @@ Quality of the near blur quality. | *Getter* | get_dof_blur_near_transition() | +-----------+-------------------------------------+ -Transition between near blur and no-blur area. +The length of the transition between the near blur and no-blur area. ---- @@ -900,7 +895,7 @@ Transition between near blur and no-blur area. | *Getter* | get_fog_color() | +-----------+---------------------------+ -Fog's :ref:`Color`. +The fog's :ref:`Color`. ---- @@ -916,7 +911,7 @@ Fog's :ref:`Color`. | *Getter* | get_fog_depth_begin() | +-----------+----------------------------+ -Fog's depth starting distance from the camera. +The fog's depth starting distance from the camera. ---- @@ -932,7 +927,7 @@ Fog's depth starting distance from the camera. | *Getter* | get_fog_depth_curve() | +-----------+----------------------------+ -Value defining the fog depth intensity. +The fog depth's intensity curve. A number of presets are available in the **Inspector** by right-clicking the curve. ---- @@ -948,7 +943,7 @@ Value defining the fog depth intensity. | *Getter* | is_fog_depth_enabled() | +-----------+------------------------------+ -Enables the fog depth. +If ``true``, the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). ---- @@ -964,7 +959,7 @@ Enables the fog depth. | *Getter* | get_fog_depth_end() | +-----------+--------------------------+ -Fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's :ref:`Camera.far` value. +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 :ref:`Camera.far` value. ---- @@ -980,7 +975,7 @@ Fog's depth end distance from the camera. If this value is set to 0, it will be | *Getter* | is_fog_enabled() | +-----------+------------------------+ -Enables the fog. Needs :ref:`fog_height_enabled` and/or :ref:`fog_depth_enabled` to actually display fog. +If ``true``, fog effects are enabled. :ref:`fog_height_enabled` and/or :ref:`fog_depth_enabled` must be set to ``true`` to actually display fog. ---- @@ -996,7 +991,7 @@ Enables the fog. Needs :ref:`fog_height_enabled`. +The depth fog's :ref:`Color` when looking towards the sun. ---- @@ -1092,7 +1087,7 @@ Sun :ref:`Color`. | *Getter* | get_fog_transmit_curve() | +-----------+-------------------------------+ -Amount of light that the fog transmits. +The intensity of the fog light transmittance effect. Amount of light that the fog transmits. ---- @@ -1108,7 +1103,7 @@ Amount of light that the fog transmits. | *Getter* | is_fog_transmit_enabled() | +-----------+---------------------------------+ -Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. +Enables fog's light transmission effect. If ``true``, light will be more visible in the fog to simulate light scattering as in real life. ---- @@ -1124,7 +1119,9 @@ Enables fog's light transmission. If enabled, lets reflections light to be trans | *Getter* | is_glow_bicubic_upscale_enabled() | +-----------+-----------------------------------+ -Smooths out blockiness created by sampling higher levels. +Smooths out the blockiness created by sampling higher levels, at the cost of performance. + +**Note:** When using the GLES2 renderer, this is only available if the GPU supports the ``GL_EXT_gpu_shader4`` extension. ---- @@ -1140,7 +1137,7 @@ Smooths out blockiness created by sampling higher levels. | *Getter* | get_glow_blend_mode() | +-----------+----------------------------+ -Glow blending mode. +The glow blending mode. ---- @@ -1156,7 +1153,7 @@ Glow blending mode. | *Getter* | get_glow_bloom() | +-----------+-----------------------+ -Bloom value (global glow). +The bloom's intensity. If set to a value higher than ``0``, this will make glow visible in areas darker than the :ref:`glow_hdr_threshold`. ---- @@ -1172,7 +1169,7 @@ Bloom value (global glow). | *Getter* | is_glow_enabled() | +-----------+-------------------------+ -Enables glow rendering. +If ``true``, the glow effect is enabled. ---- @@ -1188,6 +1185,8 @@ Enables glow rendering. | *Getter* | get_glow_hdr_luminance_cap() | +-----------+-----------------------------------+ +The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. + ---- .. _class_Environment_property_glow_hdr_scale: @@ -1202,7 +1201,7 @@ Enables glow rendering. | *Getter* | get_glow_hdr_bleed_scale() | +-----------+---------------------------------+ -Bleed scale of the HDR glow. +The bleed scale of the HDR glow. ---- @@ -1218,7 +1217,7 @@ Bleed scale of the HDR glow. | *Getter* | get_glow_hdr_bleed_threshold() | +-----------+-------------------------------------+ -Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. +The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below ``1.0`` for glow to be visible. A value of ``0.9`` works well in this case. ---- @@ -1234,7 +1233,7 @@ Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order f | *Getter* | get_glow_intensity() | +-----------+---------------------------+ -Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. +The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. ---- @@ -1250,7 +1249,7 @@ Glow intensity. In GLES2, this should be increased to 1.5 by default to compensa | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -First level of glow (most local). +If ``true``, the 1st level of glow is enabled. This is the most "local" level (least blurry). ---- @@ -1266,7 +1265,7 @@ First level of glow (most local). | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -Second level of glow. +If ``true``, the 2th level of glow is enabled. ---- @@ -1282,7 +1281,7 @@ Second level of glow. | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -Third level of glow. +If ``true``, the 3th level of glow is enabled. ---- @@ -1298,7 +1297,7 @@ Third level of glow. | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -Fourth level of glow. +If ``true``, the 4th level of glow is enabled. ---- @@ -1314,7 +1313,7 @@ Fourth level of glow. | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -Fifth level of glow. +If ``true``, the 5th level of glow is enabled. ---- @@ -1330,7 +1329,7 @@ Fifth level of glow. | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -Sixth level of glow. +If ``true``, the 6th level of glow is enabled. ---- @@ -1346,7 +1345,7 @@ Sixth level of glow. | *Getter* | is_glow_level_enabled() | +-----------+-------------------------+ -Seventh level of glow (most global). +If ``true``, the 7th level of glow is enabled. This is the most "global" level (blurriest). ---- @@ -1362,7 +1361,7 @@ Seventh level of glow (most global). | *Getter* | get_glow_strength() | +-----------+--------------------------+ -Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. +The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. ---- @@ -1378,6 +1377,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssr_depth_tolerance() | +-----------+--------------------------------+ +The depth tolerance for screen-space reflections. + ---- .. _class_Environment_property_ss_reflections_enabled: @@ -1392,6 +1393,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | is_ssr_enabled() | +-----------+------------------------+ +If ``true``, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from :ref:`GIProbe`\ s or :ref:`ReflectionProbe`\ s, but are slower and can't reflect surfaces occluded by others. + ---- .. _class_Environment_property_ss_reflections_fade_in: @@ -1406,6 +1409,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssr_fade_in() | +-----------+------------------------+ +The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). + ---- .. _class_Environment_property_ss_reflections_fade_out: @@ -1420,6 +1425,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssr_fade_out() | +-----------+-------------------------+ +The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. + ---- .. _class_Environment_property_ss_reflections_max_steps: @@ -1434,6 +1441,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssr_max_steps() | +-----------+--------------------------+ +The maximum number of steps for screen-space reflections. Higher values are slower. + ---- .. _class_Environment_property_ss_reflections_roughness: @@ -1448,6 +1457,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | is_ssr_rough() | +-----------+----------------------+ +If ``true``, screen-space reflections will take the material roughness into account. + ---- .. _class_Environment_property_ssao_ao_channel_affect: @@ -1462,6 +1473,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_ao_channel_affect() | +-----------+-----------------------------------+ +The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than ``0`` will make the SSAO effect visible in areas darkened by AO textures. + ---- .. _class_Environment_property_ssao_bias: @@ -1476,6 +1489,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_bias() | +-----------+----------------------+ +The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion. + ---- .. _class_Environment_property_ssao_blur: @@ -1490,6 +1505,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_blur() | +-----------+----------------------+ +The screen-space ambient occlusion blur quality. See :ref:`SSAOBlur` for possible values. + ---- .. _class_Environment_property_ssao_color: @@ -1504,6 +1521,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_color() | +-----------+-----------------------+ +The screen-space ambient occlusion color. + ---- .. _class_Environment_property_ssao_edge_sharpness: @@ -1518,6 +1537,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_edge_sharpness() | +-----------+--------------------------------+ +The screen-space ambient occlusion edge sharpness. + ---- .. _class_Environment_property_ssao_enabled: @@ -1532,6 +1553,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | is_ssao_enabled() | +-----------+-------------------------+ +If ``true``, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues. + ---- .. _class_Environment_property_ssao_intensity: @@ -1546,6 +1569,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_intensity() | +-----------+---------------------------+ +The primary screen-space ambient occlusion intensity. See also :ref:`ssao_radius`. + ---- .. _class_Environment_property_ssao_intensity2: @@ -1560,6 +1585,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_intensity2() | +-----------+----------------------------+ +The secondary screen-space ambient occlusion intensity. See also :ref:`ssao_radius2`. + ---- .. _class_Environment_property_ssao_light_affect: @@ -1574,6 +1601,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_direct_light_affect() | +-----------+-------------------------------------+ +The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than ``0`` will make the SSAO effect visible in direct light. + ---- .. _class_Environment_property_ssao_quality: @@ -1588,6 +1617,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_quality() | +-----------+-------------------------+ +The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower. + ---- .. _class_Environment_property_ssao_radius: @@ -1602,6 +1633,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_radius() | +-----------+------------------------+ +The primary screen-space ambient occlusion radius. + ---- .. _class_Environment_property_ssao_radius2: @@ -1616,6 +1649,8 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_ssao_radius2() | +-----------+-------------------------+ +The secondary screen-space ambient occlusion radius. If set to a value higher than ``0``, enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance). + ---- .. _class_Environment_property_tonemap_exposure: @@ -1630,7 +1665,7 @@ Glow strength. In GLES2, this should be increased to 1.3 by default to compensat | *Getter* | get_tonemap_exposure() | +-----------+-----------------------------+ -Default exposure for tonemap. +The default exposure used for tonemapping. ---- @@ -1646,7 +1681,7 @@ Default exposure for tonemap. | *Getter* | get_tonemapper() | +-----------+-----------------------+ -Tonemapping mode. +The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) ---- @@ -1662,7 +1697,7 @@ Tonemapping mode. | *Getter* | get_tonemap_white() | +-----------+--------------------------+ -White reference value for tonemap. +The white reference value for tonemapping. Only effective if the :ref:`tonemap_mode` isn't set to :ref:`TONE_MAPPER_LINEAR`. Method Descriptions ------------------- @@ -1671,9 +1706,13 @@ Method Descriptions - :ref:`bool` **is_glow_level_enabled** **(** :ref:`int` idx **)** const +Returns ``true`` if the glow level ``idx`` is specified, ``false`` otherwise. + ---- .. _class_Environment_method_set_glow_level: - void **set_glow_level** **(** :ref:`int` idx, :ref:`bool` enabled **)** +Enables or disables the glow level at index ``idx``. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. + diff --git a/classes/class_expression.rst b/classes/class_expression.rst index a8fbfae74..73dee6b93 100644 --- a/classes/class_expression.rst +++ b/classes/class_expression.rst @@ -11,26 +11,8 @@ Expression **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A class that stores an expression you can execute. -Methods -------- - -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`execute` **(** :ref:`Array` inputs=[ ], :ref:`Object` base_instance=null, :ref:`bool` show_error=true **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_error_text` **(** **)** const | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_execute_failed` **(** **)** const | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`parse` **(** :ref:`String` expression, :ref:`PoolStringArray` input_names=PoolStringArray( ) **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -56,6 +38,19 @@ In the following example we use a :ref:`LineEdit` node to write if not expression.has_execute_failed(): $LineEdit.text = str(result) +Methods +------- + ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`execute` **(** :ref:`Array` inputs=[ ], :ref:`Object` base_instance=null, :ref:`bool` show_error=true **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_error_text` **(** **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_execute_failed` **(** **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`parse` **(** :ref:`String` expression, :ref:`PoolStringArray` input_names=PoolStringArray( ) **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_file.rst b/classes/class_file.rst index 71ad091b5..b2784f599 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -11,13 +11,35 @@ File **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Type to handle file reading and writing operations. +Description +----------- + +File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. + +Here's a sample on how to write and read from a file: + +:: + + func save(content): + var file = File.new() + file.open("user://save_game.dat", File.WRITE) + file.store_string(content) + file.close() + + func load(): + var file = File.new() + file.open("user://save_game.dat", File.READ) + var content = file.get_as_text() + file.close() + return content + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/filesystem` + Properties ---------- @@ -163,33 +185,6 @@ enum **CompressionMode**: - **COMPRESSION_GZIP** = **3** --- Uses the `gzip `_ compression method. -Description ------------ - -File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. - -Here's a sample on how to write and read from a file: - -:: - - func save(content): - var file = File.new() - file.open("user://save_game.dat", File.WRITE) - file.store_string(content) - file.close() - - func load(): - var file = File.new() - file.open("user://save_game.dat", File.READ) - var content = file.get_as_text() - file.close() - return content - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/filesystem` - Property Descriptions --------------------- diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index fbb05f562..2e3aab9da 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -11,13 +11,13 @@ FileDialog **Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`WindowDialog` **<** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Dialog for selecting files or directories in the filesystem. +Description +----------- + +FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. + Properties ---------- @@ -147,11 +147,6 @@ enum **Access**: - **ACCESS_FILESYSTEM** = **2** --- The dialog allows accessing files on the whole file system. -Description ------------ - -FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. - Property Descriptions --------------------- diff --git a/classes/class_float.rst b/classes/class_float.rst index c60e92bce..6015bf47b 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -9,12 +9,12 @@ float ===== -**Category:** Built-In Types +Float built-in type. -Brief Description ------------------ +Description +----------- -Float built-in type +Float built-in type. Methods ------- @@ -27,11 +27,6 @@ Methods | :ref:`float` | :ref:`float` **(** :ref:`String` from **)** | +---------------------------+-------------------------------------------------------------------------------------+ -Description ------------ - -Float built-in type. - Method Descriptions ------------------- diff --git a/classes/class_font.rst b/classes/class_font.rst index 696122866..e1e9c80ce 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -13,13 +13,13 @@ Font **Inherited By:** :ref:`BitmapFont`, :ref:`DynamicFont` -**Category:** Core - -Brief Description ------------------ - Internationalized font and text drawing support. +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. + Methods ------- @@ -45,11 +45,6 @@ Methods | void | :ref:`update_changes` **(** **)** | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -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. - Method Descriptions ------------------- @@ -111,6 +106,8 @@ Returns the size of a string, taking kerning and advance into account. - :ref:`bool` **has_outline** **(** **)** const +Returns ``true`` if the font has an outline. + ---- .. _class_Font_method_is_distance_field_hint: diff --git a/classes/class_funcref.rst b/classes/class_funcref.rst index 977af2262..1d6ce48cc 100644 --- a/classes/class_funcref.rst +++ b/classes/class_funcref.rst @@ -11,13 +11,15 @@ FuncRef **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Reference to a function in an object. +Description +----------- + +In GDScript, functions are not *first-class objects*. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. + +However, by creating a ``FuncRef`` using the :ref:`@GDScript.funcref` function, a reference to a function in a given object can be created, passed around and called. + Methods ------- @@ -33,13 +35,6 @@ Methods | void | :ref:`set_instance` **(** :ref:`Object` instance **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------+ -Description ------------ - -In GDScript, functions are not *first-class objects*. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. - -However, by creating a ``FuncRef`` using the :ref:`@GDScript.funcref` function, a reference to a function in a given object can be created, passed around and called. - Method Descriptions ------------------- diff --git a/classes/class_gdnative.rst b/classes/class_gdnative.rst index 56fb5ac39..70daac3d1 100644 --- a/classes/class_gdnative.rst +++ b/classes/class_gdnative.rst @@ -11,11 +11,6 @@ GDNative **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_gdnativelibrary.rst b/classes/class_gdnativelibrary.rst index 9d56bca67..5a83f66ac 100644 --- a/classes/class_gdnativelibrary.rst +++ b/classes/class_gdnativelibrary.rst @@ -11,13 +11,20 @@ GDNativeLibrary **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - An external library containing functions or script classes to use in Godot. +Description +----------- + +A GDNative library can implement :ref:`NativeScript`\ s, global functions to call with the :ref:`GDNative` class, or low-level engine extensions through interfaces such as :ref:`ARVRInterfaceGDNative`. The library must be compiled for each platform and architecture that the project will run on. + +Tutorials +--------- + +- :doc:`../tutorials/plugins/gdnative/gdnative-c-example` + +- :doc:`../tutorials/plugins/gdnative/gdnative-cpp-example` + Properties ---------- @@ -42,18 +49,6 @@ Methods | :ref:`String` | :ref:`get_current_library_path` **(** **)** const | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------+ -Description ------------ - -A GDNative library can implement :ref:`NativeScript`\ s, global functions to call with the :ref:`GDNative` class, or low-level engine extensions through interfaces such as :ref:`ARVRInterfaceGDNative`. The library must be compiled for each platform and architecture that the project will run on. - -Tutorials ---------- - -- :doc:`../tutorials/plugins/gdnative/gdnative-c-example` - -- :doc:`../tutorials/plugins/gdnative/gdnative-cpp-example` - Property Descriptions --------------------- diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index 501a2273c..5be67f800 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -11,22 +11,8 @@ GDScript **Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A script implemented in the GDScript programming language. -Methods -------- - -+-------------------------------------------+-----------------------------------------------------------------------------------+ -| :ref:`PoolByteArray` | :ref:`get_as_byte_code` **(** **)** const | -+-------------------------------------------+-----------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`new` **(** ... **)** vararg | -+-------------------------------------------+-----------------------------------------------------------------------------------+ - Description ----------- @@ -39,6 +25,15 @@ Tutorials - :doc:`../getting_started/scripting/gdscript/index` +Methods +------- + ++-------------------------------------------+-----------------------------------------------------------------------------------+ +| :ref:`PoolByteArray` | :ref:`get_as_byte_code` **(** **)** const | ++-------------------------------------------+-----------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`new` **(** ... **)** vararg | ++-------------------------------------------+-----------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_gdscriptfunctionstate.rst b/classes/class_gdscriptfunctionstate.rst index fcbe62cba..5a3fc04c0 100644 --- a/classes/class_gdscriptfunctionstate.rst +++ b/classes/class_gdscriptfunctionstate.rst @@ -11,13 +11,13 @@ GDScriptFunctionState **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - State of a function call after yielding. +Description +----------- + +Calling :ref:`@GDScript.yield` within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling :ref:`resume` on this state object. + Methods ------- @@ -34,11 +34,6 @@ Signals - **completed** **(** :ref:`Nil` result **)** -Description ------------ - -Calling :ref:`@GDScript.yield` within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling :ref:`resume` on this state object. - Method Descriptions ------------------- diff --git a/classes/class_gdscriptnativeclass.rst b/classes/class_gdscriptnativeclass.rst index 9ce3229dc..f08271693 100644 --- a/classes/class_gdscriptnativeclass.rst +++ b/classes/class_gdscriptnativeclass.rst @@ -11,11 +11,6 @@ GDScriptNativeClass **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_generic6dofjoint.rst b/classes/class_generic6dofjoint.rst index f4e998958..faadd833f 100644 --- a/classes/class_generic6dofjoint.rst +++ b/classes/class_generic6dofjoint.rst @@ -11,13 +11,13 @@ Generic6DOFJoint **Inherits:** :ref:`Joint` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. +Description +----------- + +The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. + Properties ---------- @@ -331,11 +331,6 @@ enum **Flag**: - **FLAG_MAX** = **6** --- Represents the size of the :ref:`Flag` enum. -Description ------------ - -The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. - Property Descriptions --------------------- diff --git a/classes/class_geometry.rst b/classes/class_geometry.rst index 11535f473..e81cfe631 100644 --- a/classes/class_geometry.rst +++ b/classes/class_geometry.rst @@ -11,11 +11,6 @@ Geometry **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_geometryinstance.rst b/classes/class_geometryinstance.rst index fdf11fd02..0a4204b36 100644 --- a/classes/class_geometryinstance.rst +++ b/classes/class_geometryinstance.rst @@ -13,13 +13,13 @@ GeometryInstance **Inherited By:** :ref:`CPUParticles`, :ref:`CSGShape`, :ref:`ImmediateGeometry`, :ref:`MeshInstance`, :ref:`MultiMeshInstance`, :ref:`Particles`, :ref:`SpriteBase3D` -**Category:** Core - -Brief Description ------------------ - Base node for geometry-based visual instances. +Description +----------- + +Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. + Properties ---------- @@ -99,11 +99,6 @@ enum **Flags**: - **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flags` enum. -Description ------------ - -Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. - Property Descriptions --------------------- diff --git a/classes/class_giprobe.rst b/classes/class_giprobe.rst index a112d3dd2..be2976ad5 100644 --- a/classes/class_giprobe.rst +++ b/classes/class_giprobe.rst @@ -11,12 +11,12 @@ GIProbe **Inherits:** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ +Tutorials +--------- + +- :doc:`../tutorials/3d/gi_probes` Properties ---------- @@ -79,11 +79,6 @@ enum **Subdiv**: - **SUBDIV_MAX** = **4** --- Represents the size of the :ref:`Subdiv` enum. -Tutorials ---------- - -- :doc:`../tutorials/3d/gi_probes` - Property Descriptions --------------------- diff --git a/classes/class_giprobedata.rst b/classes/class_giprobedata.rst index bbfa64a1b..fb8ae879d 100644 --- a/classes/class_giprobedata.rst +++ b/classes/class_giprobedata.rst @@ -11,11 +11,6 @@ GIProbeData **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_godotsharp.rst b/classes/class_godotsharp.rst index 3d49870de..370e41cae 100644 --- a/classes/class_godotsharp.rst +++ b/classes/class_godotsharp.rst @@ -11,11 +11,6 @@ GodotSharp **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index c3ca48bc5..886d6cece 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -11,13 +11,13 @@ Gradient **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A color interpolator resource which can be used to generate colors between user-defined color points. +Description +----------- + +Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the ramp will interpolate from color 1 to color 2 and from color 2 to color 3. The ramp will initially have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. + Properties ---------- @@ -48,11 +48,6 @@ Methods | void | :ref:`set_offset` **(** :ref:`int` point, :ref:`float` offset **)** | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the ramp will interpolate from color 1 to color 2 and from color 2 to color 3. The ramp will initially have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. - Property Descriptions --------------------- diff --git a/classes/class_gradienttexture.rst b/classes/class_gradienttexture.rst index 66d74affc..b82d84355 100644 --- a/classes/class_gradienttexture.rst +++ b/classes/class_gradienttexture.rst @@ -11,13 +11,13 @@ GradientTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Gradient-filled texture. +Description +----------- + +GradientTexture uses a :ref:`Gradient` to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`width`). + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`int` | :ref:`width` | 2048 | +---------------------------------+----------------------------------------------------------+------+ -Description ------------ - -GradientTexture uses a :ref:`Gradient` to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`width`). - Property Descriptions --------------------- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 1662e7635..c1b947859 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -11,13 +11,15 @@ GraphEdit **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them. +Description +----------- + +GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default. + +It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. + Properties ---------- @@ -98,6 +100,10 @@ Theme Properties +---------------------------------+-------------------------------+------------------------+ | :ref:`Texture` | reset | | +---------------------------------+-------------------------------+------------------------+ +| :ref:`Color` | selection_fill | Color( 1, 1, 1, 0.3 ) | ++---------------------------------+-------------------------------+------------------------+ +| :ref:`Color` | selection_stroke | Color( 1, 1, 1, 0.8 ) | ++---------------------------------+-------------------------------+------------------------+ | :ref:`Texture` | snap | | +---------------------------------+-------------------------------+------------------------+ @@ -108,7 +114,7 @@ Signals - **_begin_node_move** **(** **)** -Signal sent at the beginning of a GraphNode movement. +Emitted at the beginning of a GraphNode movement. ---- @@ -116,7 +122,7 @@ Signal sent at the beginning of a GraphNode movement. - **_end_node_move** **(** **)** -Signal sent at the end of a GraphNode movement. +Emitted at the end of a GraphNode movement. ---- @@ -124,7 +130,7 @@ Signal sent at the end of a GraphNode movement. - **connection_from_empty** **(** :ref:`String` to, :ref:`int` to_slot, :ref:`Vector2` release_position **)** -Signal sent when user dragging connection from input port into empty space of the graph. +Emitted when user dragging connection from input port into empty space of the graph. ---- @@ -132,7 +138,7 @@ Signal sent when user dragging connection from input port into empty space of th - **connection_request** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`String` to, :ref:`int` to_slot **)** -Signal sent to the GraphEdit when the connection between the ``from_slot`` slot of the ``from`` GraphNode and the ``to_slot`` slot of the ``to`` GraphNode is attempted to be created. +Emitted to the GraphEdit when the connection between the ``from_slot`` slot of the ``from`` GraphNode and the ``to_slot`` slot of the ``to`` GraphNode is attempted to be created. ---- @@ -140,7 +146,7 @@ Signal sent to the GraphEdit when the connection between the ``from_slot`` slot - **connection_to_empty** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`Vector2` release_position **)** -Signal sent when user dragging connection from output port into empty space of the graph. +Emitted when user dragging connection from output port into empty space of the graph. ---- @@ -148,7 +154,7 @@ Signal sent when user dragging connection from output port into empty space of t - **copy_nodes_request** **(** **)** -Signal sent when the user presses ``Ctrl + C``. +Emitted when the user presses ``Ctrl + C``. ---- @@ -156,7 +162,7 @@ Signal sent when the user presses ``Ctrl + C``. - **delete_nodes_request** **(** **)** -Signal sent when a GraphNode is attempted to be removed from the GraphEdit. +Emitted when a GraphNode is attempted to be removed from the GraphEdit. ---- @@ -188,7 +194,7 @@ Emitted when a GraphNode is selected. - **paste_nodes_request** **(** **)** -Signal sent when the user presses ``Ctrl + V``. +Emitted when the user presses ``Ctrl + V``. ---- @@ -204,12 +210,7 @@ Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ` - **scroll_offset_changed** **(** :ref:`Vector2` ofs **)** -Description ------------ - -GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default. - -It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. +Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. Property Descriptions --------------------- @@ -405,6 +406,8 @@ Removes the possibility to disconnect nodes when dragging from the slot at the r - void **set_connection_activity** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port, :ref:`float` amount **)** +Sets the coloration of the connection between ``from``'s ``from_port`` and ``to``'s ``to_port`` with the color provided in the ``activity`` theme property. + ---- .. _class_GraphEdit_method_set_selected: diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 4b042556d..9ff034ca8 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -11,13 +11,15 @@ GraphNode **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. +Description +----------- + +A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + +To add a slot to GraphNode, add any :ref:`Control`-derived child node to it. + Properties ---------- @@ -126,7 +128,7 @@ Signals - **close_request** **(** **)** -Signal sent on closing the GraphNode. +Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see :ref:`show_close`). ---- @@ -134,7 +136,7 @@ Signal sent on closing the GraphNode. - **dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** -Signal sent when the GraphNode is dragged. +Emitted when the GraphNode is dragged. ---- @@ -142,7 +144,7 @@ Signal sent when the GraphNode is dragged. - **offset_changed** **(** **)** -Signal sent when the GraphNode is moved. +Emitted when the GraphNode is moved. ---- @@ -150,7 +152,7 @@ Signal sent when the GraphNode is moved. - **raise_request** **(** **)** -Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. +Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. ---- @@ -158,6 +160,8 @@ Signal sent when the GraphNode is requested to be displayed over other ones. Hap - **resize_request** **(** :ref:`Vector2` new_minsize **)** +Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see :ref:`resizable`). + Enumerations ------------ @@ -171,18 +175,11 @@ Enumerations enum **Overlay**: -- **OVERLAY_DISABLED** = **0** +- **OVERLAY_DISABLED** = **0** --- No overlay is shown. -- **OVERLAY_BREAKPOINT** = **1** +- **OVERLAY_BREAKPOINT** = **1** --- Show overlay set in the ``breakpoint`` theme property. -- **OVERLAY_POSITION** = **2** - -Description ------------ - -A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. - -To add a slot to GraphNode, add any :ref:`Control`-derived child node to it. +- **OVERLAY_POSITION** = **2** --- Show overlay set in the ``position`` theme property. Property Descriptions --------------------- @@ -233,6 +230,8 @@ The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdi | *Getter* | get_overlay() | +-----------+--------------------+ +Sets the overlay shown above the GraphNode. See :ref:`Overlay`. + ---- .. _class_GraphNode_property_resizable: @@ -247,6 +246,10 @@ The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdi | *Getter* | is_resizable() | +-----------+----------------------+ +If ``true``, the user can resize the GraphNode. + +**Note:** Dragging the handle will only trigger the :ref:`resize_request` signal, the GraphNode needs to be resized manually. + ---- .. _class_GraphNode_property_selected: @@ -261,6 +264,8 @@ The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdi | *Getter* | is_selected() | +-----------+---------------------+ +If ``true``, the GraphNode is selected. + ---- .. _class_GraphNode_property_show_close: @@ -275,6 +280,10 @@ The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdi | *Getter* | is_close_button_visible() | +-----------+------------------------------+ +If ``true``, the close button will be visible. + +**Note:** Pressing it will only trigger the :ref:`close_request` signal, the GraphNode needs to be removed manually. + ---- .. _class_GraphNode_property_title: @@ -289,6 +298,8 @@ The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdi | *Getter* | get_title() | +-----------+------------------+ +The text displayed in the GraphNode's title bar. + Method Descriptions ------------------- @@ -424,7 +435,7 @@ Returns ``true`` if right (output) slot ``idx`` is enabled, ``false`` otherwise. - void **set_slot** **(** :ref:`int` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture` custom_left=null, :ref:`Texture` custom_right=null **)** -Sets properties of the slot with id ``idx``. +Sets properties of the slot with ID ``idx``. If ``enable_left``/``right``, a port will appear and the slot will be able to be connected from this side. @@ -434,5 +445,5 @@ If ``enable_left``/``right``, a port will appear and the slot will be able to be ``custom_left``/``right`` is a custom texture for this side's port. -**Note:** this method only sets properties of the slot. To create the slot, add a :ref:`Control`-derived child to the GraphNode. +**Note:** This method only sets properties of the slot. To create the slot, add a :ref:`Control`-derived child to the GraphNode. diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 7dedf924c..85a4cbecd 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -11,13 +11,15 @@ GridContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Grid container used to arrange elements in a grid like layout. +Description +----------- + +Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. + +Notice that grid layout will preserve the columns and rows for every size of the container, and that empty columns will be expanded automatically. + Properties ---------- @@ -36,13 +38,6 @@ Theme Properties | :ref:`int` | vseparation | 4 | +-----------------------+-------------+---+ -Description ------------ - -Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. - -Notice that grid layout will preserve the columns and rows for every size of the container, and that empty columns will be expanded automatically. - Property Descriptions --------------------- diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index b046e595a..4ec19d5b3 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -11,13 +11,24 @@ GridMap **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node for 3D tile-based maps. +Description +----------- + +GridMap lets you place meshes on a grid interactively. It works both from the editor and from scripts, which can help you create in-game level editors. + +GridMaps use a :ref:`MeshLibrary` which contains a list of tiles. Each tile is a mesh with materials plus optional collision and navigation shapes. + +A GridMap contains a collection of cells. Each grid cell refers to a tile in the :ref:`MeshLibrary`. All cells in the map have the same dimensions. + +Internally, a GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. + +Tutorials +--------- + +- :doc:`../tutorials/3d/using_gridmaps` + Properties ---------- @@ -98,22 +109,6 @@ Constants - **INVALID_CELL_ITEM** = **-1** --- Invalid cell item that can be used in :ref:`set_cell_item` to clear cells (or represent an empty cell in :ref:`get_cell_item`). -Description ------------ - -GridMap lets you place meshes on a grid interactively. It works both from the editor and from scripts, which can help you create in-game level editors. - -GridMaps use a :ref:`MeshLibrary` which contains a list of tiles. Each tile is a mesh with materials plus optional collision and navigation shapes. - -A GridMap contains a collection of cells. Each grid cell refers to a tile in the :ref:`MeshLibrary`. All cells in the map have the same dimensions. - -Internally, a GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. - -Tutorials ---------- - -- :doc:`../tutorials/3d/using_gridmaps` - Property Descriptions --------------------- diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst index 45c0cfbe1..e8f5402dc 100644 --- a/classes/class_groovejoint2d.rst +++ b/classes/class_groovejoint2d.rst @@ -11,13 +11,13 @@ GrooveJoint2D **Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Groove constraint for 2D physics. +Description +----------- + +Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`float` | :ref:`length` | 50.0 | +---------------------------+--------------------------------------------------------------------+------+ -Description ------------ - -Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. - Property Descriptions --------------------- diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index e0a0ad056..355ea4bfe 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -11,13 +11,39 @@ HashingContext **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Context to compute cryptographic hashes over multiple iterations. +Description +----------- + +The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. This is useful for example when computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). + +The :ref:`HashType` enum shows the supported hashing algorithms. + +:: + + const CHUNK_SIZE = 1024 + + func hash_file(path): + var ctx = HashingContext.new() + var file = File.new() + # Start a SHA-256 context. + ctx.start(HashingContext.HASH_SHA256) + # Check that file exists. + if not file.file_exists(path): + return + # Open the file to hash. + file.open(path, File.READ) + # Update the context after reading each chunk. + while not file.eof_reached(): + ctx.update(file.get_buffer(CHUNK_SIZE)) + # Get the computed hash. + var res = ctx.finish() + # Print the result as hex string and array. + printt(res.hex_encode(), Array(res)) + +**Note:** Not available in HTML5 exports. + Methods ------- @@ -48,35 +74,6 @@ enum **HashType**: - **HASH_SHA256** = **2** --- Hashing algorithm: SHA-256. -Description ------------ - -The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. This is useful for example when computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). - -The :ref:`HashType` enum shows the supported hashing algorithms. - -:: - - const CHUNK_SIZE = 1024 - - func hash_file(path): - var ctx = HashingContext.new() - var file = File.new() - # Start a SHA-256 context. - ctx.start(HashingContext.HASH_SHA256) - # Check that file exists. - if not file.file_exists(path): - return - # Open the file to hash. - file.open(path, File.READ) - # Update the context after reading each chunk. - while not file.eof_reached(): - ctx.update(file.get_buffer(CHUNK_SIZE)) - # Get the computed hash. - var res = ctx.finish() - # Print the result as hex string and array. - printt(res.hex_encode(), Array(res)) - Method Descriptions ------------------- diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst index e084779e2..f78919bc4 100644 --- a/classes/class_hboxcontainer.rst +++ b/classes/class_hboxcontainer.rst @@ -11,13 +11,13 @@ HBoxContainer **Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Horizontal box container. +Description +----------- + +Horizontal box container. See :ref:`BoxContainer`. + Theme Properties ---------------- @@ -25,8 +25,3 @@ Theme Properties | :ref:`int` | separation | 4 | +-----------------------+------------+---+ -Description ------------ - -Horizontal box container. See :ref:`BoxContainer`. - diff --git a/classes/class_heightmapshape.rst b/classes/class_heightmapshape.rst index 0b1027946..6ec0f926c 100644 --- a/classes/class_heightmapshape.rst +++ b/classes/class_heightmapshape.rst @@ -11,13 +11,13 @@ HeightMapShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Height map shape for 3D physics (Bullet only). +Description +----------- + +Height map shape resource, which can be added to a :ref:`PhysicsBody` or :ref:`Area`. + Properties ---------- @@ -29,11 +29,6 @@ Properties | :ref:`int` | :ref:`map_width` | 2 | +-------------------------------------------+-----------------------------------------------------------+-----------------------------+ -Description ------------ - -Height map shape resource, which can be added to a :ref:`PhysicsBody` or :ref:`Area`. - Property Descriptions --------------------- diff --git a/classes/class_hingejoint.rst b/classes/class_hingejoint.rst index 046c1d67e..c0a08bd72 100644 --- a/classes/class_hingejoint.rst +++ b/classes/class_hingejoint.rst @@ -11,13 +11,13 @@ HingeJoint **Inherits:** :ref:`Joint` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A hinge between two 3D bodies. +Description +----------- + +A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. + Properties ---------- @@ -117,11 +117,6 @@ enum **Flag**: - **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flag` enum. -Description ------------ - -A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. - Property Descriptions --------------------- diff --git a/classes/class_hscrollbar.rst b/classes/class_hscrollbar.rst index 7bdba7cf2..3359a00c7 100644 --- a/classes/class_hscrollbar.rst +++ b/classes/class_hscrollbar.rst @@ -11,13 +11,13 @@ HScrollBar **Inherits:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Horizontal scroll bar. +Description +----------- + +Horizontal version of :ref:`ScrollBar`, which goes from left (min) to right (max). + Theme Properties ---------------- @@ -41,8 +41,3 @@ Theme Properties | :ref:`StyleBox` | scroll_focus | +---------------------------------+---------------------+ -Description ------------ - -Horizontal scroll bar. See :ref:`ScrollBar`. This one goes from left (min) to right (max). - diff --git a/classes/class_hseparator.rst b/classes/class_hseparator.rst index e47c89edc..3fec79c5e 100644 --- a/classes/class_hseparator.rst +++ b/classes/class_hseparator.rst @@ -11,13 +11,13 @@ HSeparator **Inherits:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Horizontal separator. +Description +----------- + +Horizontal separator. See :ref:`Separator`. Even though it looks horizontal, it is used to separate objects vertically. + Theme Properties ---------------- @@ -27,8 +27,3 @@ Theme Properties | :ref:`StyleBox` | separator | | +---------------------------------+------------+---+ -Description ------------ - -Horizontal separator. See :ref:`Separator`. Even though it looks horizontal, it is used to separate objects vertically. - diff --git a/classes/class_hslider.rst b/classes/class_hslider.rst index 6413dcce0..fa039acd3 100644 --- a/classes/class_hslider.rst +++ b/classes/class_hslider.rst @@ -11,13 +11,13 @@ HSlider **Inherits:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Horizontal slider. +Description +----------- + +Horizontal slider. See :ref:`Slider`. This one goes from left (min) to right (max). + Theme Properties ---------------- @@ -35,8 +35,3 @@ Theme Properties | :ref:`Texture` | tick | +---------------------------------+-------------------+ -Description ------------ - -Horizontal slider. See :ref:`Slider`. This one goes from left (min) to right (max). - diff --git a/classes/class_hsplitcontainer.rst b/classes/class_hsplitcontainer.rst index 76a1fa0b1..a799a6a74 100644 --- a/classes/class_hsplitcontainer.rst +++ b/classes/class_hsplitcontainer.rst @@ -11,13 +11,13 @@ HSplitContainer **Inherits:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Horizontal split container. +Description +----------- + +Horizontal split container. See :ref:`SplitContainer`. This goes from left to right. + Theme Properties ---------------- @@ -31,8 +31,3 @@ Theme Properties | :ref:`int` | separation | 12 | +---------------------------------+------------+----+ -Description ------------ - -Horizontal split container. See :ref:`SplitContainer`. This goes from left to right. - diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 280efeaf9..4659a91e4 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -11,13 +11,26 @@ HTTPClient **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Hyper-text transfer protocol client. +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 :ref:`HTTPRequest` for an higher-level alternative. + +**Note:** This client only needs to connect to a host once (see :ref:`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 :ref:`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). + +Tutorials +--------- + +- :doc:`../tutorials/networking/http_client_class` + +- :doc:`../tutorials/networking/ssl_certificates` + Properties ---------- @@ -405,24 +418,6 @@ enum **ResponseCode**: - **RESPONSE_NETWORK_AUTH_REQUIRED** = **511** --- HTTP status code ``511 Network Authentication Required``. The client needs to authenticate to gain network access. -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 :ref:`HTTPRequest` for an higher-level alternative. - -**Note:** This client only needs to connect to a host once (see :ref:`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 :ref:`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). - -Tutorials ---------- - -- :doc:`../tutorials/networking/http_client_class` - -- :doc:`../tutorials/networking/ssl_certificates` - Property Descriptions --------------------- diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index c8ad20266..e0ee8a362 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -11,13 +11,76 @@ HTTPRequest **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A node with the ability to send HTTP(S) requests. +Description +----------- + +A node with the ability to send HTTP requests. Uses :ref:`HTTPClient` internally. + +Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. + +**Example of contacting a REST API and printing one of its returned fields:** + +:: + + func _ready(): + # Create an HTTP request node and connect its completion signal. + var http_request = HTTPRequest.new() + 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. + var error = http_request.request("https://httpbin.org/get") + 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): + var response = parse_json(body.get_string_from_utf8()) + + # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). + print(response.headers["User-Agent"]) + +**Example of loading and displaying an image using HTTPRequest:** + +:: + + func _ready(): + # Create an HTTP request node and connect its completion signal. + var http_request = HTTPRequest.new() + add_child(http_request) + http_request.connect("request_completed", self, "_http_request_completed") + + # Perform the HTTP request. The URL below returns a PNG image as of writing. + var error = http_request.request("https://via.placeholder.com/512") + 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): + var image = Image.new() + var error = image.load_png_from_buffer(body) + if error != OK: + push_error("Couldn't load the image.") + + var texture = ImageTexture.new() + texture.create_from_image(image) + + # Display the image in a TextureRect node. + var texture_rect = TextureRect.new() + add_child(texture_rect) + texture_rect.texture = texture + +Tutorials +--------- + +- :doc:`../tutorials/networking/http_request_class` + +- :doc:`../tutorials/networking/ssl_certificates` + Properties ---------- @@ -118,74 +181,6 @@ enum **Result**: - **RESULT_TIMEOUT** = **12** -Description ------------ - -A node with the ability to send HTTP requests. Uses :ref:`HTTPClient` internally. - -Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. - -**Example of contacting a REST API and printing one of its returned fields:** - -:: - - func _ready(): - # Create an HTTP request node and connect its completion signal. - var http_request = HTTPRequest.new() - 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. - var error = http_request.request("https://httpbin.org/get") - 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): - var response = parse_json(body.get_string_from_utf8()) - - # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). - print(response.headers["User-Agent"]) - -**Example of loading and displaying an image using HTTPRequest:** - -:: - - func _ready(): - # Create an HTTP request node and connect its completion signal. - var http_request = HTTPRequest.new() - add_child(http_request) - http_request.connect("request_completed", self, "_http_request_completed") - - # Perform the HTTP request. The URL below returns a PNG image as of writing. - var error = http_request.request("https://via.placeholder.com/512") - 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): - var image = Image.new() - var error = image.load_png_from_buffer(body) - if error != OK: - push_error("Couldn't load the image.") - - var texture = ImageTexture.new() - texture.create_from_image(image) - - # Display the image in a TextureRect node. - var texture_rect = TextureRect.new() - add_child(texture_rect) - texture_rect.texture = texture - -Tutorials ---------- - -- :doc:`../tutorials/networking/http_request_class` - -- :doc:`../tutorials/networking/ssl_certificates` - Property Descriptions --------------------- diff --git a/classes/class_image.rst b/classes/class_image.rst index 3e707bcd6..e0fae24aa 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -11,13 +11,13 @@ Image **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Image datatype. +Description +----------- + +Native image datatype. Contains image data, which can be converted to a :ref:`Texture`, and several functions to interact with it. The maximum width and height for an ``Image`` are :ref:`MAX_WIDTH` and :ref:`MAX_HEIGHT`. + Properties ---------- @@ -418,11 +418,6 @@ Constants - **MAX_HEIGHT** = **16384** --- The maximal height allowed for ``Image`` resources. -Description ------------ - -Native image datatype. Contains image data, which can be converted to a :ref:`Texture`, and several functions to interact with it. The maximum width and height for an ``Image`` are :ref:`MAX_WIDTH` and :ref:`MAX_HEIGHT`. - Property Descriptions --------------------- diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index ac0e0d481..a61fc16be 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -11,13 +11,13 @@ ImageTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A :ref:`Texture` based on an :ref:`Image`. +Description +----------- + +A :ref:`Texture` based on an :ref:`Image`. Can be created from an :ref:`Image` with :ref:`create_from_image`. + Properties ---------- @@ -65,11 +65,6 @@ enum **Storage**: - **STORAGE_COMPRESS_LOSSLESS** = **2** --- :ref:`Image` data is compressed with a lossless algorithm. -Description ------------ - -A :ref:`Texture` based on an :ref:`Image`. Can be created from an :ref:`Image` with :ref:`create_from_image`. - Property Descriptions --------------------- diff --git a/classes/class_immediategeometry.rst b/classes/class_immediategeometry.rst index 73563e65b..e3b4f8192 100644 --- a/classes/class_immediategeometry.rst +++ b/classes/class_immediategeometry.rst @@ -11,13 +11,13 @@ ImmediateGeometry **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Draws simple geometry from code. +Description +----------- + +Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. + Methods ------- @@ -43,11 +43,6 @@ Methods | void | :ref:`set_uv2` **(** :ref:`Vector2` uv **)** | +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. - Method Descriptions ------------------- diff --git a/classes/class_input.rst b/classes/class_input.rst index e447feb02..80cf029cb 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -13,13 +13,18 @@ Input **Inherited By:** :ref:`InputDefault` -**Category:** Core - -Brief Description ------------------ - A Singleton that deals with inputs. +Description +----------- + +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 **Input Map** tab in the **Project > Project Settings**, or with the :ref:`InputMap` class. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/index` + Methods ------- @@ -211,16 +216,6 @@ enum **CursorShape**: - **CURSOR_HELP** = **16** --- Help cursor. Usually a question mark. -Description ------------ - -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 **Input Map** tab in the **Project > Project Settings**, or with the :ref:`InputMap` class. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/index` - Method Descriptions ------------------- diff --git a/classes/class_inputdefault.rst b/classes/class_inputdefault.rst index 46fb21fd7..81c00f258 100644 --- a/classes/class_inputdefault.rst +++ b/classes/class_inputdefault.rst @@ -11,11 +11,6 @@ InputDefault **Inherits:** :ref:`Input` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Default implementation of the :ref:`Input` class. Description diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index bed78952a..8cfa5d692 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -13,13 +13,20 @@ InputEvent **Inherited By:** :ref:`InputEventAction`, :ref:`InputEventJoypadButton`, :ref:`InputEventJoypadMotion`, :ref:`InputEventMIDI`, :ref:`InputEventScreenDrag`, :ref:`InputEventScreenTouch`, :ref:`InputEventWithModifiers` -**Category:** Core - -Brief Description ------------------ - Generic input event +Description +----------- + +Base class of all sort of input event. See :ref:`Node._input`. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + +- :doc:`../tutorials/2d/2d_transforms` + Properties ---------- @@ -54,18 +61,6 @@ Methods | :ref:`InputEvent` | :ref:`xformed_by` **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2( 0, 0 ) **)** const | +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Base class of all sort of input event. See :ref:`Node._input`. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - -- :doc:`../tutorials/2d/2d_transforms` - Property Descriptions --------------------- diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index 2b7710290..77a19cfc7 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -11,13 +11,18 @@ InputEventAction **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for actions. +Description +----------- + +Contains a generic action which can be targeted from several types of inputs. Actions can be created from the **Input Map** tab in the **Project > Project Settings** menu. See :ref:`Node._input`. + +Tutorials +--------- + +- `#actions <../tutorials/inputs/inputevent.html#actions>`_ in :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -29,16 +34,6 @@ Properties | :ref:`float` | :ref:`strength` | 1.0 | +-----------------------------+-----------------------------------------------------------+-------+ -Description ------------ - -Contains a generic action which can be targeted from several types of inputs. Actions can be created from the **Input Map** tab in the **Project > Project Settings** menu. See :ref:`Node._input`. - -Tutorials ---------- - -- `#actions <../tutorials/inputs/inputevent.html#actions>`_ in :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputeventgesture.rst b/classes/class_inputeventgesture.rst index 70d130dd2..43bbc0d5b 100644 --- a/classes/class_inputeventgesture.rst +++ b/classes/class_inputeventgesture.rst @@ -13,11 +13,6 @@ InputEventGesture **Inherited By:** :ref:`InputEventMagnifyGesture`, :ref:`InputEventPanGesture` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index 29a69f260..91f858beb 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -11,13 +11,18 @@ InputEventJoypadButton **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event for gamepad buttons. +Description +----------- + +Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see :ref:`InputEventJoypadMotion`. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -29,16 +34,6 @@ Properties | :ref:`float` | :ref:`pressure` | 0.0 | +---------------------------+-------------------------------------------------------------------------+-------+ -Description ------------ - -Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see :ref:`InputEventJoypadMotion`. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index 32ec62fab..7948c328b 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -11,22 +11,8 @@ InputEventJoypadMotion **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``. -Properties ----------- - -+---------------------------+---------------------------------------------------------------------+-----+ -| :ref:`int` | :ref:`axis` | 0 | -+---------------------------+---------------------------------------------------------------------+-----+ -| :ref:`float` | :ref:`axis_value` | 0.0 | -+---------------------------+---------------------------------------------------------------------+-----+ - Description ----------- @@ -37,6 +23,15 @@ Tutorials - :doc:`../tutorials/inputs/inputevent` +Properties +---------- + ++---------------------------+---------------------------------------------------------------------+-----+ +| :ref:`int` | :ref:`axis` | 0 | ++---------------------------+---------------------------------------------------------------------+-----+ +| :ref:`float` | :ref:`axis_value` | 0.0 | ++---------------------------+---------------------------------------------------------------------+-----+ + Property Descriptions --------------------- diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index 9f1e630a3..9b372956b 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -11,13 +11,18 @@ InputEventKey **Inherits:** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for keyboard events. +Description +----------- + +Stores key presses on the keyboard. Supports key presses, key releases and :ref:`echo` events. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -38,16 +43,6 @@ Methods | :ref:`int` | :ref:`get_scancode_with_modifiers` **(** **)** const | +-----------------------+--------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Stores key presses on the keyboard. Supports key presses, key releases and :ref:`echo` events. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputeventmagnifygesture.rst b/classes/class_inputeventmagnifygesture.rst index 00396856e..88e2ffd99 100644 --- a/classes/class_inputeventmagnifygesture.rst +++ b/classes/class_inputeventmagnifygesture.rst @@ -11,11 +11,6 @@ InputEventMagnifyGesture **Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index c78210269..235deb4de 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -11,11 +11,6 @@ InputEventMIDI **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_inputeventmouse.rst b/classes/class_inputeventmouse.rst index 04bd5e67d..a1a8c8710 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -13,13 +13,18 @@ InputEventMouse **Inherited By:** :ref:`InputEventMouseButton`, :ref:`InputEventMouseMotion` -**Category:** Core - -Brief Description ------------------ - Base input event type for mouse events. +Description +----------- + +Stores general mouse events information. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`Vector2` | :ref:`position` | Vector2( 0, 0 ) | +-------------------------------+------------------------------------------------------------------------+-----------------+ -Description ------------ - -Stores general mouse events information. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index 2cb9b1c7b..01ee6736f 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -11,13 +11,18 @@ InputEventMouseButton **Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for mouse button events. +Description +----------- + +Contains mouse click information. See :ref:`Node._input`. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/mouse_and_input_coordinates` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`bool` | :ref:`pressed` | false | +---------------------------+------------------------------------------------------------------------+-------+ -Description ------------ - -Contains mouse click information. See :ref:`Node._input`. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/mouse_and_input_coordinates` - Property Descriptions --------------------- diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index 9c8b05436..65ba797cd 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -11,13 +11,18 @@ InputEventMouseMotion **Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for mouse motion events. +Description +----------- + +Contains mouse and pen motion information. Supports relative, absolute positions and speed. See :ref:`Node._input`. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/mouse_and_input_coordinates` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`Vector2` | :ref:`tilt` | Vector2( 0, 0 ) | +-------------------------------+----------------------------------------------------------------+-----------------+ -Description ------------ - -Contains mouse and pen motion information. Supports relative, absolute positions and speed. See :ref:`Node._input`. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/mouse_and_input_coordinates` - Property Descriptions --------------------- diff --git a/classes/class_inputeventpangesture.rst b/classes/class_inputeventpangesture.rst index 247d3c703..86baf56f1 100644 --- a/classes/class_inputeventpangesture.rst +++ b/classes/class_inputeventpangesture.rst @@ -11,11 +11,6 @@ InputEventPanGesture **Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index f46e9a867..ec406e2f2 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -11,13 +11,18 @@ InputEventScreenDrag **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for screen drag events. Only available on mobile devices. +Description +----------- + +Contains screen drag information. See :ref:`Node._input`. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`Vector2` | :ref:`speed` | Vector2( 0, 0 ) | +-------------------------------+---------------------------------------------------------------+-----------------+ -Description ------------ - -Contains screen drag information. See :ref:`Node._input`. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index 40bbb364c..3eea8c803 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -11,15 +11,20 @@ InputEventScreenTouch **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Input event type for screen touch events. (only available on mobile devices) +Description +----------- + +Stores multi-touch press/release information. Supports touch press, touch release and :ref:`index` for multi-touch count and order. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`bool` | :ref:`pressed` | false | +-------------------------------+----------------------------------------------------------------+-----------------+ -Description ------------ - -Stores multi-touch press/release information. Supports touch press, touch release and :ref:`index` for multi-touch count and order. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index 836bee0ba..073eca34b 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -13,13 +13,18 @@ InputEventWithModifiers **Inherited By:** :ref:`InputEventGesture`, :ref:`InputEventKey`, :ref:`InputEventMouse` -**Category:** Core - -Brief Description ------------------ - Base class for keys events with modifiers. +Description +----------- + +Contains keys events information with modifiers support like ``Shift`` or ``Alt``. See :ref:`Node._input`. + +Tutorials +--------- + +- :doc:`../tutorials/inputs/inputevent` + Properties ---------- @@ -35,16 +40,6 @@ Properties | :ref:`bool` | :ref:`shift` | false | +-------------------------+----------------------------------------------------------------+-------+ -Description ------------ - -Contains keys events information with modifiers support like ``Shift`` or ``Alt``. See :ref:`Node._input`. - -Tutorials ---------- - -- :doc:`../tutorials/inputs/inputevent` - Property Descriptions --------------------- diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index 477031a36..5ff0b8429 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -11,13 +11,18 @@ InputMap **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Singleton that manages :ref:`InputEventAction`. +Description +----------- + +Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. + +Tutorials +--------- + +- `#inputmap <../tutorials/inputs/inputevent.html#inputmap>`_ in :doc:`../tutorials/inputs/inputevent` + Methods ------- @@ -47,16 +52,6 @@ Methods | void | :ref:`load_from_globals` **(** **)** | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. - -Tutorials ---------- - -- `#inputmap <../tutorials/inputs/inputevent.html#inputmap>`_ in :doc:`../tutorials/inputs/inputevent` - Method Descriptions ------------------- @@ -96,6 +91,8 @@ Returns ``true`` if the action has the given :ref:`InputEvent` - void **action_set_deadzone** **(** :ref:`String` action, :ref:`float` deadzone **)** +Sets a deadzone value for the action. + ---- .. _class_InputMap_method_add_action: diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index 1f04deded..0f9d452dd 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -11,13 +11,15 @@ InstancePlaceholder **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Placeholder for the root :ref:`Node` of a :ref:`PackedScene`. +Description +----------- + +Turning on the option **Load As Placeholder** for an instanced scene in the editor causes it to be replaced by an InstancePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling :ref:`replace_by_instance`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. + +The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. + Methods ------- @@ -31,13 +33,6 @@ Methods | void | :ref:`replace_by_instance` **(** :ref:`PackedScene` custom_scene=null **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Turning on the option **Load As Placeholder** for an instanced scene in the editor causes it to be replaced by an InstancePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling :ref:`replace_by_instance`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. - -The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. - Method Descriptions ------------------- diff --git a/classes/class_int.rst b/classes/class_int.rst index e59cd76cc..e861e182d 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -9,24 +9,8 @@ int === -**Category:** Built-In Types - -Brief Description ------------------ - Integer built-in type. -Methods -------- - -+-----------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`bool` from **)** | -+-----------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`float` from **)** | -+-----------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`String` from **)** | -+-----------------------+-------------------------------------------------------------------------------+ - Description ----------- @@ -49,6 +33,17 @@ It can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854 max_int += 1 print(max_int) # -9223372036854775808, we overflowed and wrapped around +Methods +------- + ++-----------------------+-------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`int` **(** :ref:`bool` from **)** | ++-----------------------+-------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`int` **(** :ref:`float` from **)** | ++-----------------------+-------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`int` **(** :ref:`String` from **)** | ++-----------------------+-------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_interpolatedcamera.rst b/classes/class_interpolatedcamera.rst index a599bb00b..64ce308d7 100644 --- a/classes/class_interpolatedcamera.rst +++ b/classes/class_interpolatedcamera.rst @@ -11,13 +11,15 @@ InterpolatedCamera **Inherits:** :ref:`Camera` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Camera which moves toward another node. +Description +----------- + +InterpolatedCamera is a :ref:`Camera` which smoothly moves to match a target node's position and rotation. + +If it is not :ref:`enabled` or does not have a valid target set, InterpolatedCamera acts like a normal Camera. + Properties ---------- @@ -36,13 +38,6 @@ Methods | void | :ref:`set_target` **(** :ref:`Object` target **)** | +------+--------------------------------------------------------------------------------------------------------------+ -Description ------------ - -InterpolatedCamera is a :ref:`Camera` which smoothly moves to match a target node's position and rotation. - -If it is not :ref:`enabled` or does not have a valid target set, InterpolatedCamera acts like a normal Camera. - Property Descriptions --------------------- diff --git a/classes/class_ip.rst b/classes/class_ip.rst index afb2e2dd6..134d97c1d 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -13,13 +13,13 @@ IP **Inherited By:** :ref:`IP_Unix` -**Category:** Core - -Brief Description ------------------ - Internet protocol (IP) support functions such as DNS resolution. +Description +----------- + +IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see :ref:`StreamPeerTCP` and :ref:`TCP_Server`). IP provides DNS hostname resolution support, both blocking and threaded. + Methods ------- @@ -97,11 +97,6 @@ Constants - **RESOLVER_INVALID_ID** = **-1** --- Invalid ID constant. Returned if :ref:`RESOLVER_MAX_QUERIES` is exceeded. -Description ------------ - -IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see :ref:`StreamPeerTCP` and :ref:`TCP_Server`). IP provides DNS hostname resolution support, both blocking and threaded. - Method Descriptions ------------------- diff --git a/classes/class_ip_unix.rst b/classes/class_ip_unix.rst index b05dbd1b3..5eb248dee 100644 --- a/classes/class_ip_unix.rst +++ b/classes/class_ip_unix.rst @@ -11,11 +11,6 @@ IP_Unix **Inherits:** :ref:`IP` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - UNIX IP support. See :ref:`IP`. Description diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index ec70af4ef..97508cf6b 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -11,13 +11,17 @@ ItemList **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. +Description +----------- + +This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. + +Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. + +Item text only supports single-line strings, newline characters (e.g. ``\n``) in the string won't produce a newline. Text wrapping is enabled in :ref:`ICON_MODE_TOP` mode, but column's width is adjusted to fully fit its content by default. You need to set :ref:`fixed_column_width` greater than zero to wrap the text. + Properties ---------- @@ -115,7 +119,7 @@ Methods +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_icon_region` **(** :ref:`int` idx, :ref:`Rect2` rect **)** | +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon_transposed` **(** :ref:`int` idx, :ref:`bool` rect **)** | +| void | :ref:`set_item_icon_transposed` **(** :ref:`int` idx, :ref:`bool` transposed **)** | +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -235,9 +239,9 @@ Enumerations enum **IconMode**: -- **ICON_MODE_TOP** = **0** +- **ICON_MODE_TOP** = **0** --- Icon is drawn above the text. -- **ICON_MODE_LEFT** = **1** +- **ICON_MODE_LEFT** = **1** --- Icon is drawn to the left of the text. ---- @@ -253,13 +257,6 @@ enum **SelectMode**: - **SELECT_MULTI** = **1** --- Allows selecting multiple items by holding Ctrl or Shift. -Description ------------ - -This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. - -Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. - Property Descriptions --------------------- @@ -323,7 +320,9 @@ If ``true``, the control will automatically resize the height to fit its content | *Getter* | get_fixed_column_width() | +-----------+-------------------------------+ -Sets the default column width in pixels. If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. +The width all columns will be adjusted to. + +A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. ---- @@ -339,7 +338,9 @@ Sets the default column width in pixels. If left to default value, each item wil | *Getter* | get_fixed_icon_size() | +-----------+----------------------------+ -Sets the default icon size in pixels. +The size all icons will be adjusted to. + +If either X or Y component is not greater than zero, icon size won't be affected. ---- @@ -355,7 +356,7 @@ Sets the default icon size in pixels. | *Getter* | get_icon_mode() | +-----------+----------------------+ -Sets the default position of the icon to either :ref:`ICON_MODE_LEFT` or :ref:`ICON_MODE_TOP`. +The icon position, whether above or to the left of the text. See the :ref:`IconMode` constants. ---- @@ -371,7 +372,7 @@ Sets the default position of the icon to either :ref:`ICON_MODE_LEFT` and transposing takes effect. ---- @@ -387,7 +388,11 @@ Sets the icon size to its initial size multiplied by the specified scale. | *Getter* | get_max_columns() | +-----------+------------------------+ -Sets the maximum columns the list will have. If set to anything other than the default, the content will be split among the specified columns. +Maximum columns the list will have. + +If greater than zero, the content will be split among the specified columns. + +A value of zero means unlimited columns, i.e. all items will be put in the same row. ---- @@ -403,6 +408,10 @@ Sets the maximum columns the list will have. If set to anything other than the d | *Getter* | get_max_text_lines() | +-----------+---------------------------+ +Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. + +**Note:** This property takes effect only when :ref:`icon_mode` is :ref:`ICON_MODE_TOP`. To make the text wrap, :ref:`fixed_column_width` should be greater than zero. + ---- .. _class_ItemList_property_same_column_width: @@ -417,7 +426,9 @@ Sets the maximum columns the list will have. If set to anything other than the d | *Getter* | is_same_column_width() | +-----------+------------------------------+ -If set to ``true``, all columns will have the same width specified by :ref:`fixed_column_width`. +Whether all columns will have the same width. + +If ``true``, the width is equal to the largest column width of all columns. ---- @@ -476,7 +487,9 @@ Ensure current selection is visible, adjusting the scroll position as necessary. - :ref:`int` **get_item_at_position** **(** :ref:`Vector2` position, :ref:`bool` exact=false **)** const -Given a position within the control return the item (if any) at that point. +Returns the item index at the given ``position``. + +When there is no item at that point, -1 will be returned if ``exact`` is ``true``, and the closest item index will be returned otherwise. ---- @@ -524,6 +537,8 @@ Returns a :ref:`Color` modulating item's icon at the specified inde - :ref:`Rect2` **get_item_icon_region** **(** :ref:`int` idx **)** const +Returns the region of item's icon used. The whole icon will be used if the region has no area. + ---- .. _class_ItemList_method_get_item_metadata: @@ -586,6 +601,8 @@ Returns ``true`` if the item at the specified index is disabled. - :ref:`bool` **is_item_icon_transposed** **(** :ref:`int` idx **)** const +Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. + ---- .. _class_ItemList_method_is_item_selectable: @@ -694,11 +711,15 @@ Sets a modulating :ref:`Color` of the item associated with the spec - void **set_item_icon_region** **(** :ref:`int` idx, :ref:`Rect2` rect **)** +Sets the region of item's icon used. The whole icon will be used if the region has no area. + ---- .. _class_ItemList_method_set_item_icon_transposed: -- void **set_item_icon_transposed** **(** :ref:`int` idx, :ref:`bool` rect **)** +- void **set_item_icon_transposed** **(** :ref:`int` idx, :ref:`bool` transposed **)** + +Sets whether the item icon will be drawn transposed. ---- diff --git a/classes/class_javascript.rst b/classes/class_javascript.rst index 4c449450c..bc09ff41f 100644 --- a/classes/class_javascript.rst +++ b/classes/class_javascript.rst @@ -11,20 +11,8 @@ JavaScript **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Singleton that connects the engine with the browser's JavaScript context in HTML5 export. -Methods -------- - -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`eval` **(** :ref:`String` code, :ref:`bool` use_global_execution_context=false **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -35,6 +23,13 @@ Tutorials - `#calling-javascript-from-script <../getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script>`_ in :doc:`../getting_started/workflow/export/exporting_for_web` +Methods +------- + ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`eval` **(** :ref:`String` code, :ref:`bool` use_global_execution_context=false **)** | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_joint.rst b/classes/class_joint.rst index 133c97909..7cd1b165c 100644 --- a/classes/class_joint.rst +++ b/classes/class_joint.rst @@ -13,13 +13,13 @@ Joint **Inherited By:** :ref:`ConeTwistJoint`, :ref:`Generic6DOFJoint`, :ref:`HingeJoint`, :ref:`PinJoint`, :ref:`SliderJoint` -**Category:** Core - -Brief Description ------------------ - Base class for all 3D joints. +Description +----------- + +Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. + Properties ---------- @@ -33,11 +33,6 @@ Properties | :ref:`int` | :ref:`solver/priority` | 1 | +---------------------------------+------------------------------------------------------------------------------+--------------+ -Description ------------ - -Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. - Property Descriptions --------------------- diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index a91e5bb60..d68588fc4 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -13,13 +13,13 @@ Joint2D **Inherited By:** :ref:`DampedSpringJoint2D`, :ref:`GrooveJoint2D`, :ref:`PinJoint2D` -**Category:** Core - -Brief Description ------------------ - Base node for all joint constraints in 2D physics. +Description +----------- + +Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. + Properties ---------- @@ -33,11 +33,6 @@ Properties | :ref:`NodePath` | :ref:`node_b` | NodePath("") | +---------------------------------+--------------------------------------------------------------------+--------------+ -Description ------------ - -Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. - Property Descriptions --------------------- diff --git a/classes/class_json.rst b/classes/class_json.rst index b3f1eb2dc..4ead4cd84 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -11,13 +11,13 @@ JSON **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Helper class for parsing JSON data. +Description +----------- + +Helper class for parsing JSON data. For usage example and other important hints, see :ref:`JSONParseResult`. + Methods ------- @@ -27,11 +27,6 @@ Methods | :ref:`String` | :ref:`print` **(** :ref:`Variant` value, :ref:`String` indent="", :ref:`bool` sort_keys=false **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Helper class for parsing JSON data. For usage example and other important hints, see :ref:`JSONParseResult`. - Method Descriptions ------------------- diff --git a/classes/class_jsonparseresult.rst b/classes/class_jsonparseresult.rst index 0f2b91b6b..90ead55d7 100644 --- a/classes/class_jsonparseresult.rst +++ b/classes/class_jsonparseresult.rst @@ -11,13 +11,13 @@ JSONParseResult **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Data class wrapper for decoded JSON. +Description +----------- + +Returned by :ref:`JSON.parse`, ``JSONParseResult`` contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with ``if json_result.error == OK``. + Properties ---------- @@ -31,11 +31,6 @@ Properties | :ref:`Variant` | :ref:`result` | | +---------------------------------------+------------------------------------------------------------------+----+ -Description ------------ - -Returned by :ref:`JSON.parse`, ``JSONParseResult`` contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with ``if json_result.error == OK``. - Property Descriptions --------------------- diff --git a/classes/class_jsonrpc.rst b/classes/class_jsonrpc.rst index 24acd38da..e01edbdb1 100644 --- a/classes/class_jsonrpc.rst +++ b/classes/class_jsonrpc.rst @@ -11,11 +11,6 @@ JSONRPC **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_kinematicbody.rst b/classes/class_kinematicbody.rst index 8a63d15ea..378b57342 100644 --- a/classes/class_kinematicbody.rst +++ b/classes/class_kinematicbody.rst @@ -11,13 +11,22 @@ KinematicBody **Inherits:** :ref:`PhysicsBody` **<** :ref:`CollisionObject` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Kinematic body 3D node. +Description +----------- + +Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: + +**Simulated motion:** When these bodies are moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + +**Kinematic characters:** KinematicBody also has an API for moving objects (the :ref:`move_and_collide` and :ref:`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. + +Tutorials +--------- + +- :doc:`../tutorials/physics/kinematic_character_2d` + Properties ---------- @@ -37,6 +46,8 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_axis_lock` **(** :ref:`BodyAxis` axis **)** const | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_floor_normal` **(** **)** const | ++-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_floor_velocity` **(** **)** const | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`KinematicCollision` | :ref:`get_slide_collision` **(** :ref:`int` slide_idx **)** | @@ -51,7 +62,7 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`KinematicCollision` | :ref:`move_and_collide` **(** :ref:`Vector3` rel_vec, :ref:`bool` infinite_inertia=true, :ref:`bool` exclude_raycast_shapes=true, :ref:`bool` test_only=false **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`move_and_slide` **(** :ref:`Vector3` linear_velocity, :ref:`Vector3` floor_normal=Vector3( 0, 0, 0 ), :ref:`bool` stop_on_slope=false, :ref:`int` max_slides=4, :ref:`float` floor_max_angle=0.785398, :ref:`bool` infinite_inertia=true **)** | +| :ref:`Vector3` | :ref:`move_and_slide` **(** :ref:`Vector3` linear_velocity, :ref:`Vector3` up_direction=Vector3( 0, 0, 0 ), :ref:`bool` stop_on_slope=false, :ref:`int` max_slides=4, :ref:`float` floor_max_angle=0.785398, :ref:`bool` infinite_inertia=true **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`move_and_slide_with_snap` **(** :ref:`Vector3` linear_velocity, :ref:`Vector3` snap, :ref:`Vector3` floor_normal=Vector3( 0, 0, 0 ), :ref:`bool` stop_on_slope=false, :ref:`int` max_slides=4, :ref:`float` floor_max_angle=0.785398, :ref:`bool` infinite_inertia=true **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -60,20 +71,6 @@ Methods | :ref:`bool` | :ref:`test_move` **(** :ref:`Transform` from, :ref:`Vector3` rel_vec, :ref:`bool` infinite_inertia=true **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: - -**Simulated motion:** When these bodies are moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - -**Kinematic characters:** KinematicBody also has an API for moving objects (the :ref:`move_and_collide` and :ref:`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. - -Tutorials ---------- - -- :doc:`../tutorials/physics/kinematic_character_2d` - Property Descriptions --------------------- @@ -150,6 +147,14 @@ Returns ``true`` if the specified ``axis`` is locked. See also :ref:`move_lock_x ---- +.. _class_KinematicBody_method_get_floor_normal: + +- :ref:`Vector3` **get_floor_normal** **(** **)** const + +Returns the normal vector of the floor. + +---- + .. _class_KinematicBody_method_get_floor_velocity: - :ref:`Vector3` **get_floor_velocity** **(** **)** const @@ -210,7 +215,7 @@ If ``test_only`` is ``true``, the body does not move but the would-be collision .. _class_KinematicBody_method_move_and_slide: -- :ref:`Vector3` **move_and_slide** **(** :ref:`Vector3` linear_velocity, :ref:`Vector3` floor_normal=Vector3( 0, 0, 0 ), :ref:`bool` stop_on_slope=false, :ref:`int` max_slides=4, :ref:`float` floor_max_angle=0.785398, :ref:`bool` infinite_inertia=true **)** +- :ref:`Vector3` **move_and_slide** **(** :ref:`Vector3` linear_velocity, :ref:`Vector3` up_direction=Vector3( 0, 0, 0 ), :ref:`bool` stop_on_slope=false, :ref:`int` max_slides=4, :ref:`float` floor_max_angle=0.785398, :ref:`bool` infinite_inertia=true **)** 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 ``KinematicBody`` or :ref:`RigidBody`, 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. diff --git a/classes/class_kinematicbody2d.rst b/classes/class_kinematicbody2d.rst index d73c77bab..01c0cbf98 100644 --- a/classes/class_kinematicbody2d.rst +++ b/classes/class_kinematicbody2d.rst @@ -11,13 +11,24 @@ KinematicBody2D **Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Kinematic body 2D node. +Description +----------- + +Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: + +**Simulated motion:** When these bodies are moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + +**Kinematic characters:** KinematicBody2D also has an API for moving objects (the :ref:`move_and_collide` and :ref:`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. + +Tutorials +--------- + +- :doc:`../tutorials/physics/kinematic_character_2d` + +- :doc:`../tutorials/physics/using_kinematic_body_2d` + Properties ---------- @@ -30,6 +41,8 @@ Properties Methods ------- ++---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_floor_normal` **(** **)** const | +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_floor_velocity` **(** **)** const | +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -52,22 +65,6 @@ Methods | :ref:`bool` | :ref:`test_move` **(** :ref:`Transform2D` from, :ref:`Vector2` rel_vec, :ref:`bool` infinite_inertia=true **)** | +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: - -**Simulated motion:** When these bodies are moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - -**Kinematic characters:** KinematicBody2D also has an API for moving objects (the :ref:`move_and_collide` and :ref:`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. - -Tutorials ---------- - -- :doc:`../tutorials/physics/kinematic_character_2d` - -- :doc:`../tutorials/physics/using_kinematic_body_2d` - Property Descriptions --------------------- @@ -104,6 +101,14 @@ If ``true``, the body's movement will be synchronized to the physics frame. This Method Descriptions ------------------- +.. _class_KinematicBody2D_method_get_floor_normal: + +- :ref:`Vector2` **get_floor_normal** **(** **)** const + +Returns the normal vector of the floor. + +---- + .. _class_KinematicBody2D_method_get_floor_velocity: - :ref:`Vector2` **get_floor_velocity** **(** **)** const diff --git a/classes/class_kinematiccollision.rst b/classes/class_kinematiccollision.rst index fbd184e9e..8dd8043a3 100644 --- a/classes/class_kinematiccollision.rst +++ b/classes/class_kinematiccollision.rst @@ -11,13 +11,15 @@ KinematicCollision **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Collision data for :ref:`KinematicBody` collisions. +Description +----------- + +Contains collision data for :ref:`KinematicBody` collisions. When a :ref:`KinematicBody` is moved using :ref:`KinematicBody.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. + +This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. + Properties ---------- @@ -45,13 +47,6 @@ Properties | :ref:`Vector3` | :ref:`travel` | Vector3( 0, 0, 0 ) | +-------------------------------+-------------------------------------------------------------------------------------+--------------------+ -Description ------------ - -Contains collision data for :ref:`KinematicBody` collisions. When a :ref:`KinematicBody` is moved using :ref:`KinematicBody.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. - -This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. - Property Descriptions --------------------- diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index 1fdfdf6eb..26294ac9d 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -11,13 +11,15 @@ KinematicCollision2D **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Collision data for :ref:`KinematicBody2D` collisions. +Description +----------- + +Contains collision data for :ref:`KinematicBody2D` collisions. When a :ref:`KinematicBody2D` is moved using :ref:`KinematicBody2D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. + +This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. + Properties ---------- @@ -45,13 +47,6 @@ Properties | :ref:`Vector2` | :ref:`travel` | Vector2( 0, 0 ) | +-------------------------------+---------------------------------------------------------------------------------------+-----------------+ -Description ------------ - -Contains collision data for :ref:`KinematicBody2D` collisions. When a :ref:`KinematicBody2D` is moved using :ref:`KinematicBody2D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. - -This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. - Property Descriptions --------------------- diff --git a/classes/class_label.rst b/classes/class_label.rst index f4b8dbcef..631050d68 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -11,13 +11,15 @@ Label **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Displays plain text in a line or wrapped inside a rectangle. For formatted text, use :ref:`RichTextLabel`. +Description +----------- + +Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use :ref:`RichTextLabel` instead. + +**Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.hint_tooltip`, unless you change its mouse filter. + Properties ---------- @@ -128,13 +130,6 @@ enum **VAlign**: - **VALIGN_FILL** = **3** --- Align the whole text by spreading the rows. -Description ------------ - -Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use :ref:`RichTextLabel` instead. - -**Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.hint_tooltip`, unless you change its mouse filter. - Property Descriptions --------------------- diff --git a/classes/class_largetexture.rst b/classes/class_largetexture.rst index 4fca4c927..91b4f1f78 100644 --- a/classes/class_largetexture.rst +++ b/classes/class_largetexture.rst @@ -11,13 +11,15 @@ LargeTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +A :ref:`Texture` capable of storing many smaller textures with offsets. -Brief Description ------------------ +Description +----------- A :ref:`Texture` capable of storing many smaller textures with offsets. +You can dynamically add pieces (:ref:`Texture`\ s) to this ``LargeTexture`` using different offsets. + Properties ---------- @@ -46,13 +48,6 @@ Methods | void | :ref:`set_size` **(** :ref:`Vector2` size **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A :ref:`Texture` capable of storing many smaller textures with offsets. - -You can dynamically add pieces (:ref:`Texture`\ s) to this ``LargeTexture`` using different offsets. - Method Descriptions ------------------- diff --git a/classes/class_light.rst b/classes/class_light.rst index 2a13c9074..e70c82ecc 100644 --- a/classes/class_light.rst +++ b/classes/class_light.rst @@ -13,13 +13,18 @@ Light **Inherited By:** :ref:`DirectionalLight`, :ref:`OmniLight`, :ref:`SpotLight` -**Category:** Core - -Brief Description ------------------ - Provides a base class for different kinds of light nodes. +Description +----------- + +Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. + +Tutorials +--------- + +- :doc:`../tutorials/3d/lights_and_shadows` + Properties ---------- @@ -153,16 +158,6 @@ enum **BakeMode**: **Note:** You should hide the light if you don't want it to appear twice (dynamic and baked). -Description ------------ - -Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. - -Tutorials ---------- - -- :doc:`../tutorials/3d/lights_and_shadows` - Property Descriptions --------------------- diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 3283a1442..2ec219a8d 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -11,13 +11,20 @@ Light2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Casts light in a 2D environment. +Description +----------- + +Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). + +**Note:** Light2D can also be used as a mask. + +Tutorials +--------- + +- :doc:`../tutorials/2d/2d_lights_and_shadows` + Properties ---------- @@ -118,18 +125,6 @@ enum **ShadowFilter**: - **SHADOW_FILTER_PCF13** = **5** --- Percentage closer filtering (13 samples) applies to the shadow map. See :ref:`shadow_filter`. -Description ------------ - -Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). - -**Note:** Light2D can also be used as a mask. - -Tutorials ---------- - -- :doc:`../tutorials/2d/2d_lights_and_shadows` - Property Descriptions --------------------- diff --git a/classes/class_lightoccluder2d.rst b/classes/class_lightoccluder2d.rst index 1717878f0..715acd7c2 100644 --- a/classes/class_lightoccluder2d.rst +++ b/classes/class_lightoccluder2d.rst @@ -11,22 +11,8 @@ LightOccluder2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Occludes light cast by a Light2D, casting shadows. -Properties ----------- - -+---------------------------------------------------+--------------------------------------------------------------+---+ -| :ref:`int` | :ref:`light_mask` | 1 | -+---------------------------------------------------+--------------------------------------------------------------+---+ -| :ref:`OccluderPolygon2D` | :ref:`occluder` | | -+---------------------------------------------------+--------------------------------------------------------------+---+ - Description ----------- @@ -37,6 +23,15 @@ Tutorials - :doc:`../tutorials/2d/2d_lights_and_shadows` +Properties +---------- + ++---------------------------------------------------+--------------------------------------------------------------+---+ +| :ref:`int` | :ref:`light_mask` | 1 | ++---------------------------------------------------+--------------------------------------------------------------+---+ +| :ref:`OccluderPolygon2D` | :ref:`occluder` | | ++---------------------------------------------------+--------------------------------------------------------------+---+ + Property Descriptions --------------------- diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 4c69871ac..b87697c89 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -11,13 +11,13 @@ Line2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A 2D line. +Description +----------- + +A line through several points in 2D space. + Properties ---------- @@ -121,11 +121,6 @@ enum **LineTextureMode**: - **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. Import the texture with **Repeat** disabled for best results. -Description ------------ - -A line through several points in 2D space. - Property Descriptions --------------------- diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 885fa29f2..14db02d50 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -11,13 +11,31 @@ LineEdit **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Control that provides single-line string editing. +Description +----------- + +LineEdit provides a single-line string editor, used for text fields. It features many built-in shortcuts which will always be available: + +- Ctrl + C: Copy + +- Ctrl + X: Cut + +- Ctrl + V or Ctrl + Y: Paste/"yank" + +- Ctrl + Z: Undo + +- Ctrl + Shift + Z: Redo + +- Ctrl + U: Delete text from the cursor position to the beginning of the line + +- Ctrl + K: Delete text from the cursor position to the end of the line + +- Ctrl + A: Select all text + +- Up/Down arrow: Move the cursor to the beginning/end of the line + Properties ---------- @@ -114,6 +132,14 @@ Theme Properties Signals ------- +.. _class_LineEdit_signal_text_change_rejected: + +- **text_change_rejected** **(** **)** + +Emitted when trying to append text that would overflow the :ref:`max_length`. + +---- + .. _class_LineEdit_signal_text_changed: - **text_changed** **(** :ref:`String` new_text **)** @@ -191,29 +217,6 @@ Non-printable escape characters are automatically stripped from the OS clipboard - **MENU_MAX** = **7** --- Represents the size of the :ref:`MenuItems` enum. -Description ------------ - -LineEdit provides a single-line string editor, used for text fields. It features many built-in shortcuts which will always be available: - -- Ctrl + C: Copy - -- Ctrl + X: Cut - -- Ctrl + V or Ctrl + Y: Paste/"yank" - -- Ctrl + Z: Undo - -- Ctrl + Shift + Z: Redo - -- Ctrl + U: Delete text from the cursor position to the beginning of the line - -- Ctrl + K: Delete text from the cursor position to the end of the line - -- Ctrl + A: Select all text - -- Up/Down arrow: Move the cursor to the beginning/end of the line - Property Descriptions --------------------- @@ -293,7 +296,7 @@ The cursor's position inside the ``LineEdit``. When set, the text may scroll to | *Getter* | is_clear_button_enabled() | +-----------+---------------------------------+ -If ``true``, the ``LineEdit`` will show a clear button if ``text`` is not empty. +If ``true``, the ``LineEdit`` will show a clear button if ``text`` is not empty, which can be used to clear the text quickly. ---- @@ -451,6 +454,8 @@ The character to use to mask secret input (defaults to "\*"). Only a single char | *Getter* | is_selecting_enabled() | +-----------+------------------------------+ +If ``false``, it's impossible to select the text using mouse nor keyboard. + ---- .. _class_LineEdit_property_shortcut_keys_enabled: @@ -465,6 +470,8 @@ The character to use to mask secret input (defaults to "\*"). Only a single char | *Getter* | is_shortcut_keys_enabled() | +-----------+----------------------------------+ +If ``false``, using shortcuts will be disabled. + ---- .. _class_LineEdit_property_text: diff --git a/classes/class_lineshape2d.rst b/classes/class_lineshape2d.rst index ef5c2a47d..93fcf5bce 100644 --- a/classes/class_lineshape2d.rst +++ b/classes/class_lineshape2d.rst @@ -11,13 +11,13 @@ LineShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Line shape for 2D collisions. +Description +----------- + +Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`Vector2` | :ref:`normal` | Vector2( 0, -1 ) | +-------------------------------+--------------------------------------------------+------------------+ -Description ------------ - -Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. - Property Descriptions --------------------- diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 400cc69ba..46a330431 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -11,13 +11,13 @@ LinkButton **Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Simple button used to represent a link to some resource. +Description +----------- + +This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). + Properties ---------- @@ -69,11 +69,6 @@ enum **UnderlineMode**: - **UNDERLINE_MODE_NEVER** = **2** --- The LinkButton will never show an underline at the bottom of its text. -Description ------------ - -This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). - Property Descriptions --------------------- diff --git a/classes/class_listener.rst b/classes/class_listener.rst index e13f2054a..ac3c82f9e 100644 --- a/classes/class_listener.rst +++ b/classes/class_listener.rst @@ -11,13 +11,15 @@ Listener **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Overrides the location sounds are heard from. +Description +----------- + +Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera`. + +**Note:** There is no 2D equivalent for this node yet. + Methods ------- @@ -31,13 +33,6 @@ Methods | void | :ref:`make_current` **(** **)** | +-----------------------------------+-----------------------------------------------------------------------------------------------+ -Description ------------ - -Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera`. - -**Note:** There is no 2D equivalent for this node yet. - Method Descriptions ------------------- diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index f6c78cbc5..c594e1ceb 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -13,13 +13,50 @@ MainLoop **Inherited By:** :ref:`SceneTree` -**Category:** Core - -Brief Description ------------------ - Abstract base class for the game's main loop. +Description +----------- + +``MainLoop`` is the abstract base class for a Godot project's game loop. It is inherited by :ref:`SceneTree`, which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own ``MainLoop`` subclass instead of the scene tree. + +Upon the application start, a ``MainLoop`` implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a :ref:`SceneTree` is created) unless a main :ref:`Script` is provided from the command line (with e.g. ``godot -s my_loop.gd``, which should then be a ``MainLoop`` implementation. + +Here is an example script implementing a simple ``MainLoop``: + +:: + + extends MainLoop + + var time_elapsed = 0 + var keys_typed = [] + var quit = false + + func _initialize(): + print("Initialized:") + print(" Starting time: %s" % str(time_elapsed)) + + func _idle(delta): + time_elapsed += delta + # Return true to end the main loop. + return quit + + func _input_event(event): + # Record keys. + if event is InputEventKey and event.pressed and !event.echo: + keys_typed.append(OS.get_scancode_string(event.scancode)) + # Quit on Escape press. + if event.scancode == KEY_ESCAPE: + quit = true + # Quit on any mouse click. + if event is InputEventMouseButton: + quit = true + + func _finalize(): + print("Finalized:") + print(" End time: %s" % str(time_elapsed)) + print(" Keys typed: %s" % var2str(keys_typed)) + Methods ------- @@ -60,7 +97,7 @@ Signals - **on_request_permissions_result** **(** :ref:`String` permission, :ref:`bool` granted **)** -Emitted when an user responds to permission request. +Emitted when a user responds to a permission request. Constants --------- @@ -147,48 +184,6 @@ Specific to the Android platform. Specific to the Android platform. -Description ------------ - -``MainLoop`` is the abstract base class for a Godot project's game loop. It is inherited by :ref:`SceneTree`, which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own ``MainLoop`` subclass instead of the scene tree. - -Upon the application start, a ``MainLoop`` implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a :ref:`SceneTree` is created) unless a main :ref:`Script` is provided from the command line (with e.g. ``godot -s my_loop.gd``, which should then be a ``MainLoop`` implementation. - -Here is an example script implementing a simple ``MainLoop``: - -:: - - extends MainLoop - - var time_elapsed = 0 - var keys_typed = [] - var quit = false - - func _initialize(): - print("Initialized:") - print(" Starting time: %s" % str(time_elapsed)) - - func _idle(delta): - time_elapsed += delta - # Return true to end the main loop. - return quit - - func _input_event(event): - # Record keys. - if event is InputEventKey and event.pressed and !event.echo: - keys_typed.append(OS.get_scancode_string(event.scancode)) - # Quit on Escape press. - if event.scancode == KEY_ESCAPE: - quit = true - # Quit on any mouse click. - if event is InputEventMouseButton: - quit = true - - func _finalize(): - print("Finalized:") - print(" End time: %s" % str(time_elapsed)) - print(" Keys typed: %s" % var2str(keys_typed)) - Method Descriptions ------------------- @@ -212,6 +207,8 @@ Called before the program exits. - void **_global_menu_action** **(** :ref:`Variant` id, :ref:`Variant` meta **)** virtual +Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar). + ---- .. _class_MainLoop_method__idle: diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst index c6d300643..178a8af3d 100644 --- a/classes/class_margincontainer.rst +++ b/classes/class_margincontainer.rst @@ -11,26 +11,8 @@ MarginContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Simple margin container. -Theme Properties ----------------- - -+-----------------------+---------------+---+ -| :ref:`int` | margin_bottom | 0 | -+-----------------------+---------------+---+ -| :ref:`int` | margin_left | 0 | -+-----------------------+---------------+---+ -| :ref:`int` | margin_right | 0 | -+-----------------------+---------------+---+ -| :ref:`int` | margin_top | 0 | -+-----------------------+---------------+---+ - Description ----------- @@ -46,3 +28,16 @@ Adds a top, left, bottom, and right margin to all :ref:`Control` set("custom_constants/margin_bottom", margin_value) set("custom_constants/margin_right", margin_value) +Theme Properties +---------------- + ++-----------------------+---------------+---+ +| :ref:`int` | margin_bottom | 0 | ++-----------------------+---------------+---+ +| :ref:`int` | margin_left | 0 | ++-----------------------+---------------+---+ +| :ref:`int` | margin_right | 0 | ++-----------------------+---------------+---+ +| :ref:`int` | margin_top | 0 | ++-----------------------+---------------+---+ + diff --git a/classes/class_marshalls.rst b/classes/class_marshalls.rst index 9b179e9a1..76a0d73ac 100644 --- a/classes/class_marshalls.rst +++ b/classes/class_marshalls.rst @@ -11,13 +11,13 @@ Marshalls **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Data transformation (marshalling) and encoding helpers. +Description +----------- + +Provides data transformation and encoding utility functions. + Methods ------- @@ -35,11 +35,6 @@ Methods | :ref:`String` | :ref:`variant_to_base64` **(** :ref:`Variant` variant, :ref:`bool` full_objects=false **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Provides data transformation and encoding utility functions. - Method Descriptions ------------------- diff --git a/classes/class_material.rst b/classes/class_material.rst index 18b42ffd5..63e9d2667 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -13,13 +13,13 @@ Material **Inherited By:** :ref:`CanvasItemMaterial`, :ref:`ParticlesMaterial`, :ref:`ShaderMaterial`, :ref:`SpatialMaterial` -**Category:** Core - -Brief Description ------------------ - Abstract base :ref:`Resource` for coloring and shading geometry. +Description +----------- + +Material is a base :ref:`Resource` used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance` derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. + Properties ---------- @@ -40,11 +40,6 @@ Constants - **RENDER_PRIORITY_MIN** = **-128** --- Minimum value for the :ref:`render_priority` parameter. -Description ------------ - -Material is a base :ref:`Resource` used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance` derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. - Property Descriptions --------------------- diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index 79fc9672c..3ca630ad1 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -11,13 +11,13 @@ MenuButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Special button that brings up a :ref:`PopupMenu` when clicked. +Description +----------- + +Special button that brings up a :ref:`PopupMenu` when clicked. That's pretty much all it does, as it's just a helper class when building GUIs. + Properties ---------- @@ -80,11 +80,6 @@ Signals Emitted when :ref:`PopupMenu` of this MenuButton is about to show. -Description ------------ - -Special button that brings up a :ref:`PopupMenu` when clicked. That's pretty much all it does, as it's just a helper class when building GUIs. - Property Descriptions --------------------- diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index ba6ffb215..0e4d40097 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -13,13 +13,13 @@ Mesh **Inherited By:** :ref:`ArrayMesh`, :ref:`PrimitiveMesh` -**Category:** Core - -Brief Description ------------------ - A :ref:`Resource` that contains vertex array-based geometry. +Description +----------- + +Mesh is a type of :ref:`Resource` that contains vertex array-based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. + Properties ---------- @@ -243,11 +243,6 @@ enum **ArrayType**: - **ARRAY_MAX** = **9** --- Represents the size of the :ref:`ArrayType` enum. -Description ------------ - -Mesh is a type of :ref:`Resource` that contains vertex array-based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. - Property Descriptions --------------------- diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 18ceab6c3..14f08c479 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -11,13 +11,28 @@ MeshDataTool **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Helper tool to access and edit :ref:`Mesh` data. +Description +----------- + +MeshDataTool provides access to individual vertices in a :ref:`Mesh`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. + +To use MeshDataTool, load a mesh with :ref:`create_from_surface`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface`. + +Below is an example of how MeshDataTool may be used. + +:: + + var mdt = MeshDataTool.new() + mdt.create_from_surface(mesh, 0) + for i in range(mdt.get_vertex_count()): + var vertex = mdt.get_vertex(i) + ... + mdt.set_vertex(i, vertex) + mesh.surface_remove(0) + mdt.commit_to_surface(mesh) + Methods ------- @@ -99,26 +114,6 @@ Methods | void | :ref:`set_vertex_weights` **(** :ref:`int` idx, :ref:`PoolRealArray` weights **)** | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -MeshDataTool provides access to individual vertices in a :ref:`Mesh`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. - -To use MeshDataTool, load a mesh with :ref:`create_from_surface`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface`. - -Below is an example of how MeshDataTool may be used. - -:: - - var mdt = MeshDataTool.new() - mdt.create_from_surface(mesh, 0) - for i in range(mdt.get_vertex_count()): - var vertex = mdt.get_vertex(i) - ... - mdt.set_vertex(i, vertex) - mesh.surface_remove(0) - mdt.commit_to_surface(mesh) - Method Descriptions ------------------- diff --git a/classes/class_meshinstance.rst b/classes/class_meshinstance.rst index f3b7702d2..b04bab2fb 100644 --- a/classes/class_meshinstance.rst +++ b/classes/class_meshinstance.rst @@ -13,13 +13,13 @@ MeshInstance **Inherited By:** :ref:`SoftBody` -**Category:** Core - -Brief Description ------------------ - Node that instances meshes into a scenario. +Description +----------- + +MeshInstance is a node that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single :ref:`Mesh` in many places. This allows to reuse geometry and save on resources. When a :ref:`Mesh` has to be instanced more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance` instead. + Properties ---------- @@ -48,11 +48,6 @@ Methods | void | :ref:`set_surface_material` **(** :ref:`int` surface, :ref:`Material` material **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -MeshInstance is a node that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single :ref:`Mesh` in many places. This allows to reuse geometry and save on resources. When a :ref:`Mesh` has to be instanced more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance` instead. - Property Descriptions --------------------- diff --git a/classes/class_meshinstance2d.rst b/classes/class_meshinstance2d.rst index 07a811f57..3007acbac 100644 --- a/classes/class_meshinstance2d.rst +++ b/classes/class_meshinstance2d.rst @@ -11,13 +11,18 @@ MeshInstance2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node used for displaying a :ref:`Mesh` in 2D. +Description +----------- + +Node used for displaying a :ref:`Mesh` in 2D. Can be constructed from an existing :ref:`Sprite` use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". + +Tutorials +--------- + +- :doc:`../tutorials/2d/2d_meshes` + Properties ---------- @@ -36,16 +41,6 @@ Signals - **texture_changed** **(** **)** -Description ------------ - -Node used for displaying a :ref:`Mesh` in 2D. Can be constructed from an existing :ref:`Sprite` use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". - -Tutorials ---------- - -- :doc:`../tutorials/2d/2d_meshes` - Property Descriptions --------------------- diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index d399dab6c..16b138923 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -11,13 +11,13 @@ MeshLibrary **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Library of meshes. +Description +----------- + +A library of meshes. Contains a list of :ref:`Mesh` resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in :ref:`GridMap`. + Methods ------- @@ -59,11 +59,6 @@ Methods | void | :ref:`set_item_shapes` **(** :ref:`int` id, :ref:`Array` shapes **)** | +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A library of meshes. Contains a list of :ref:`Mesh` resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in :ref:`GridMap`. - Method Descriptions ------------------- diff --git a/classes/class_meshtexture.rst b/classes/class_meshtexture.rst index 171a99348..01c1963e5 100644 --- a/classes/class_meshtexture.rst +++ b/classes/class_meshtexture.rst @@ -11,13 +11,13 @@ MeshTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Simple texture that uses a mesh to draw itself. +Description +----------- + +Simple texture that uses a mesh to draw itself. It's limited because flags can't be changed and region drawing is not supported. + Properties ---------- @@ -31,11 +31,6 @@ Properties | :ref:`Mesh` | :ref:`mesh` | | +-------------------------------+--------------------------------------------------------------+-----------------+ -Description ------------ - -Simple texture that uses a mesh to draw itself. It's limited because flags can't be changed and region drawing is not supported. - Property Descriptions --------------------- diff --git a/classes/class_mobilevrinterface.rst b/classes/class_mobilevrinterface.rst index 2f1021205..1b205c9fe 100644 --- a/classes/class_mobilevrinterface.rst +++ b/classes/class_mobilevrinterface.rst @@ -11,13 +11,23 @@ MobileVRInterface **Inherits:** :ref:`ARVRInterface` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Generic mobile VR implementation. +Description +----------- + +This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer. + +Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting :ref:`eye_height`. + +You can initialise this interface as follows: + +:: + + var interface = ARVRServer.find_interface("Native mobile") + if interface and interface.initialize(): + get_viewport().arvr = true + Properties ---------- @@ -37,21 +47,6 @@ Properties | :ref:`float` | :ref:`oversample` | 1.5 | +---------------------------+--------------------------------------------------------------------------+-------+ -Description ------------ - -This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer. - -Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting :ref:`eye_height`. - -You can initialise this interface as follows: - -:: - - var interface = ARVRServer.find_interface("Native mobile") - if interface and interface.initialize(): - get_viewport().arvr = true - Property Descriptions --------------------- diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index e82dd7caa..7be168d3e 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -11,13 +11,26 @@ MultiMesh **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Provides high-performance mesh instancing. +Description +----------- + +MultiMesh provides low-level mesh instancing. Drawing thousands of :ref:`MeshInstance` nodes can be slow, since each object is submitted to the GPU then drawn individually. + +MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. + +As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). + +Since instances may have any behavior, the AABB used for visibility must be provided by the user. + +Tutorials +--------- + +- :doc:`../tutorials/3d/vertex_animation/animating_thousands_of_fish` + +- :doc:`../tutorials/optimization/using_multimesh` + Properties ---------- @@ -107,26 +120,10 @@ enum **CustomDataFormat**: - **CUSTOM_DATA_NONE** = **0** --- Use when you are not using per-instance custom data. -- **CUSTOM_DATA_8BIT** = **1** --- Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision. +- **CUSTOM_DATA_8BIT** = **1** --- Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision and range. Floats packed into 8 bits can only represent values between 0 and 1, numbers outside that range will be clamped. - **CUSTOM_DATA_FLOAT** = **2** --- The :ref:`Color` passed into :ref:`set_instance_custom_data` will use 4 floats. Use this for highest precision. -Description ------------ - -MultiMesh provides low-level mesh instancing. Drawing thousands of :ref:`MeshInstance` nodes can be slow, since each object is submitted to the GPU then drawn individually. - -MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. - -As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). - -Since instances may have any behavior, the AABB used for visibility must be provided by the user. - -Tutorials ---------- - -- :doc:`../tutorials/3d/vertex_animation/animating_thousands_of_fish` - Property Descriptions --------------------- @@ -291,7 +288,7 @@ For the color to take effect, ensure that :ref:`color_format` instance, :ref:`Color` custom_data **)** -Sets custom data for a specific instance. Although :ref:`Color` is used, it is just a container for 4 numbers. +Sets custom data for a specific instance. Although :ref:`Color` is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the :ref:`CustomDataFormat` used. ---- diff --git a/classes/class_multimeshinstance.rst b/classes/class_multimeshinstance.rst index a5fc5c5b0..4bdd847a8 100644 --- a/classes/class_multimeshinstance.rst +++ b/classes/class_multimeshinstance.rst @@ -11,20 +11,8 @@ MultiMeshInstance **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node that instances a :ref:`MultiMesh`. -Properties ----------- - -+-----------------------------------+--------------------------------------------------------------+ -| :ref:`MultiMesh` | :ref:`multimesh` | -+-----------------------------------+--------------------------------------------------------------+ - Description ----------- @@ -39,6 +27,13 @@ Tutorials - :doc:`../tutorials/3d/using_multi_mesh_instance` +Properties +---------- + ++-----------------------------------+--------------------------------------------------------------+ +| :ref:`MultiMesh` | :ref:`multimesh` | ++-----------------------------------+--------------------------------------------------------------+ + Property Descriptions --------------------- diff --git a/classes/class_multimeshinstance2d.rst b/classes/class_multimeshinstance2d.rst index 333377c81..12d9bdeb3 100644 --- a/classes/class_multimeshinstance2d.rst +++ b/classes/class_multimeshinstance2d.rst @@ -11,13 +11,15 @@ MultiMeshInstance2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node that instances a :ref:`MultiMesh` in 2D. +Description +----------- + +``MultiMeshInstance2D`` is a specialized node to instance a :ref:`MultiMesh` resource in 2D. + +Usage is the same as :ref:`MultiMeshInstance`. + Properties ---------- @@ -36,13 +38,6 @@ Signals - **texture_changed** **(** **)** -Description ------------ - -``MultiMeshInstance2D`` is a specialized node to instance a :ref:`MultiMesh` resource in 2D. - -Usage is the same as :ref:`MultiMeshInstance`. - Property Descriptions --------------------- diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 4e54531cf..60e19ed6b 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -11,13 +11,17 @@ MultiplayerAPI **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - High-level multiplayer API. +Description +----------- + +This class implements most of the logic behind the high-level multiplayer API. + +By default, :ref:`SceneTree` has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. + +It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the :ref:`Node.custom_multiplayer` property, effectively allowing to run both client and server in the same scene. + Properties ---------- @@ -144,15 +148,6 @@ enum **RPCMode**: - **RPC_MODE_PUPPETSYNC** = **6** --- Behave like :ref:`RPC_MODE_PUPPET` but also make the call or property change locally. Analogous to the ``puppetsync`` keyword. -Description ------------ - -This class implements most of the logic behind the high-level multiplayer API. - -By default, :ref:`SceneTree` has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. - -It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the :ref:`Node.custom_multiplayer` property, effectively allowing to run both client and server in the same scene. - Property Descriptions --------------------- diff --git a/classes/class_multiplayerpeergdnative.rst b/classes/class_multiplayerpeergdnative.rst index aa7e5334f..4a567730c 100644 --- a/classes/class_multiplayerpeergdnative.rst +++ b/classes/class_multiplayerpeergdnative.rst @@ -11,10 +11,5 @@ MultiplayerPeerGDNative **Inherits:** :ref:`NetworkedMultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index c21898a3b..570c3bfe3 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -11,13 +11,18 @@ Mutex **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A synchronization mutex (mutual exclusion). +Description +----------- + +A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`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. + +Tutorials +--------- + +- :doc:`../tutorials/threads/using_multiple_threads` + Methods ------- @@ -29,16 +34,6 @@ Methods | void | :ref:`unlock` **(** **)** | +---------------------------------------+----------------------------------------------------------+ -Description ------------ - -A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`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. - -Tutorials ---------- - -- :doc:`../tutorials/threads/using_multiple_threads` - Method Descriptions ------------------- diff --git a/classes/class_nativescript.rst b/classes/class_nativescript.rst index 214383c59..0c7f1ddce 100644 --- a/classes/class_nativescript.rst +++ b/classes/class_nativescript.rst @@ -11,11 +11,6 @@ NativeScript **Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_navigation.rst b/classes/class_navigation.rst index 4ab22fee9..5be0058a8 100644 --- a/classes/class_navigation.rst +++ b/classes/class_navigation.rst @@ -11,13 +11,13 @@ Navigation **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Mesh-based navigation and pathfinding node. +Description +----------- + +Provides navigation and pathfinding within a collection of :ref:`NavigationMesh`\ es. By default, these will be automatically collected from child :ref:`NavigationMeshInstance` nodes, but they can also be added on the fly with :ref:`navmesh_add`. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. + Properties ---------- @@ -46,11 +46,6 @@ Methods | void | :ref:`navmesh_set_transform` **(** :ref:`int` id, :ref:`Transform` xform **)** | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Provides navigation and pathfinding within a collection of :ref:`NavigationMesh`\ es. By default, these will be automatically collected from child :ref:`NavigationMeshInstance` nodes, but they can also be added on the fly with :ref:`navmesh_add`. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. - Property Descriptions --------------------- diff --git a/classes/class_navigation2d.rst b/classes/class_navigation2d.rst index 2f1142060..fb4c213b0 100644 --- a/classes/class_navigation2d.rst +++ b/classes/class_navigation2d.rst @@ -11,13 +11,13 @@ Navigation2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - 2D navigation and pathfinding node. +Description +----------- + +Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of :ref:`NavigationPolygon` resources. By default, these are automatically collected from child :ref:`NavigationPolygonInstance` nodes, but they can also be added on the fly with :ref:`navpoly_add`. + Methods ------- @@ -35,11 +35,6 @@ Methods | void | :ref:`navpoly_set_transform` **(** :ref:`int` id, :ref:`Transform2D` xform **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of :ref:`NavigationPolygon` resources. By default, these are automatically collected from child :ref:`NavigationPolygonInstance` nodes, but they can also be added on the fly with :ref:`navpoly_add`. - Method Descriptions ------------------- diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index b2a3e816a..8e9e60d44 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -11,11 +11,6 @@ NavigationMesh **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_navigationmeshinstance.rst b/classes/class_navigationmeshinstance.rst index 6d0876347..3dca06393 100644 --- a/classes/class_navigationmeshinstance.rst +++ b/classes/class_navigationmeshinstance.rst @@ -11,11 +11,6 @@ NavigationMeshInstance **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 8d43f4ed2..4469356b7 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -11,13 +11,34 @@ NavigationPolygon **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A node that has methods to draw outlines or use indices of vertices to create navigation polygons. +Description +----------- + +There are two ways to create polygons. Either by using the :ref:`add_outline` method, or using the :ref:`add_polygon` method. + +Using :ref:`add_outline`: + +:: + + var polygon = NavigationPolygon.new() + var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + polygon.add_outline(outline) + polygon.make_polygons_from_outlines() + $NavigationPolygonInstance.navpoly = polygon + +Using :ref:`add_polygon` and indices of the vertices array. + +:: + + var polygon = NavigationPolygon.new() + var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + polygon.set_vertices(vertices) + var indices = PoolIntArray(0, 3, 1) + polygon.add_polygon(indices) + $NavigationPolygonInstance.navpoly = polygon + Methods ------- @@ -51,32 +72,6 @@ Methods | void | :ref:`set_vertices` **(** :ref:`PoolVector2Array` vertices **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -There are two ways to create polygons. Either by using the :ref:`add_outline` method, or using the :ref:`add_polygon` method. - -Using :ref:`add_outline`: - -:: - - var polygon = NavigationPolygon.new() - var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.add_outline(outline) - polygon.make_polygons_from_outlines() - $NavigationPolygonInstance.navpoly = polygon - -Using :ref:`add_polygon` and indices of the vertices array. - -:: - - var polygon = NavigationPolygon.new() - var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.set_vertices(vertices) - var indices = PoolIntArray(0, 3, 1) - polygon.add_polygon(indices) - $NavigationPolygonInstance.navpoly = polygon - Method Descriptions ------------------- diff --git a/classes/class_navigationpolygoninstance.rst b/classes/class_navigationpolygoninstance.rst index 85555c646..6d70c1812 100644 --- a/classes/class_navigationpolygoninstance.rst +++ b/classes/class_navigationpolygoninstance.rst @@ -11,11 +11,6 @@ NavigationPolygonInstance **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_networkedmultiplayerenet.rst b/classes/class_networkedmultiplayerenet.rst index 904ff5fca..ea52da996 100644 --- a/classes/class_networkedmultiplayerenet.rst +++ b/classes/class_networkedmultiplayerenet.rst @@ -11,13 +11,20 @@ NetworkedMultiplayerENet **Inherits:** :ref:`NetworkedMultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - PacketPeer implementation using the `ENet `_ library. +Description +----------- + +A PacketPeer implementation that should be passed to :ref:`SceneTree.network_peer` after being initialized as either a client or server. Events can then be handled by connecting to :ref:`SceneTree` signals. + +Tutorials +--------- + +- :doc:`../tutorials/networking/high_level_multiplayer` + +- `http://enet.bespin.org/usergroup0.html `_ + Properties ---------- @@ -87,18 +94,6 @@ enum **CompressionMode**: - **COMPRESS_ZSTD** = **4** --- `Zstandard `_ compression. -Description ------------ - -A PacketPeer implementation that should be passed to :ref:`SceneTree.network_peer` after being initialized as either a client or server. Events can then be handled by connecting to :ref:`SceneTree` signals. - -Tutorials ---------- - -- :doc:`../tutorials/networking/high_level_multiplayer` - -- `http://enet.bespin.org/usergroup0.html `_ - Property Descriptions --------------------- @@ -203,7 +198,7 @@ Create client that connects to a server at ``address`` using specified ``port``. - :ref:`Error` **create_server** **(** :ref:`int` port, :ref:`int` max_clients=32, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** -Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip`. The default IP is the wildcard ``"*"``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4096 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client`. Returns :ref:`@GlobalScope.OK` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the server could not be created. +Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip`. The default IP is the wildcard ``"*"``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client`. Returns :ref:`@GlobalScope.OK` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the server could not be created. ---- diff --git a/classes/class_networkedmultiplayerpeer.rst b/classes/class_networkedmultiplayerpeer.rst index cecf88416..b758633a7 100644 --- a/classes/class_networkedmultiplayerpeer.rst +++ b/classes/class_networkedmultiplayerpeer.rst @@ -13,13 +13,18 @@ NetworkedMultiplayerPeer **Inherited By:** :ref:`MultiplayerPeerGDNative`, :ref:`NetworkedMultiplayerENet`, :ref:`WebRTCMultiplayer`, :ref:`WebSocketMultiplayerPeer` -**Category:** Core - -Brief Description ------------------ - A high-level network interface to simplify multiplayer interactions. +Description +----------- + +Manages the connection to network peers. Assigns unique IDs to each client connected to the server. + +Tutorials +--------- + +- :doc:`../tutorials/networking/high_level_multiplayer` + Properties ---------- @@ -133,16 +138,6 @@ Constants - **TARGET_PEER_SERVER** = **1** --- Packets are sent to the server alone. -Description ------------ - -Manages the connection to network peers. Assigns unique IDs to each client connected to the server. - -Tutorials ---------- - -- :doc:`../tutorials/networking/high_level_multiplayer` - Property Descriptions --------------------- diff --git a/classes/class_nil.rst b/classes/class_nil.rst index 671852b3f..5c2b10330 100644 --- a/classes/class_nil.rst +++ b/classes/class_nil.rst @@ -9,11 +9,6 @@ Nil === -**Category:** Built-In Types - -Brief Description ------------------ - Methods diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index 19e6d404c..a90b485a1 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -11,13 +11,13 @@ NinePatchRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. +Description +----------- + +Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. + Properties ---------- @@ -59,7 +59,7 @@ Signals - **texture_changed** **(** **)** -Fired when the node's texture changes. +Emitted when the node's texture changes. Enumerations ------------ @@ -80,11 +80,6 @@ enum **AxisStretchMode**: - **AXIS_STRETCH_MODE_TILE_FIT** = **2** --- Doesn't do anything at the time of writing. -Description ------------ - -Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. - Property Descriptions --------------------- @@ -235,9 +230,13 @@ Method Descriptions - :ref:`int` **get_patch_margin** **(** :ref:`Margin` margin **)** const +Returns the size of the margin identified by the given :ref:`Margin` constant. + ---- .. _class_NinePatchRect_method_set_patch_margin: - void **set_patch_margin** **(** :ref:`Margin` margin, :ref:`int` value **)** +Sets the size of the margin identified by the given :ref:`Margin` constant to ``value`` in pixels. + diff --git a/classes/class_node.rst b/classes/class_node.rst index 730bcbe23..f2149525b 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -13,13 +13,38 @@ Node **Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AnimationTreePlayer`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorInterface`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`ResourcePreloader`, :ref:`SkeletonIK`, :ref:`Spatial`, :ref:`Timer`, :ref:`Tween`, :ref:`Viewport`, :ref:`WorldEnvironment` -**Category:** Core - -Brief Description ------------------ - Base class for all *scene* objects. +Description +----------- + +Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names. + +A tree of nodes is called a *scene*. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. + +**Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE` notification and its :ref:`_enter_tree` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. + +Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY` notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, starting with the children and moving up to the parent nodes. + +This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree` of the parent, :ref:`_enter_tree` of the children, :ref:`_ready` of the children and finally :ref:`_ready` of the parent (recursively for the entire scene tree). + +**Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process`, toggled with :ref:`set_process`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* is passed as an argument. Physics processing (callback :ref:`_physics_process`, toggled with :ref:`set_physics_process`) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. + +Nodes can also process input events. When present, the :ref:`_input` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. + +To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the :ref:`owner` property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. + +Finally, when a node is freed with :ref:`Object.free` or :ref:`queue_free`, it will also free all its children. + +**Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group`, :ref:`is_in_group` and :ref:`remove_from_group`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree`. + +**Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`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 :ref:`NodePath` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/scenes_and_nodes` + Properties ---------- @@ -445,36 +470,6 @@ Specific to the Android platform. Specific to the Android platform. -Description ------------ - -Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names. - -A tree of nodes is called a *scene*. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. - -**Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE` notification and its :ref:`_enter_tree` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. - -Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY` notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, starting with the children and moving up to the parent nodes. - -This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree` of the parent, :ref:`_enter_tree` of the children, :ref:`_ready` of the children and finally :ref:`_ready` of the parent (recursively for the entire scene tree). - -**Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process`, toggled with :ref:`set_process`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* is passed as an argument. Physics processing (callback :ref:`_physics_process`, toggled with :ref:`set_physics_process`) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. - -Nodes can also process input events. When present, the :ref:`_input` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. - -To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the :ref:`owner` property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. - -Finally, when a node is freed with :ref:`Object.free` or :ref:`queue_free`, it will also free all its children. - -**Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group`, :ref:`is_in_group` and :ref:`remove_from_group`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree`. - -**Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`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 :ref:`NodePath` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/scenes_and_nodes` - Property Descriptions --------------------- @@ -707,6 +702,8 @@ If ``legible_unique_name`` is ``true``, the child node will have an human-readab child_node.get_parent().remove_child(child_node) add_child(child_node) +**Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`add_child`. This is typically relevant for `tool scripts `_ and `editor plugins `_. If :ref:`add_child` is called without setting :ref:`owner`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. + ---- .. _class_Node_method_add_child_below_node: diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index 313a85db0..3442d13e5 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -13,13 +13,18 @@ Node2D **Inherited By:** :ref:`AnimatedSprite`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`CPUParticles2D`, :ref:`Camera2D`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`Navigation2D`, :ref:`NavigationPolygonInstance`, :ref:`ParallaxLayer`, :ref:`Particles2D`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`Position2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`Skeleton2D`, :ref:`Sprite`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibilityNotifier2D`, :ref:`YSort` -**Category:** Core - -Brief Description ------------------ - A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. +Description +----------- + +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. + +Tutorials +--------- + +- :doc:`../tutorials/2d/custom_drawing_in_2d` + Properties ---------- @@ -76,16 +81,6 @@ Methods | void | :ref:`translate` **(** :ref:`Vector2` offset **)** | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -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. - -Tutorials ---------- - -- :doc:`../tutorials/2d/custom_drawing_in_2d` - Property Descriptions --------------------- diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index e69df52f7..6c882b9a8 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -9,36 +9,8 @@ NodePath ======== -**Category:** Built-In Types - -Brief Description ------------------ - Pre-parsed scene tree path. -Methods -------- - -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`NodePath` **(** :ref:`String` from **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_as_property_path` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_concatenated_subnames` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** :ref:`int` idx **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_name_count` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_subname` **(** :ref:`int` idx **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_subname_count` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_absolute` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------+ - Description ----------- @@ -63,6 +35,29 @@ Some examples of NodePaths include the following: @"/root/Main" # If your main scene's root node were named "Main". @"/root/MyAutoload" # If you have an autoloaded node or scene. +Methods +------- + ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`NodePath` **(** :ref:`String` from **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_as_property_path` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_concatenated_subnames` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** :ref:`int` idx **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_name_count` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_subname` **(** :ref:`int` idx **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_subname_count` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_absolute` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_empty` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_noisetexture.rst b/classes/class_noisetexture.rst index efc725009..02fa8c08c 100644 --- a/classes/class_noisetexture.rst +++ b/classes/class_noisetexture.rst @@ -11,13 +11,15 @@ NoiseTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - :ref:`OpenSimplexNoise` filled texture. +Description +----------- + +Uses an :ref:`OpenSimplexNoise` to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. + +NoiseTexture can also generate normalmap textures. + Properties ---------- @@ -37,13 +39,6 @@ Properties | :ref:`int` | :ref:`width` | 512 | +-------------------------------------------------+-----------------------------------------------------------------+----------+ -Description ------------ - -Uses an :ref:`OpenSimplexNoise` to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. - -NoiseTexture can also generate normalmap textures. - Property Descriptions --------------------- diff --git a/classes/class_object.rst b/classes/class_object.rst index 447daccd3..1484fc7ab 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -11,13 +11,31 @@ Object **Inherited By:** :ref:`ARVRPositionalTracker`, :ref:`ARVRServer`, :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`EditorFileSystemDirectory`, :ref:`EditorNavigationMeshGenerator`, :ref:`EditorSelection`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`Geometry`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JSON`, :ref:`JSONRPC`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`Physics2DDirectBodyState`, :ref:`Physics2DDirectSpaceState`, :ref:`Physics2DServer`, :ref:`PhysicsDirectBodyState`, :ref:`PhysicsDirectSpaceState`, :ref:`PhysicsServer`, :ref:`ProjectSettings`, :ref:`Reference`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`VisualScriptEditor`, :ref:`VisualServer` -**Category:** Core - -Brief Description ------------------ - Base class for all non built-in types. +Description +----------- + +Every class which is not a built-in type inherits from this class. + +You can construct Objects from scripting languages, using ``Object.new()`` in GDScript, ``new Object`` in C#, or the "Construct Object" node in VisualScript. + +Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the :ref:`free` method from your script or delete the instance from C++. + +Some classes that extend Object add memory management. This is the case of :ref:`Reference`, which counts references and deletes itself automatically when no longer referenced. :ref:`Node`, another fundamental type, deletes all its children when freed from memory. + +Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list` and handled in :ref:`_get` and :ref:`_set`. However, scripting languages and C++ have simpler means to export them. + +Property membership can be tested directly in GDScript using ``in``: + +:: + + var n = Node2D.new() + print("position" in n) # Prints "True". + print("other_property" in n) # Prints "False". + +Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See :ref:`_notification`. + Methods ------- @@ -38,7 +56,7 @@ Methods +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`call` **(** :ref:`String` method, ... **)** vararg | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_deferred` **(** :ref:`String` method, ... **)** vararg | +| void | :ref:`call_deferred` **(** :ref:`String` method, ... **)** vararg | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`callv` **(** :ref:`String` method, :ref:`Array` arg_array **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -48,7 +66,7 @@ Methods +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`disconnect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`emit_signal` **(** :ref:`String` signal, ... **)** vararg | +| void | :ref:`emit_signal` **(** :ref:`String` signal, ... **)** vararg | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free` **(** **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -158,29 +176,6 @@ Constants - **NOTIFICATION_PREDELETE** = **1** --- Called before the object is about to be deleted. -Description ------------ - -Every class which is not a built-in type inherits from this class. - -You can construct Objects from scripting languages, using ``Object.new()`` in GDScript, ``new Object`` in C#, or the "Construct Object" node in VisualScript. - -Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the :ref:`free` method from your script or delete the instance from C++. - -Some classes that extend Object add memory management. This is the case of :ref:`Reference`, which counts references and deletes itself automatically when no longer referenced. :ref:`Node`, another fundamental type, deletes all its children when freed from memory. - -Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list` and handled in :ref:`_get` and :ref:`_set`. However, scripting languages and C++ have simpler means to export them. - -Property membership can be tested directly in GDScript using ``in``: - -:: - - var n = Node2D.new() - print("position" in n) # Prints "True". - print("other_property" in n) # Prints "False". - -Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See :ref:`_notification`. - Method Descriptions ------------------- @@ -264,9 +259,9 @@ Calls the ``method`` on the object and returns the result. This method supports .. _class_Object_method_call_deferred: -- :ref:`Variant` **call_deferred** **(** :ref:`String` method, ... **)** vararg +- void **call_deferred** **(** :ref:`String` method, ... **)** vararg -Calls the ``method`` on the object during idle time and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: +Calls the ``method`` on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: :: @@ -335,7 +330,7 @@ If you try to disconnect a connection that does not exist, the method will throw .. _class_Object_method_emit_signal: -- :ref:`Variant` **emit_signal** **(** :ref:`String` signal, ... **)** vararg +- void **emit_signal** **(** :ref:`String` signal, ... **)** vararg Emits the given ``signal``. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -358,7 +353,7 @@ Deletes the object from memory. Any pre-existing reference to the freed object w - :ref:`Variant` **get** **(** :ref:`String` property **)** const -Returns the :ref:`Variant` value of the given ``property``. +Returns the :ref:`Variant` value of the given ``property``. If the ``property`` doesn't exist, this will return ``null``. ---- @@ -604,6 +599,8 @@ Adds or changes a given entry in the object's metadata. Metadata are serialized, Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. +If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's :ref:`_init` method will be called. + ---- .. _class_Object_method_to_string: diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index da3fc4301..a2f77a987 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -11,13 +11,13 @@ OccluderPolygon2D **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Defines a 2D polygon for LightOccluder2D. +Description +----------- + +Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D`. + Properties ---------- @@ -48,11 +48,6 @@ enum **CullMode**: - **CULL_COUNTER_CLOCKWISE** = **2** --- Culling is performed in the counterclockwise direction. See :ref:`cull_mode`. -Description ------------ - -Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D`. - Property Descriptions --------------------- diff --git a/classes/class_omnilight.rst b/classes/class_omnilight.rst index 05141700f..02a812d6f 100644 --- a/classes/class_omnilight.rst +++ b/classes/class_omnilight.rst @@ -11,13 +11,18 @@ OmniLight **Inherits:** :ref:`Light` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Omnidirectional light, such as a light bulb or a candle. +Description +----------- + +An Omnidirectional light is a type of :ref:`Light` 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. + +Tutorials +--------- + +- :doc:`../tutorials/3d/lights_and_shadows` + Properties ---------- @@ -60,16 +65,6 @@ enum **ShadowDetail**: - **SHADOW_DETAIL_HORIZONTAL** = **1** -Description ------------ - -An Omnidirectional light is a type of :ref:`Light` 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. - -Tutorials ---------- - -- :doc:`../tutorials/3d/lights_and_shadows` - Property Descriptions --------------------- diff --git a/classes/class_opensimplexnoise.rst b/classes/class_opensimplexnoise.rst index c76231acf..b893fcea9 100644 --- a/classes/class_opensimplexnoise.rst +++ b/classes/class_opensimplexnoise.rst @@ -11,13 +11,29 @@ OpenSimplexNoise **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Noise generator based on Open Simplex. +Description +----------- + +This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions: + +:: + + var noise = OpenSimplexNoise.new() + + # Configure + noise.seed = randi() + noise.octaves = 4 + noise.period = 20.0 + noise.persistence = 0.8 + + # Sample + print("Values:") + print(noise.get_noise_2d(1.0, 1.0)) + print(noise.get_noise_3d(0.5, 3.0, 15.0)) + print(noise.get_noise_4d(0.5, 1.9, 4.7, 0.0)) + Properties ---------- @@ -54,27 +70,6 @@ Methods | :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` size **)** | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions: - -:: - - var noise = OpenSimplexNoise.new() - - # Configure - noise.seed = randi() - noise.octaves = 4 - noise.period = 20.0 - noise.persistence = 0.8 - - # Sample - print("Values:") - print(noise.get_noise_2d(1.0, 1.0)) - print(noise.get_noise_3d(0.5, 3.0, 15.0)) - print(noise.get_noise_4d(0.5, 1.9, 4.7, 0.0)) - Property Descriptions --------------------- diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index a2c4aff68..3ee83f5bb 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -11,13 +11,13 @@ OptionButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Button control that provides selectable options when pressed. +Description +----------- + +OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. + Properties ---------- @@ -126,11 +126,6 @@ Emitted the when user navigates to an item using the ``ui_up`` or ``ui_down`` ac Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. -Description ------------ - -OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. - Property Descriptions --------------------- diff --git a/classes/class_os.rst b/classes/class_os.rst index 07959c9a8..5b0137d8b 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -11,13 +11,13 @@ OS **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Operating System functions. +Description +----------- + +Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc. + Properties ---------- @@ -211,6 +211,8 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_window_always_on_top` **(** **)** const | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_window_focused` **(** **)** const | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`kill` **(** :ref:`int` pid **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_window_to_foreground` **(** **)** | @@ -463,11 +465,6 @@ enum **PowerState**: - **POWERSTATE_CHARGED** = **4** --- Plugged in, battery fully charged. -Description ------------ - -Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc. - Property Descriptions --------------------- @@ -517,6 +514,8 @@ The current screen index (starting from 0). The exit code passed to the OS when the main loop exits. By convention, an exit code of ``0`` indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). +**Note:** This value will be ignored if using :ref:`SceneTree.quit` with an ``exit_code`` argument passed. + ---- .. _class_OS_property_keep_screen_on: @@ -645,6 +644,10 @@ If ``true``, vertical synchronization (Vsync) is enabled. If ``true`` and ``vsync_enabled`` is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode. +**Note:** This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. + +**Note:** This property is only implemented on Windows. + ---- .. _class_OS_property_window_borderless: @@ -1432,11 +1435,11 @@ Hides the virtual keyboard if it is shown, does nothing otherwise. - :ref:`bool` **is_debug_build** **(** **)** const -Returns ``true`` if the build is a debug build. +Returns ``true`` if the Godot binary used to run the project is a *debug* export template, or when running in the editor. -Returns ``true`` when running in the editor. +Returns ``false`` if the Godot binary used to run the project is a *release* export template. -Returns ``false`` if the build is a release build. +To check whether the Godot binary used to run the project is an export template (debug or release), use ``OS.has_feature("standalone")`` instead. ---- @@ -1480,6 +1483,16 @@ Returns ``true`` if the window should always be on top of other windows. ---- +.. _class_OS_method_is_window_focused: + +- :ref:`bool` **is_window_focused** **(** **)** const + +Returns ``true`` if the window is currently focused. + +**Note:** Only implemented on desktop platforms. On other platforms, it will always return ``true``. + +---- + .. _class_OS_method_kill: - :ref:`Error` **kill** **(** :ref:`int` pid **)** diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst index 98883dc88..cbd2ef706 100644 --- a/classes/class_packeddatacontainer.rst +++ b/classes/class_packeddatacontainer.rst @@ -11,11 +11,6 @@ PackedDataContainer **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_packeddatacontainerref.rst b/classes/class_packeddatacontainerref.rst index 446baf5d4..08be38c2e 100644 --- a/classes/class_packeddatacontainerref.rst +++ b/classes/class_packeddatacontainerref.rst @@ -11,11 +11,6 @@ PackedDataContainerRef **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index f93797e07..261606b7c 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -11,13 +11,39 @@ PackedScene **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - An abstraction of a serialized scene. +Description +----------- + +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 ``owner`` property on :ref:`Node`). + +**Note:** The node doesn't need to own itself. + +**Example of saving a node with different owners:** The following example creates 3 objects: ``Node2D`` (``node``), ``RigidBody2D`` (``rigid``) and ``CollisionObject2D`` (``collision``). ``collision`` is a child of ``rigid`` which is a child of ``node``. Only ``rigid`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. + +:: + + # Create the objects + var node = Node2D.new() + var rigid = RigidBody2D.new() + var collision = CollisionShape2D.new() + + # Create the object hierarchy + rigid.add_child(collision) + node.add_child(rigid) + + # Change owner of rigid, but not of collision + rigid.owner = node + + var scene = PackedScene.new() + # Only node and rigid are now packed + var result = scene.pack(node) + if result == OK: + ResourceSaver.save("res://path/name.scn", scene) # Or "user://..." + Properties ---------- @@ -61,37 +87,6 @@ enum **GenEditState**: **Note:** Only available in editor builds. -Description ------------ - -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 ``owner`` property on :ref:`Node`). - -**Note:** The node doesn't need to own itself. - -**Example of saving a node with different owners:** The following example creates 3 objects: ``Node2D`` (``node``), ``RigidBody2D`` (``rigid``) and ``CollisionObject2D`` (``collision``). ``collision`` is a child of ``rigid`` which is a child of ``node``. Only ``rigid`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. - -:: - - # Create the objects - var node = Node2D.new() - var rigid = RigidBody2D.new() - var collision = CollisionShape2D.new() - - # Create the object hierarchy - rigid.add_child(collision) - node.add_child(rigid) - - # Change owner of rigid, but not of collision - rigid.owner = node - - var scene = PackedScene.new() - # Only node and rigid are now packed - var result = scene.pack(node) - if result == OK: - ResourceSaver.save("res://path/name.scn", scene) # Or "user://..." - Property Descriptions --------------------- diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst index 80bf8e579..f113dff75 100644 --- a/classes/class_packetpeer.rst +++ b/classes/class_packetpeer.rst @@ -13,13 +13,13 @@ PacketPeer **Inherited By:** :ref:`NetworkedMultiplayerPeer`, :ref:`PacketPeerGDNative`, :ref:`PacketPeerStream`, :ref:`PacketPeerUDP`, :ref:`WebRTCDataChannel`, :ref:`WebSocketPeer` -**Category:** Core - -Brief Description ------------------ - Abstraction and base class for packet-based protocols. +Description +----------- + +PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering. + Properties ---------- @@ -44,11 +44,6 @@ Methods | :ref:`Error` | :ref:`put_var` **(** :ref:`Variant` var, :ref:`bool` full_objects=false **)** | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering. - Property Descriptions --------------------- diff --git a/classes/class_packetpeergdnative.rst b/classes/class_packetpeergdnative.rst index 05b785eff..4f89e3bff 100644 --- a/classes/class_packetpeergdnative.rst +++ b/classes/class_packetpeergdnative.rst @@ -11,10 +11,5 @@ PacketPeerGDNative **Inherits:** :ref:`PacketPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_packetpeerstream.rst b/classes/class_packetpeerstream.rst index 5180cc890..cdb88bdc1 100644 --- a/classes/class_packetpeerstream.rst +++ b/classes/class_packetpeerstream.rst @@ -11,13 +11,13 @@ PacketPeerStream **Inherits:** :ref:`PacketPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Wrapper to use a PacketPeer over a StreamPeer. +Description +----------- + +PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. + Properties ---------- @@ -29,11 +29,6 @@ Properties | :ref:`StreamPeer` | :ref:`stream_peer` | | +-------------------------------------+---------------------------------------------------------------------------------------+-------+ -Description ------------ - -PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. - Property Descriptions --------------------- diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index f02ae2afb..42adf3205 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -11,13 +11,13 @@ PacketPeerUDP **Inherits:** :ref:`PacketPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - UDP packet peer. +Description +----------- + +UDP packet peer. Can be used to send raw UDP packets as well as :ref:`Variant`\ s. + Methods ------- @@ -43,11 +43,6 @@ Methods | :ref:`Error` | :ref:`wait` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -UDP packet peer. Can be used to send raw UDP packets as well as :ref:`Variant`\ s. - Method Descriptions ------------------- diff --git a/classes/class_panel.rst b/classes/class_panel.rst index b59cdc80d..fbfea1c33 100644 --- a/classes/class_panel.rst +++ b/classes/class_panel.rst @@ -11,13 +11,13 @@ Panel **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Provides an opaque background for :ref:`Control` children. +Description +----------- + +Panel is a :ref:`Control` that displays an opaque background. It's commonly used as a parent and container for other types of :ref:`Control` nodes. + Theme Properties ---------------- @@ -25,8 +25,3 @@ Theme Properties | :ref:`StyleBox` | panel | +---------------------------------+-------+ -Description ------------ - -Panel is a :ref:`Control` that displays an opaque background. It's commonly used as a parent and container for other types of :ref:`Control` nodes. - diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst index cfe480f27..f005517b6 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -13,13 +13,13 @@ PanelContainer **Inherited By:** :ref:`ScriptEditor` -**Category:** Core - -Brief Description ------------------ - Panel container type. +Description +----------- + +Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. + Theme Properties ---------------- @@ -27,8 +27,3 @@ Theme Properties | :ref:`StyleBox` | panel | +---------------------------------+-------+ -Description ------------ - -Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. - diff --git a/classes/class_panoramasky.rst b/classes/class_panoramasky.rst index 58119a85f..474c736e3 100644 --- a/classes/class_panoramasky.rst +++ b/classes/class_panoramasky.rst @@ -11,13 +11,13 @@ PanoramaSky **Inherits:** :ref:`Sky` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A type of :ref:`Sky` used to draw a background texture. +Description +----------- + +A resource referenced in an :ref:`Environment` that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Texture` | :ref:`panorama` | +-------------------------------+------------------------------------------------------+ -Description ------------ - -A resource referenced in an :ref:`Environment` that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. - Property Descriptions --------------------- diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst index 1794ae584..43a0ab069 100644 --- a/classes/class_parallaxbackground.rst +++ b/classes/class_parallaxbackground.rst @@ -11,13 +11,13 @@ ParallaxBackground **Inherits:** :ref:`CanvasLayer` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A node used to create a parallax scrolling background. +Description +----------- + +A ParallaxBackground uses one or more :ref:`ParallaxLayer` child nodes to create a parallax effect. Each :ref:`ParallaxLayer` can move at a different speed using :ref:`ParallaxLayer.motion_offset`. This creates an illusion of depth in a 2D game. If not used with a :ref:`Camera2D`, you must manually calculate the :ref:`scroll_offset`. + Properties ---------- @@ -37,11 +37,6 @@ Properties | :ref:`Vector2` | :ref:`scroll_offset` | Vector2( 0, 0 ) | +-------------------------------+-----------------------------------------------------------------------------------------------+-----------------+ -Description ------------ - -A ParallaxBackground uses one or more :ref:`ParallaxLayer` child nodes to create a parallax effect. Each :ref:`ParallaxLayer` can move at a different speed using :ref:`ParallaxLayer.motion_offset`. This creates an illusion of depth in a 2D game. If not used with a :ref:`Camera2D`, you must manually calculate the :ref:`scroll_offset`. - Property Descriptions --------------------- diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index 3edc129af..261e06ed7 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -11,13 +11,17 @@ ParallaxLayer **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A parallax scrolling layer to be used with :ref:`ParallaxBackground`. +Description +----------- + +A ParallaxLayer must be the child of a :ref:`ParallaxBackground` node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the :ref:`ParallaxBackground.scroll_offset` value. + +This node's children will be affected by its scroll offset. + +**Note:** Any changes to this node's position and scale made after it enters the scene will be ignored. + Properties ---------- @@ -29,15 +33,6 @@ Properties | :ref:`Vector2` | :ref:`motion_scale` | Vector2( 1, 1 ) | +-------------------------------+------------------------------------------------------------------------+-----------------+ -Description ------------ - -A ParallaxLayer must be the child of a :ref:`ParallaxBackground` node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the :ref:`ParallaxBackground.scroll_offset` value. - -This node's children will be affected by its scroll offset. - -**Note:** Any changes to this node's position and scale made after it enters the scene will be ignored. - Property Descriptions --------------------- diff --git a/classes/class_particles.rst b/classes/class_particles.rst index d3d137675..84154d407 100644 --- a/classes/class_particles.rst +++ b/classes/class_particles.rst @@ -11,13 +11,20 @@ Particles **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - 3D particle emitter. +Description +----------- + +3D particle node used to create a variety of particle systems and effects. ``Particles`` features an emitter that generates some number of particles at a given rate. + +Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. + +Tutorials +--------- + +- :doc:`../tutorials/3d/vertex_animation/controlling_thousands_of_fish` + Properties ---------- @@ -100,18 +107,6 @@ Constants - **MAX_DRAW_PASSES** = **4** --- Maximum number of draw passes supported. -Description ------------ - -3D particle node used to create a variety of particle systems and effects. ``Particles`` features an emitter that generates some number of particles at a given rate. - -Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. - -Tutorials ---------- - -- :doc:`../tutorials/3d/vertex_animation/controlling_thousands_of_fish` - Property Descriptions --------------------- diff --git a/classes/class_particles2d.rst b/classes/class_particles2d.rst index e24d9b057..a15ea3365 100644 --- a/classes/class_particles2d.rst +++ b/classes/class_particles2d.rst @@ -11,13 +11,20 @@ Particles2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - 2D particle emitter. +Description +----------- + +2D particle node used to create a variety of particle systems and effects. ``Particles2D`` features an emitter that generates some number of particles at a given rate. + +Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. + +Tutorials +--------- + +- :doc:`../tutorials/2d/particle_systems_2d` + Properties ---------- @@ -79,18 +86,6 @@ enum **DrawOrder**: - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime. -Description ------------ - -2D particle node used to create a variety of particle systems and effects. ``Particles2D`` features an emitter that generates some number of particles at a given rate. - -Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. - -Tutorials ---------- - -- :doc:`../tutorials/2d/particle_systems_2d` - Property Descriptions --------------------- diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst index 6c28b195e..b66fa5a25 100644 --- a/classes/class_particlesmaterial.rst +++ b/classes/class_particlesmaterial.rst @@ -11,13 +11,17 @@ ParticlesMaterial **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Particle properties for :ref:`Particles` and :ref:`Particles2D` nodes. +Description +----------- + +ParticlesMaterial defines particle properties and behavior. It is used in the ``process_material`` of :ref:`Particles` and :ref:`Particles2D` emitter nodes. + +Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture` applied to vary values over the lifetime of the particle. + +When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between ``1.0`` and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of ``0.4`` would scale the original property between ``0.4-1.0`` of its original value. + Properties ---------- @@ -261,15 +265,6 @@ enum **EmissionShape**: - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. -Description ------------ - -ParticlesMaterial defines particle properties and behavior. It is used in the ``process_material`` of :ref:`Particles` and :ref:`Particles2D` emitter nodes. - -Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture` applied to vary values over the lifetime of the particle. - -When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between ``1.0`` and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of ``0.4`` would scale the original property between ``0.4-1.0`` of its original value. - Property Descriptions --------------------- diff --git a/classes/class_path.rst b/classes/class_path.rst index d8ec9d5f8..da852d03a 100644 --- a/classes/class_path.rst +++ b/classes/class_path.rst @@ -11,13 +11,15 @@ Path **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Contains a :ref:`Curve3D` path for :ref:`PathFollow` nodes to follow. +Description +----------- + +Can have :ref:`PathFollow` child nodes moving along the :ref:`Curve3D`. See :ref:`PathFollow` for more information on the usage. + +Note that the path is considered as relative to the moved nodes (children of :ref:`PathFollow`). As such, the curve should usually start with a zero vector ``(0, 0, 0)``. + Properties ---------- @@ -34,13 +36,6 @@ Signals Emitted when the :ref:`curve` changes. -Description ------------ - -Can have :ref:`PathFollow` child nodes moving along the :ref:`Curve3D`. See :ref:`PathFollow` for more information on the usage. - -Note that the path is considered as relative to the moved nodes (children of :ref:`PathFollow`). As such, the curve should usually start with a zero vector ``(0, 0, 0)``. - Property Descriptions --------------------- diff --git a/classes/class_path2d.rst b/classes/class_path2d.rst index d93b77435..c428ae7cc 100644 --- a/classes/class_path2d.rst +++ b/classes/class_path2d.rst @@ -11,13 +11,15 @@ Path2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Contains a :ref:`Curve2D` path for :ref:`PathFollow2D` nodes to follow. +Description +----------- + +Can have :ref:`PathFollow2D` child nodes moving along the :ref:`Curve2D`. See :ref:`PathFollow2D` for more information on usage. + +**Note:** The path is considered as relative to the moved nodes (children of :ref:`PathFollow2D`). As such, the curve should usually start with a zero vector (``(0, 0)``). + Properties ---------- @@ -27,13 +29,6 @@ Properties | :ref:`Color` | self_modulate | **O:** Color( 0.5, 0.6, 1, 0.7 ) | +-------------------------------+-------------------------------------------+----------------------------------+ -Description ------------ - -Can have :ref:`PathFollow2D` child nodes moving along the :ref:`Curve2D`. See :ref:`PathFollow2D` for more information on usage. - -**Note:** The path is considered as relative to the moved nodes (children of :ref:`PathFollow2D`). As such, the curve should usually start with a zero vector (``(0, 0)``). - Property Descriptions --------------------- diff --git a/classes/class_pathfollow.rst b/classes/class_pathfollow.rst index 91ab31b3f..c4549b9da 100644 --- a/classes/class_pathfollow.rst +++ b/classes/class_pathfollow.rst @@ -11,13 +11,15 @@ PathFollow **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Point sampler for a :ref:`Path`. +Description +----------- + +This node takes its parent :ref:`Path`, and returns the coordinates of a point within it, given a distance from the first vertex. + +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. + Properties ---------- @@ -64,13 +66,6 @@ enum **RotationMode**: - **ROTATION_ORIENTED** = **4** --- Uses the up vector information in a :ref:`Curve3D` to enforce orientation. This rotation mode requires the :ref:`Path`'s :ref:`Curve3D.up_vector_enabled` property to be set to ``true``. -Description ------------ - -This node takes its parent :ref:`Path`, and returns the coordinates of a point within it, given a distance from the first vertex. - -It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. - Property Descriptions --------------------- diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index 772587909..14b3041fc 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -11,13 +11,15 @@ PathFollow2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Point sampler for a :ref:`Path2D`. +Description +----------- + +This node takes its parent :ref:`Path2D`, and returns the coordinates of a point within it, given a distance from the first vertex. + +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. + Properties ---------- @@ -39,13 +41,6 @@ Properties | :ref:`float` | :ref:`v_offset` | 0.0 | +---------------------------+---------------------------------------------------------------+------+ -Description ------------ - -This node takes its parent :ref:`Path2D`, and returns the coordinates of a point within it, given a distance from the first vertex. - -It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. - Property Descriptions --------------------- diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst index 4b9e6dfe9..596ce6907 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -11,24 +11,8 @@ PCKPacker **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Creates packages that can be loaded into a running project. -Methods -------- - -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`add_file` **(** :ref:`String` pck_path, :ref:`String` source_path **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`flush` **(** :ref:`bool` verbose=false **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`pck_start` **(** :ref:`String` pck_name, :ref:`int` alignment=0 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -43,6 +27,17 @@ The ``PCKPacker`` is used to create packages that can be loaded into a running p The above ``PCKPacker`` creates package ``test.pck``, then adds a file named ``text.txt`` at the root of the package. +Methods +------- + ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`add_file` **(** :ref:`String` pck_path, :ref:`String` source_path **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`flush` **(** :ref:`bool` verbose=false **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`pck_start` **(** :ref:`String` pck_name, :ref:`int` alignment=0 **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_performance.rst b/classes/class_performance.rst index fbfc25cc4..fa308eeaf 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -11,13 +11,17 @@ Performance **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Exposes performance-related data. +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 **Monitor** tab in the editor's **Debugger** panel. By using the :ref:`get_monitor` method of this class, you can access this data from your code. + +**Note:** A few of these monitors are only available in debug mode and will always return 0 when used in a release build. + +**Note:** Many of these monitors are not updated in real-time, so there may be a short delay between changes. + Methods ------- @@ -152,15 +156,6 @@ enum **Monitor**: - **MONITOR_MAX** = **29** --- Represents the size of the :ref:`Monitor` enum. -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 **Monitor** tab in the editor's **Debugger** panel. By using the :ref:`get_monitor` method of this class, you can access this data from your code. - -**Note:** A few of these monitors are only available in debug mode and will always return 0 when used in a release build. - -**Note:** Many of these monitors are not updated in real-time, so there may be a short delay between changes. - Method Descriptions ------------------- diff --git a/classes/class_phashtranslation.rst b/classes/class_phashtranslation.rst index c7a155173..1cbc6827c 100644 --- a/classes/class_phashtranslation.rst +++ b/classes/class_phashtranslation.rst @@ -11,13 +11,13 @@ PHashTranslation **Inherits:** :ref:`Translation` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Optimized translation. +Description +----------- + +Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. + Methods ------- @@ -25,11 +25,6 @@ Methods | void | :ref:`generate` **(** :ref:`Translation` from **)** | +------+----------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. - Method Descriptions ------------------- diff --git a/classes/class_physicalbone.rst b/classes/class_physicalbone.rst index bc8b304c6..ee2ed5a92 100644 --- a/classes/class_physicalbone.rst +++ b/classes/class_physicalbone.rst @@ -11,11 +11,6 @@ PhysicalBone **Inherits:** :ref:`PhysicsBody` **<** :ref:`CollisionObject` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_physics2ddirectbodystate.rst b/classes/class_physics2ddirectbodystate.rst index fb0ff64b8..eb7b2b0e3 100644 --- a/classes/class_physics2ddirectbodystate.rst +++ b/classes/class_physics2ddirectbodystate.rst @@ -13,13 +13,18 @@ Physics2DDirectBodyState **Inherited By:** :ref:`Physics2DDirectBodyStateSW` -**Category:** Core - -Brief Description ------------------ - Direct access object to a physics body in the :ref:`Physics2DServer`. +Description +----------- + +Provides direct access to a physics body in the :ref:`Physics2DServer`, 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 :ref:`RigidBody2D._integrate_forces`. + +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Properties ---------- @@ -88,16 +93,6 @@ Methods | void | :ref:`integrate_forces` **(** **)** | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Provides direct access to a physics body in the :ref:`Physics2DServer`, 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 :ref:`RigidBody2D._integrate_forces`. - -Tutorials ---------- - -- :doc:`../tutorials/physics/ray-casting` - Property Descriptions --------------------- diff --git a/classes/class_physics2ddirectbodystatesw.rst b/classes/class_physics2ddirectbodystatesw.rst index b4d929047..ceaf9d5d9 100644 --- a/classes/class_physics2ddirectbodystatesw.rst +++ b/classes/class_physics2ddirectbodystatesw.rst @@ -11,11 +11,6 @@ Physics2DDirectBodyStateSW **Inherits:** :ref:`Physics2DDirectBodyState` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Software implementation of :ref:`Physics2DDirectBodyState`. Description diff --git a/classes/class_physics2ddirectspacestate.rst b/classes/class_physics2ddirectspacestate.rst index 13746ee89..b5988d175 100644 --- a/classes/class_physics2ddirectspacestate.rst +++ b/classes/class_physics2ddirectspacestate.rst @@ -11,13 +11,18 @@ Physics2DDirectSpaceState **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Direct access object to a space in the :ref:`Physics2DServer`. +Description +----------- + +Direct access object to a space in the :ref:`Physics2DServer`. It's used mainly to do queries against objects and areas residing in a given space. + +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Methods ------- @@ -37,16 +42,6 @@ Methods | :ref:`Array` | :ref:`intersect_shape` **(** :ref:`Physics2DShapeQueryParameters` shape, :ref:`int` max_results=32 **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Direct access object to a space in the :ref:`Physics2DServer`. It's used mainly to do queries against objects and areas residing in a given space. - -Tutorials ---------- - -- :doc:`../tutorials/physics/ray-casting` - Method Descriptions ------------------- diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index 083a1b97a..a1baf0fcd 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -13,13 +13,13 @@ Physics2DServer **Inherited By:** :ref:`Physics2DServerSW` -**Category:** Core - -Brief Description ------------------ - Server interface for low-level 2D physics access. +Description +----------- + +Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. + Methods ------- @@ -564,11 +564,6 @@ enum **ProcessInfo**: - **INFO_ISLAND_COUNT** = **2** --- Constant to get the number of space regions where a collision could occur. -Description ------------ - -Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. - Method Descriptions ------------------- diff --git a/classes/class_physics2dserversw.rst b/classes/class_physics2dserversw.rst index d289d7f21..f638cec54 100644 --- a/classes/class_physics2dserversw.rst +++ b/classes/class_physics2dserversw.rst @@ -11,11 +11,6 @@ Physics2DServerSW **Inherits:** :ref:`Physics2DServer` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Software implementation of :ref:`Physics2DServer`. Description diff --git a/classes/class_physics2dshapequeryparameters.rst b/classes/class_physics2dshapequeryparameters.rst index 6993992ab..e09ca58a3 100644 --- a/classes/class_physics2dshapequeryparameters.rst +++ b/classes/class_physics2dshapequeryparameters.rst @@ -11,13 +11,13 @@ Physics2DShapeQueryParameters **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Parameters to be sent to a 2D shape physics query. +Description +----------- + +This class contains the shape and other parameters for 2D intersection/collision queries. See also :ref:`Physics2DShapeQueryResult`. + Properties ---------- @@ -46,11 +46,6 @@ Methods | void | :ref:`set_shape` **(** :ref:`Resource` shape **)** | +------+--------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This class contains the shape and other parameters for 2D intersection/collision queries. See also :ref:`Physics2DShapeQueryResult`. - Property Descriptions --------------------- diff --git a/classes/class_physics2dshapequeryresult.rst b/classes/class_physics2dshapequeryresult.rst index e4d9f944f..174db6eef 100644 --- a/classes/class_physics2dshapequeryresult.rst +++ b/classes/class_physics2dshapequeryresult.rst @@ -11,13 +11,13 @@ Physics2DShapeQueryResult **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Result of a 2D shape query in :ref:`Physics2DServer`. +Description +----------- + +The result of a 2D shape query in :ref:`Physics2DServer`. See also :ref:`Physics2DShapeQueryParameters`. + Methods ------- @@ -33,11 +33,6 @@ Methods | :ref:`RID` | :ref:`get_result_rid` **(** :ref:`int` idx **)** const | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -The result of a 2D shape query in :ref:`Physics2DServer`. See also :ref:`Physics2DShapeQueryParameters`. - Method Descriptions ------------------- diff --git a/classes/class_physics2dtestmotionresult.rst b/classes/class_physics2dtestmotionresult.rst index 3ebc441bf..5e1623758 100644 --- a/classes/class_physics2dtestmotionresult.rst +++ b/classes/class_physics2dtestmotionresult.rst @@ -11,11 +11,6 @@ Physics2DTestMotionResult **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_physicsbody.rst b/classes/class_physicsbody.rst index 5c30f5ece..3c2000062 100644 --- a/classes/class_physicsbody.rst +++ b/classes/class_physicsbody.rst @@ -13,13 +13,18 @@ PhysicsBody **Inherited By:** :ref:`KinematicBody`, :ref:`PhysicalBone`, :ref:`RigidBody`, :ref:`StaticBody` -**Category:** Core - -Brief Description ------------------ - Base class for all objects affected by physics in 3D space. +Description +----------- + +PhysicsBody is an abstract base class for implementing a physics body. All \*Body types inherit from it. + +Tutorials +--------- + +- :doc:`../tutorials/physics/physics_introduction` + Properties ---------- @@ -48,16 +53,6 @@ Methods | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -PhysicsBody is an abstract base class for implementing a physics body. All \*Body types inherit from it. - -Tutorials ---------- - -- :doc:`../tutorials/physics/physics_introduction` - Property Descriptions --------------------- diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index f1178f5d0..4ff3e814e 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -13,13 +13,18 @@ PhysicsBody2D **Inherited By:** :ref:`KinematicBody2D`, :ref:`RigidBody2D`, :ref:`StaticBody2D` -**Category:** Core - -Brief Description ------------------ - Base class for all objects affected by physics in 2D space. +Description +----------- + +PhysicsBody2D is an abstract base class for implementing a physics body. All \*Body2D types inherit from it. + +Tutorials +--------- + +- :doc:`../tutorials/physics/physics_introduction` + Properties ---------- @@ -52,16 +57,6 @@ Methods | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -PhysicsBody2D is an abstract base class for implementing a physics body. All \*Body2D types inherit from it. - -Tutorials ---------- - -- :doc:`../tutorials/physics/physics_introduction` - Property Descriptions --------------------- diff --git a/classes/class_physicsdirectbodystate.rst b/classes/class_physicsdirectbodystate.rst index 4b97245dd..5cdcae328 100644 --- a/classes/class_physicsdirectbodystate.rst +++ b/classes/class_physicsdirectbodystate.rst @@ -13,13 +13,13 @@ PhysicsDirectBodyState **Inherited By:** :ref:`BulletPhysicsDirectBodyState` -**Category:** Core - -Brief Description ------------------ - Direct access object to a physics body in the :ref:`PhysicsServer`. +Description +----------- + +Provides direct access to a physics body in the :ref:`PhysicsServer`, 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 :ref:`RigidBody._integrate_forces`. + Properties ---------- @@ -92,11 +92,6 @@ Methods | void | :ref:`integrate_forces` **(** **)** | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Provides direct access to a physics body in the :ref:`PhysicsServer`, 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 :ref:`RigidBody._integrate_forces`. - Property Descriptions --------------------- diff --git a/classes/class_physicsdirectspacestate.rst b/classes/class_physicsdirectspacestate.rst index 7b6d1e351..64006f252 100644 --- a/classes/class_physicsdirectspacestate.rst +++ b/classes/class_physicsdirectspacestate.rst @@ -11,13 +11,18 @@ PhysicsDirectSpaceState **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Direct access object to a space in the :ref:`PhysicsServer`. +Description +----------- + +Direct access object to a space in the :ref:`PhysicsServer`. It's used mainly to do queries against objects and areas residing in a given space. + +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Methods ------- @@ -33,16 +38,6 @@ Methods | :ref:`Array` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`int` max_results=32 **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Direct access object to a space in the :ref:`PhysicsServer`. It's used mainly to do queries against objects and areas residing in a given space. - -Tutorials ---------- - -- :doc:`../tutorials/physics/ray-casting` - Method Descriptions ------------------- diff --git a/classes/class_physicsmaterial.rst b/classes/class_physicsmaterial.rst index d9dd6cb13..a89063f0c 100644 --- a/classes/class_physicsmaterial.rst +++ b/classes/class_physicsmaterial.rst @@ -11,13 +11,13 @@ PhysicsMaterial **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A material for physics properties. +Description +----------- + +Provides a means of modifying the collision properties of a :ref:`PhysicsBody`. + Properties ---------- @@ -31,11 +31,6 @@ Properties | :ref:`bool` | :ref:`rough` | false | +---------------------------+------------------------------------------------------------+-------+ -Description ------------ - -Provides a means of modifying the collision properties of a :ref:`PhysicsBody`. - Property Descriptions --------------------- diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index d6485fdd7..74bf54368 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -13,13 +13,13 @@ PhysicsServer **Inherited By:** :ref:`BulletPhysicsServer` -**Category:** Core - -Brief Description ------------------ - Server interface for low-level physics access. +Description +----------- + +PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. + Methods ------- @@ -874,11 +874,6 @@ enum **BodyAxis**: - **BODY_AXIS_ANGULAR_Z** = **32** -Description ------------ - -PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. - Method Descriptions ------------------- diff --git a/classes/class_physicsshapequeryparameters.rst b/classes/class_physicsshapequeryparameters.rst index 33ff9d060..f252c595b 100644 --- a/classes/class_physicsshapequeryparameters.rst +++ b/classes/class_physicsshapequeryparameters.rst @@ -11,13 +11,13 @@ PhysicsShapeQueryParameters **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Parameters to be sent to a 3D shape physics query. +Description +----------- + +This class contains the shape and other parameters for 3D intersection/collision queries. See also :ref:`PhysicsShapeQueryResult`. + Properties ---------- @@ -44,11 +44,6 @@ Methods | void | :ref:`set_shape` **(** :ref:`Resource` shape **)** | +------+------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This class contains the shape and other parameters for 3D intersection/collision queries. See also :ref:`PhysicsShapeQueryResult`. - Property Descriptions --------------------- diff --git a/classes/class_physicsshapequeryresult.rst b/classes/class_physicsshapequeryresult.rst index efa25ad91..494c71672 100644 --- a/classes/class_physicsshapequeryresult.rst +++ b/classes/class_physicsshapequeryresult.rst @@ -11,13 +11,13 @@ PhysicsShapeQueryResult **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Result of a 3D shape query in :ref:`PhysicsServer`. +Description +----------- + +The result of a 3D shape query in :ref:`PhysicsServer`. See also :ref:`PhysicsShapeQueryParameters`. + Methods ------- @@ -33,11 +33,6 @@ Methods | :ref:`RID` | :ref:`get_result_rid` **(** :ref:`int` idx **)** const | +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -The result of a 3D shape query in :ref:`PhysicsServer`. See also :ref:`PhysicsShapeQueryParameters`. - Method Descriptions ------------------- diff --git a/classes/class_pinjoint.rst b/classes/class_pinjoint.rst index 6f22920f3..8441f6320 100644 --- a/classes/class_pinjoint.rst +++ b/classes/class_pinjoint.rst @@ -11,13 +11,13 @@ PinJoint **Inherits:** :ref:`Joint` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Pin joint for 3D shapes. +Description +----------- + +Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. + Properties ---------- @@ -57,11 +57,6 @@ enum **Param**: - **PARAM_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint produces. -Description ------------ - -Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. - Property Descriptions --------------------- diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst index 0de3f6c4f..37682fff2 100644 --- a/classes/class_pinjoint2d.rst +++ b/classes/class_pinjoint2d.rst @@ -11,13 +11,13 @@ PinJoint2D **Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Pin Joint for 2D shapes. +Description +----------- + +Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`float` | :ref:`softness` | 0.0 | +---------------------------+-----------------------------------------------------+-----+ -Description ------------ - -Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together. - Property Descriptions --------------------- diff --git a/classes/class_plane.rst b/classes/class_plane.rst index 952af26a1..cf1b9dbb0 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -9,13 +9,18 @@ Plane ===== -**Category:** Built-In Types - -Brief Description ------------------ - Plane in hessian form. +Description +----------- + +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. + +Tutorials +--------- + +- :doc:`../tutorials/math/index` + Properties ---------- @@ -79,16 +84,6 @@ Constants - **PLANE_XY** = **Plane( 0, 0, 1, 0 )** -Description ------------ - -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. - -Tutorials ---------- - -- :doc:`../tutorials/math/index` - Property Descriptions --------------------- diff --git a/classes/class_planemesh.rst b/classes/class_planemesh.rst index 639d049f5..b415f6a31 100644 --- a/classes/class_planemesh.rst +++ b/classes/class_planemesh.rst @@ -11,13 +11,13 @@ PlaneMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Class representing a planar :ref:`PrimitiveMesh`. +Description +----------- + +Class representing a planar :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use :ref:`QuadMesh` instead. + Properties ---------- @@ -29,11 +29,6 @@ Properties | :ref:`int` | :ref:`subdivide_width` | 0 | +-------------------------------+------------------------------------------------------------------+-----------------+ -Description ------------ - -Class representing a planar :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use :ref:`QuadMesh` instead. - Property Descriptions --------------------- diff --git a/classes/class_planeshape.rst b/classes/class_planeshape.rst index 8b3aa61ea..55a180a9a 100644 --- a/classes/class_planeshape.rst +++ b/classes/class_planeshape.rst @@ -11,13 +11,13 @@ PlaneShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Infinite plane shape for 3D collisions. +Description +----------- + +An infinite plane shape for 3D collisions. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the ``PlaneShape`` is used in a :ref:`PhysicsBody`, it will cause colliding objects placed "below" it to teleport "above" the plane. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Plane` | :ref:`plane` | Plane( 0, 1, 0, 0 ) | +---------------------------+-----------------------------------------------+---------------------+ -Description ------------ - -An infinite plane shape for 3D collisions. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the ``PlaneShape`` is used in a :ref:`PhysicsBody`, it will cause colliding objects placed "below" it to teleport "above" the plane. - Property Descriptions --------------------- diff --git a/classes/class_pluginscript.rst b/classes/class_pluginscript.rst index becf30495..9904ec7c0 100644 --- a/classes/class_pluginscript.rst +++ b/classes/class_pluginscript.rst @@ -11,11 +11,6 @@ PluginScript **Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_pointmesh.rst b/classes/class_pointmesh.rst index b9cc60cfa..1dc91b484 100644 --- a/classes/class_pointmesh.rst +++ b/classes/class_pointmesh.rst @@ -11,11 +11,6 @@ PointMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Mesh with a single Point primitive. Description diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 4cd24f254..0cf3a0993 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -11,13 +11,13 @@ Polygon2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A 2D polygon. +Description +----------- + +A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. + Properties ---------- @@ -78,11 +78,6 @@ Methods | void | :ref:`set_bone_weights` **(** :ref:`int` index, :ref:`PoolRealArray` weights **)** | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. - Property Descriptions --------------------- diff --git a/classes/class_polygonpathfinder.rst b/classes/class_polygonpathfinder.rst index 005ab557a..478bf0c37 100644 --- a/classes/class_polygonpathfinder.rst +++ b/classes/class_polygonpathfinder.rst @@ -11,11 +11,6 @@ PolygonPathFinder **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index 50cc08ded..ee5dbccd2 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -9,13 +9,15 @@ PoolByteArray ============= -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of bytes. +Description +----------- + +An :ref:`Array` specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + Methods ------- @@ -55,13 +57,6 @@ Methods | :ref:`PoolByteArray` | :ref:`subarray` **(** :ref:`int` from, :ref:`int` to **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - Method Descriptions ------------------- @@ -133,6 +128,13 @@ Returns a copy of the array's contents as :ref:`String`. Slower th - :ref:`String` **hex_encode** **(** **)** +Returns a hexadecimal representation of this array as a :ref:`String`. + +:: + + var array = PoolByteArray([11, 46, 255]) + print(array.hex_encode()) # Prints: 0b2eff + ---- .. _class_PoolByteArray_method_insert: diff --git a/classes/class_poolcolorarray.rst b/classes/class_poolcolorarray.rst index 6578ee1a9..38fe0c73c 100644 --- a/classes/class_poolcolorarray.rst +++ b/classes/class_poolcolorarray.rst @@ -9,13 +9,15 @@ PoolColorArray ============== -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of :ref:`Color`. +Description +----------- + +An :ref:`Array` specifically designed to hold :ref:`Color`. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + Methods ------- @@ -43,13 +45,6 @@ Methods | :ref:`int` | :ref:`size` **(** **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold :ref:`Color`. Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - Method Descriptions ------------------- diff --git a/classes/class_poolintarray.rst b/classes/class_poolintarray.rst index c93aa07c0..92fca18fc 100644 --- a/classes/class_poolintarray.rst +++ b/classes/class_poolintarray.rst @@ -9,13 +9,17 @@ PoolIntArray ============ -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of integers (:ref:`int`). +Description +----------- + +An :ref:`Array` specifically designed to hold integer values (:ref:`int`). Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + +**Note:** This type is limited to signed 32-bit integers, which means it can only take values in the interval ``[-2^31, 2^31 - 1]``, i.e. ``[-2147483648, 2147483647]``. Exceeding those bounds will wrap around. In comparison, :ref:`int` uses signed 64-bit integers which can hold much larger values. + Methods ------- @@ -43,15 +47,6 @@ Methods | :ref:`int` | :ref:`size` **(** **)** | +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold integer values (:ref:`int`). Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - -**Note:** This type is limited to signed 32-bit integers, which means it can only take values in the interval ``[-2^31, 2^31 - 1]``, i.e. ``[-2147483648, 2147483647]``. Exceeding those bounds will wrap around. In comparison, :ref:`int` uses signed 64-bit integers which can hold much larger values. - Method Descriptions ------------------- diff --git a/classes/class_poolrealarray.rst b/classes/class_poolrealarray.rst index dc1bbe015..43622ede2 100644 --- a/classes/class_poolrealarray.rst +++ b/classes/class_poolrealarray.rst @@ -9,13 +9,15 @@ PoolRealArray ============= -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of reals (:ref:`float`). +Description +----------- + +An :ref:`Array` specifically designed to hold floating-point values (:ref:`float`). Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + Methods ------- @@ -43,13 +45,6 @@ Methods | :ref:`int` | :ref:`size` **(** **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold floating-point values (:ref:`float`). Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - Method Descriptions ------------------- diff --git a/classes/class_poolstringarray.rst b/classes/class_poolstringarray.rst index a84e2028e..25113f0ec 100644 --- a/classes/class_poolstringarray.rst +++ b/classes/class_poolstringarray.rst @@ -9,13 +9,15 @@ PoolStringArray =============== -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of :ref:`String`. +Description +----------- + +An :ref:`Array` specifically designed to hold :ref:`String`\ s. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + Methods ------- @@ -45,13 +47,6 @@ Methods | :ref:`int` | :ref:`size` **(** **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold :ref:`String`\ s. Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - Method Descriptions ------------------- diff --git a/classes/class_poolvector2array.rst b/classes/class_poolvector2array.rst index 3b49de54c..507dfdcbd 100644 --- a/classes/class_poolvector2array.rst +++ b/classes/class_poolvector2array.rst @@ -9,13 +9,15 @@ PoolVector2Array ================ -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of :ref:`Vector2`. +Description +----------- + +An :ref:`Array` specifically designed to hold :ref:`Vector2`. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + Methods ------- @@ -43,13 +45,6 @@ Methods | :ref:`int` | :ref:`size` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold :ref:`Vector2`. Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - Method Descriptions ------------------- diff --git a/classes/class_poolvector3array.rst b/classes/class_poolvector3array.rst index 7784897c7..091ec4424 100644 --- a/classes/class_poolvector3array.rst +++ b/classes/class_poolvector3array.rst @@ -9,13 +9,15 @@ PoolVector3Array ================ -**Category:** Built-In Types - -Brief Description ------------------ - A pooled :ref:`Array` of :ref:`Vector3`. +Description +----------- + +An :ref:`Array` specifically designed to hold :ref:`Vector3`. Optimized for memory usage, does not fragment the memory. + +**Note:** This type is passed by value and not by reference. + Methods ------- @@ -43,13 +45,6 @@ Methods | :ref:`int` | :ref:`size` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -An :ref:`Array` specifically designed to hold :ref:`Vector3`. Optimized for memory usage, does not fragment the memory. - -**Note:** This type is passed by value and not by reference. - Method Descriptions ------------------- diff --git a/classes/class_popup.rst b/classes/class_popup.rst index fe09fc86d..3228f4fe9 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -13,13 +13,13 @@ Popup **Inherited By:** :ref:`PopupDialog`, :ref:`PopupMenu`, :ref:`PopupPanel`, :ref:`WindowDialog` -**Category:** Core - -Brief Description ------------------ - Base container control for popups and dialogs. +Description +----------- + +Popup is a base :ref:`Control` used to show dialogs and popups. It's a subwindow and modal by default (see :ref:`Control`) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport. + Properties ---------- @@ -74,11 +74,6 @@ Constants - **NOTIFICATION_POPUP_HIDE** = **81** --- Notification sent right after the popup is hidden. -Description ------------ - -Popup is a base :ref:`Control` used to show dialogs and popups. It's a subwindow and modal by default (see :ref:`Control`) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport. - Property Descriptions --------------------- diff --git a/classes/class_popupdialog.rst b/classes/class_popupdialog.rst index 52f708814..b682f44e2 100644 --- a/classes/class_popupdialog.rst +++ b/classes/class_popupdialog.rst @@ -11,13 +11,13 @@ PopupDialog **Inherits:** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Base class for popup dialogs. +Description +----------- + +PopupDialog is a base class for popup dialogs, along with :ref:`WindowDialog`. + Theme Properties ---------------- @@ -25,8 +25,3 @@ Theme Properties | :ref:`StyleBox` | panel | +---------------------------------+-------+ -Description ------------ - -PopupDialog is a base class for popup dialogs, along with :ref:`WindowDialog`. - diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index ce3a1952a..565e1f20c 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -11,13 +11,13 @@ PopupMenu **Inherits:** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - PopupMenu displays a list of options. +Description +----------- + +``PopupMenu`` is a :ref:`Control` that displays a list of options. They are popular in toolbars or context menus. + Properties ---------- @@ -210,11 +210,6 @@ Emitted when an item of some ``id`` is pressed or its accelerator is activated. Emitted when an item of some ``index`` is pressed or its accelerator is activated. -Description ------------ - -``PopupMenu`` is a :ref:`Control` that displays a list of options. They are popular in toolbars or context menus. - Property Descriptions --------------------- @@ -549,7 +544,7 @@ Returns the tooltip associated with the specified index index ``idx``. - :ref:`bool` **is_hide_on_window_lose_focus** **(** **)** const -Returns whether the popup will be hidden when the window loses focus or not. +Returns ``true`` if the popup will be hidden when the window loses focus or not. ---- @@ -603,7 +598,7 @@ Returns ``true`` if the item is a separator. If it is, it will be displayed as a - :ref:`bool` **is_item_shortcut_disabled** **(** :ref:`int` idx **)** const -Returns whether the shortcut of the specified item ``idx`` is disabled or not. +Returns ``true`` if the specified item's shortcut is disabled. ---- @@ -671,7 +666,7 @@ Sets the checkstate status of the item at index ``idx``. - void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** -Sets whether the item at index ``idx`` is disabled or not. When it is disabled, it can't be selected and its action can't be invoked. +Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked. ---- @@ -703,6 +698,8 @@ Sets the metadata of an item, which may be of any type. You can later get it wit - void **set_item_multistate** **(** :ref:`int` idx, :ref:`int` state **)** +Sets the state of an multistate item. See :ref:`add_multistate_item` for details. + ---- .. _class_PopupMenu_method_set_item_shortcut: @@ -757,3 +754,5 @@ Toggles the check state of the item of the specified index ``idx``. - void **toggle_item_multistate** **(** :ref:`int` idx **)** +Cycle to the next state of an multistate item. See :ref:`add_multistate_item` for details. + diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index 0dcfb19f3..c3bd22ae1 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -11,13 +11,13 @@ PopupPanel **Inherits:** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Class for displaying popups with a panel background. +Description +----------- + +Class for displaying popups with a panel background. In some cases it might be simpler to use than :ref:`Popup`, since it provides a configurable background. If you are making windows, better check :ref:`WindowDialog`. + Theme Properties ---------------- @@ -25,8 +25,3 @@ Theme Properties | :ref:`StyleBox` | panel | +---------------------------------+-------+ -Description ------------ - -Class for displaying popups with a panel background. In some cases it might be simpler to use than :ref:`Popup`, since it provides a configurable background. If you are making windows, better check :ref:`WindowDialog`. - diff --git a/classes/class_position2d.rst b/classes/class_position2d.rst index c54707368..e3a65d033 100644 --- a/classes/class_position2d.rst +++ b/classes/class_position2d.rst @@ -11,11 +11,6 @@ Position2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Generic 2D position hint for editing. Description diff --git a/classes/class_position3d.rst b/classes/class_position3d.rst index c7e6003e4..8ad06d5c5 100644 --- a/classes/class_position3d.rst +++ b/classes/class_position3d.rst @@ -11,11 +11,6 @@ Position3D **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Generic 3D position hint for editing. Description diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index 28e4186d0..f5b25daf6 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -13,13 +13,13 @@ PrimitiveMesh **Inherited By:** :ref:`CapsuleMesh`, :ref:`CubeMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, :ref:`SphereMesh` -**Category:** Core - -Brief Description ------------------ - Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. +Description +----------- + +Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. Examples include :ref:`CapsuleMesh`, :ref:`CubeMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, and :ref:`SphereMesh`. + Properties ---------- @@ -38,11 +38,6 @@ Methods | :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** const | +---------------------------+--------------------------------------------------------------------------------------+ -Description ------------ - -Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. Examples include :ref:`CapsuleMesh`, :ref:`CubeMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, and :ref:`SphereMesh`. - Property Descriptions --------------------- diff --git a/classes/class_prismmesh.rst b/classes/class_prismmesh.rst index 1c40c7e26..1b7ad45db 100644 --- a/classes/class_prismmesh.rst +++ b/classes/class_prismmesh.rst @@ -11,10 +11,10 @@ PrismMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Class representing a prism-shaped :ref:`PrimitiveMesh`. -Brief Description ------------------ +Description +----------- Class representing a prism-shaped :ref:`PrimitiveMesh`. @@ -33,11 +33,6 @@ Properties | :ref:`int` | :ref:`subdivide_width` | 0 | +-------------------------------+--------------------------------------------------------------------+--------------------+ -Description ------------ - -Class representing a prism-shaped :ref:`PrimitiveMesh`. - Property Descriptions --------------------- diff --git a/classes/class_proceduralsky.rst b/classes/class_proceduralsky.rst index ec393dbeb..60c7c6de3 100644 --- a/classes/class_proceduralsky.rst +++ b/classes/class_proceduralsky.rst @@ -11,13 +11,15 @@ ProceduralSky **Inherits:** :ref:`Sky` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Type of :ref:`Sky` that is generated procedurally based on user input parameters. +Description +----------- + +ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. + +The ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available. + Properties ---------- @@ -86,13 +88,6 @@ enum **TextureSize**: - **TEXTURE_SIZE_MAX** = **5** --- Represents the size of the :ref:`TextureSize` enum. -Description ------------ - -ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. - -The ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available. - Property Descriptions --------------------- diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index c6ca52982..cdbaba9a1 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -11,13 +11,13 @@ ProgressBar **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - General-purpose progress bar. +Description +----------- + +General-purpose progress bar. Shows fill percentage from right to left. + Properties ---------- @@ -44,11 +44,6 @@ Theme Properties | :ref:`Color` | font_color_shadow | Color( 0, 0, 0, 1 ) | +---------------------------------+-------------------+------------------------------+ -Description ------------ - -General-purpose progress bar. Shows fill percentage from right to left. - Property Descriptions --------------------- diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index ea21b6c81..eead5fc39 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -11,13 +11,17 @@ ProjectSettings **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Contains global variables accessible from everywhere. +Description +----------- + +Contains global variables accessible from everywhere. Use :ref:`get_setting`, :ref:`set_setting` or :ref:`has_setting` to access them. Variables stored in ``project.godot`` are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. + +When naming a Project Settings property, use the full path to the setting including the category. For example, ``"application/config/name"`` for the project name. Category and property names can be viewed in the Project Settings dialog. + +**Overriding:** Any project setting can be overridden by creating a file named ``override.cfg`` in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. + Properties ---------- @@ -118,6 +122,8 @@ Properties +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/standalone_expression` | true | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/gdscript/warnings/standalone_ternary` | true | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/treat_warnings_as_errors` | false | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/unassigned_variable` | true | @@ -614,15 +620,6 @@ Methods | void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Contains global variables accessible from everywhere. Use :ref:`get_setting`, :ref:`set_setting` or :ref:`has_setting` to access them. Variables stored in ``project.godot`` are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. - -When naming a Project Settings property, use the full path to the setting including the category. For example, ``"application/config/name"`` for the project name. Category and property names can be viewed in the Project Settings dialog. - -**Overriding:** Any project setting can be overridden by creating a file named ``override.cfg`` in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. - Property Descriptions --------------------- @@ -1198,6 +1195,18 @@ If ``true``, enables warnings when calling an expression that has no effect on t ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/standalone_ternary: + +- :ref:`bool` **debug/gdscript/warnings/standalone_ternary** + ++-----------+------+ +| *Default* | true | ++-----------+------+ + +If ``true``, enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing ``42 if active else 0`` as a statement. + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/treat_warnings_as_errors: - :ref:`bool` **debug/gdscript/warnings/treat_warnings_as_errors** @@ -1674,6 +1683,8 @@ If ``true``, enables vertical synchronization. This eliminates tearing that may If ``Use Vsync`` is enabled and this setting is ``true``, enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.) +**Note:** This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. + ---- .. _class_ProjectSettings_property_editor/script_templates_search_path: diff --git a/classes/class_proximitygroup.rst b/classes/class_proximitygroup.rst index d81051d0e..4d5cf7d2f 100644 --- a/classes/class_proximitygroup.rst +++ b/classes/class_proximitygroup.rst @@ -11,10 +11,10 @@ ProximityGroup **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core +General-purpose proximity detection node. -Brief Description ------------------ +Description +----------- General-purpose proximity detection node. @@ -58,11 +58,6 @@ enum **DispatchMode**: - **MODE_SIGNAL** = **1** -Description ------------ - -General-purpose proximity detection node. - Property Descriptions --------------------- diff --git a/classes/class_proxytexture.rst b/classes/class_proxytexture.rst index 116b1e444..04058b6da 100644 --- a/classes/class_proxytexture.rst +++ b/classes/class_proxytexture.rst @@ -11,11 +11,6 @@ ProxyTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_quadmesh.rst b/classes/class_quadmesh.rst index cb271b20f..4f68fd60b 100644 --- a/classes/class_quadmesh.rst +++ b/classes/class_quadmesh.rst @@ -11,13 +11,13 @@ QuadMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Class representing a square mesh. +Description +----------- + +Class representing a square :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike :ref:`PlaneMesh`, this mesh doesn't provide subdivision options. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Vector2` | :ref:`size` | Vector2( 1, 1 ) | +-------------------------------+-------------------------------------------+-----------------+ -Description ------------ - -Class representing a square :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike :ref:`PlaneMesh`, this mesh doesn't provide subdivision options. - Property Descriptions --------------------- diff --git a/classes/class_quat.rst b/classes/class_quat.rst index e3f76e323..744d04841 100644 --- a/classes/class_quat.rst +++ b/classes/class_quat.rst @@ -9,13 +9,22 @@ Quat ==== -**Category:** Built-In Types - -Brief Description ------------------ - Quaternion. +Description +----------- + +A unit quaternion used for representing 3D rotations. + +It is similar to :ref:`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. + +Tutorials +--------- + +- `#interpolating-with-quaternions <../tutorials/3d/using_transforms.html#interpolating-with-quaternions>`_ in :doc:`../tutorials/3d/using_transforms` + Properties ---------- @@ -77,20 +86,6 @@ Constants - **IDENTITY** = **Quat( 0, 0, 0, 1 )** -Description ------------ - -A unit quaternion used for representing 3D rotations. - -It is similar to :ref:`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. - -Tutorials ---------- - -- `#interpolating-with-quaternions <../tutorials/3d/using_transforms.html#interpolating-with-quaternions>`_ in :doc:`../tutorials/3d/using_transforms` - Property Descriptions --------------------- diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index db682da1c..617ab37c5 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -11,13 +11,24 @@ RandomNumberGenerator **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A class for generating pseudo-random numbers. +Description +----------- + +RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses `PCG32 `_. + +**Note:** The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. + +To generate a random float number (within a given range) based on a time-dependant seed: + +:: + + var rng = RandomNumberGenerator.new() + func _ready(): + rng.randomize() + var my_random_number = rng.randf_range(-10.0, 10.0) + Properties ---------- @@ -42,22 +53,6 @@ Methods | void | :ref:`randomize` **(** **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses `PCG32 `_. - -**Note:** The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. - -To generate a random float number (within a given range) based on a time-dependant seed: - -:: - - var rng = RandomNumberGenerator.new() - func _ready(): - rng.randomize() - var my_random_number = rng.randf_range(-10.0, 10.0) - Property Descriptions --------------------- diff --git a/classes/class_range.rst b/classes/class_range.rst index d70cebf08..0e422d907 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -13,13 +13,13 @@ Range **Inherited By:** :ref:`EditorSpinSlider`, :ref:`ProgressBar`, :ref:`ScrollBar`, :ref:`Slider`, :ref:`SpinBox`, :ref:`TextureProgress` -**Category:** Core - -Brief Description ------------------ - Abstract base class for range-based controls. +Description +----------- + +Range is a base class for :ref:`Control` nodes that change a floating-point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar`. + Properties ---------- @@ -71,11 +71,6 @@ Emitted when :ref:`min_value`, :ref:`max_value` changes. -Description ------------ - -Range is a base class for :ref:`Control` nodes that change a floating-point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar`. - Property Descriptions --------------------- diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index 0ffe2fe1a..e6311f1e3 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -11,13 +11,26 @@ RayCast **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Query the closest object intersecting a ray. +Description +----------- + +A RayCast represents a line from its origin to its destination position, ``cast_to``. It is used to query the 3D space in order to find the closest object along the path of the ray. + +RayCast can ignore some objects by adding them to the exception list via ``add_exception`` or by setting proper filtering with collision layers and masks. + +RayCast can be configured to report collisions with :ref:`Area`\ s (:ref:`collide_with_areas`) and/or :ref:`PhysicsBody`\ s (:ref:`collide_with_bodies`). + +Only enabled raycasts will be able to query the space and report collisions. + +RayCast calculates intersection every physics frame (see :ref:`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 :ref:`force_raycast_update` after adjusting the raycast. + +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Properties ---------- @@ -66,24 +79,6 @@ Methods | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A RayCast represents a line from its origin to its destination position, ``cast_to``. It is used to query the 3D space in order to find the closest object along the path of the ray. - -RayCast can ignore some objects by adding them to the exception list via ``add_exception`` or by setting proper filtering with collision layers and masks. - -RayCast can be configured to report collisions with :ref:`Area`\ s (:ref:`collide_with_areas`) and/or :ref:`PhysicsBody`\ s (:ref:`collide_with_bodies`). - -Only enabled raycasts will be able to query the space and report collisions. - -RayCast calculates intersection every physics frame (see :ref:`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 :ref:`force_raycast_update` after adjusting the raycast. - -Tutorials ---------- - -- :doc:`../tutorials/physics/ray-casting` - Property Descriptions --------------------- diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index fee6e1731..3e477ab22 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -11,13 +11,26 @@ RayCast2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Query the closest object intersecting a ray. +Description +----------- + +A RayCast represents a line from its origin to its destination position, ``cast_to``. It is used to query the 2D space in order to find the closest object along the path of the ray. + +RayCast2D can ignore some objects by adding them to the exception list via ``add_exception``, by setting proper filtering with collision layers, or by filtering object types with type masks. + +RayCast2D can be configured to report collisions with :ref:`Area2D`\ s (:ref:`collide_with_areas`) and/or :ref:`PhysicsBody2D`\ s (:ref:`collide_with_bodies`). + +Only enabled raycasts will be able to query the space and report collisions. + +RayCast2D calculates intersection every physics frame (see :ref:`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 :ref:`force_raycast_update` after adjusting the raycast. + +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Properties ---------- @@ -66,24 +79,6 @@ Methods | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A RayCast represents a line from its origin to its destination position, ``cast_to``. It is used to query the 2D space in order to find the closest object along the path of the ray. - -RayCast2D can ignore some objects by adding them to the exception list via ``add_exception``, by setting proper filtering with collision layers, or by filtering object types with type masks. - -RayCast2D can be configured to report collisions with :ref:`Area2D`\ s (:ref:`collide_with_areas`) and/or :ref:`PhysicsBody2D`\ s (:ref:`collide_with_bodies`). - -Only enabled raycasts will be able to query the space and report collisions. - -RayCast2D calculates intersection every physics frame (see :ref:`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 :ref:`force_raycast_update` after adjusting the raycast. - -Tutorials ---------- - -- :doc:`../tutorials/physics/ray-casting` - Property Descriptions --------------------- diff --git a/classes/class_rayshape.rst b/classes/class_rayshape.rst index 3281c260c..2c3d8d8c5 100644 --- a/classes/class_rayshape.rst +++ b/classes/class_rayshape.rst @@ -11,13 +11,13 @@ RayShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Ray shape for 3D collisions. +Description +----------- + +Ray shape for 3D collisions, which can be set into a :ref:`PhysicsBody` or :ref:`Area`. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`bool` | :ref:`slips_on_slope` | false | +---------------------------+---------------------------------------------------------------+-------+ -Description ------------ - -Ray shape for 3D collisions, which can be set into a :ref:`PhysicsBody` or :ref:`Area`. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - Property Descriptions --------------------- diff --git a/classes/class_rayshape2d.rst b/classes/class_rayshape2d.rst index 271f4cc5f..5940213d3 100644 --- a/classes/class_rayshape2d.rst +++ b/classes/class_rayshape2d.rst @@ -11,13 +11,13 @@ RayShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Ray shape for 2D collisions. +Description +----------- + +Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`bool` | :ref:`slips_on_slope` | false | +---------------------------+-----------------------------------------------------------------+-------+ -Description ------------ - -Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - Property Descriptions --------------------- diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 19f1e36a2..2477884b1 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -9,13 +9,18 @@ Rect2 ===== -**Category:** Built-In Types - -Brief Description ------------------ - 2D axis-aligned bounding box. +Description +----------- + +Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + +Tutorials +--------- + +- :doc:`../tutorials/math/index` + Properties ---------- @@ -62,16 +67,6 @@ Methods | :ref:`Rect2` | :ref:`merge` **(** :ref:`Rect2` b **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. - -Tutorials ---------- - -- :doc:`../tutorials/math/index` - Property Descriptions --------------------- diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst index eabe8caaf..bf86ee2da 100644 --- a/classes/class_rectangleshape2d.rst +++ b/classes/class_rectangleshape2d.rst @@ -11,13 +11,13 @@ RectangleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Rectangle shape for 2D collisions. +Description +----------- + +Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`Vector2` | :ref:`extents` | Vector2( 10, 10 ) | +-------------------------------+---------------------------------------------------------+-------------------+ -Description ------------ - -Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects. - Property Descriptions --------------------- diff --git a/classes/class_reference.rst b/classes/class_reference.rst index 801b430e0..d092735e0 100644 --- a/classes/class_reference.rst +++ b/classes/class_reference.rst @@ -13,13 +13,17 @@ Reference **Inherited By:** :ref:`ARVRInterface`, :ref:`AStar`, :ref:`AStar2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`Directory`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScript`, :ref:`EncodedObjectAsID`, :ref:`Expression`, :ref:`File`, :ref:`FuncRef`, :ref:`GDNative`, :ref:`GDScriptFunctionState`, :ref:`GDScriptNativeClass`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSONParseResult`, :ref:`KinematicCollision`, :ref:`KinematicCollision2D`, :ref:`Marshalls`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`Physics2DShapeQueryParameters`, :ref:`Physics2DShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`PhysicsShapeQueryParameters`, :ref:`PhysicsShapeQueryResult`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`ResourceInteractiveLoader`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`SpatialGizmo`, :ref:`SpatialVelocityTracker`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCP_Server`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser` -**Category:** Core - -Brief Description ------------------ - Base class for reference-counted objects. +Description +----------- + +Base class for any object that keeps a reference count. :ref:`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 :ref:`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. + Methods ------- @@ -31,15 +35,6 @@ Methods | :ref:`bool` | :ref:`unreference` **(** **)** | +-------------------------+--------------------------------------------------------------------+ -Description ------------ - -Base class for any object that keeps a reference count. :ref:`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 :ref:`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. - Method Descriptions ------------------- diff --git a/classes/class_referencerect.rst b/classes/class_referencerect.rst index c0c25e79e..23f93c904 100644 --- a/classes/class_referencerect.rst +++ b/classes/class_referencerect.rst @@ -11,13 +11,13 @@ ReferenceRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Reference frame for GUI. +Description +----------- + +A rectangle box that displays only a :ref:`border_color` border color around its rectangle. ``ReferenceRect`` has no fill :ref:`Color`. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`bool` | :ref:`editor_only` | true | +---------------------------+----------------------------------------------------------------+---------------------+ -Description ------------ - -A rectangle box that displays only a :ref:`border_color` border color around its rectangle. ``ReferenceRect`` has no fill :ref:`Color`. - Property Descriptions --------------------- diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index 1a28d1fcb..b49c77212 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -11,13 +11,18 @@ ReflectionProbe **Inherits:** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Captures its surroundings to create reflections. +Description +----------- + +Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses. + +Tutorials +--------- + +- :doc:`../tutorials/3d/reflection_probes` + Properties ---------- @@ -62,16 +67,6 @@ enum **UpdateMode**: - **UPDATE_ALWAYS** = **1** -Description ------------ - -Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses. - -Tutorials ---------- - -- :doc:`../tutorials/3d/reflection_probes` - Property Descriptions --------------------- diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 16f3284af..c8b7c6297 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -11,36 +11,8 @@ RegEx **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Class for searching text for patterns using regular expressions. -Methods -------- - -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`compile` **(** :ref:`String` pattern **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_group_count` **(** **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_names` **(** **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_pattern` **(** **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RegExMatch` | :ref:`search` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`search_all` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sub` **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -86,6 +58,29 @@ If you need to process multiple results, :ref:`search_all` **(** **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`compile` **(** :ref:`String` pattern **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_group_count` **(** **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_names` **(** **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_pattern` **(** **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RegExMatch` | :ref:`search` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`search_all` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`sub` **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_regexmatch.rst b/classes/class_regexmatch.rst index 36e7a63b7..19e4df6eb 100644 --- a/classes/class_regexmatch.rst +++ b/classes/class_regexmatch.rst @@ -11,13 +11,13 @@ RegExMatch **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Contains the results of a :ref:`RegEx` search. +Description +----------- + +Contains the results of a single :ref:`RegEx` match returned by :ref:`RegEx.search` and :ref:`RegEx.search_all`. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. + Properties ---------- @@ -42,11 +42,6 @@ Methods | :ref:`String` | :ref:`get_string` **(** :ref:`Variant` name=0 **)** const | +-----------------------------+--------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Contains the results of a single :ref:`RegEx` match returned by :ref:`RegEx.search` and :ref:`RegEx.search_all`. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. - Property Descriptions --------------------- diff --git a/classes/class_remotetransform.rst b/classes/class_remotetransform.rst index ffe9afbdd..8fe1537a1 100644 --- a/classes/class_remotetransform.rst +++ b/classes/class_remotetransform.rst @@ -11,13 +11,15 @@ RemoteTransform **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - RemoteTransform pushes its own :ref:`Transform` to another :ref:`Spatial` derived Node in the scene. +Description +----------- + +RemoteTransform pushes its own :ref:`Transform` to another :ref:`Spatial` derived Node (called the remote node) in the scene. + +It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. + Properties ---------- @@ -40,13 +42,6 @@ Methods | void | :ref:`force_update_cache` **(** **)** | +------+----------------------------------------------------------------------------------------+ -Description ------------ - -RemoteTransform pushes its own :ref:`Transform` to another :ref:`Spatial` derived Node (called the remote node) in the scene. - -It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. - Property Descriptions --------------------- diff --git a/classes/class_remotetransform2d.rst b/classes/class_remotetransform2d.rst index d6b870603..21d249b80 100644 --- a/classes/class_remotetransform2d.rst +++ b/classes/class_remotetransform2d.rst @@ -11,13 +11,15 @@ RemoteTransform2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - RemoteTransform2D pushes its own :ref:`Transform2D` to another :ref:`CanvasItem` derived Node in the scene. +Description +----------- + +RemoteTransform2D pushes its own :ref:`Transform2D` to another :ref:`CanvasItem` derived Node (called the remote node) in the scene. + +It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. + Properties ---------- @@ -40,13 +42,6 @@ Methods | void | :ref:`force_update_cache` **(** **)** | +------+------------------------------------------------------------------------------------------+ -Description ------------ - -RemoteTransform2D pushes its own :ref:`Transform2D` to another :ref:`CanvasItem` derived Node (called the remote node) in the scene. - -It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. - Property Descriptions --------------------- diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 199f0e859..3df573a1d 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -13,13 +13,18 @@ Resource **Inherited By:** :ref:`Animation`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BakedLightmapData`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CryptoKey`, :ref:`CubeMap`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`DynamicFontData`, :ref:`EditorSettings`, :ref:`EditorSpatialGizmoPlugin`, :ref:`Environment`, :ref:`Font`, :ref:`GDNativeLibrary`, :ref:`GIProbeData`, :ref:`Gradient`, :ref:`Image`, :ref:`InputEvent`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`OccluderPolygon2D`, :ref:`OpenSimplexNoise`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RichTextEffect`, :ref:`Script`, :ref:`Shader`, :ref:`Shape`, :ref:`Shape2D`, :ref:`ShortCut`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`TextFile`, :ref:`Texture`, :ref:`TextureLayered`, :ref:`Theme`, :ref:`TileSet`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`World`, :ref:`World2D`, :ref:`X509Certificate` -**Category:** Core - -Brief Description ------------------ - Base class for all resources. +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 :ref:`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 :ref:`Node` or another resource. + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/resources` + Properties ---------- @@ -57,16 +62,6 @@ Signals Emitted whenever the resource changes. -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 :ref:`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 :ref:`Node` or another resource. - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/resources` - Property Descriptions --------------------- diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index f2681b614..00fa42ff7 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -13,13 +13,17 @@ ResourceFormatLoader **Inherited By:** :ref:`ResourceFormatLoaderCrypto` -**Category:** Core - -Brief Description ------------------ - Loads a specific resource type from a file. +Description +----------- + +Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the :ref:`ResourceLoader` singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. + +Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a :ref:`ResourceFormatSaver`. + +**Note:** You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.stex`` (:ref:`StreamTexture`) first, so they can be loaded with better efficiency on the graphics card. + Methods ------- @@ -37,15 +41,6 @@ Methods | :ref:`int` | :ref:`rename_dependencies` **(** :ref:`String` path, :ref:`String` renames **)** virtual | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the :ref:`ResourceLoader` singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. - -Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a :ref:`ResourceFormatSaver`. - -**Note:** You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.stex`` (:ref:`StreamTexture`) first, so they can be loaded with better efficiency on the graphics card. - Method Descriptions ------------------- diff --git a/classes/class_resourceformatloadercrypto.rst b/classes/class_resourceformatloadercrypto.rst index 5c1307853..6968cea48 100644 --- a/classes/class_resourceformatloadercrypto.rst +++ b/classes/class_resourceformatloadercrypto.rst @@ -11,10 +11,5 @@ ResourceFormatLoaderCrypto **Inherits:** :ref:`ResourceFormatLoader` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_resourceformatsaver.rst b/classes/class_resourceformatsaver.rst index 66f7bd071..6eb8e6b63 100644 --- a/classes/class_resourceformatsaver.rst +++ b/classes/class_resourceformatsaver.rst @@ -13,13 +13,15 @@ ResourceFormatSaver **Inherited By:** :ref:`ResourceFormatSaverCrypto` -**Category:** Core - -Brief Description ------------------ - Saves a specific resource type to a file. +Description +----------- + +The engine can save resources when you do it from the editor, or when you use the :ref:`ResourceSaver` singleton. This is accomplished thanks to multiple ``ResourceFormatSaver``\ s, each handling its own format and called automatically by the engine. + +By default, Godot saves resources as ``.tres`` (text-based), ``.res`` (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a :ref:`ResourceFormatLoader`. + Methods ------- @@ -31,13 +33,6 @@ Methods | :ref:`int` | :ref:`save` **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags **)** virtual | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -The engine can save resources when you do it from the editor, or when you use the :ref:`ResourceSaver` singleton. This is accomplished thanks to multiple ``ResourceFormatSaver``\ s, each handling its own format and called automatically by the engine. - -By default, Godot saves resources as ``.tres`` (text-based), ``.res`` (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a :ref:`ResourceFormatLoader`. - Method Descriptions ------------------- diff --git a/classes/class_resourceformatsavercrypto.rst b/classes/class_resourceformatsavercrypto.rst index 90e6f0898..5ed977d4a 100644 --- a/classes/class_resourceformatsavercrypto.rst +++ b/classes/class_resourceformatsavercrypto.rst @@ -11,10 +11,5 @@ ResourceFormatSaverCrypto **Inherits:** :ref:`ResourceFormatSaver` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst index 1357d2bc8..af3c84468 100644 --- a/classes/class_resourceimporter.rst +++ b/classes/class_resourceimporter.rst @@ -13,10 +13,5 @@ ResourceImporter **Inherited By:** :ref:`EditorImportPlugin` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_resourceinteractiveloader.rst b/classes/class_resourceinteractiveloader.rst index d3c70257d..11ad6a203 100644 --- a/classes/class_resourceinteractiveloader.rst +++ b/classes/class_resourceinteractiveloader.rst @@ -11,13 +11,13 @@ ResourceInteractiveLoader **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Interactive :ref:`Resource` loader. +Description +----------- + +Interactive :ref:`Resource` loader. This object is returned by :ref:`ResourceLoader` when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages. + Methods ------- @@ -33,11 +33,6 @@ Methods | :ref:`Error` | :ref:`wait` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------+ -Description ------------ - -Interactive :ref:`Resource` loader. This object is returned by :ref:`ResourceLoader` when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages. - Method Descriptions ------------------- diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 4c9e9832a..5a872e8df 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -11,13 +11,17 @@ ResourceLoader **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Singleton used to load resource files. +Description +----------- + +Singleton used to load resource files from the filesystem. + +It uses the many :ref:`ResourceFormatLoader` classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. + +GDScript has a simplified :ref:`@GDScript.load` built-in method which can be used in most situations, leaving the use of ``ResourceLoader`` for more advanced scenarios. + Methods ------- @@ -39,15 +43,6 @@ Methods | void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Singleton used to load resource files from the filesystem. - -It uses the many :ref:`ResourceFormatLoader` classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. - -GDScript has a simplified :ref:`@GDScript.load` built-in method which can be used in most situations, leaving the use of ``ResourceLoader`` for more advanced scenarios. - Method Descriptions ------------------- diff --git a/classes/class_resourcepreloader.rst b/classes/class_resourcepreloader.rst index 7143844b5..d87e8889e 100644 --- a/classes/class_resourcepreloader.rst +++ b/classes/class_resourcepreloader.rst @@ -11,13 +11,15 @@ ResourcePreloader **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Resource Preloader Node. +Description +----------- + +This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. + +GDScript has a simplified :ref:`@GDScript.preload` built-in method which can be used in most situations, leaving the use of ``ResourcePreloader`` for more advanced scenarios. + Methods ------- @@ -35,13 +37,6 @@ Methods | void | :ref:`rename_resource` **(** :ref:`String` name, :ref:`String` newname **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. - -GDScript has a simplified :ref:`@GDScript.preload` built-in method which can be used in most situations, leaving the use of ``ResourcePreloader`` for more advanced scenarios. - Method Descriptions ------------------- diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 429a45d73..49351849d 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -11,13 +11,15 @@ ResourceSaver **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Singleton for saving Godot-specific resource types. +Description +----------- + +Singleton for saving Godot-specific resource types to the filesystem. + +It uses the many :ref:`ResourceFormatSaver` classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. ``.tres`` or ``.tscn``) or binary files (e.g. ``.res`` or ``.scn``). + Methods ------- @@ -62,13 +64,6 @@ enum **SaverFlags**: - **FLAG_REPLACE_SUBRESOURCE_PATHS** = **64** --- Take over the paths of the saved subresources (see :ref:`Resource.take_over_path`). -Description ------------ - -Singleton for saving Godot-specific resource types to the filesystem. - -It uses the many :ref:`ResourceFormatSaver` classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. ``.tres`` or ``.tscn``) or binary files (e.g. ``.res`` or ``.scn``). - Method Descriptions ------------------- diff --git a/classes/class_richtexteffect.rst b/classes/class_richtexteffect.rst index 815c347fa..c828ec7a9 100644 --- a/classes/class_richtexteffect.rst +++ b/classes/class_richtexteffect.rst @@ -11,20 +11,8 @@ RichTextEffect **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A custom effect for use with :ref:`RichTextLabel`. -Methods -------- - -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_process_custom_fx` **(** :ref:`CharFXTransform` char_fx **)** virtual | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- @@ -46,6 +34,13 @@ Tutorials - `https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project `_ +Methods +------- + ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_process_custom_fx` **(** :ref:`CharFXTransform` char_fx **)** virtual | ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 7d2bb8ccd..58ac5a9ac 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -11,13 +11,20 @@ RichTextLabel **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Label that displays rich text. +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. + +**Note:** Assignments to :ref:`bbcode_text` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`bbcode_text` will erase previous edits made from other manual sources such as :ref:`append_bbcode` and the ``push_*`` / :ref:`pop` methods. + +Tutorials +--------- + +- :doc:`../tutorials/gui/bbcode_in_richtextlabel` + Properties ---------- @@ -164,7 +171,7 @@ Signals - **meta_clicked** **(** :ref:`Nil` meta **)** -Triggered when the user clicks on content between ``[url]`` tags. If the meta is defined in text, e.g. ``[url={"data"="hi"}]hi[/url]``, then the parameter for this signal will be a :ref:`String` type. If a particular type or an object is desired, the :ref:`push_meta` method must be used to manually insert the data into the tag stack. +Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. ``[url={"data"="hi"}]hi[/url]``, then the parameter for this signal will be a :ref:`String` type. If a particular type or an object is desired, the :ref:`push_meta` method must be used to manually insert the data into the tag stack. ---- @@ -197,13 +204,13 @@ Enumerations enum **Align**: -- **ALIGN_LEFT** = **0** +- **ALIGN_LEFT** = **0** --- Makes text left aligned. -- **ALIGN_CENTER** = **1** +- **ALIGN_CENTER** = **1** --- Makes text centered. -- **ALIGN_RIGHT** = **2** +- **ALIGN_RIGHT** = **2** --- Makes text right aligned. -- **ALIGN_FILL** = **3** +- **ALIGN_FILL** = **3** --- Makes text fill width. ---- @@ -217,11 +224,11 @@ enum **Align**: enum **ListType**: -- **LIST_NUMBERS** = **0** +- **LIST_NUMBERS** = **0** --- Each list item has a number marker. -- **LIST_LETTERS** = **1** +- **LIST_LETTERS** = **1** --- Each list item has a letter marker. -- **LIST_DOTS** = **2** +- **LIST_DOTS** = **2** --- Each list item has a filled circle marker. ---- @@ -305,18 +312,6 @@ enum **ItemType**: - **ITEM_META** = **17** -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. - -**Note:** Assignments to :ref:`bbcode_text` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`bbcode_text` will erase previous edits made from other manual sources such as :ref:`append_bbcode` and the ``push_*`` / :ref:`pop` methods. - -Tutorials ---------- - -- :doc:`../tutorials/gui/bbcode_in_richtextlabel` - Property Descriptions --------------------- @@ -366,6 +361,10 @@ The label's text in BBCode format. Is not representative of manual modifications | *Getter* | get_effects() | +-----------+--------------------+ +The currently installed custom effects. This is an array of :ref:`RichTextEffect`\ s. + +To add a custom effect, it's more convenient to use :ref:`install_effect`. + ---- .. _class_RichTextLabel_property_meta_underlined: @@ -412,7 +411,9 @@ If ``true``, the label uses the custom font color. | *Getter* | get_percent_visible() | +-----------+----------------------------+ -The text's visibility, as a :ref:`float` between 0.0 and 1.0. +The range of characters to display, as a :ref:`float` between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. + +**Note:** Setting this property updates :ref:`visible_characters` based on current :ref:`get_total_character_count`. ---- @@ -428,7 +429,7 @@ The text's visibility, as a :ref:`float` between 0.0 and 1.0. | *Getter* | is_scroll_active() | +-----------+--------------------------+ -If ``true``, the scrollbar is visible. Does not block scrolling completely. See :ref:`scroll_to_line`. +If ``true``, the scrollbar is visible. Setting this to ``false`` does not block scrolling completely. See :ref:`scroll_to_line`. ---- @@ -593,6 +594,8 @@ Returns the number of visible lines. - void **install_effect** **(** :ref:`Variant` effect **)** +Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect`. + ---- .. _class_RichTextLabel_method_newline: @@ -615,6 +618,8 @@ The assignment version of :ref:`append_bbcode` **parse_expressions_for_values** **(** :ref:`PoolStringArray` expressions **)** +Parses BBCode parameter ``expressions`` into a dictionary. + ---- .. _class_RichTextLabel_method_pop: @@ -637,12 +642,16 @@ Adds an ``[align]`` tag based on the given ``align`` value. See :ref:`Align` level **)** -Adds an ``[indent]`` tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length. +Adds an ``[indent]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size` to determine new margin length. ---- @@ -681,6 +690,8 @@ Adds an ``[indent]`` tag to the tag stack. Multiplies "level" by current tab_siz - void **push_italics** **(** **)** +Adds a ``[font]`` tag with a italics font to the tag stack. This is the same as adding a ``[i]`` tag if not currently in a ``[b]`` tag. + ---- .. _class_RichTextLabel_method_push_list: @@ -703,12 +714,16 @@ Adds a ``[meta]`` tag to the tag stack. Similar to the BBCode ``[url=something]{ - void **push_mono** **(** **)** +Adds a ``[font]`` tag with a monospace font to the tag stack. + ---- .. _class_RichTextLabel_method_push_normal: - void **push_normal** **(** **)** +Adds a ``[font]`` tag with a normal font to the tag stack. + ---- .. _class_RichTextLabel_method_push_strikethrough: @@ -741,6 +756,8 @@ Adds a ``[u]`` tag to the tag stack. Removes a line of content from the label. Returns ``true`` if the line exists. +The ``line`` argument is the index of the line to remove, it can take values in the interval ``[0, get_line_count() - 1]``. + ---- .. _class_RichTextLabel_method_scroll_to_line: diff --git a/classes/class_rid.rst b/classes/class_rid.rst index 425a248f4..c79ed7bc1 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -9,13 +9,13 @@ RID === -**Category:** Built-In Types - -Brief Description ------------------ - Handle for a :ref:`Resource`'s unique ID. +Description +----------- + +The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. + Methods ------- @@ -25,11 +25,6 @@ Methods | :ref:`int` | :ref:`get_id` **(** **)** | +-----------------------+-------------------------------------------------------------------------------+ -Description ------------ - -The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. - Method Descriptions ------------------- diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index e1cd358f9..2682c8154 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -13,13 +13,24 @@ RigidBody **Inherited By:** :ref:`VehicleBody` -**Category:** Core - -Brief Description ------------------ - Physics Body whose position is determined through physics simulation in 3D space. +Description +----------- + +This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. + +A RigidBody has 4 behavior :ref:`mode`\ s: Rigid, Static, Character, and Kinematic. + +**Note:** Don't change a RigidBody'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 :ref:`_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 :ref:`custom_integrator`. + +Tutorials +--------- + +- :doc:`../tutorials/physics/physics_introduction` + Properties ---------- @@ -166,22 +177,6 @@ enum **Mode**: - **MODE_KINEMATIC** = **3** --- Kinematic body mode. The body behaves like a :ref:`KinematicBody`, and can only move by user code. -Description ------------ - -This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. - -A RigidBody has 4 behavior :ref:`mode`\ s: Rigid, Static, Character, and Kinematic. - -**Note:** Don't change a RigidBody'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 :ref:`_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 :ref:`custom_integrator`. - -Tutorials ---------- - -- :doc:`../tutorials/physics/physics_introduction` - Property Descriptions --------------------- diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index 8752691f8..794a0b0e8 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -11,13 +11,21 @@ RigidBody2D **Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A body that is controlled by the 2D physics engine. +Description +----------- + +This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. + +A RigidBody2D has 4 behavior :ref:`mode`\ s: Rigid, Static, Character, and Kinematic. + +**Note:** You should not change a RigidBody2D's ``position`` or ``linear_velocity`` every frame or even very often. If you need to directly affect the body's state, use :ref:`_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 :ref:`custom_integrator`. + Properties ---------- @@ -170,19 +178,6 @@ enum **CCDMode**: - **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. -Description ------------ - -This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. - -A RigidBody2D has 4 behavior :ref:`mode`\ s: Rigid, Static, Character, and Kinematic. - -**Note:** You should not change a RigidBody2D's ``position`` or ``linear_velocity`` every frame or even very often. If you need to directly affect the body's state, use :ref:`_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 :ref:`custom_integrator`. - Property Descriptions --------------------- diff --git a/classes/class_rootmotionview.rst b/classes/class_rootmotionview.rst index 6bbcdfc96..dfabadf13 100644 --- a/classes/class_rootmotionview.rst +++ b/classes/class_rootmotionview.rst @@ -11,11 +11,6 @@ RootMotionView **Inherits:** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index bffbd70bc..8b06e774a 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -11,13 +11,15 @@ SceneState **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A script interface to a scene file's data. +Description +----------- + +Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. + +This class cannot be instantiated directly, it is retrieved for a given scene as the result of :ref:`PackedScene.get_state`. + Methods ------- @@ -86,13 +88,6 @@ enum **GenEditState**: **Note:** Only available in editor builds. -Description ------------ - -Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. - -This class cannot be instantiated directly, it is retrieved for a given scene as the result of :ref:`PackedScene.get_state`. - Method Descriptions ------------------- diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index b195bb16d..4fa7e003b 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -11,13 +11,24 @@ SceneTree **Inherits:** :ref:`MainLoop` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Manages the game loop via a hierarchy of nodes. +Description +----------- + +As one of the most important classes, the ``SceneTree`` manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. + +You can also use the ``SceneTree`` to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. + +``SceneTree`` is the default :ref:`MainLoop` implementation used by scenes, and is thus in charge of the game loop. + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/scene_tree` + +- :doc:`../tutorials/viewports/multiple_resolutions` + Properties ---------- @@ -85,7 +96,7 @@ Methods +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`queue_delete` **(** :ref:`Object` obj **)** | +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`quit` **(** **)** | +| void | :ref:`quit` **(** :ref:`int` exit_code=-1 **)** | +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`reload_current_scene` **(** **)** | +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -290,22 +301,6 @@ enum **StretchAspect**: - **STRETCH_ASPECT_EXPAND** = **4** --- Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars. -Description ------------ - -As one of the most important classes, the ``SceneTree`` manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. - -You can also use the ``SceneTree`` to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. - -``SceneTree`` is the default :ref:`MainLoop` implementation used by scenes, and is thus in charge of the game loop. - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/scene_tree` - -- :doc:`../tutorials/viewports/multiple_resolutions` - Property Descriptions --------------------- @@ -639,9 +634,9 @@ Queues the given object for deletion, delaying the call to :ref:`Object.free` exit_code=-1 **)** -Quits the application. +Quits the application. A process ``exit_code`` can optionally be passed as an argument. If this argument is ``0`` or greater, it will override the :ref:`OS.exit_code` defined before quitting the application. ---- diff --git a/classes/class_scenetreetimer.rst b/classes/class_scenetreetimer.rst index 571c03d62..ce0eef22c 100644 --- a/classes/class_scenetreetimer.rst +++ b/classes/class_scenetreetimer.rst @@ -11,13 +11,22 @@ SceneTreeTimer **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - One-shot timer. +Description +----------- + +A one-shot timer managed by the scene tree, which emits :ref:`timeout` on completion. See also :ref:`SceneTree.create_timer`. + +As opposed to :ref:`Timer`, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example: + +:: + + func some_function(): + print("Timer started.") + yield(get_tree().create_timer(1.0), "timeout") + print("Timer ended.") + Properties ---------- @@ -34,20 +43,6 @@ Signals Emitted when the timer reaches 0. -Description ------------ - -A one-shot timer managed by the scene tree, which emits :ref:`timeout` on completion. See also :ref:`SceneTree.create_timer`. - -As opposed to :ref:`Timer`, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example: - -:: - - func some_function(): - print("Timer started.") - yield(get_tree().create_timer(1.0), "timeout") - print("Timer ended.") - Property Descriptions --------------------- diff --git a/classes/class_script.rst b/classes/class_script.rst index 152c85cd8..504331f04 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -13,13 +13,20 @@ Script **Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`NativeScript`, :ref:`PluginScript`, :ref:`VisualScript` -**Category:** Core - -Brief Description ------------------ - A class stored as a resource. +Description +----------- + +A class stored as a resource. A script extends the functionality of all objects that instance it. + +The ``new`` method of a script subclass creates a new instance. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/scripting` + Properties ---------- @@ -58,18 +65,6 @@ Methods | :ref:`Error` | :ref:`reload` **(** :ref:`bool` keep_state=false **)** | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A class stored as a resource. A script extends the functionality of all objects that instance it. - -The ``new`` method of a script subclass creates a new instance. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. - -Tutorials ---------- - -- :doc:`../getting_started/step_by_step/scripting` - Property Descriptions --------------------- diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index d39292750..06bcfe517 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -11,13 +11,20 @@ ScriptCreateDialog **Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`WindowDialog` **<** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - The Editor's popup dialog for creating new :ref:`Script` files. +Description +----------- + +The ``ScriptCreateDialog`` creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the :ref:`Popup.popup` methods. + +:: + + func _ready(): + dialog.config("Node", "res://new_node.gd") # For in-engine types + dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types + dialog.popup_centered() + Properties ---------- @@ -36,9 +43,9 @@ Properties Methods ------- -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`config` **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`config` **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true, :ref:`bool` load_enabled=true **)** | ++------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -49,24 +56,12 @@ Signals Emitted when the user clicks the OK button. -Description ------------ - -The ``ScriptCreateDialog`` creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the :ref:`Popup.popup` methods. - -:: - - func _ready(): - dialog.config("Node", "res://new_node.gd") # For in-engine types - dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types - dialog.popup_centered() - Method Descriptions ------------------- .. _class_ScriptCreateDialog_method_config: -- void **config** **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true **)** +- void **config** **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true, :ref:`bool` load_enabled=true **)** Prefills required fields to configure the ScriptCreateDialog for use. diff --git a/classes/class_scripteditor.rst b/classes/class_scripteditor.rst index 805b9acfa..238f85f50 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -11,11 +11,6 @@ ScriptEditor **Inherits:** :ref:`PanelContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index 758ecf03e..8351ac6bd 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -13,13 +13,13 @@ ScrollBar **Inherited By:** :ref:`HScrollBar`, :ref:`VScrollBar` -**Category:** Core - -Brief Description ------------------ - Base class for scroll bars. +Description +----------- + +Scrollbars are a :ref:`Range`-based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. + Properties ---------- @@ -40,11 +40,6 @@ Signals Emitted when the scrollbar is being scrolled. -Description ------------ - -Scrollbars are a :ref:`Range`-based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. - Property Descriptions --------------------- @@ -60,3 +55,5 @@ Property Descriptions | *Getter* | get_custom_step() | +-----------+------------------------+ +Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the ``ScrollBar`` is focused. + diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 54d03d18c..37ba80f15 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -13,16 +13,18 @@ ScrollContainer **Inherited By:** :ref:`EditorInspector` -**Category:** Core - -Brief Description ------------------ - A helper node for displaying scrollable elements such as lists. +Description +----------- + +A ScrollContainer node meant to contain a :ref:`Control` child. ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.rect_min_size` of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set ``EXPAND`` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). + Properties ---------- ++-------------------------+--------------------------------------------------------------------------------------------+-------------+ +| :ref:`bool` | :ref:`follow_focus` | false | +-------------------------+--------------------------------------------------------------------------------------------+-------------+ | :ref:`bool` | rect_clip_content | **O:** true | +-------------------------+--------------------------------------------------------------------------------------------+-------------+ @@ -70,14 +72,25 @@ Emitted when scrolling stops. Emitted when scrolling is started. -Description ------------ - -A ScrollContainer node meant to contain a :ref:`Control` child. ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.rect_min_size` of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set ``EXPAND`` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). - Property Descriptions --------------------- +.. _class_ScrollContainer_property_follow_focus: + +- :ref:`bool` **follow_focus** + ++-----------+-------------------------+ +| *Default* | false | ++-----------+-------------------------+ +| *Setter* | set_follow_focus(value) | ++-----------+-------------------------+ +| *Getter* | is_following_focus() | ++-----------+-------------------------+ + +If ``true``, the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible. + +---- + .. _class_ScrollContainer_property_scroll_deadzone: - :ref:`int` **scroll_deadzone** diff --git a/classes/class_segmentshape2d.rst b/classes/class_segmentshape2d.rst index 19a26f885..40b8c9911 100644 --- a/classes/class_segmentshape2d.rst +++ b/classes/class_segmentshape2d.rst @@ -11,13 +11,13 @@ SegmentShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Segment shape for 2D collisions. +Description +----------- + +Segment shape for 2D collisions. Consists of two points, ``a`` and ``b``. + Properties ---------- @@ -27,11 +27,6 @@ Properties | :ref:`Vector2` | :ref:`b` | Vector2( 0, 10 ) | +-------------------------------+-------------------------------------------+------------------+ -Description ------------ - -Segment shape for 2D collisions. Consists of two points, ``a`` and ``b``. - Property Descriptions --------------------- diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index d187e4ffe..fb8cceea4 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -11,22 +11,8 @@ Semaphore **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A synchronization semaphore. -Methods -------- - -+---------------------------------------+------------------------------------------------------+ -| :ref:`Error` | :ref:`post` **(** **)** | -+---------------------------------------+------------------------------------------------------+ -| :ref:`Error` | :ref:`wait` **(** **)** | -+---------------------------------------+------------------------------------------------------+ - Description ----------- @@ -37,6 +23,15 @@ Tutorials - :doc:`../tutorials/threads/using_multiple_threads` +Methods +------- + ++---------------------------------------+------------------------------------------------------+ +| :ref:`Error` | :ref:`post` **(** **)** | ++---------------------------------------+------------------------------------------------------+ +| :ref:`Error` | :ref:`wait` **(** **)** | ++---------------------------------------+------------------------------------------------------+ + Method Descriptions ------------------- diff --git a/classes/class_separator.rst b/classes/class_separator.rst index 3ced201c5..6017a7e13 100644 --- a/classes/class_separator.rst +++ b/classes/class_separator.rst @@ -13,11 +13,6 @@ Separator **Inherited By:** :ref:`HSeparator`, :ref:`VSeparator` -**Category:** Core - -Brief Description ------------------ - Base class for separators. Description diff --git a/classes/class_shader.rst b/classes/class_shader.rst index a4c2c96a2..bb2e09e3f 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -13,13 +13,18 @@ Shader **Inherited By:** :ref:`VisualShader` -**Category:** Core - -Brief Description ------------------ - A custom shader program. +Description +----------- + +This class allows you to define a custom shader program that can be used for various materials to render objects. + +Tutorials +--------- + +- :doc:`../tutorials/shading/index` + Properties ---------- @@ -59,16 +64,6 @@ enum **Mode**: - **MODE_PARTICLES** = **2** -Description ------------ - -This class allows you to define a custom shader program that can be used for various materials to render objects. - -Tutorials ---------- - -- :doc:`../tutorials/shading/index` - Property Descriptions --------------------- diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst index 33557fe6b..a9566b01a 100644 --- a/classes/class_shadermaterial.rst +++ b/classes/class_shadermaterial.rst @@ -11,13 +11,18 @@ ShaderMaterial **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A material that uses a custom :ref:`Shader` program. +Description +----------- + +A material that uses a custom :ref:`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. + +Tutorials +--------- + +- :doc:`../tutorials/shading/index` + Properties ---------- @@ -38,16 +43,6 @@ Methods | void | :ref:`set_shader_param` **(** :ref:`String` param, :ref:`Variant` value **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A material that uses a custom :ref:`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. - -Tutorials ---------- - -- :doc:`../tutorials/shading/index` - Property Descriptions --------------------- @@ -78,12 +73,16 @@ Returns the current value set for this material of a uniform in the shader. - :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** +Returns ``true`` if the property identified by ``name`` can be reverted to a default value. + ---- .. _class_ShaderMaterial_method_property_get_revert: - :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** +Returns the default value of the material property with given ``name``. + ---- .. _class_ShaderMaterial_method_set_shader_param: diff --git a/classes/class_shape.rst b/classes/class_shape.rst index 5bbe90c25..66fdf076b 100644 --- a/classes/class_shape.rst +++ b/classes/class_shape.rst @@ -13,20 +13,8 @@ Shape **Inherited By:** :ref:`BoxShape`, :ref:`CapsuleShape`, :ref:`ConcavePolygonShape`, :ref:`ConvexPolygonShape`, :ref:`CylinderShape`, :ref:`HeightMapShape`, :ref:`PlaneShape`, :ref:`RayShape`, :ref:`SphereShape` -**Category:** Core - -Brief Description ------------------ - Base class for all 3D shape resources. -Properties ----------- - -+---------------------------+--------------------------------------------+------+ -| :ref:`float` | :ref:`margin` | 0.04 | -+---------------------------+--------------------------------------------+------+ - Description ----------- @@ -37,6 +25,13 @@ Tutorials - :doc:`../tutorials/physics/physics_introduction` +Properties +---------- + ++---------------------------+--------------------------------------------+------+ +| :ref:`float` | :ref:`margin` | 0.04 | ++---------------------------+--------------------------------------------+------+ + Property Descriptions --------------------- diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index 86b9d41ea..d0e62a029 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -13,13 +13,18 @@ Shape2D **Inherited By:** :ref:`CapsuleShape2D`, :ref:`CircleShape2D`, :ref:`ConcavePolygonShape2D`, :ref:`ConvexPolygonShape2D`, :ref:`LineShape2D`, :ref:`RayShape2D`, :ref:`RectangleShape2D`, :ref:`SegmentShape2D` -**Category:** Core - -Brief Description ------------------ - Base class for all 2D shapes. +Description +----------- + +Base class for all 2D shapes. All 2D shape types inherit from this. + +Tutorials +--------- + +- :doc:`../tutorials/physics/physics_introduction` + Properties ---------- @@ -40,16 +45,6 @@ Methods | :ref:`Array` | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Base class for all 2D shapes. All 2D shape types inherit from this. - -Tutorials ---------- - -- :doc:`../tutorials/physics/physics_introduction` - Property Descriptions --------------------- diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index e4bffaa1b..60c2a252d 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -11,13 +11,15 @@ ShortCut **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +A shortcut for binding input. -Brief Description ------------------ +Description +----------- A shortcut for binding input. +Shortcuts are commonly used for interacting with a :ref:`Control` element from a :ref:`InputEvent`. + Properties ---------- @@ -36,13 +38,6 @@ Methods | :ref:`bool` | :ref:`is_valid` **(** **)** const | +-----------------------------+-------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A shortcut for binding input. - -Shortcuts are commonly used for interacting with a :ref:`Control` element from a :ref:`InputEvent`. - Property Descriptions --------------------- diff --git a/classes/class_skeleton.rst b/classes/class_skeleton.rst index ed68f005a..266999b74 100644 --- a/classes/class_skeleton.rst +++ b/classes/class_skeleton.rst @@ -11,13 +11,17 @@ Skeleton **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Skeleton for characters and animated objects. +Description +----------- + +Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see :ref:`Animation`). It can also use ragdoll physics. + +The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. + +Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. + Methods ------- @@ -84,15 +88,6 @@ Constants - **NOTIFICATION_UPDATE_SKELETON** = **50** -Description ------------ - -Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see :ref:`Animation`). It can also use ragdoll physics. - -The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. - -Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. - Method Descriptions ------------------- diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index e6f9b9942..7cc5958af 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -11,13 +11,13 @@ Skeleton2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Skeleton for 2D characters and animated objects. +Tutorials +--------- + +- :doc:`../tutorials/animation/2d_skeletons` + Methods ------- @@ -36,11 +36,6 @@ Signals - **bone_setup_changed** **(** **)** -Tutorials ---------- - -- :doc:`../tutorials/animation/2d_skeletons` - Method Descriptions ------------------- diff --git a/classes/class_skeletonik.rst b/classes/class_skeletonik.rst index 21416bda9..f10e40998 100644 --- a/classes/class_skeletonik.rst +++ b/classes/class_skeletonik.rst @@ -11,11 +11,6 @@ SkeletonIK **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_skin.rst b/classes/class_skin.rst index ebdff1c89..1bf489b4b 100644 --- a/classes/class_skin.rst +++ b/classes/class_skin.rst @@ -11,11 +11,6 @@ Skin **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_skinreference.rst b/classes/class_skinreference.rst index 4b928249a..60550d1ac 100644 --- a/classes/class_skinreference.rst +++ b/classes/class_skinreference.rst @@ -11,11 +11,6 @@ SkinReference **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Methods diff --git a/classes/class_sky.rst b/classes/class_sky.rst index aa6f12613..19bee058b 100644 --- a/classes/class_sky.rst +++ b/classes/class_sky.rst @@ -13,10 +13,10 @@ Sky **Inherited By:** :ref:`PanoramaSky`, :ref:`ProceduralSky` -**Category:** Core +The base class for :ref:`PanoramaSky` and :ref:`ProceduralSky`. -Brief Description ------------------ +Description +----------- The base class for :ref:`PanoramaSky` and :ref:`ProceduralSky`. @@ -66,11 +66,6 @@ enum **RadianceSize**: - **RADIANCE_SIZE_MAX** = **7** --- Represents the size of the :ref:`RadianceSize` enum. -Description ------------ - -The base class for :ref:`PanoramaSky` and :ref:`ProceduralSky`. - Property Descriptions --------------------- diff --git a/classes/class_slider.rst b/classes/class_slider.rst index 2a20a5681..649fb2580 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -13,10 +13,10 @@ Slider **Inherited By:** :ref:`HSlider`, :ref:`VSlider` -**Category:** Core +Base class for GUI sliders. -Brief Description ------------------ +Description +----------- Base class for GUI sliders. @@ -37,11 +37,6 @@ Properties | :ref:`bool` | :ref:`ticks_on_borders` | false | +------------------------------------------+-----------------------------------------------------------------+----------+ -Description ------------ - -Base class for GUI sliders. - Property Descriptions --------------------- diff --git a/classes/class_sliderjoint.rst b/classes/class_sliderjoint.rst index b8b47655f..4b38e9f73 100644 --- a/classes/class_sliderjoint.rst +++ b/classes/class_sliderjoint.rst @@ -11,13 +11,13 @@ SliderJoint **Inherits:** :ref:`Joint` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Piston kind of slider between two bodies in 3D. +Description +----------- + +Slides across the X axis of the pivot object. + Properties ---------- @@ -175,11 +175,6 @@ enum **Param**: - **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param` enum. -Description ------------ - -Slides across the X axis of the pivot object. - Property Descriptions --------------------- diff --git a/classes/class_softbody.rst b/classes/class_softbody.rst index d1c0f0b12..d2e90ce51 100644 --- a/classes/class_softbody.rst +++ b/classes/class_softbody.rst @@ -11,13 +11,18 @@ SoftBody **Inherits:** :ref:`MeshInstance` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A soft mesh physics body. +Description +----------- + +A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. + +Tutorials +--------- + +- :doc:`../tutorials/physics/soft_body` + Properties ---------- @@ -68,16 +73,6 @@ Methods | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. - -Tutorials ---------- - -- :doc:`../tutorials/physics/soft_body` - Property Descriptions --------------------- diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index b4f5e77d6..56f9c431f 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -13,13 +13,20 @@ Spatial **Inherited By:** :ref:`ARVRAnchor`, :ref:`ARVRController`, :ref:`ARVROrigin`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment`, :ref:`Camera`, :ref:`CollisionObject`, :ref:`CollisionPolygon`, :ref:`CollisionShape`, :ref:`GridMap`, :ref:`Joint`, :ref:`Listener`, :ref:`Navigation`, :ref:`NavigationMeshInstance`, :ref:`Path`, :ref:`PathFollow`, :ref:`Position3D`, :ref:`ProximityGroup`, :ref:`RayCast`, :ref:`RemoteTransform`, :ref:`Skeleton`, :ref:`SpringArm`, :ref:`VehicleWheel`, :ref:`VisibilityNotifier`, :ref:`VisualInstance` -**Category:** Core - -Brief Description ------------------ - Most basic 3D game object, parent of all 3D-related nodes. +Description +----------- + +Most basic 3D game object, with a 3D :ref:`Transform` and visibility settings. All other 3D game objects inherit from Spatial. Use ``Spatial`` as a parent node to move, scale, rotate and show/hide children in a 3D project. + +Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Spatial`` object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the ``Spatial``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Spatial`` object itself is referred to as object-local coordinate system. + +Tutorials +--------- + +- :doc:`../tutorials/3d/introduction_to_3d` + Properties ---------- @@ -142,18 +149,6 @@ In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED` and visibility settings. All other 3D game objects inherit from Spatial. Use ``Spatial`` as a parent node to move, scale, rotate and show/hide children in a 3D project. - -Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Spatial`` object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the ``Spatial``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Spatial`` object itself is referred to as object-local coordinate system. - -Tutorials ---------- - -- :doc:`../tutorials/3d/introduction_to_3d` - Property Descriptions --------------------- diff --git a/classes/class_spatialgizmo.rst b/classes/class_spatialgizmo.rst index 3e8de8de8..6f00ac6cb 100644 --- a/classes/class_spatialgizmo.rst +++ b/classes/class_spatialgizmo.rst @@ -13,10 +13,5 @@ SpatialGizmo **Inherited By:** :ref:`EditorSpatialGizmo` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_spatialmaterial.rst b/classes/class_spatialmaterial.rst index ff60ad814..31091309e 100644 --- a/classes/class_spatialmaterial.rst +++ b/classes/class_spatialmaterial.rst @@ -11,13 +11,18 @@ SpatialMaterial **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Default 3D rendering material. +Description +----------- + +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. + +Tutorials +--------- + +- :doc:`../tutorials/3d/spatial_material` + Properties ---------- @@ -673,16 +678,6 @@ enum **DistanceFadeMode**: - **DISTANCE_FADE_OBJECT_DITHER** = **3** -Description ------------ - -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. - -Tutorials ---------- - -- :doc:`../tutorials/3d/spatial_material` - Property Descriptions --------------------- diff --git a/classes/class_spatialvelocitytracker.rst b/classes/class_spatialvelocitytracker.rst index 5880e1f93..28ab1b2f6 100644 --- a/classes/class_spatialvelocitytracker.rst +++ b/classes/class_spatialvelocitytracker.rst @@ -11,11 +11,6 @@ SpatialVelocityTracker **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_spheremesh.rst b/classes/class_spheremesh.rst index 37d72989e..1d712d497 100644 --- a/classes/class_spheremesh.rst +++ b/classes/class_spheremesh.rst @@ -11,10 +11,10 @@ SphereMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core +Class representing a spherical :ref:`PrimitiveMesh`. -Brief Description ------------------ +Description +----------- Class representing a spherical :ref:`PrimitiveMesh`. @@ -33,11 +33,6 @@ Properties | :ref:`int` | :ref:`rings` | 32 | +---------------------------+-------------------------------------------------------------------+-------+ -Description ------------ - -Class representing a spherical :ref:`PrimitiveMesh`. - Property Descriptions --------------------- @@ -69,7 +64,7 @@ Full height of the sphere. | *Getter* | get_is_hemisphere() | +-----------+--------------------------+ -Determines whether a full sphere or a hemisphere is created. +If ``true``, a hemisphere is created rather than a full sphere. **Note:** To get a regular hemisphere, the height and radius of the sphere must be equal. diff --git a/classes/class_sphereshape.rst b/classes/class_sphereshape.rst index c199ca375..ea25cc548 100644 --- a/classes/class_sphereshape.rst +++ b/classes/class_sphereshape.rst @@ -11,13 +11,13 @@ SphereShape **Inherits:** :ref:`Shape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Sphere shape for 3D collisions. +Description +----------- + +Sphere shape for 3D collisions, which can be set into a :ref:`PhysicsBody` or :ref:`Area`. This shape is useful for modeling sphere-like 3D objects. + Properties ---------- @@ -25,11 +25,6 @@ Properties | :ref:`float` | :ref:`radius` | 1.0 | +---------------------------+--------------------------------------------------+-----+ -Description ------------ - -Sphere shape for 3D collisions, which can be set into a :ref:`PhysicsBody` or :ref:`Area`. This shape is useful for modeling sphere-like 3D objects. - Property Descriptions --------------------- diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 8998a0b2a..9621c75b1 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -11,40 +11,8 @@ SpinBox **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Numerical input text field. -Properties ----------- - -+-----------------------------------+--------------------------------------------------+------+ -| :ref:`Align` | :ref:`align` | 0 | -+-----------------------------------+--------------------------------------------------+------+ -| :ref:`bool` | :ref:`editable` | true | -+-----------------------------------+--------------------------------------------------+------+ -| :ref:`String` | :ref:`prefix` | "" | -+-----------------------------------+--------------------------------------------------+------+ -| :ref:`String` | :ref:`suffix` | "" | -+-----------------------------------+--------------------------------------------------+------+ - -Methods -------- - -+---------------------------------+----------------------------------------------------------------------+ -| :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | -+---------------------------------+----------------------------------------------------------------------+ - -Theme Properties ----------------- - -+-------------------------------+--------+ -| :ref:`Texture` | updown | -+-------------------------------+--------+ - Description ----------- @@ -64,6 +32,35 @@ The above code will create a ``SpinBox``, disable context menu on it and set the See :ref:`Range` class for more options over the ``SpinBox``. +Properties +---------- + ++-----------------------------------+--------------------------------------------------+------+ +| :ref:`Align` | :ref:`align` | 0 | ++-----------------------------------+--------------------------------------------------+------+ +| :ref:`bool` | :ref:`editable` | true | ++-----------------------------------+--------------------------------------------------+------+ +| :ref:`String` | :ref:`prefix` | "" | ++-----------------------------------+--------------------------------------------------+------+ +| :ref:`String` | :ref:`suffix` | "" | ++-----------------------------------+--------------------------------------------------+------+ + +Methods +------- + ++---------------------------------+----------------------------------------------------------------------+ +| void | :ref:`apply` **(** **)** | ++---------------------------------+----------------------------------------------------------------------+ +| :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | ++---------------------------------+----------------------------------------------------------------------+ + +Theme Properties +---------------- + ++-------------------------------+--------+ +| :ref:`Texture` | updown | ++-------------------------------+--------+ + Property Descriptions --------------------- @@ -132,6 +129,14 @@ Adds the specified ``prefix`` string after the numerical value of the ``SpinBox` Method Descriptions ------------------- +.. _class_SpinBox_method_apply: + +- void **apply** **(** **)** + +Applies the current value of this ``SpinBox``. + +---- + .. _class_SpinBox_method_get_line_edit: - :ref:`LineEdit` **get_line_edit** **(** **)** diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index 5c4febb9b..857a13861 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -13,13 +13,13 @@ SplitContainer **Inherited By:** :ref:`HSplitContainer`, :ref:`VSplitContainer` -**Category:** Core - -Brief Description ------------------ - Container for splitting and adjusting. +Description +----------- + +Container for splitting two :ref:`Control`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. + Properties ---------- @@ -60,16 +60,11 @@ Enumerations enum **DraggerVisibility**: -- **DRAGGER_VISIBLE** = **0** --- The split dragger is visible. +- **DRAGGER_VISIBLE** = **0** --- The split dragger is visible when the cursor hovers it. -- **DRAGGER_HIDDEN** = **1** --- The split dragger is invisible. +- **DRAGGER_HIDDEN** = **1** --- The split dragger is never visible. -- **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is invisible and collapsed. - -Description ------------ - -Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. +- **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is never visible and its space collapsed. Property Descriptions --------------------- @@ -86,6 +81,8 @@ Property Descriptions | *Getter* | is_collapsed() | +-----------+----------------------+ +If ``true``, the area of the first :ref:`Control` will be collapsed and the dragger will be disabled. + ---- .. _class_SplitContainer_property_dragger_visibility: @@ -100,7 +97,7 @@ Property Descriptions | *Getter* | get_dragger_visibility() | +-----------+-------------------------------+ -Determines whether the dragger is visible. +Determines the dragger's visibility. See :ref:`DraggerVisibility` for details. ---- @@ -116,6 +113,8 @@ Determines whether the dragger is visible. | *Getter* | get_split_offset() | +-----------+-------------------------+ +The initial offset of the splitting between the two :ref:`Control`\ s, with ``0`` being at the end of the first :ref:`Control`. + Method Descriptions ------------------- @@ -123,3 +122,5 @@ Method Descriptions - void **clamp_split_offset** **(** **)** +Clamps the :ref:`split_offset` value to not go outside the currently possible minimal and maximum values. + diff --git a/classes/class_spotlight.rst b/classes/class_spotlight.rst index e08974dae..8127bf9be 100644 --- a/classes/class_spotlight.rst +++ b/classes/class_spotlight.rst @@ -11,13 +11,18 @@ SpotLight **Inherits:** :ref:`Light` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A spotlight, such as a reflector spotlight or a lantern. +Description +----------- + +A Spotlight is a type of :ref:`Light` 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 :ref:`Light`. + +Tutorials +--------- + +- :doc:`../tutorials/3d/lights_and_shadows` + Properties ---------- @@ -31,16 +36,6 @@ Properties | :ref:`float` | :ref:`spot_range` | 5.0 | +---------------------------+--------------------------------------------------------------------------------+------+ -Description ------------ - -A Spotlight is a type of :ref:`Light` 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 :ref:`Light`. - -Tutorials ---------- - -- :doc:`../tutorials/3d/lights_and_shadows` - Property Descriptions --------------------- diff --git a/classes/class_springarm.rst b/classes/class_springarm.rst index c2e03a4a1..5bf34e954 100644 --- a/classes/class_springarm.rst +++ b/classes/class_springarm.rst @@ -11,13 +11,19 @@ SpringArm **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A helper node, mostly used in 3rd person cameras. +Description +----------- + +The SpringArm node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin. + +The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment. + +The SpringArm will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis. + +If you use the SpringArm as a camera controller for your player, you might need to exclude the player's collider from the SpringArm's collision check. + Properties ---------- @@ -44,17 +50,6 @@ Methods | :ref:`bool` | :ref:`remove_excluded_object` **(** :ref:`RID` RID **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -The SpringArm node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin. - -The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment. - -The SpringArm will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis. - -If you use the SpringArm as a camera controller for your player, you might need to exclude the player's collider from the SpringArm's collision check. - Property Descriptions --------------------- diff --git a/classes/class_sprite.rst b/classes/class_sprite.rst index d78c75811..c6b958acd 100644 --- a/classes/class_sprite.rst +++ b/classes/class_sprite.rst @@ -11,13 +11,13 @@ Sprite **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - General-purpose sprite node. +Description +----------- + +A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. + Properties ---------- @@ -75,11 +75,6 @@ Emitted when the :ref:`frame` changes. Emitted when the :ref:`texture` changes. -Description ------------ - -A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. - Property Descriptions --------------------- diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index f2311d501..65e5d2789 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -11,13 +11,13 @@ Sprite3D **Inherits:** :ref:`SpriteBase3D` **<** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - 2D sprite node in a 3D world. +Description +----------- + +A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. + Properties ---------- @@ -46,11 +46,6 @@ Signals Emitted when the :ref:`frame` changes. -Description ------------ - -A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. - Property Descriptions --------------------- diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index 655004c92..1aee4ae19 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -13,13 +13,13 @@ SpriteBase3D **Inherited By:** :ref:`AnimatedSprite3D`, :ref:`Sprite3D` -**Category:** Core - -Brief Description ------------------ - 2D sprite node in 3D environment. +Description +----------- + +A node that displays 2D texture information in a 3D environment. + Properties ---------- @@ -105,11 +105,6 @@ enum **AlphaCutMode**: - **ALPHA_CUT_OPAQUE_PREPASS** = **2** -Description ------------ - -A node that displays 2D texture information in a 3D environment. - Property Descriptions --------------------- diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index 88e4f3dc7..91ff646a2 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -11,13 +11,13 @@ SpriteFrames **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Sprite frame library for AnimatedSprite. +Description +----------- + +Sprite frame library for :ref:`AnimatedSprite`. Contains frames and animation data for playback. + Properties ---------- @@ -62,11 +62,6 @@ Methods | void | :ref:`set_frame` **(** :ref:`String` anim, :ref:`int` idx, :ref:`Texture` txt **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Sprite frame library for :ref:`AnimatedSprite`. Contains frames and animation data for playback. - Property Descriptions --------------------- @@ -74,6 +69,8 @@ Property Descriptions - :ref:`Array` **frames** +Compatibility property, always equals to an empty array. + Method Descriptions ------------------- diff --git a/classes/class_staticbody.rst b/classes/class_staticbody.rst index 62fc2755f..4cd7e8c3d 100644 --- a/classes/class_staticbody.rst +++ b/classes/class_staticbody.rst @@ -11,13 +11,17 @@ StaticBody **Inherits:** :ref:`PhysicsBody` **<** :ref:`CollisionObject` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Static body for 3D physics. +Description +----------- + +Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to :ref:`RigidBody`, they don't consume any CPU resources as long as they don't move. + +A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active, the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. + +Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + Properties ---------- @@ -33,15 +37,6 @@ Properties | :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | +-----------------------------------------------+---------------------------------------------------------------------------------------+--------------------+ -Description ------------ - -Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to :ref:`RigidBody`, they don't consume any CPU resources as long as they don't move. - -A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active, the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. - -Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - Property Descriptions --------------------- diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index cff5b00f7..d74db3927 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -11,13 +11,15 @@ StaticBody2D **Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Static body for 2D physics. +Description +----------- + +Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. + +Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). + Properties ---------- @@ -33,13 +35,6 @@ Properties | :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | +-----------------------------------------------+-----------------------------------------------------------------------------------------+-----------------+ -Description ------------ - -Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. - -Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). - Property Descriptions --------------------- diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 62ee757f8..dacb618c1 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -13,13 +13,13 @@ StreamPeer **Inherited By:** :ref:`StreamPeerBuffer`, :ref:`StreamPeerGDNative`, :ref:`StreamPeerSSL`, :ref:`StreamPeerTCP` -**Category:** Core - -Brief Description ------------------ - Abstraction and base class for stream-based protocols. +Description +----------- + +StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings. + Properties ---------- @@ -94,11 +94,6 @@ Methods | void | :ref:`put_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings. - Property Descriptions --------------------- diff --git a/classes/class_streampeerbuffer.rst b/classes/class_streampeerbuffer.rst index 38b0c655f..ec868620e 100644 --- a/classes/class_streampeerbuffer.rst +++ b/classes/class_streampeerbuffer.rst @@ -11,11 +11,6 @@ StreamPeerBuffer **Inherits:** :ref:`StreamPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_streampeergdnative.rst b/classes/class_streampeergdnative.rst index 6862629cc..4211aae09 100644 --- a/classes/class_streampeergdnative.rst +++ b/classes/class_streampeergdnative.rst @@ -11,10 +11,5 @@ StreamPeerGDNative **Inherits:** :ref:`StreamPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index 1b3f96112..39c990dfa 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -11,13 +11,18 @@ StreamPeerSSL **Inherits:** :ref:`StreamPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - SSL stream peer. +Description +----------- + +SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection. + +Tutorials +--------- + +- :doc:`../tutorials/networking/ssl_certificates` + Properties ---------- @@ -67,16 +72,6 @@ enum **Status**: - **STATUS_ERROR_HOSTNAME_MISMATCH** = **4** --- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. -Description ------------ - -SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection. - -Tutorials ---------- - -- :doc:`../tutorials/networking/ssl_certificates` - Property Descriptions --------------------- @@ -109,6 +104,8 @@ Accepts a peer connection as a server using the given ``private_key`` and provid Connects to a peer using an underlying :ref:`StreamPeer` ``stream``. If ``validate_certs`` is ``true``, ``StreamPeerSSL`` will validate that the certificate presented by the peer matches the ``for_hostname``. +**Note:** Specifying a custom ``valid_certificate`` is not supported in HTML5 exports due to browsers restrictions. + ---- .. _class_StreamPeerSSL_method_disconnect_from_stream: diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index 07124093a..8f7884f37 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -11,13 +11,13 @@ StreamPeerTCP **Inherits:** :ref:`StreamPeer` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - TCP stream peer. +Description +----------- + +TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. + Methods ------- @@ -60,11 +60,6 @@ enum **Status**: - **STATUS_ERROR** = **3** --- A status representing a ``StreamPeerTCP`` in error state. -Description ------------ - -TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. - Method Descriptions ------------------- diff --git a/classes/class_streamtexture.rst b/classes/class_streamtexture.rst index 9173c5427..a5f01858d 100644 --- a/classes/class_streamtexture.rst +++ b/classes/class_streamtexture.rst @@ -11,13 +11,13 @@ StreamTexture **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A ``.stex`` texture. +Description +----------- + +A texture that is loaded from a ``.stex`` file. + Properties ---------- @@ -34,11 +34,6 @@ Methods | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | +---------------------------------------+-------------------------------------------------------------------------------------------+ -Description ------------ - -A texture that is loaded from a ``.stex`` file. - Property Descriptions --------------------- diff --git a/classes/class_string.rst b/classes/class_string.rst index 53189a538..08b57a47e 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -9,13 +9,18 @@ String ====== -**Category:** Built-In Types - -Brief Description ------------------ - Built-in string class. +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. + +Tutorials +--------- + +- :doc:`../getting_started/scripting/gdscript/gdscript_format_string` + Methods ------- @@ -229,16 +234,6 @@ Methods | :ref:`String` | :ref:`xml_unescape` **(** **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -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. - -Tutorials ---------- - -- :doc:`../getting_started/scripting/gdscript/gdscript_format_string` - Method Descriptions ------------------- diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 3e05845d9..1cb04e6fd 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -13,13 +13,13 @@ StyleBox **Inherited By:** :ref:`StyleBoxEmpty`, :ref:`StyleBoxFlat`, :ref:`StyleBoxLine`, :ref:`StyleBoxTexture` -**Category:** Core - -Brief Description ------------------ - Base class for drawing stylized boxes for the UI. +Description +----------- + +StyleBox is :ref:`Resource` that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. + Properties ---------- @@ -56,11 +56,6 @@ Methods | :ref:`bool` | :ref:`test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** const | +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -StyleBox is :ref:`Resource` that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. - Property Descriptions --------------------- @@ -145,31 +140,41 @@ Method Descriptions - void **draw** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** const +Draws this stylebox using a :ref:`CanvasItem` with given :ref:`RID`. + +You can get a :ref:`RID` value using :ref:`Object.get_instance_id` on a :ref:`CanvasItem`-derived node. + ---- .. _class_StyleBox_method_get_center_size: - :ref:`Vector2` **get_center_size** **(** **)** const +Returns the size of this ``StyleBox`` without the margins. + ---- .. _class_StyleBox_method_get_current_item_drawn: - :ref:`CanvasItem` **get_current_item_drawn** **(** **)** const +Returns the :ref:`CanvasItem` that handles its :ref:`CanvasItem.NOTIFICATION_DRAW` or :ref:`CanvasItem._draw` callback at this moment. + ---- .. _class_StyleBox_method_get_default_margin: - :ref:`float` **get_default_margin** **(** :ref:`Margin` margin **)** const +Returns the default value of the specified :ref:`Margin`. + ---- .. _class_StyleBox_method_get_margin: - :ref:`float` **get_margin** **(** :ref:`Margin` margin **)** const -Returns the content margin offset for the specified margin. +Returns the content margin offset for the specified :ref:`Margin`. Positive values reduce size inwards, unlike :ref:`Control`'s margin values. @@ -195,6 +200,8 @@ Returns the "offset" of a stylebox. This helper function returns a value equival - void **set_default_margin** **(** :ref:`Margin` margin, :ref:`float` offset **)** +Sets the default value of the specified :ref:`Margin` to given ``offset`` in pixels. + ---- .. _class_StyleBox_method_test_mask: diff --git a/classes/class_styleboxempty.rst b/classes/class_styleboxempty.rst index cd0c9808e..4865372a2 100644 --- a/classes/class_styleboxempty.rst +++ b/classes/class_styleboxempty.rst @@ -11,11 +11,6 @@ StyleBoxEmpty **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Empty stylebox (does not display anything). Description diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index d5bfb52c0..dcb6d4b9d 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -11,13 +11,36 @@ StyleBoxFlat **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Customizable :ref:`StyleBox` with a given set of parameters (no texture required). +Description +----------- + +This :ref:`StyleBox` can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + +- Color + +- Border width (individual width for each border) + +- Rounded corners (individual radius for each corner) + +- Shadow (with blur and offset) + +Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: + +:: + + height = 30 + corner_radius_top_left = 50 + corner_radius_bottom_left = 100 + +The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will **never** be more than the height. Result: + +:: + + corner_radius_top_left: 10 + corner_radius_bottom_left: 20 + Properties ---------- @@ -96,34 +119,6 @@ Methods | void | :ref:`set_expand_margin_individual` **(** :ref:`float` size_left, :ref:`float` size_top, :ref:`float` size_right, :ref:`float` size_bottom **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -This :ref:`StyleBox` can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: - -- Color - -- Border width (individual width for each border) - -- Rounded corners (individual radius for each corner) - -- Shadow (with blur and offset) - -Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: - -:: - - height = 30 - corner_radius_top_left = 50 - corner_radius_bottom_left = 100 - -The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will **never** be more than the height. Result: - -:: - - corner_radius_top_left: 10 - corner_radius_bottom_left: 20 - Property Descriptions --------------------- diff --git a/classes/class_styleboxline.rst b/classes/class_styleboxline.rst index 5e02c3c93..e9e2f6800 100644 --- a/classes/class_styleboxline.rst +++ b/classes/class_styleboxline.rst @@ -11,13 +11,13 @@ StyleBoxLine **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - :ref:`StyleBox` that displays a single line. +Description +----------- + +:ref:`StyleBox` that displays a single line of a given color and thickness. It can be used to draw things like separators. + Properties ---------- @@ -33,11 +33,6 @@ Properties | :ref:`bool` | :ref:`vertical` | false | +---------------------------+-----------------------------------------------------------+---------------------+ -Description ------------ - -:ref:`StyleBox` that displays a single line of a given color and thickness. It can be used to draw things like separators. - Property Descriptions --------------------- diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index 7f262782d..fdf42d8df 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -11,13 +11,13 @@ StyleBoxTexture **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Texture-based nine-patch :ref:`StyleBox`. +Description +----------- + +Texture-based nine-patch :ref:`StyleBox`, in a way similar to :ref:`NinePatchRect`. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. + Properties ---------- @@ -98,11 +98,6 @@ enum **AxisStretchMode**: - **AXIS_STRETCH_MODE_TILE_FIT** = **2** --- Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike :ref:`AXIS_STRETCH_MODE_TILE`, the texture may be slightly stretched to make the nine-patch texture tile seamlessly. -Description ------------ - -Texture-based nine-patch :ref:`StyleBox`, in a way similar to :ref:`NinePatchRect`. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. - Property Descriptions --------------------- diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 99fbc2949..4279d19e2 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -11,13 +11,27 @@ SurfaceTool **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Helper tool to create geometry. +Description +----------- + +The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex`. For example, to add vertex colors and UVs: + +:: + + var st = SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + st.add_color(Color(1, 0, 0)) + st.add_uv(Vector2(0, 0)) + st.add_vertex(Vector3(0, 0, 0)) + +The above ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`add_uv` or :ref:`add_color`, then the last values would be used. + +Vertex attributes must be passed **before** calling :ref:`add_vertex`. Failure to do so will result in an error when committing the vertex information to a mesh. + +Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. + Methods ------- @@ -69,25 +83,6 @@ Methods | void | :ref:`set_material` **(** :ref:`Material` material **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex`. For example, to add vertex colors and UVs: - -:: - - var st = SurfaceTool.new() - st.begin(Mesh.PRIMITIVE_TRIANGLES) - st.add_color(Color(1, 0, 0)) - st.add_uv(Vector2(0, 0)) - st.add_vertex(Vector3(0, 0, 0)) - -The above ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`add_uv` or :ref:`add_color`, then the last values would be used. - -Vertex attributes must be passed **before** calling :ref:`add_vertex`. Failure to do so will result in an error when committing the vertex information to a mesh. - -Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. - Method Descriptions ------------------- diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 5e26d1a89..a2ff8c307 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -11,13 +11,19 @@ TabContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Tabbed container. +Description +----------- + +Sets the active tab's ``visible`` property to the value ``true``. Sets all other children's to ``false``. + +Ignores non-:ref:`Control` children. + +Individual tabs are always visible unless you use :ref:`set_tab_disabled` and :ref:`set_tab_title` to hide it. + +To hide only a tab's content, nest the content inside a child :ref:`Control`, so it receives the ``TabContainer``'s visibility setting instead. + Properties ---------- @@ -153,17 +159,6 @@ enum **TabAlign**: - **ALIGN_RIGHT** = **2** --- Align the tabs to the right. -Description ------------ - -Sets the active tab's ``visible`` property to the value ``true``. Sets all other children's to ``false``. - -Ignores non-:ref:`Control` children. - -Individual tabs are always visible unless you use :ref:`set_tab_disabled` and :ref:`set_tab_title` to hide it. - -To hide only a tab's content, nest the content inside a child :ref:`Control`, so it receives the ``TabContainer``'s visibility setting instead. - Property Descriptions --------------------- @@ -243,6 +238,8 @@ If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden | *Getter* | get_use_hidden_tabs_for_min_size() | +-----------+-----------------------------------------+ +If ``true``, children :ref:`Control` nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one. + Method Descriptions ------------------- diff --git a/classes/class_tabs.rst b/classes/class_tabs.rst index 5db081251..590871cc4 100644 --- a/classes/class_tabs.rst +++ b/classes/class_tabs.rst @@ -11,13 +11,13 @@ Tabs **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Tabs control. +Description +----------- + +Simple tabs control, similar to :ref:`TabContainer` but is only in charge of drawing tabs, not interact with children. + Properties ---------- @@ -124,36 +124,48 @@ Signals - **reposition_active_tab_request** **(** :ref:`int` idx_to **)** +Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled`. + ---- .. _class_Tabs_signal_right_button_pressed: - **right_button_pressed** **(** :ref:`int` tab **)** +Emitted when a tab is right-clicked. + ---- .. _class_Tabs_signal_tab_changed: - **tab_changed** **(** :ref:`int` tab **)** +Emitted when switching to another tab. + ---- .. _class_Tabs_signal_tab_clicked: - **tab_clicked** **(** :ref:`int` tab **)** +Emitted when a tab is clicked, even if it is the current tab. + ---- .. _class_Tabs_signal_tab_close: - **tab_close** **(** :ref:`int` tab **)** +Emitted when a tab is closed. + ---- .. _class_Tabs_signal_tab_hover: - **tab_hover** **(** :ref:`int` tab **)** +Emitted when a tab is hovered by the mouse. + Enumerations ------------ @@ -191,19 +203,14 @@ enum **TabAlign**: enum **CloseButtonDisplayPolicy**: -- **CLOSE_BUTTON_SHOW_NEVER** = **0** +- **CLOSE_BUTTON_SHOW_NEVER** = **0** --- Never show the close buttons. -- **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1** +- **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1** --- Only show the close button on the currently active tab. -- **CLOSE_BUTTON_SHOW_ALWAYS** = **2** +- **CLOSE_BUTTON_SHOW_ALWAYS** = **2** --- Show the close button on all tabs. - **CLOSE_BUTTON_MAX** = **3** --- Represents the size of the :ref:`CloseButtonDisplayPolicy` enum. -Description ------------ - -Simple tabs control, similar to :ref:`TabContainer` but is only in charge of drawing tabs, not interact with children. - Property Descriptions --------------------- @@ -251,6 +258,8 @@ If ``true``, tabs can be rearranged with mouse drag. | *Getter* | get_scrolling_enabled() | +-----------+------------------------------+ +if ``true``, the mouse's scroll wheel cab be used to navigate the scroll view. + ---- .. _class_Tabs_property_tab_align: @@ -265,7 +274,7 @@ If ``true``, tabs can be rearranged with mouse drag. | *Getter* | get_tab_align() | +-----------+----------------------+ -The alignment of all tabs. See enum ``TabAlign`` constants for details. +The alignment of all tabs. See :ref:`TabAlign` for details. ---- @@ -281,6 +290,8 @@ The alignment of all tabs. See enum ``TabAlign`` constants for details. | *Getter* | get_tab_close_display_policy() | +-----------+-------------------------------------+ +Sets when the close button will appear on the tabs. See :ref:`CloseButtonDisplayPolicy` for details. + Method Descriptions ------------------- @@ -304,6 +315,8 @@ Moves the scroll view to make the tab visible. - :ref:`bool` **get_offset_buttons_visible** **(** **)** const +Returns ``true`` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible. + ---- .. _class_Tabs_method_get_select_with_rmb: @@ -342,6 +355,8 @@ Returns the :ref:`Texture` for the tab at index ``tab_idx`` or `` - :ref:`int` **get_tab_offset** **(** **)** const +Returns the number of hidden tabs offsetted to the left. + ---- .. _class_Tabs_method_get_tab_rect: diff --git a/classes/class_tcp_server.rst b/classes/class_tcp_server.rst index 06b876199..da510d0fc 100644 --- a/classes/class_tcp_server.rst +++ b/classes/class_tcp_server.rst @@ -11,13 +11,13 @@ TCP_Server **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A TCP server. +Description +----------- + +A TCP server. Listens to connections on a port and returns a :ref:`StreamPeerTCP` when it gets an incoming connection. + Methods ------- @@ -33,11 +33,6 @@ Methods | :ref:`StreamPeerTCP` | :ref:`take_connection` **(** **)** | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A TCP server. Listens to connections on a port and returns a :ref:`StreamPeerTCP` when it gets an incoming connection. - Method Descriptions ------------------- diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index a1ef9c806..7b72bd402 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -11,13 +11,13 @@ TextEdit **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Multiline text editing control. +Description +----------- + +TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. + Properties ---------- @@ -58,6 +58,10 @@ Properties +----------------------------------------------+-------------------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`readonly` | false | +----------------------------------------------+-------------------------------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`scroll_horizontal` | 0 | ++----------------------------------------------+-------------------------------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`scroll_vertical` | 0.0 | ++----------------------------------------------+-------------------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`selecting_enabled` | true | +----------------------------------------------+-------------------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`shortcut_keys_enabled` | true | @@ -365,11 +369,6 @@ enum **MenuItems**: - **MENU_MAX** = **7** --- Represents the size of the :ref:`MenuItems` enum. -Description ------------ - -TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. - Property Descriptions --------------------- @@ -627,6 +626,38 @@ If ``true``, read-only mode is enabled. Existing text cannot be modified and new ---- +.. _class_TextEdit_property_scroll_horizontal: + +- :ref:`int` **scroll_horizontal** + ++-----------+---------------------+ +| *Default* | 0 | ++-----------+---------------------+ +| *Setter* | set_h_scroll(value) | ++-----------+---------------------+ +| *Getter* | get_h_scroll() | ++-----------+---------------------+ + +The current horizontal scroll value. + +---- + +.. _class_TextEdit_property_scroll_vertical: + +- :ref:`float` **scroll_vertical** + ++-----------+---------------------+ +| *Default* | 0.0 | ++-----------+---------------------+ +| *Setter* | set_v_scroll(value) | ++-----------+---------------------+ +| *Getter* | get_v_scroll() | ++-----------+---------------------+ + +The current vertical scroll value. + +---- + .. _class_TextEdit_property_selecting_enabled: - :ref:`bool` **selecting_enabled** diff --git a/classes/class_textfile.rst b/classes/class_textfile.rst index 31423428f..311d8680c 100644 --- a/classes/class_textfile.rst +++ b/classes/class_textfile.rst @@ -11,10 +11,5 @@ TextFile **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_texture.rst b/classes/class_texture.rst index aa1bc7c28..6549973e4 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -13,13 +13,15 @@ Texture **Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CurveTexture`, :ref:`GradientTexture`, :ref:`ImageTexture`, :ref:`LargeTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`ProxyTexture`, :ref:`StreamTexture`, :ref:`ViewportTexture` -**Category:** Core - -Brief Description ------------------ - Texture for 2D and 3D. +Description +----------- + +A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D :ref:`Sprite` or GUI :ref:`Control`. + +Textures are often created by loading them from a file. See :ref:`@GDScript.load`. + Properties ---------- @@ -89,13 +91,6 @@ This results in better-looking textures when viewed from oblique angles. - **FLAG_VIDEO_SURFACE** = **2048** --- Texture is a video surface. -Description ------------ - -A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D :ref:`Sprite` or GUI :ref:`Control`. - -Textures are often created by loading them from a file. See :ref:`@GDScript.load`. - Property Descriptions --------------------- diff --git a/classes/class_texture3d.rst b/classes/class_texture3d.rst index b5685c528..968ff7193 100644 --- a/classes/class_texture3d.rst +++ b/classes/class_texture3d.rst @@ -11,11 +11,6 @@ Texture3D **Inherits:** :ref:`TextureLayered` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_texturearray.rst b/classes/class_texturearray.rst index 3b1051a41..e921730f8 100644 --- a/classes/class_texturearray.rst +++ b/classes/class_texturearray.rst @@ -11,10 +11,5 @@ TextureArray **Inherits:** :ref:`TextureLayered` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index 24f287c44..91770f2cc 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -11,13 +11,15 @@ TextureButton **Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Texture-based button. Supports Pressed, Hover, Disabled and Focused states. +Description +----------- + +``TextureButton`` has the same functionality as :ref:`Button`, except it uses sprites instead of Godot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex :ref:`Control`\ s. + +The "normal" state must contain a texture (:ref:`texture_normal`); other textures are optional. + Properties ---------- @@ -74,13 +76,6 @@ enum **StretchMode**: - **STRETCH_KEEP_ASPECT_COVERED** = **6** --- Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. -Description ------------ - -``TextureButton`` has the same functionality as :ref:`Button`, except it uses sprites instead of Godot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex :ref:`Control`\ s. - -The "normal" state must contain a texture (:ref:`texture_normal`); other textures are optional. - Property Descriptions --------------------- diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 7b3acae1d..8ef9d0f9c 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -13,11 +13,6 @@ TextureLayered **Inherited By:** :ref:`Texture3D`, :ref:`TextureArray` -**Category:** Core - -Brief Description ------------------ - Properties diff --git a/classes/class_textureprogress.rst b/classes/class_textureprogress.rst index 4f664c395..7fbb19378 100644 --- a/classes/class_textureprogress.rst +++ b/classes/class_textureprogress.rst @@ -11,13 +11,13 @@ TextureProgress **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Texture-based progress bar. Useful for loading screens and life or stamina bars. +Description +----------- + +TextureProgress works like :ref:`ProgressBar`, but uses up to 3 textures instead of Godot's :ref:`Theme` resource. It can be used to create horizontal, vertical and radial progress bars. + Properties ---------- @@ -93,7 +93,7 @@ enum **FillMode**: - **FILL_RIGHT_TO_LEFT** = **1** --- The :ref:`texture_progress` fills from right to left. -- **FILL_TOP_TO_BOTTOM** = **2** --- The :ref:`texture_progress` fills from top to bototm. +- **FILL_TOP_TO_BOTTOM** = **2** --- The :ref:`texture_progress` fills from top to bottom. - **FILL_BOTTOM_TO_TOP** = **3** --- The :ref:`texture_progress` fills from bottom to top. @@ -107,11 +107,6 @@ enum **FillMode**: - **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = **8** --- Turns the node into a radial bar. The :ref:`texture_progress` fills radially from the center, expanding both clockwise and counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. -Description ------------ - -TextureProgress works like :ref:`ProgressBar`, but uses up to 3 textures instead of Godot's :ref:`Theme` resource. It can be used to create horizontal, vertical and radial progress bars. - Property Descriptions --------------------- diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index c7facb1a8..4e3b7d4af 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -11,13 +11,13 @@ TextureRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Control for drawing textures. +Description +----------- + +Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the :ref:`stretch_mode` property. It can scale, tile, or stay centered inside its bounding rectangle. + Properties ---------- @@ -74,11 +74,6 @@ enum **StretchMode**: - **STRETCH_KEEP_ASPECT_COVERED** = **7** --- Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. -Description ------------ - -Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the :ref:`stretch_mode` property. It can scale, tile, or stay centered inside its bounding rectangle. - Property Descriptions --------------------- diff --git a/classes/class_theme.rst b/classes/class_theme.rst index 9d250ce2c..486837c87 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -11,13 +11,20 @@ Theme **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Theme for controls. +Description +----------- + +A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any :ref:`Control`; the Control and its children will automatically use it. + +Theme resources can alternatively be loaded by writing them in a ``.theme`` file, see the documentation for more information. + +Tutorials +--------- + +- :doc:`../tutorials/gui/gui_skinning` + Properties ---------- @@ -90,18 +97,6 @@ Methods | void | :ref:`set_stylebox` **(** :ref:`String` name, :ref:`String` type, :ref:`StyleBox` texture **)** | +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any :ref:`Control`; the Control and its children will automatically use it. - -Theme resources can alternatively be loaded by writing them in a ``.theme`` file, see the documentation for more information. - -Tutorials ---------- - -- :doc:`../tutorials/gui/gui_skinning` - Property Descriptions --------------------- diff --git a/classes/class_thread.rst b/classes/class_thread.rst index eb818c23b..a694689a0 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -11,13 +11,18 @@ Thread **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A unit of execution in a process. +Description +----------- + +A unit of execution in a process. Can run methods on :ref:`Object`\ s simultaneously. The use of synchronization via :ref:`Mutex` or :ref:`Semaphore` is advised if working with shared objects. + +Tutorials +--------- + +- :doc:`../tutorials/threads/using_multiple_threads` + Methods ------- @@ -44,21 +49,11 @@ Enumerations enum **Priority**: -- **PRIORITY_LOW** = **0** +- **PRIORITY_LOW** = **0** --- A thread running with lower priority than normally. -- **PRIORITY_NORMAL** = **1** +- **PRIORITY_NORMAL** = **1** --- A thread with a standard priority. -- **PRIORITY_HIGH** = **2** - -Description ------------ - -A unit of execution in a process. Can run methods on :ref:`Object`\ s simultaneously. The use of synchronization via :ref:`Mutex` or :ref:`Semaphore` is advised if working with shared objects. - -Tutorials ---------- - -- :doc:`../tutorials/threads/using_multiple_threads` +- **PRIORITY_HIGH** = **2** --- A thread running with higher priority than normally. Method Descriptions ------------------- diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index d274babd2..3e37be2c3 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -11,13 +11,18 @@ TileMap **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Node for 2D tile-based maps. +Description +----------- + +Node for 2D tile-based maps. Tilemaps use a :ref:`TileSet` which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. + +Tutorials +--------- + +- :doc:`../tutorials/2d/using_tilemaps` + Properties ---------- @@ -187,16 +192,6 @@ Constants - **INVALID_CELL** = **-1** --- Returned when a cell doesn't exist. -Description ------------ - -Node for 2D tile-based maps. Tilemaps use a :ref:`TileSet` which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. - -Tutorials ---------- - -- :doc:`../tutorials/2d/using_tilemaps` - Property Descriptions --------------------- diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index ecc80099f..e0a935806 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -11,13 +11,15 @@ TileSet **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Tile library for tilemaps. +Description +----------- + +A TileSet is a library of tiles for a :ref:`TileMap`. It contains a list of tiles, each consisting of a sprite and optional collision shapes. + +Tiles are referenced by a unique integer ID. + Methods ------- @@ -234,13 +236,6 @@ enum **TileMode**: - **ATLAS_TILE** = **2** -Description ------------ - -A TileSet is a library of tiles for a :ref:`TileMap`. It contains a list of tiles, each consisting of a sprite and optional collision shapes. - -Tiles are referenced by a unique integer ID. - Method Descriptions ------------------- diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 5d7dc78dd..f3ad1b2c9 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -11,13 +11,13 @@ Timer **Inherits:** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - A countdown timer. +Description +----------- + +Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. + Properties ---------- @@ -70,11 +70,6 @@ enum **TimerProcessMode**: - **TIMER_PROCESS_IDLE** = **1** --- Update the timer during the idle time at each frame. -Description ------------ - -Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. - Property Descriptions --------------------- @@ -150,7 +145,7 @@ Processing mode. See :ref:`TimerProcessMode`. The timer's remaining time in seconds. Returns 0 if the timer is inactive. -**Note:** You cannot set this value. To change the timer's remaining time, use :ref:`wait_time`. +**Note:** You cannot set this value. To change the timer's remaining time, use :ref:`start`. ---- diff --git a/classes/class_toolbutton.rst b/classes/class_toolbutton.rst index bb1ce1f1c..53f2ba164 100644 --- a/classes/class_toolbutton.rst +++ b/classes/class_toolbutton.rst @@ -11,13 +11,18 @@ ToolButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Flat button helper class. +Description +----------- + +This is a helper class to generate a flat :ref:`Button` (see :ref:`Button.flat`), creating a ``ToolButton`` is equivalent to: + +:: + + var btn = Button.new() + btn.flat = true + Properties ---------- @@ -52,13 +57,3 @@ Theme Properties | :ref:`StyleBox` | pressed | | +---------------------------------+---------------------+------------------------------+ -Description ------------ - -This is a helper class to generate a flat :ref:`Button` (see :ref:`Button.flat`), creating a ``ToolButton`` is equivalent to: - -:: - - var btn = Button.new() - btn.flat = true - diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index 80cd26932..944b7b793 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -11,13 +11,13 @@ TouchScreenButton **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Button for touch screen devices. +Description +----------- + +Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices. + Properties ---------- @@ -80,11 +80,6 @@ enum **VisibilityMode**: - **VISIBILITY_TOUCHSCREEN_ONLY** = **1** --- Visible on touch screens only. -Description ------------ - -Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices. - Property Descriptions --------------------- diff --git a/classes/class_transform.rst b/classes/class_transform.rst index 1226bf30c..3750df439 100644 --- a/classes/class_transform.rst +++ b/classes/class_transform.rst @@ -9,13 +9,20 @@ Transform ========= -**Category:** Built-In Types - -Brief Description ------------------ - 3D transformation (3×4 matrix). +Description +----------- + +Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a :ref:`basis` and an :ref:`origin`. It is similar to a 3×4 matrix. + +Tutorials +--------- + +- :doc:`../tutorials/math/index` + +- :doc:`../tutorials/3d/using_transforms` + Properties ---------- @@ -81,18 +88,6 @@ Constants - **FLIP_Z** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )** --- ``Transform`` with mirroring applied perpendicular to the XY plane. -Description ------------ - -Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a :ref:`basis` and an :ref:`origin`. It is similar to a 3×4 matrix. - -Tutorials ---------- - -- :doc:`../tutorials/math/index` - -- :doc:`../tutorials/3d/using_transforms` - Property Descriptions --------------------- diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index accc6b9d6..0f4fbfca4 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -9,13 +9,13 @@ Transform2D =========== -**Category:** Built-In Types - -Brief Description ------------------ - 2D transformation (3×2 matrix). +Description +----------- + +Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of two :ref:`x` and :ref:`y` :ref:`Vector2`\ s and an :ref:`origin`. It is similar to a 3×2 matrix. + Properties ---------- @@ -83,11 +83,6 @@ Constants - **FLIP_Y** = **Transform2D( 1, 0, 0, -1, 0, 0 )** --- ``Transform2D`` with mirroring applied parallel to the Y axis. -Description ------------ - -Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of two :ref:`x` and :ref:`y` :ref:`Vector2`\ s and an :ref:`origin`. It is similar to a 3×2 matrix. - Property Descriptions --------------------- diff --git a/classes/class_translation.rst b/classes/class_translation.rst index 975ed1f0e..dd44c3781 100644 --- a/classes/class_translation.rst +++ b/classes/class_translation.rst @@ -13,13 +13,20 @@ Translation **Inherited By:** :ref:`PHashTranslation` -**Category:** Core - -Brief Description ------------------ - Language Translation. +Description +----------- + +Translations are resources that can be loaded and unloaded on demand. They map a string to another string. + +Tutorials +--------- + +- :doc:`../tutorials/i18n/internationalizing_games` + +- :doc:`../tutorials/i18n/locales` + Properties ---------- @@ -42,18 +49,6 @@ Methods | :ref:`PoolStringArray` | :ref:`get_message_list` **(** **)** const | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Translations are resources that can be loaded and unloaded on demand. They map a string to another string. - -Tutorials ---------- - -- :doc:`../tutorials/i18n/internationalizing_games` - -- :doc:`../tutorials/i18n/locales` - Property Descriptions --------------------- diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 5f3278032..ed61311b6 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -11,13 +11,20 @@ TranslationServer **Inherits:** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Server that manages all translations. +Description +----------- + +Server that manages all translations. Translations can be set to it and removed from it. + +Tutorials +--------- + +- :doc:`../tutorials/i18n/internationalizing_games` + +- :doc:`../tutorials/i18n/locales` + Methods ------- @@ -39,18 +46,6 @@ Methods | :ref:`String` | :ref:`translate` **(** :ref:`String` message **)** const | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -Description ------------ - -Server that manages all translations. Translations can be set to it and removed from it. - -Tutorials ---------- - -- :doc:`../tutorials/i18n/internationalizing_games` - -- :doc:`../tutorials/i18n/locales` - Method Descriptions ------------------- diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 3e2804708..ef2c0dbce 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -11,13 +11,28 @@ Tree **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Category:** Core - -Brief Description ------------------ - Control to show a tree of items. +Description +----------- + +This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structured displays and interactions. + +Trees are built via code, using :ref:`TreeItem` objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added. + +:: + + func _ready(): + var tree = Tree.new() + var root = tree.create_item() + tree.set_hide_root(true) + var child1 = tree.create_item(root) + var child2 = tree.create_item(root) + var subchild1 = tree.create_item(child1) + subchild1.set_text(0, "Subchild1") + +To iterate over all the :ref:`TreeItem` objects in a ``Tree`` object, use :ref:`TreeItem.get_next` and :ref:`TreeItem.get_children` after getting the root through :ref:`get_root`. + Properties ---------- @@ -212,6 +227,8 @@ Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM` position **)** +Emitted when the right mouse button is pressed in the empty space of the tree. + ---- .. _class_Tree_signal_empty_tree_rmb_selected: @@ -296,6 +313,8 @@ Emitted instead of ``item_selected`` if ``select_mode`` is :ref:`SELECT_MULTI