- **NAN** = **nan** --- Macro constant that expands to an expression of type float that represents a NaN.
- **NAN** = **nan** --- Macro constant that expands to an expression of type float that represents a NaN.
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.
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
Description
-----------
-----------
@@ -203,7 +202,7 @@ List of core built-in GDScript functions. Math functions and other utilities. Ev
- :ref:`Vector2<class_Vector2>` **cartesian2polar** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
- :ref:`Vector2<class_Vector2>` **cartesian2polar** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle).
Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle).
-.. _class_@GDScript_ceil:
+.. _class_@GDScript_ceil:
- :ref:`float<class_float>` **ceil** **(** :ref:`float<class_float>` s **)**
- :ref:`float<class_float>` **ceil** **(** :ref:`float<class_float>` s **)**
@@ -327,7 +326,7 @@ Rounds ``s`` upward, returning the smallest integral value that is not less than
Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (x and y axis).
Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (x and y axis).
-.. _class_@GDScript_pow:
+.. _class_@GDScript_pow:
- :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
- :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
@@ -721,7 +720,7 @@ Returns the result of ``x`` raised to the power of ``y``.
Random from seed: pass a ``seed``, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
Random from seed: pass a ``seed``, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
-.. _class_@GDScript_randf:
+.. _class_@GDScript_randf:
- :ref:`float<class_float>` **randf** **(** **)**
- :ref:`float<class_float>` **randf** **(** **)**
@@ -839,7 +838,7 @@ Returns a random floating point value between 0 and 1.
randf() # returns 0.375671
randf() # returns 0.375671
-.. _class_@GDScript_randi:
+.. _class_@GDScript_randi:
- :ref:`int<class_int>` **randi** **(** **)**
- :ref:`int<class_int>` **randi** **(** **)**
@@ -851,7 +850,7 @@ Returns a random 32 bit integer. Use remainder to obtain a random value between
randi() % 100 # returns random number between 0 and 99
randi() % 100 # returns random number between 0 and 99
randi() % 100 + 1 # returns random number between 1 and 100
randi() % 100 + 1 # returns random number between 1 and 100
-.. _class_@GDScript_randomize:
+.. _class_@GDScript_randomize:
- void **randomize** **(** **)**
- void **randomize** **(** **)**
@@ -862,7 +861,7 @@ Randomizes the seed (or the internal state) of the random number generator. Curr
@@ -1106,7 +1105,7 @@ Returns a weak reference to an object.
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
@@ -1162,4 +1161,3 @@ From the caller, call :ref:`GDScriptFunctionState.resume<class_GDScriptFunctionS
If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, ``yield()`` returns the argument passed to ``emit_signal()`` if the signal takes only one argument, or an array containing all the arguments passed to ``emit_signal()`` if the signal takes multiple arguments.
If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, ``yield()`` returns the argument passed to ``emit_signal()`` if the signal takes only one argument, or an array containing all the arguments passed to ``emit_signal()`` if the signal takes multiple arguments.
- **METHOD_FLAG_NORMAL** = **1** --- Flag for normal method
- **METHOD_FLAG_NORMAL** = **1** --- Flag for normal method
- **METHOD_FLAG_EDITOR** = **2** --- Flag for editor method
- **METHOD_FLAG_EDITOR** = **2** --- Flag for editor method
@@ -63,14 +112,14 @@ enum **MethodFlags**
.. _enum_@GlobalScope_Orientation:
.. _enum_@GlobalScope_Orientation:
-enum **Orientation**
+enum **Orientation**:
- **VERTICAL** = **1** --- General vertical alignment, used usually for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
- **VERTICAL** = **1** --- General vertical alignment, used usually for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
- **HORIZONTAL** = **0** --- General horizontal alignment, used usually for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
- **HORIZONTAL** = **0** --- General horizontal alignment, used usually for :ref:`Separator<class_Separator>`, :ref:`ScrollBar<class_ScrollBar>`, :ref:`Slider<class_Slider>`, etc.
.. _enum_@GlobalScope_PropertyUsageFlags:
.. _enum_@GlobalScope_PropertyUsageFlags:
-enum **PropertyUsageFlags**
+enum **PropertyUsageFlags**:
- **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default).
- **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default).
- **PROPERTY_USAGE_EDITOR** = **2** --- Property will be visible in editor (default).
- **PROPERTY_USAGE_EDITOR** = **2** --- Property will be visible in editor (default).
- **HALIGN_LEFT** = **0** --- Horizontal left alignment, usually for text-derived classes.
- **HALIGN_LEFT** = **0** --- Horizontal left alignment, usually for text-derived classes.
- **HALIGN_CENTER** = **1** --- Horizontal center alignment, usually for text-derived classes.
- **HALIGN_CENTER** = **1** --- Horizontal center alignment, usually for text-derived classes.
@@ -189,7 +238,7 @@ enum **HAlign**
.. _enum_@GlobalScope_Error:
.. _enum_@GlobalScope_Error:
-enum **Error**
+enum **Error**:
- **OK** = **0** --- Functions that return Error return OK when no error occurred. Most functions don't return errors and/or just print errors to STDOUT.
- **OK** = **0** --- Functions that return Error return OK when no error occurred. Most functions don't return errors and/or just print errors to STDOUT.
- **FAILED** = **1** --- Generic error.
- **FAILED** = **1** --- Generic error.
@@ -235,7 +284,7 @@ enum **Error**
.. _enum_@GlobalScope_VAlign:
.. _enum_@GlobalScope_VAlign:
-enum **VAlign**
+enum **VAlign**:
- **VALIGN_TOP** = **0** --- Vertical top alignment, usually for text-derived classes.
- **VALIGN_TOP** = **0** --- Vertical top alignment, usually for text-derived classes.
- **VALIGN_CENTER** = **1** --- Vertical center alignment, usually for text-derived classes.
- **VALIGN_CENTER** = **1** --- Vertical center alignment, usually for text-derived classes.
@@ -243,7 +292,7 @@ enum **VAlign**
.. _enum_@GlobalScope_PropertyHint:
.. _enum_@GlobalScope_PropertyHint:
-enum **PropertyHint**
+enum **PropertyHint**:
- **PROPERTY_HINT_NONE** = **0** --- No hint for edited property.
- **PROPERTY_HINT_NONE** = **0** --- No hint for edited property.
- **PROPERTY_HINT_RANGE** = **1** --- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
- **PROPERTY_HINT_RANGE** = **1** --- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
@@ -270,7 +319,7 @@ enum **PropertyHint**
.. _enum_@GlobalScope_Corner:
.. _enum_@GlobalScope_Corner:
-enum **Corner**
+enum **Corner**:
- **CORNER_TOP_LEFT** = **0**
- **CORNER_TOP_LEFT** = **0**
- **CORNER_TOP_RIGHT** = **1**
- **CORNER_TOP_RIGHT** = **1**
@@ -279,7 +328,7 @@ enum **Corner**
.. _enum_@GlobalScope_KeyList:
.. _enum_@GlobalScope_KeyList:
-enum **KeyList**
+enum **KeyList**:
- **KEY_ESCAPE** = **16777217** --- Escape Key
- **KEY_ESCAPE** = **16777217** --- Escape Key
- **KEY_TAB** = **16777218** --- Tab Key
- **KEY_TAB** = **16777218** --- Tab Key
@@ -526,7 +575,7 @@ enum **KeyList**
.. _enum_@GlobalScope_Variant.Type:
.. _enum_@GlobalScope_Variant.Type:
-enum **Variant.Type**
+enum **Variant.Type**:
- **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null).
- **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null).
- **TYPE_BOOL** = **1** --- Variable is of type :ref:`bool<class_bool>`.
- **TYPE_BOOL** = **1** --- Variable is of type :ref:`bool<class_bool>`.
@@ -559,7 +608,7 @@ enum **Variant.Type**
.. _enum_@GlobalScope_Margin:
.. _enum_@GlobalScope_Margin:
-enum **Margin**
+enum **Margin**:
- **MARGIN_LEFT** = **0** --- Left margin, used usually for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>` derived classes.
- **MARGIN_LEFT** = **0** --- Left margin, used usually for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>` derived classes.
- **MARGIN_TOP** = **1** --- Top margin, used usually for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>` derived classes.
- **MARGIN_TOP** = **1** --- Top margin, used usually for :ref:`Control<class_Control>` or :ref:`StyleBox<class_StyleBox>` derived classes.
@@ -568,7 +617,7 @@ enum **Margin**
.. _enum_@GlobalScope_ButtonList:
.. _enum_@GlobalScope_ButtonList:
-enum **ButtonList**
+enum **ButtonList**:
- **BUTTON_LEFT** = **1** --- Left Mouse Button
- **BUTTON_LEFT** = **1** --- Left Mouse Button
- **BUTTON_RIGHT** = **2** --- Right Mouse Button
- **BUTTON_RIGHT** = **2** --- Right Mouse Button
@@ -585,12 +634,10 @@ enum **ButtonList**
- **BUTTON_MASK_XBUTTON1** = **128**
- **BUTTON_MASK_XBUTTON1** = **128**
- **BUTTON_MASK_XBUTTON2** = **256**
- **BUTTON_MASK_XBUTTON2** = **256**
-
Constants
Constants
---------
---------
- **SPKEY** = **16777216** --- Scancodes with this bit applied are non printable.
- **SPKEY** = **16777216** --- Scancodes with this bit applied are non printable.
Emitted when a custom button is pressed. See :ref:`add_button<class_AcceptDialog_add_button>`.
Emitted when a custom button is pressed. See :ref:`add_button<class_AcceptDialog_add_button>`.
-
Description
Description
-----------
-----------
@@ -57,19 +67,34 @@ Property Descriptions
.. _class_AcceptDialog_dialog_hide_on_ok:
.. _class_AcceptDialog_dialog_hide_on_ok:
-- :ref:`bool<class_bool>` **dialog_hide_on_ok** - If ``true`` the dialog is hidden when the OK button is pressed. You can set it to ``false`` if you want to do e.g. input validation when receiving the :ref:`confirmed<class_AcceptDialog_confirmed>` signal, and handle hiding the dialog in your own logic. Default value: ``true``.
+- :ref:`bool<class_bool>` **dialog_hide_on_ok**
+
++----------+-----------------------+
+| *Setter* | set_hide_on_ok(value) |
++----------+-----------------------+
+| *Getter* | get_hide_on_ok() |
++----------+-----------------------+
+
+If ``true`` the dialog is hidden when the OK button is pressed. You can set it to ``false`` if you want to do e.g. input validation when receiving the :ref:`confirmed<class_AcceptDialog_confirmed>` signal, and handle hiding the dialog in your own logic. Default value: ``true``.
Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example :ref:`FileDialog<class_FileDialog>` defaults to ``false``, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in :ref:`FileDialog<class_FileDialog>` to disable hiding the dialog when pressing OK.
Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example :ref:`FileDialog<class_FileDialog>` defaults to ``false``, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in :ref:`FileDialog<class_FileDialog>` to disable hiding the dialog when pressing OK.
.. _class_AcceptDialog_dialog_text:
.. _class_AcceptDialog_dialog_text:
-- :ref:`String<class_String>` **dialog_text** - The text displayed by this dialog.
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
-.. _class_AnimatedSprite_frame_changed:
+.. _class_AnimatedSprite_frame_changed:
- **frame_changed** **(** **)**
- **frame_changed** **(** **)**
Emitted when :ref:`frame<class_AnimatedSprite_frame>` changed.
Emitted when :ref:`frame<class_AnimatedSprite_frame>` changed.
-
Description
Description
-----------
-----------
@@ -52,60 +75,122 @@ Property Descriptions
.. _class_AnimatedSprite_animation:
.. _class_AnimatedSprite_animation:
-- :ref:`String<class_String>` **animation** - The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
+- :ref:`String<class_String>` **animation**
+
++----------+----------------------+
+| *Setter* | set_animation(value) |
++----------+----------------------+
+| *Getter* | get_animation() |
++----------+----------------------+
+
+The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
.. _class_AnimatedSprite_centered:
.. _class_AnimatedSprite_centered:
-- :ref:`bool<class_bool>` **centered** - If ``true`` texture will be centered. Default value: ``true``.
+- :ref:`bool<class_bool>` **centered**
+
++----------+---------------------+
+| *Setter* | set_centered(value) |
++----------+---------------------+
+| *Getter* | is_centered() |
++----------+---------------------+
+
+If ``true`` texture will be centered. Default value: ``true``.
.. _class_AnimatedSprite_flip_h:
.. _class_AnimatedSprite_flip_h:
-- :ref:`bool<class_bool>` **flip_h** - If ``true`` texture is flipped horizontally. Default value: ``false``.
+- :ref:`bool<class_bool>` **flip_h**
+
++----------+-------------------+
+| *Setter* | set_flip_h(value) |
++----------+-------------------+
+| *Getter* | is_flipped_h() |
++----------+-------------------+
+
+If ``true`` texture is flipped horizontally. Default value: ``false``.
.. _class_AnimatedSprite_flip_v:
.. _class_AnimatedSprite_flip_v:
-- :ref:`bool<class_bool>` **flip_v** - If ``true`` texture is flipped vertically. Default value: ``false``.
+- :ref:`bool<class_bool>` **flip_v**
+
++----------+-------------------+
+| *Setter* | set_flip_v(value) |
++----------+-------------------+
+| *Getter* | is_flipped_v() |
++----------+-------------------+
+
+If ``true`` texture is flipped vertically. Default value: ``false``.
.. _class_AnimatedSprite_frame:
.. _class_AnimatedSprite_frame:
-- :ref:`int<class_int>` **frame** - The displayed animation frame's index.
+- :ref:`int<class_int>` **frame**
+
++----------+------------------+
+| *Setter* | set_frame(value) |
++----------+------------------+
+| *Getter* | get_frame() |
++----------+------------------+
+
+The displayed animation frame's index.
.. _class_AnimatedSprite_frames:
.. _class_AnimatedSprite_frames:
-- :ref:`SpriteFrames<class_SpriteFrames>` **frames** - The :ref:`SpriteFrames<class_SpriteFrames>` resource containing the animation(s).
Emitted when :ref:`frame<class_AnimatedSprite3D_frame>` changed.
Emitted when :ref:`frame<class_AnimatedSprite3D_frame>` changed.
-
Description
Description
-----------
-----------
@@ -46,40 +59,64 @@ Property Descriptions
.. _class_AnimatedSprite3D_animation:
.. _class_AnimatedSprite3D_animation:
-- :ref:`String<class_String>` **animation** - The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
+- :ref:`String<class_String>` **animation**
+
++----------+----------------------+
+| *Setter* | set_animation(value) |
++----------+----------------------+
+| *Getter* | get_animation() |
++----------+----------------------+
+
+The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
.. _class_AnimatedSprite3D_frame:
.. _class_AnimatedSprite3D_frame:
-- :ref:`int<class_int>` **frame** - The displayed animation frame's index.
+- :ref:`int<class_int>` **frame**
+
++----------+------------------+
+| *Setter* | set_frame(value) |
++----------+------------------+
+| *Getter* | get_frame() |
++----------+------------------+
+
+The displayed animation frame's index.
.. _class_AnimatedSprite3D_frames:
.. _class_AnimatedSprite3D_frames:
-- :ref:`SpriteFrames<class_SpriteFrames>` **frames** - The :ref:`SpriteFrames<class_SpriteFrames>` resource containing the animation(s).
- **UPDATE_CONTINUOUS** = **0** --- Update between keyframes.
- **UPDATE_CONTINUOUS** = **0** --- Update between keyframes.
- **UPDATE_DISCRETE** = **1** --- Update at the keyframes and hold the value.
- **UPDATE_DISCRETE** = **1** --- Update at the keyframes and hold the value.
@@ -146,7 +158,7 @@ enum **UpdateMode**
.. _enum_Animation_InterpolationType:
.. _enum_Animation_InterpolationType:
-enum **InterpolationType**
+enum **InterpolationType**:
- **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value).
- **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value).
- **INTERPOLATION_LINEAR** = **1** --- Linear interpolation.
- **INTERPOLATION_LINEAR** = **1** --- Linear interpolation.
@@ -154,7 +166,7 @@ enum **InterpolationType**
.. _enum_Animation_TrackType:
.. _enum_Animation_TrackType:
-enum **TrackType**
+enum **TrackType**:
- **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated.
- **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated.
- **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
- **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
@@ -163,7 +175,6 @@ enum **TrackType**
- **TYPE_AUDIO** = **4**
- **TYPE_AUDIO** = **4**
- **TYPE_ANIMATION** = **5**
- **TYPE_ANIMATION** = **5**
-
Description
Description
-----------
-----------
@@ -175,285 +186,307 @@ Tutorials
---------
---------
- :doc:`../tutorials/animation/index`
- :doc:`../tutorials/animation/index`
-
Property Descriptions
Property Descriptions
---------------------
---------------------
.. _class_Animation_length:
.. _class_Animation_length:
-- :ref:`float<class_float>` **length** - The total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
+- :ref:`float<class_float>` **length**
+
++----------+-------------------+
+| *Setter* | set_length(value) |
++----------+-------------------+
+| *Getter* | get_length() |
++----------+-------------------+
+
+The total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
.. _class_Animation_loop:
.. _class_Animation_loop:
-- :ref:`bool<class_bool>` **loop** - A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
+- :ref:`bool<class_bool>` **loop**
+
++----------+-----------------+
+| *Setter* | set_loop(value) |
++----------+-----------------+
+| *Getter* | has_loop() |
++----------+-----------------+
+
+A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
.. _class_Animation_step:
.. _class_Animation_step:
-- :ref:`float<class_float>` **step** - The animation step value.
Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (:ref:`Vector3<class_Vector3>`), rotation (:ref:`Quat<class_Quat>`) and scale (:ref:`Vector3<class_Vector3>`).
Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (:ref:`Vector3<class_Vector3>`), rotation (:ref:`Quat<class_Quat>`) and scale (:ref:`Vector3<class_Vector3>`).
-- :ref:`String<class_String>` **assigned_animation** - If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also :ref:`current_animation<class_AnimationPlayer_current_animation>`.
+If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also :ref:`current_animation<class_AnimationPlayer_current_animation>`.
.. _class_AnimationPlayer_autoplay:
.. _class_AnimationPlayer_autoplay:
-- :ref:`String<class_String>` **autoplay** - The name of the animation to play when the scene loads. Default value: ``""``.
+- :ref:`String<class_String>` **autoplay**
+
++----------+---------------------+
+| *Setter* | set_autoplay(value) |
++----------+---------------------+
+| *Getter* | get_autoplay() |
++----------+---------------------+
+
+The name of the animation to play when the scene loads. Default value: ``""``.
.. _class_AnimationPlayer_current_animation:
.. _class_AnimationPlayer_current_animation:
-- :ref:`String<class_String>` **current_animation** - The name of the current animation, "" if not playing anything. When being set, does not restart the animation. See also :ref:`play<class_AnimationPlayer_play>`. Default value: ``""``.
+The name of the current animation, "" if not playing anything. When being set, does not restart the animation. See also :ref:`play<class_AnimationPlayer_play>`. Default value: ``""``.
-- :ref:`float<class_float>` **playback_default_blend_time** - The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: ``0``.
+The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: ``0``.
.. _class_AnimationPlayer_playback_process_mode:
.. _class_AnimationPlayer_playback_process_mode:
-- :ref:`AnimationProcessMode<enum_AnimationPlayer_AnimationProcessMode>` **playback_process_mode** - The process notification in which to update animations. Default value: :ref:`ANIMATION_PROCESS_IDLE<enum_@GlobalScope_ANIMATION_PROCESS_IDLE>`.
+The process notification in which to update animations. Default value: :ref:`ANIMATION_PROCESS_IDLE<enum_@GlobalScope_ANIMATION_PROCESS_IDLE>`.
.. _class_AnimationPlayer_playback_speed:
.. _class_AnimationPlayer_playback_speed:
-- :ref:`float<class_float>` **playback_speed** - The speed scaling ratio. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. Default value: ``1``.
+- :ref:`float<class_float>` **playback_speed**
+
++----------+------------------------+
+| *Setter* | set_speed_scale(value) |
++----------+------------------------+
+| *Getter* | get_speed_scale() |
++----------+------------------------+
+
+The speed scaling ratio. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. Default value: ``1``.
.. _class_AnimationPlayer_root_node:
.. _class_AnimationPlayer_root_node:
-- :ref:`NodePath<class_NodePath>` **root_node** - The node from which node path references will travel. Default value: ``".."``.
+- :ref:`NodePath<class_NodePath>` **root_node**
+
++----------+-----------------+
+| *Setter* | set_root(value) |
++----------+-----------------+
+| *Getter* | get_root() |
++----------+-----------------+
+The node from which node path references will travel. Default value: ``".."``.
Get the actual playing speed of current animation or 0 if not playing. This speed is the ``playback_speed`` property multiplied by ``custom_speed`` argument specified when calling the ``play`` method.
Get the actual playing speed of current animation or 0 if not playing. This speed is the ``playback_speed`` property multiplied by ``custom_speed`` argument specified when calling the ``play`` method.
-.. _class_AnimationPlayer_has_animation:
+.. _class_AnimationPlayer_has_animation:
- :ref:`bool<class_bool>` **has_animation** **(** :ref:`String<class_String>` name **)** const
- :ref:`bool<class_bool>` **has_animation** **(** :ref:`String<class_String>` name **)** const
Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`Animation<class_Animation>` with key ``name``.
Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`Animation<class_Animation>` with key ``name``.
Play the animation with key ``name``. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
Play the animation with key ``name``. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
Seek the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time.
Seek the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time.
-- :ref:`bool<class_bool>` **active** - If ``true`` the ``AnimationTreePlayer`` is able to play animations. Default value: ``false``.
+- :ref:`bool<class_bool>` **active**
+
++----------+-------------------+
+| *Setter* | set_active(value) |
++----------+-------------------+
+| *Getter* | is_active() |
++----------+-------------------+
+
+If ``true`` the ``AnimationTreePlayer`` is able to play animations. Default value: ``false``.
.. _class_AnimationTreePlayer_base_path:
.. _class_AnimationTreePlayer_base_path:
-- :ref:`NodePath<class_NodePath>` **base_path** - The node from which to relatively access other nodes. Default value: ``".."``.
+- :ref:`NodePath<class_NodePath>` **base_path**
+
++----------+----------------------+
+| *Setter* | set_base_path(value) |
++----------+----------------------+
+| *Getter* | get_base_path() |
++----------+----------------------+
+
+The node from which to relatively access other nodes. Default value: ``".."``.
It accesses the Bones, so it should point to the same Node the AnimationPlayer would point its Root Node at.
It accesses the Bones, so it should point to the same Node the AnimationPlayer would point its Root Node at.
.. _class_AnimationTreePlayer_master_player:
.. _class_AnimationTreePlayer_master_player:
-- :ref:`NodePath<class_NodePath>` **master_player** - The path to the :ref:`AnimationPlayer<class_AnimationPlayer>` from which this ``AnimationTreePlayer`` binds animations to animation nodes.
-- :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` **playback_process_mode** - The thread in which to update animations. Default value: :ref:`ANIMATION_PROCESS_IDLE<enum_@GlobalScope_ANIMATION_PROCESS_IDLE>`.
- :ref:`Animation<class_Animation>` **animation_node_get_animation** **(** :ref:`String<class_String>` id **)** const
- :ref:`Animation<class_Animation>` **animation_node_get_animation** **(** :ref:`String<class_String>` id **)** const
Returns the :ref:`AnimationPlayer<class_AnimationPlayer>`'s :ref:`Animation<class_Animation>` bound to the ``AnimationTreePlayer``'s animation node with name ``id``.
Returns the :ref:`AnimationPlayer<class_AnimationPlayer>`'s :ref:`Animation<class_Animation>` bound to the ``AnimationTreePlayer``'s animation node with name ``id``.
- :ref:`String<class_String>` **animation_node_get_master_animation** **(** :ref:`String<class_String>` id **)** const
- :ref:`String<class_String>` **animation_node_get_master_animation** **(** :ref:`String<class_String>` id **)** const
Returns the name of the :ref:`master_player<class_AnimationTreePlayer_master_player>`'s :ref:`Animation<class_Animation>` bound to this animation node.
Returns the name of the :ref:`master_player<class_AnimationTreePlayer_master_player>`'s :ref:`Animation<class_Animation>` bound to this animation node.
Binds a new :ref:`Animation<class_Animation>` from the :ref:`master_player<class_AnimationTreePlayer_master_player>` to the ``AnimationTreePlayer``'s animation node with name ``id``.
Binds a new :ref:`Animation<class_Animation>` from the :ref:`master_player<class_AnimationTreePlayer_master_player>` to the ``AnimationTreePlayer``'s animation node with name ``id``.
If ``enable`` is ``true``, the animation node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
If ``enable`` is ``true``, the animation node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
Binds the :ref:`Animation<class_Animation>` named ``source`` from :ref:`master_player<class_AnimationTreePlayer_master_player>` to the animation node ``id``. Recalculates caches.
Binds the :ref:`Animation<class_Animation>` named ``source`` from :ref:`master_player<class_AnimationTreePlayer_master_player>` to the animation node ``id``. Recalculates caches.
If ``enable`` is ``true``, the blend2 node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
If ``enable`` is ``true``, the blend2 node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
If ``enable`` is ``true``, the oneshot node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
If ``enable`` is ``true``, the oneshot node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
Emitted when a :ref:`PhysicsBody<class_PhysicsBody>` object exits, reporting which shapes were overlapping.
Emitted when a :ref:`PhysicsBody<class_PhysicsBody>` object exits, reporting which shapes were overlapping.
-
Enumerations
Enumerations
------------
------------
.. _enum_Area_SpaceOverride:
.. _enum_Area_SpaceOverride:
-enum **SpaceOverride**
+enum **SpaceOverride**:
- **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping.
- **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping.
- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order).
- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order).
@@ -101,7 +142,6 @@ enum **SpaceOverride**
- **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
- **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas.
- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas.
-
Description
Description
-----------
-----------
@@ -112,126 +152,268 @@ Property Descriptions
.. _class_Area_angular_damp:
.. _class_Area_angular_damp:
-- :ref:`float<class_float>` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
+- :ref:`float<class_float>` **angular_damp**
+
++----------+-------------------------+
+| *Setter* | set_angular_damp(value) |
++----------+-------------------------+
+| *Getter* | get_angular_damp() |
++----------+-------------------------+
+
+The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
.. _class_Area_audio_bus_name:
.. _class_Area_audio_bus_name:
-- :ref:`String<class_String>` **audio_bus_name** - The name of the area's audio bus.
+- :ref:`String<class_String>` **audio_bus_name**
+
++----------+----------------------+
+| *Setter* | set_audio_bus(value) |
++----------+----------------------+
+| *Getter* | get_audio_bus() |
++----------+----------------------+
+
+The name of the area's audio bus.
.. _class_Area_audio_bus_override:
.. _class_Area_audio_bus_override:
-- :ref:`bool<class_bool>` **audio_bus_override** - If ``true`` the area's audio bus overrides the default audio bus. Default value: ``false``.
+- :ref:`bool<class_bool>` **audio_bus_override**
+
++----------+-------------------------------+
+| *Setter* | set_audio_bus_override(value) |
++----------+-------------------------------+
+| *Getter* | is_overriding_audio_bus() |
++----------+-------------------------------+
+
+If ``true`` the area's audio bus overrides the default audio bus. Default value: ``false``.
.. _class_Area_collision_layer:
.. _class_Area_collision_layer:
-- :ref:`int<class_int>` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``.
+- :ref:`int<class_int>` **collision_layer**
+
++----------+----------------------------+
+| *Setter* | set_collision_layer(value) |
++----------+----------------------------+
+| *Getter* | get_collision_layer() |
++----------+----------------------------+
+
+The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``.
.. _class_Area_collision_mask:
.. _class_Area_collision_mask:
-- :ref:`int<class_int>` **collision_mask** - The physics layers this area scans to determine collision detection.
+- :ref:`int<class_int>` **collision_mask**
+
++----------+---------------------------+
+| *Setter* | set_collision_mask(value) |
++----------+---------------------------+
+| *Getter* | get_collision_mask() |
++----------+---------------------------+
+
+The physics layers this area scans to determine collision detection.
.. _class_Area_gravity:
.. _class_Area_gravity:
-- :ref:`float<class_float>` **gravity** - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+- :ref:`float<class_float>` **gravity**
+
++----------+--------------------+
+| *Setter* | set_gravity(value) |
++----------+--------------------+
+| *Getter* | get_gravity() |
++----------+--------------------+
+
+The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
.. _class_Area_gravity_distance_scale:
.. _class_Area_gravity_distance_scale:
-- :ref:`float<class_float>` **gravity_distance_scale** - The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
.. _class_Area_gravity_point:
.. _class_Area_gravity_point:
-- :ref:`bool<class_bool>` **gravity_point** - If ``true`` gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``.
+- :ref:`bool<class_bool>` **gravity_point**
+
++----------+-----------------------------+
+| *Setter* | set_gravity_is_point(value) |
++----------+-----------------------------+
+| *Getter* | is_gravity_a_point() |
++----------+-----------------------------+
+
+If ``true`` gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``.
.. _class_Area_gravity_vec:
.. _class_Area_gravity_vec:
-- :ref:`Vector3<class_Vector3>` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point<class_Area_is_gravity_a_point>`), this will be the point of attraction.
+- :ref:`Vector3<class_Vector3>` **gravity_vec**
+
++----------+---------------------------+
+| *Setter* | set_gravity_vector(value) |
++----------+---------------------------+
+| *Getter* | get_gravity_vector() |
++----------+---------------------------+
+
+The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point<class_Area_is_gravity_a_point>`), this will be the point of attraction.
.. _class_Area_linear_damp:
.. _class_Area_linear_damp:
-- :ref:`float<class_float>` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
+- :ref:`float<class_float>` **linear_damp**
+
++----------+------------------------+
+| *Setter* | set_linear_damp(value) |
++----------+------------------------+
+| *Getter* | get_linear_damp() |
++----------+------------------------+
+
+The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
.. _class_Area_monitorable:
.. _class_Area_monitorable:
-- :ref:`bool<class_bool>` **monitorable** - If ``true`` other monitoring areas can detect this area. Default value: ``true``.
+- :ref:`bool<class_bool>` **monitorable**
+
++----------+------------------------+
+| *Setter* | set_monitorable(value) |
++----------+------------------------+
+| *Getter* | is_monitorable() |
++----------+------------------------+
+
+If ``true`` other monitoring areas can detect this area. Default value: ``true``.
.. _class_Area_monitoring:
.. _class_Area_monitoring:
-- :ref:`bool<class_bool>` **monitoring** - If ``true`` the area detects bodies or areas entering and exiting it. Default value: ``true``.
+- :ref:`bool<class_bool>` **monitoring**
+
++----------+-----------------------+
+| *Setter* | set_monitoring(value) |
++----------+-----------------------+
+| *Getter* | is_monitoring() |
++----------+-----------------------+
+
+If ``true`` the area detects bodies or areas entering and exiting it. Default value: ``true``.
.. _class_Area_priority:
.. _class_Area_priority:
-- :ref:`float<class_float>` **priority** - The area's priority. Higher priority areas are processed first. Default value: 0.
+- :ref:`float<class_float>` **priority**
+
++----------+---------------------+
+| *Setter* | set_priority(value) |
++----------+---------------------+
+| *Getter* | get_priority() |
++----------+---------------------+
+
+The area's priority. Higher priority areas are processed first. Default value: 0.
.. _class_Area_reverb_bus_amount:
.. _class_Area_reverb_bus_amount:
-- :ref:`float<class_float>` **reverb_bus_amount** - The degree to which this area applies reverb to its associated audio. Ranges from ``0`` to ``1`` with ``0.1`` precision.
+The reverb bus name to use for this area's associated audio.
.. _class_Area_reverb_bus_uniformity:
.. _class_Area_reverb_bus_uniformity:
-- :ref:`float<class_float>` **reverb_bus_uniformity** - The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to ``1`` with ``0.1`` precision.
+The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to ``1`` with ``0.1`` precision.
.. _class_Area_space_override:
.. _class_Area_space_override:
-- :ref:`SpaceOverride<enum_Area_SpaceOverride>` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE\_\* constants for values.
Returns a list of intersecting ``Area``\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
Returns a list of intersecting ``Area``\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
Returns a list of intersecting :ref:`PhysicsBody<class_PhysicsBody>`\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
Returns a list of intersecting :ref:`PhysicsBody<class_PhysicsBody>`\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
-.. _class_Area_overlaps_area:
+.. _class_Area_overlaps_area:
- :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_Node>` area **)** const
- :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_Node>` area **)** const
If ``true`` the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
If ``true`` the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
-.. _class_Area_overlaps_body:
+.. _class_Area_overlaps_body:
- :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_Node>` body **)** const
- :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_Node>` body **)** const
If ``true`` the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
If ``true`` the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
-.. _class_Area_set_collision_layer_bit:
+.. _class_Area_set_collision_layer_bit:
- void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
- void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
Set/clear individual bits on the layer mask. This simplifies editing this ``Area[code]'s layers.
Set/clear individual bits on the layer mask. This simplifies editing this ``Area[code]'s layers.
-.. _class_Area_set_collision_mask_bit:
+.. _class_Area_set_collision_mask_bit:
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
Set/clear individual bits on the collision mask. This simplifies editing which ``Area`` layers this ``Area`` scans.
Set/clear individual bits on the collision mask. This simplifies editing which ``Area`` layers this ``Area`` scans.
Emitted when a :ref:`PhysicsBody2D<class_PhysicsBody2D>` object exits, reporting which shapes were overlapping.
Emitted when a :ref:`PhysicsBody2D<class_PhysicsBody2D>` object exits, reporting which shapes were overlapping.
-
Enumerations
Enumerations
------------
------------
.. _enum_Area2D_SpaceOverride:
.. _enum_Area2D_SpaceOverride:
-enum **SpaceOverride**
+enum **SpaceOverride**:
- **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping.
- **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping.
- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order).
- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order).
@@ -101,7 +134,6 @@ enum **SpaceOverride**
- **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
- **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas.
- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas.
-
Description
Description
-----------
-----------
@@ -112,110 +144,220 @@ Property Descriptions
.. _class_Area2D_angular_damp:
.. _class_Area2D_angular_damp:
-- :ref:`float<class_float>` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
+- :ref:`float<class_float>` **angular_damp**
+
++----------+-------------------------+
+| *Setter* | set_angular_damp(value) |
++----------+-------------------------+
+| *Getter* | get_angular_damp() |
++----------+-------------------------+
+
+The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
.. _class_Area2D_audio_bus_name:
.. _class_Area2D_audio_bus_name:
-- :ref:`String<class_String>` **audio_bus_name** - The name of the area's audio bus.
+- :ref:`String<class_String>` **audio_bus_name**
+
++----------+---------------------------+
+| *Setter* | set_audio_bus_name(value) |
++----------+---------------------------+
+| *Getter* | get_audio_bus_name() |
++----------+---------------------------+
+
+The name of the area's audio bus.
.. _class_Area2D_audio_bus_override:
.. _class_Area2D_audio_bus_override:
-- :ref:`bool<class_bool>` **audio_bus_override** - If ``true`` the area's audio bus overrides the default audio bus. Default value: ``false``.
+- :ref:`bool<class_bool>` **audio_bus_override**
+
++----------+-------------------------------+
+| *Setter* | set_audio_bus_override(value) |
++----------+-------------------------------+
+| *Getter* | is_overriding_audio_bus() |
++----------+-------------------------------+
+
+If ``true`` the area's audio bus overrides the default audio bus. Default value: ``false``.
.. _class_Area2D_collision_layer:
.. _class_Area2D_collision_layer:
-- :ref:`int<class_int>` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``.
+- :ref:`int<class_int>` **collision_layer**
+
++----------+----------------------------+
+| *Setter* | set_collision_layer(value) |
++----------+----------------------------+
+| *Getter* | get_collision_layer() |
++----------+----------------------------+
+
+The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``.
.. _class_Area2D_collision_mask:
.. _class_Area2D_collision_mask:
-- :ref:`int<class_int>` **collision_mask** - The physics layers this area scans to determine collision detection.
+- :ref:`int<class_int>` **collision_mask**
+
++----------+---------------------------+
+| *Setter* | set_collision_mask(value) |
++----------+---------------------------+
+| *Getter* | get_collision_mask() |
++----------+---------------------------+
+
+The physics layers this area scans to determine collision detection.
.. _class_Area2D_gravity:
.. _class_Area2D_gravity:
-- :ref:`float<class_float>` **gravity** - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+- :ref:`float<class_float>` **gravity**
+
++----------+--------------------+
+| *Setter* | set_gravity(value) |
++----------+--------------------+
+| *Getter* | get_gravity() |
++----------+--------------------+
+
+The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
.. _class_Area2D_gravity_distance_scale:
.. _class_Area2D_gravity_distance_scale:
-- :ref:`float<class_float>` **gravity_distance_scale** - The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
.. _class_Area2D_gravity_point:
.. _class_Area2D_gravity_point:
-- :ref:`bool<class_bool>` **gravity_point** - If ``true`` gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``.
+- :ref:`bool<class_bool>` **gravity_point**
+
++----------+-----------------------------+
+| *Setter* | set_gravity_is_point(value) |
++----------+-----------------------------+
+| *Getter* | is_gravity_a_point() |
++----------+-----------------------------+
+
+If ``true`` gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``.
.. _class_Area2D_gravity_vec:
.. _class_Area2D_gravity_vec:
-- :ref:`Vector2<class_Vector2>` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point<class_Area2D_is_gravity_a_point>`), this will be the point of attraction.
+- :ref:`Vector2<class_Vector2>` **gravity_vec**
+
++----------+---------------------------+
+| *Setter* | set_gravity_vector(value) |
++----------+---------------------------+
+| *Getter* | get_gravity_vector() |
++----------+---------------------------+
+
+The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point<class_Area2D_is_gravity_a_point>`), this will be the point of attraction.
.. _class_Area2D_linear_damp:
.. _class_Area2D_linear_damp:
-- :ref:`float<class_float>` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
+- :ref:`float<class_float>` **linear_damp**
+
++----------+------------------------+
+| *Setter* | set_linear_damp(value) |
++----------+------------------------+
+| *Getter* | get_linear_damp() |
++----------+------------------------+
+
+The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping).
.. _class_Area2D_monitorable:
.. _class_Area2D_monitorable:
-- :ref:`bool<class_bool>` **monitorable** - If ``true`` other monitoring areas can detect this area. Default value: ``true``.
+- :ref:`bool<class_bool>` **monitorable**
+
++----------+------------------------+
+| *Setter* | set_monitorable(value) |
++----------+------------------------+
+| *Getter* | is_monitorable() |
++----------+------------------------+
+
+If ``true`` other monitoring areas can detect this area. Default value: ``true``.
.. _class_Area2D_monitoring:
.. _class_Area2D_monitoring:
-- :ref:`bool<class_bool>` **monitoring** - If ``true`` the area detects bodies or areas entering and exiting it. Default value: ``true``.
+- :ref:`bool<class_bool>` **monitoring**
+
++----------+-----------------------+
+| *Setter* | set_monitoring(value) |
++----------+-----------------------+
+| *Getter* | is_monitoring() |
++----------+-----------------------+
+
+If ``true`` the area detects bodies or areas entering and exiting it. Default value: ``true``.
.. _class_Area2D_priority:
.. _class_Area2D_priority:
-- :ref:`float<class_float>` **priority** - The area's priority. Higher priority areas are processed first. Default value: 0.
+- :ref:`float<class_float>` **priority**
+
++----------+---------------------+
+| *Setter* | set_priority(value) |
++----------+---------------------+
+| *Getter* | get_priority() |
++----------+---------------------+
+
+The area's priority. Higher priority areas are processed first. Default value: 0.
.. _class_Area2D_space_override:
.. _class_Area2D_space_override:
-- :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE\_\* constants for values.
Returns a list of intersecting ``Area2D``\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
Returns a list of intersecting ``Area2D``\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
Returns a list of intersecting :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
Returns a list of intersecting :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
-.. _class_Area2D_overlaps_area:
+.. _class_Area2D_overlaps_area:
- :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_Node>` area **)** const
- :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_Node>` area **)** const
If ``true`` the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
If ``true`` the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
-.. _class_Area2D_overlaps_body:
+.. _class_Area2D_overlaps_body:
- :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_Node>` body **)** const
- :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_Node>` body **)** const
If ``true`` the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
If ``true`` the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
-.. _class_Area2D_set_collision_layer_bit:
+.. _class_Area2D_set_collision_layer_bit:
- void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
- void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
-.. _class_Area2D_set_collision_mask_bit:
+.. _class_Area2D_set_collision_mask_bit:
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. Note that calling bsearch on an unsorted array results in unexpected behavior.
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. Note that calling bsearch on an unsorted array results in unexpected behavior.
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior.
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior.
-.. _class_Array_clear:
+.. _class_Array_clear:
- void **clear** **(** **)**
- void **clear** **(** **)**
Clear the array (resize to 0).
Clear the array (resize to 0).
-.. _class_Array_count:
+.. _class_Array_count:
- :ref:`int<class_int>` **count** **(** :ref:`Variant<class_Variant>` value **)**
- :ref:`int<class_int>` **count** **(** :ref:`Variant<class_Variant>` value **)**
Return the amount of times an element is in the array.
Return the amount of times an element is in the array.
@@ -196,37 +196,37 @@ Returns a copy of the array.
If ``deep`` is ``true``, a deep copy is be performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If ``false``, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
If ``deep`` is ``true``, a deep copy is be performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If ``false``, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
-.. _class_Array_empty:
+.. _class_Array_empty:
- :ref:`bool<class_bool>` **empty** **(** **)**
- :ref:`bool<class_bool>` **empty** **(** **)**
Return true if the array is empty (size==0).
Return true if the array is empty (size==0).
-.. _class_Array_erase:
+.. _class_Array_erase:
- void **erase** **(** :ref:`Variant<class_Variant>` value **)**
- void **erase** **(** :ref:`Variant<class_Variant>` value **)**
Remove the first occurrence of a value from the array.
Remove the first occurrence of a value from the array.
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
-.. _class_Array_shuffle:
+.. _class_Array_shuffle:
- void **shuffle** **(** **)**
- void **shuffle** **(** **)**
Shuffle the array such that the items will have a random order.
Shuffle the array such that the items will have a random order.
- **ARRAY_NORMAL** = **1** --- Normal array (array of :ref:`Vector3<class_Vector3>` normals).
- **ARRAY_NORMAL** = **1** --- Normal array (array of :ref:`Vector3<class_Vector3>` normals).
@@ -90,13 +100,11 @@ enum **ArrayType**
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
- **ARRAY_MAX** = **9**
- **ARRAY_MAX** = **9**
-
Constants
Constants
---------
---------
- **NO_INDEX_ARRAY** = **-1** --- Default value used for index_array_len when no indices are present.
- **NO_INDEX_ARRAY** = **-1** --- Default value used for index_array_len when no indices are present.
- **ARRAY_WEIGHTS_SIZE** = **4** --- Amount of weights/bone indices per vertex (always 4).
- **ARRAY_WEIGHTS_SIZE** = **4** --- Amount of weights/bone indices per vertex (always 4).
Return the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays<class_ArrayMesh_add_surface_from_arrays>`).
Return the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays<class_ArrayMesh_add_surface_from_arrays>`).
Return the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays<class_ArrayMesh_add_surface_from_arrays>`).
Return the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays<class_ArrayMesh_add_surface_from_arrays>`).
-- :ref:`int<class_int>` **anchor_id** - The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of ``1``, the second an id of ``2``, etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them.
+- :ref:`int<class_int>` **anchor_id**
++----------+----------------------+
+| *Setter* | set_anchor_id(value) |
++----------+----------------------+
+| *Getter* | get_anchor_id() |
++----------+----------------------+
+
+The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of ``1``, the second an id of ``2``, etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them.
Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.
Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.
Emitted when a button on this controller is released.
Emitted when a button on this controller is released.
-
Description
Description
-----------
-----------
@@ -62,7 +71,15 @@ Property Descriptions
.. _class_ARVRController_controller_id:
.. _class_ARVRController_controller_id:
-- :ref:`int<class_int>` **controller_id** - The controller's id.
+- :ref:`int<class_int>` **controller_id**
+
++----------+--------------------------+
+| *Setter* | set_controller_id(value) |
++----------+--------------------------+
+| *Getter* | get_controller_id() |
++----------+--------------------------+
+
+The controller's id.
A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller.
A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller.
@@ -72,46 +89,52 @@ When a controller is turned off, its slot is freed. This ensures controllers wil
.. _class_ARVRController_rumble:
.. _class_ARVRController_rumble:
-- :ref:`float<class_float>` **rumble** - The degree to which the tracker rumbles. Ranges from ``0.0`` to ``1.0`` with precision ``.01``. If changed, updates :ref:`ARVRPositionalTracker.rumble<class_ARVRPositionalTracker_rumble>` accordingly.
+- :ref:`float<class_float>` **rumble**
++----------+-------------------+
+| *Setter* | set_rumble(value) |
++----------+-------------------+
+| *Getter* | get_rumble() |
++----------+-------------------+
+
+The degree to which the tracker rumbles. Ranges from ``0.0`` to ``1.0`` with precision ``.01``. If changed, updates :ref:`ARVRPositionalTracker.rumble<class_ARVRPositionalTracker_rumble>` accordingly.
Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
- **EYE_MONO** = **0** --- Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
- **EYE_MONO** = **0** --- Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
- **EYE_LEFT** = **1** --- Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information.
- **EYE_LEFT** = **1** --- Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information.
@@ -48,7 +61,7 @@ enum **Eyes**
.. _enum_ARVRInterface_Tracking_status:
.. _enum_ARVRInterface_Tracking_status:
-enum **Tracking_status**
+enum **Tracking_status**:
- **ARVR_NORMAL_TRACKING** = **0** --- Tracking is behaving as expected.
- **ARVR_NORMAL_TRACKING** = **0** --- Tracking is behaving as expected.
- **ARVR_EXCESSIVE_MOTION** = **1** --- Tracking is hindered by excessive motion, player is moving faster then tracking can keep up.
- **ARVR_EXCESSIVE_MOTION** = **1** --- Tracking is hindered by excessive motion, player is moving faster then tracking can keep up.
@@ -58,7 +71,7 @@ enum **Tracking_status**
.. _enum_ARVRInterface_Capabilities:
.. _enum_ARVRInterface_Capabilities:
-enum **Capabilities**
+enum **Capabilities**:
- **ARVR_NONE** = **0** --- No ARVR capabilities.
- **ARVR_NONE** = **0** --- No ARVR capabilities.
- **ARVR_MONO** = **1** --- This interface can work with normal rendering output (non-HMD based AR).
- **ARVR_MONO** = **1** --- This interface can work with normal rendering output (non-HMD based AR).
@@ -66,7 +79,6 @@ enum **Capabilities**
- **ARVR_AR** = **4** --- This interface support AR (video background and real world tracking).
- **ARVR_AR** = **4** --- This interface support AR (video background and real world tracking).
- **ARVR_EXTERNAL** = **8** --- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_render_targetsize. Using a separate viewport node frees up the main viewport for other purposes.
- **ARVR_EXTERNAL** = **8** --- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_render_targetsize. Using a separate viewport node frees up the main viewport for other purposes.
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
@@ -131,16 +166,15 @@ If you do this for a platform that handles its own output (such as OpenVR) Godot
While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD.
While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD.
-- :ref:`float<class_float>` **world_scale** - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
+- :ref:`float<class_float>` **world_scale**
-Note that this method is a passthrough to the :ref:`ARVRServer<class_ARVRServer>` itself.
++----------+------------------------+
+| *Setter* | set_world_scale(value) |
++----------+------------------------+
+| *Getter* | get_world_scale() |
++----------+------------------------+
+
+Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
+Note that this method is a passthrough to the :ref:`ARVRServer<class_ARVRServer>` itself.
- **tracker_added** **(** :ref:`String<class_String>` tracker_name, :ref:`int<class_int>` type, :ref:`int<class_int>` id **)**
- **tracker_added** **(** :ref:`String<class_String>` tracker_name, :ref:`int<class_int>` type, :ref:`int<class_int>` id **)**
Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker.
Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker.
-.. _class_ARVRServer_tracker_removed:
+.. _class_ARVRServer_tracker_removed:
- **tracker_removed** **(** :ref:`String<class_String>` tracker_name, :ref:`int<class_int>` type, :ref:`int<class_int>` id **)**
- **tracker_removed** **(** :ref:`String<class_String>` tracker_name, :ref:`int<class_int>` type, :ref:`int<class_int>` id **)**
Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
-
Enumerations
Enumerations
------------
------------
.. _enum_ARVRServer_RotationMode:
.. _enum_ARVRServer_RotationMode:
-enum **RotationMode**
+enum **RotationMode**:
- **RESET_FULL_ROTATION** = **0** --- Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world.
- **RESET_FULL_ROTATION** = **0** --- Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world.
- **RESET_BUT_KEEP_TILT** = **1** --- Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset.
- **RESET_BUT_KEEP_TILT** = **1** --- Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset.
@@ -85,7 +94,7 @@ enum **RotationMode**
.. _enum_ARVRServer_TrackerType:
.. _enum_ARVRServer_TrackerType:
-enum **TrackerType**
+enum **TrackerType**:
- **TRACKER_CONTROLLER** = **1** --- Our tracker tracks the location of a controller.
- **TRACKER_CONTROLLER** = **1** --- Our tracker tracks the location of a controller.
- **TRACKER_BASESTATION** = **2** --- Our tracker tracks the location of a base station.
- **TRACKER_BASESTATION** = **2** --- Our tracker tracks the location of a base station.
@@ -94,7 +103,6 @@ enum **TrackerType**
- **TRACKER_UNKNOWN** = **128** --- Used internally if we haven't set the tracker type yet.
- **TRACKER_UNKNOWN** = **128** --- Used internally if we haven't set the tracker type yet.
- **TRACKER_ANY** = **255** --- Used internally to select all trackers.
- **TRACKER_ANY** = **255** --- Used internally to select all trackers.
-- :ref:`float<class_float>` **world_scale** - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
+- :ref:`float<class_float>` **world_scale**
++----------+------------------------+
+| *Setter* | set_world_scale(value) |
++----------+------------------------+
+| *Getter* | get_world_scale() |
++----------+------------------------+
+
+Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
@@ -131,64 +152,63 @@ For this method to produce usable results tracking information should be availab
You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
-.. _class_ARVRServer_find_interface:
+.. _class_ARVRServer_find_interface:
- :ref:`ARVRInterface<class_ARVRInterface>` **find_interface** **(** :ref:`String<class_String>` name **)** const
- :ref:`ARVRInterface<class_ARVRInterface>` **find_interface** **(** :ref:`String<class_String>` name **)** const
Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it.
Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it.
Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look through the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true.
Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look through the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true.
@@ -186,7 +187,7 @@ Returns an array with the ids of the points that form the path found by AStar be
If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
-.. _class_AStar_get_point_connections:
+.. _class_AStar_get_point_connections:
- :ref:`PoolIntArray<class_PoolIntArray>` **get_point_connections** **(** :ref:`int<class_int>` id **)**
- :ref:`PoolIntArray<class_PoolIntArray>` **get_point_connections** **(** :ref:`int<class_int>` id **)**
@@ -206,52 +207,51 @@ Returns an array with the ids of the points that form the connect with the given
var neighbors = as.get_point_connections(1) # returns [2, 3]
var neighbors = as.get_point_connections(1) # returns [2, 3]
Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
-.. _class_AStar_get_point_position:
+.. _class_AStar_get_point_position:
- :ref:`Vector3<class_Vector3>` **get_point_position** **(** :ref:`int<class_int>` id **)** const
- :ref:`Vector3<class_Vector3>` **get_point_position** **(** :ref:`int<class_int>` id **)** const
Returns the position of the point associated with the given id.
Returns the position of the point associated with the given id.
-.. _class_AStar_get_point_weight_scale:
+.. _class_AStar_get_point_weight_scale:
- :ref:`float<class_float>` **get_point_weight_scale** **(** :ref:`int<class_int>` id **)** const
- :ref:`float<class_float>` **get_point_weight_scale** **(** :ref:`int<class_int>` id **)** const
Returns the weight scale of the point associated with the given id.
Returns the weight scale of the point associated with the given id.
-- :ref:`Texture<class_Texture>` **atlas** - The texture that contains the atlas. Can be any :ref:`Texture<class_Texture>` subtype.
+- :ref:`Texture<class_Texture>` **atlas**
+
++----------+------------------+
+| *Setter* | set_atlas(value) |
++----------+------------------+
+| *Getter* | get_atlas() |
++----------+------------------+
+
+The texture that contains the atlas. Can be any :ref:`Texture<class_Texture>` subtype.
.. _class_AtlasTexture_filter_clip:
.. _class_AtlasTexture_filter_clip:
-- :ref:`bool<class_bool>` **filter_clip** - If ``true`` clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
+- :ref:`bool<class_bool>` **filter_clip**
+
++----------+------------------------+
+| *Setter* | set_filter_clip(value) |
++----------+------------------------+
+| *Getter* | has_filter_clip() |
++----------+------------------------+
+
+If ``true`` clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
.. _class_AtlasTexture_margin:
.. _class_AtlasTexture_margin:
-- :ref:`Rect2<class_Rect2>` **margin** - The margin around the region. The :ref:`Rect2<class_Rect2>`'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin.
+- :ref:`Rect2<class_Rect2>` **margin**
+
++----------+-------------------+
+| *Setter* | set_margin(value) |
++----------+-------------------+
+| *Getter* | get_margin() |
++----------+-------------------+
+
+The margin around the region. The :ref:`Rect2<class_Rect2>`'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin.
.. _class_AtlasTexture_region:
.. _class_AtlasTexture_region:
-- :ref:`Rect2<class_Rect2>` **region** - The AtlasTexture's used region.
-- :ref:`float<class_float>` **volume_db** - Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: ``0``.
+- :ref:`float<class_float>` **volume_db**
+
++----------+----------------------+
+| *Setter* | set_volume_db(value) |
++----------+----------------------+
+| *Getter* | get_volume_db() |
++----------+----------------------+
+Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: ``0``.
-- :ref:`float<class_float>` **attack_us** - Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: ``20ms``.
+- :ref:`float<class_float>` **attack_us**
+
++----------+----------------------+
+| *Setter* | set_attack_us(value) |
++----------+----------------------+
+| *Getter* | get_attack_us() |
++----------+----------------------+
+
+Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: ``20ms``.
.. _class_AudioEffectCompressor_gain:
.. _class_AudioEffectCompressor_gain:
-- :ref:`float<class_float>` **gain** - Gain applied to the output signal.
+- :ref:`float<class_float>` **gain**
+
++----------+-----------------+
+| *Setter* | set_gain(value) |
++----------+-----------------+
+| *Getter* | get_gain() |
++----------+-----------------+
+
+Gain applied to the output signal.
.. _class_AudioEffectCompressor_mix:
.. _class_AudioEffectCompressor_mix:
-- :ref:`float<class_float>` **mix** - Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: ``1``.
+- :ref:`float<class_float>` **mix**
+
++----------+----------------+
+| *Setter* | set_mix(value) |
++----------+----------------+
+| *Getter* | get_mix() |
++----------+----------------+
+
+Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: ``1``.
.. _class_AudioEffectCompressor_ratio:
.. _class_AudioEffectCompressor_ratio:
-- :ref:`float<class_float>` **ratio** - Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: ``4``.
+- :ref:`float<class_float>` **ratio**
+
++----------+------------------+
+| *Setter* | set_ratio(value) |
++----------+------------------+
+| *Getter* | get_ratio() |
++----------+------------------+
+
+Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: ``4``.
.. _class_AudioEffectCompressor_release_ms:
.. _class_AudioEffectCompressor_release_ms:
-- :ref:`float<class_float>` **release_ms** - Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: ``250ms``.
+- :ref:`float<class_float>` **release_ms**
+
++----------+-----------------------+
+| *Setter* | set_release_ms(value) |
++----------+-----------------------+
+| *Getter* | get_release_ms() |
++----------+-----------------------+
+
+Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: ``250ms``.
.. _class_AudioEffectCompressor_sidechain:
.. _class_AudioEffectCompressor_sidechain:
-- :ref:`String<class_String>` **sidechain** - Reduce the sound level using another audio bus for threshold detection.
+- :ref:`String<class_String>` **sidechain**
+
++----------+----------------------+
+| *Setter* | set_sidechain(value) |
++----------+----------------------+
+| *Getter* | get_sidechain() |
++----------+----------------------+
+
+Reduce the sound level using another audio bus for threshold detection.
.. _class_AudioEffectCompressor_threshold:
.. _class_AudioEffectCompressor_threshold:
-- :ref:`float<class_float>` **threshold** - The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: ``0``.
+- :ref:`float<class_float>` **threshold**
+
++----------+----------------------+
+| *Setter* | set_threshold(value) |
++----------+----------------------+
+| *Getter* | get_threshold() |
++----------+----------------------+
+The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: ``0``.
-- :ref:`float<class_float>` **dry** - Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: ``1``.
+- :ref:`float<class_float>` **dry**
+
++----------+----------------+
+| *Setter* | set_dry(value) |
++----------+----------------+
+| *Getter* | get_dry() |
++----------+----------------+
+
+Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: ``1``.
.. _class_AudioEffectDelay_feedback/active:
.. _class_AudioEffectDelay_feedback/active:
-- :ref:`bool<class_bool>` **feedback/active** - If ``true`` feedback is enabled. Default value: ``false``.
+- :ref:`bool<class_bool>` **feedback/active**
+
++----------+----------------------------+
+| *Setter* | set_feedback_active(value) |
++----------+----------------------------+
+| *Getter* | is_feedback_active() |
++----------+----------------------------+
+
+If ``true`` feedback is enabled. Default value: ``false``.
.. _class_AudioEffectDelay_feedback/delay_ms:
.. _class_AudioEffectDelay_feedback/delay_ms:
-- :ref:`float<class_float>` **feedback/delay_ms** - Feedback delay time in milliseconds. Default value: ``340``.
+Sound level for ``tap1``. Default value: ``-6 dB``.
.. _class_AudioEffectDelay_feedback/lowpass:
.. _class_AudioEffectDelay_feedback/lowpass:
-- :ref:`float<class_float>` **feedback/lowpass** - Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: ``16000``.
+- :ref:`float<class_float>` **feedback/lowpass**
+
++----------+-----------------------------+
+| *Setter* | set_feedback_lowpass(value) |
++----------+-----------------------------+
+| *Getter* | get_feedback_lowpass() |
++----------+-----------------------------+
+
+Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: ``16000``.
.. _class_AudioEffectDelay_tap1/active:
.. _class_AudioEffectDelay_tap1/active:
-- :ref:`bool<class_bool>` **tap1/active** - If ``true``, ``tap1`` will be enabled. Default value: ``true``.
+- :ref:`bool<class_bool>` **tap1/active**
+
++----------+------------------------+
+| *Setter* | set_tap1_active(value) |
++----------+------------------------+
+| *Getter* | is_tap1_active() |
++----------+------------------------+
+
+If ``true``, ``tap1`` will be enabled. Default value: ``true``.
.. _class_AudioEffectDelay_tap1/delay_ms:
.. _class_AudioEffectDelay_tap1/delay_ms:
-- :ref:`float<class_float>` **tap1/delay_ms** - **Tap1** delay time in milliseconds. Default value: ``250ms``.
+- :ref:`float<class_float>` **tap1/delay_ms**
+
++----------+--------------------------+
+| *Setter* | set_tap1_delay_ms(value) |
++----------+--------------------------+
+| *Getter* | get_tap1_delay_ms() |
++----------+--------------------------+
+
+**Tap1** delay time in milliseconds. Default value: ``250ms``.
+Sound level for ``tap1``. Default value: ``-6 dB``.
.. _class_AudioEffectDelay_tap1/pan:
.. _class_AudioEffectDelay_tap1/pan:
-- :ref:`float<class_float>` **tap1/pan** - Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right). Default value: ``0.2``.
+- :ref:`float<class_float>` **tap1/pan**
+
++----------+---------------------+
+| *Setter* | set_tap1_pan(value) |
++----------+---------------------+
+| *Getter* | get_tap1_pan() |
++----------+---------------------+
+
+Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right). Default value: ``0.2``.
.. _class_AudioEffectDelay_tap2/active:
.. _class_AudioEffectDelay_tap2/active:
-- :ref:`bool<class_bool>` **tap2/active** - If ``true``, ``tap2`` will be enabled. Default value: ``true``.
+- :ref:`bool<class_bool>` **tap2/active**
+
++----------+------------------------+
+| *Setter* | set_tap2_active(value) |
++----------+------------------------+
+| *Getter* | is_tap2_active() |
++----------+------------------------+
+
+If ``true``, ``tap2`` will be enabled. Default value: ``true``.
.. _class_AudioEffectDelay_tap2/delay_ms:
.. _class_AudioEffectDelay_tap2/delay_ms:
-- :ref:`float<class_float>` **tap2/delay_ms** - **Tap2** delay time in milliseconds. Default value: ``500ms``.
+- :ref:`float<class_float>` **tap2/delay_ms**
+
++----------+--------------------------+
+| *Setter* | set_tap2_delay_ms(value) |
++----------+--------------------------+
+| *Getter* | get_tap2_delay_ms() |
++----------+--------------------------+
+
+**Tap2** delay time in milliseconds. Default value: ``500ms``.
+Sound level for ``tap2``. Default value: ``-12 dB``.
.. _class_AudioEffectDelay_tap2/pan:
.. _class_AudioEffectDelay_tap2/pan:
-- :ref:`float<class_float>` **tap2/pan** - Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right). Default value: ``-0.4``.
+- :ref:`float<class_float>` **tap2/pan**
+
++----------+---------------------+
+| *Setter* | set_tap2_pan(value) |
++----------+---------------------+
+| *Getter* | get_tap2_pan() |
++----------+---------------------+
+Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right). Default value: ``-0.4``.
- **MODE_CLIP** = **0** --- Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
- **MODE_CLIP** = **0** --- Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
- **MODE_ATAN** = **1**
- **MODE_ATAN** = **1**
@@ -30,7 +46,6 @@ enum **Mode**
- **MODE_OVERDRIVE** = **3** --- Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers.
- **MODE_OVERDRIVE** = **3** --- Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers.
- **MODE_WAVESHAPE** = **4** --- Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
- **MODE_WAVESHAPE** = **4** --- Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
-
Description
Description
-----------
-----------
@@ -43,22 +58,61 @@ Property Descriptions
.. _class_AudioEffectDistortion_drive:
.. _class_AudioEffectDistortion_drive:
-- :ref:`float<class_float>` **drive** - Distortion power. Value can range from 0 to 1. Default value: ``0``.
+- :ref:`float<class_float>` **drive**
+
++----------+------------------+
+| *Setter* | set_drive(value) |
++----------+------------------+
+| *Getter* | get_drive() |
++----------+------------------+
+
+Distortion power. Value can range from 0 to 1. Default value: ``0``.
.. _class_AudioEffectDistortion_keep_hf_hz:
.. _class_AudioEffectDistortion_keep_hf_hz:
-- :ref:`float<class_float>` **keep_hf_hz** - High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: ``16000``.
+- :ref:`float<class_float>` **keep_hf_hz**
+
++----------+-----------------------+
+| *Setter* | set_keep_hf_hz(value) |
++----------+-----------------------+
+| *Getter* | get_keep_hf_hz() |
++----------+-----------------------+
+
+High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: ``16000``.
-- :ref:`float<class_float>` **ceiling_db** - The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: ``-0.1dB``.
+- :ref:`float<class_float>` **ceiling_db**
+
++----------+-----------------------+
+| *Setter* | set_ceiling_db(value) |
++----------+-----------------------+
+| *Getter* | get_ceiling_db() |
++----------+-----------------------+
+
+The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: ``-0.1dB``.
.. _class_AudioEffectLimiter_soft_clip_db:
.. _class_AudioEffectLimiter_soft_clip_db:
-- :ref:`float<class_float>` **soft_clip_db** - Applies a gain to the limited waves. Value can range from 0 to 6. Default value: ``2dB``.
+- :ref:`float<class_float>` **soft_clip_db**
+
++----------+-------------------------+
+| *Setter* | set_soft_clip_db(value) |
++----------+-------------------------+
+| *Getter* | get_soft_clip_db() |
++----------+-------------------------+
+
+Applies a gain to the limited waves. Value can range from 0 to 6. Default value: ``2dB``.
.. _class_AudioEffectLimiter_soft_clip_ratio:
.. _class_AudioEffectLimiter_soft_clip_ratio:
- :ref:`float<class_float>` **soft_clip_ratio**
- :ref:`float<class_float>` **soft_clip_ratio**
++----------+----------------------------+
+| *Setter* | set_soft_clip_ratio(value) |
++----------+----------------------------+
+| *Getter* | get_soft_clip_ratio() |
++----------+----------------------------+
+
.. _class_AudioEffectLimiter_threshold_db:
.. _class_AudioEffectLimiter_threshold_db:
-- :ref:`float<class_float>` **threshold_db** - Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: ``0dB``.
+- :ref:`float<class_float>` **threshold_db**
+
++----------+-------------------------+
+| *Setter* | set_threshold_db(value) |
++----------+-------------------------+
+| *Getter* | get_threshold_db() |
++----------+-------------------------+
+Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: ``0dB``.
-- :ref:`float<class_float>` **depth** - Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: ``1``.
+- :ref:`float<class_float>` **depth**
+
++----------+------------------+
+| *Setter* | set_depth(value) |
++----------+------------------+
+| *Getter* | get_depth() |
++----------+------------------+
+
+Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: ``1``.
.. _class_AudioEffectPhaser_feedback:
.. _class_AudioEffectPhaser_feedback:
-- :ref:`float<class_float>` **feedback** - Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: ``0.7``.
+- :ref:`float<class_float>` **feedback**
+
++----------+---------------------+
+| *Setter* | set_feedback(value) |
++----------+---------------------+
+| *Getter* | get_feedback() |
++----------+---------------------+
+
+Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: ``0.7``.
.. _class_AudioEffectPhaser_range_max_hz:
.. _class_AudioEffectPhaser_range_max_hz:
-- :ref:`float<class_float>` **range_max_hz** - Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``1600hz``.
+- :ref:`float<class_float>` **range_max_hz**
+
++----------+-------------------------+
+| *Setter* | set_range_max_hz(value) |
++----------+-------------------------+
+| *Getter* | get_range_max_hz() |
++----------+-------------------------+
+
+Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``1600hz``.
.. _class_AudioEffectPhaser_range_min_hz:
.. _class_AudioEffectPhaser_range_min_hz:
-- :ref:`float<class_float>` **range_min_hz** - Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``440hz``.
+- :ref:`float<class_float>` **range_min_hz**
+
++----------+-------------------------+
+| *Setter* | set_range_min_hz(value) |
++----------+-------------------------+
+| *Getter* | get_range_min_hz() |
++----------+-------------------------+
+
+Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``440hz``.
.. _class_AudioEffectPhaser_rate_hz:
.. _class_AudioEffectPhaser_rate_hz:
-- :ref:`float<class_float>` **rate_hz** - Adjusts the rate at which the effect sweeps up and down across the frequency range.
+- :ref:`float<class_float>` **rate_hz**
+
++----------+--------------------+
+| *Setter* | set_rate_hz(value) |
++----------+--------------------+
+| *Getter* | get_rate_hz() |
++----------+--------------------+
+Adjusts the rate at which the effect sweeps up and down across the frequency range.
-- :ref:`float<class_float>` **damping** - Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: ``1``.
+- :ref:`float<class_float>` **damping**
+
++----------+--------------------+
+| *Setter* | set_damping(value) |
++----------+--------------------+
+| *Getter* | get_damping() |
++----------+--------------------+
+
+Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: ``1``.
.. _class_AudioEffectReverb_dry:
.. _class_AudioEffectReverb_dry:
-- :ref:`float<class_float>` **dry** - Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: ``1``.
+- :ref:`float<class_float>` **dry**
+
++----------+----------------+
+| *Setter* | set_dry(value) |
++----------+----------------+
+| *Getter* | get_dry() |
++----------+----------------+
+
+Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: ``1``.
.. _class_AudioEffectReverb_hipass:
.. _class_AudioEffectReverb_hipass:
-- :ref:`float<class_float>` **hipass** - High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: ``0``.
+- :ref:`float<class_float>` **hipass**
+
++----------+----------------+
+| *Setter* | set_hpf(value) |
++----------+----------------+
+| *Getter* | get_hpf() |
++----------+----------------+
+
+High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: ``0``.
.. _class_AudioEffectReverb_predelay_feedback:
.. _class_AudioEffectReverb_predelay_feedback:
-- :ref:`float<class_float>` **predelay_feedback** - Output percent of predelay. Value can range from 0 to 1. Default value: ``1``.
+Output percent of predelay. Value can range from 0 to 1. Default value: ``1``.
.. _class_AudioEffectReverb_predelay_msec:
.. _class_AudioEffectReverb_predelay_msec:
-- :ref:`float<class_float>` **predelay_msec** - Time between the original signal and the early reflections of the reverb signal. Default value: ``150ms``.
+- :ref:`float<class_float>` **predelay_msec**
+
++----------+--------------------------+
+| *Setter* | set_predelay_msec(value) |
++----------+--------------------------+
+| *Getter* | get_predelay_msec() |
++----------+--------------------------+
+
+Time between the original signal and the early reflections of the reverb signal. Default value: ``150ms``.
.. _class_AudioEffectReverb_room_size:
.. _class_AudioEffectReverb_room_size:
-- :ref:`float<class_float>` **room_size** - Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: ``0.8``.
+- :ref:`float<class_float>` **room_size**
+
++----------+----------------------+
+| *Setter* | set_room_size(value) |
++----------+----------------------+
+| *Getter* | get_room_size() |
++----------+----------------------+
+
+Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: ``0.8``.
.. _class_AudioEffectReverb_spread:
.. _class_AudioEffectReverb_spread:
-- :ref:`float<class_float>` **spread** - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: ``1``.
+- :ref:`float<class_float>` **spread**
+
++----------+-------------------+
+| *Setter* | set_spread(value) |
++----------+-------------------+
+| *Getter* | get_spread() |
++----------+-------------------+
+
+Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: ``1``.
.. _class_AudioEffectReverb_wet:
.. _class_AudioEffectReverb_wet:
-- :ref:`float<class_float>` **wet** - Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: ``0.5``.
+- :ref:`float<class_float>` **wet**
+
++----------+----------------+
+| *Setter* | set_wet(value) |
++----------+----------------+
+| *Getter* | get_wet() |
++----------+----------------+
+Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: ``0.5``.
- **MIX_TARGET_STEREO** = **0** --- The audio will be played only on the first channel.
- **MIX_TARGET_STEREO** = **0** --- The audio will be played only on the first channel.
- **MIX_TARGET_SURROUND** = **1** --- The audio will be played on all surround channels.
- **MIX_TARGET_SURROUND** = **1** --- The audio will be played on all surround channels.
- **MIX_TARGET_CENTER** = **2** --- The audio will be played on the second channel, which is usually the center.
- **MIX_TARGET_CENTER** = **2** --- The audio will be played on the second channel, which is usually the center.
-
Description
Description
-----------
-----------
@@ -60,68 +80,125 @@ Tutorials
- :doc:`../learning/features/audio/index`
- :doc:`../learning/features/audio/index`
- :doc:`../tutorials/audio/audio_streams`
- :doc:`../tutorials/audio/audio_streams`
-
Property Descriptions
Property Descriptions
---------------------
---------------------
.. _class_AudioStreamPlayer_autoplay:
.. _class_AudioStreamPlayer_autoplay:
-- :ref:`bool<class_bool>` **autoplay** - If ``true`` audio plays when added to scene tree. Default value: ``false``.
+- :ref:`bool<class_bool>` **autoplay**
+
++----------+-----------------------+
+| *Setter* | set_autoplay(value) |
++----------+-----------------------+
+| *Getter* | is_autoplay_enabled() |
++----------+-----------------------+
+
+If ``true`` audio plays when added to scene tree. Default value: ``false``.
.. _class_AudioStreamPlayer_bus:
.. _class_AudioStreamPlayer_bus:
-- :ref:`String<class_String>` **bus** - Bus on which this audio is playing.
+- :ref:`String<class_String>` **bus**
+
++----------+----------------+
+| *Setter* | set_bus(value) |
++----------+----------------+
+| *Getter* | get_bus() |
++----------+----------------+
+
+Bus on which this audio is playing.
.. _class_AudioStreamPlayer_mix_target:
.. _class_AudioStreamPlayer_mix_target:
-- :ref:`MixTarget<enum_AudioStreamPlayer_MixTarget>` **mix_target** - If the audio configuration has more than two speakers, this sets the target channels. See ``MIX_TARGET_*`` constants.
+Amount how much the filter affects the loudness, in dB.
.. _class_AudioStreamPlayer3D_attenuation_model:
.. _class_AudioStreamPlayer3D_attenuation_model:
-- :ref:`AttenuationModel<enum_AudioStreamPlayer3D_AttenuationModel>` **attenuation_model** - Decides if audio should get quieter with distance linearly, quadratically or logarithmically.
+Decides if audio should get quieter with distance linearly, quadratically or logarithmically.
.. _class_AudioStreamPlayer3D_autoplay:
.. _class_AudioStreamPlayer3D_autoplay:
-- :ref:`bool<class_bool>` **autoplay** - If ``true`` audio plays when added to scene tree. Default value: ``false``.
+- :ref:`bool<class_bool>` **autoplay**
+
++----------+-----------------------+
+| *Setter* | set_autoplay(value) |
++----------+-----------------------+
+| *Getter* | is_autoplay_enabled() |
++----------+-----------------------+
+
+If ``true`` audio plays when added to scene tree. Default value: ``false``.
.. _class_AudioStreamPlayer3D_bus:
.. _class_AudioStreamPlayer3D_bus:
-- :ref:`String<class_String>` **bus** - Bus on which this audio is playing.
+- :ref:`String<class_String>` **bus**
+
++----------+----------------+
+| *Setter* | set_bus(value) |
++----------+----------------+
+| *Getter* | get_bus() |
++----------+----------------+
+
+Bus on which this audio is playing.
.. _class_AudioStreamPlayer3D_doppler_tracking:
.. _class_AudioStreamPlayer3D_doppler_tracking:
-- :ref:`DopplerTracking<enum_AudioStreamPlayer3D_DopplerTracking>` **doppler_tracking** - Decides in which step the Doppler effect should be calculated.
-- :ref:`float<class_float>` **emission_angle_filter_attenuation_db** - dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB.
+dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB.
.. _class_AudioStreamPlayer3D_max_db:
.. _class_AudioStreamPlayer3D_max_db:
-- :ref:`float<class_float>` **max_db** - Sets the absolute maximum of the soundlevel, in dB.
+- :ref:`float<class_float>` **max_db**
+
++----------+-------------------+
+| *Setter* | set_max_db(value) |
++----------+-------------------+
+| *Getter* | get_max_db() |
++----------+-------------------+
+
+Sets the absolute maximum of the soundlevel, in dB.
.. _class_AudioStreamPlayer3D_max_distance:
.. _class_AudioStreamPlayer3D_max_distance:
-- :ref:`float<class_float>` **max_distance** - Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0.
+- :ref:`float<class_float>` **max_distance**
+
++----------+-------------------------+
+| *Setter* | set_max_distance(value) |
++----------+-------------------------+
+| *Getter* | get_max_distance() |
++----------+-------------------------+
+
+Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0.
.. _class_AudioStreamPlayer3D_out_of_range_mode:
.. _class_AudioStreamPlayer3D_out_of_range_mode:
-- :ref:`OutOfRangeMode<enum_AudioStreamPlayer3D_OutOfRangeMode>` **out_of_range_mode** - Decides if audio should pause when source is outside of 'max_distance' range.
- **COPY_MODE_DISABLED** = **0** --- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
- **COPY_MODE_DISABLED** = **0** --- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
- **COPY_MODE_RECT** = **1** --- BackBufferCopy buffers a rectangular region.
- **COPY_MODE_RECT** = **1** --- BackBufferCopy buffers a rectangular region.
- **COPY_MODE_VIEWPORT** = **2** --- BackBufferCopy buffers the entire screen.
- **COPY_MODE_VIEWPORT** = **2** --- BackBufferCopy buffers the entire screen.
-
Description
Description
-----------
-----------
@@ -37,10 +46,25 @@ Property Descriptions
.. _class_BackBufferCopy_copy_mode:
.. _class_BackBufferCopy_copy_mode:
-- :ref:`CopyMode<enum_BackBufferCopy_CopyMode>` **copy_mode** - Buffer mode. See ``COPY_MODE_*`` constants.
- **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode.
- **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode.
- **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake.
- **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake.
-
Description
Description
-----------
-----------
@@ -62,60 +87,133 @@ Tutorials
---------
---------
- :doc:`../tutorials/3d/baked_lightmaps`
- :doc:`../tutorials/3d/baked_lightmaps`
-
Property Descriptions
Property Descriptions
---------------------
---------------------
.. _class_BakedLightmap_bake_cell_size:
.. _class_BakedLightmap_bake_cell_size:
-- :ref:`float<class_float>` **bake_cell_size** - Grid subdivision size for lightmapper calculation. Default value of ``0.25`` will work for most cases. Increase for better lighting on small details or if your scene is very large.
+- :ref:`float<class_float>` **bake_cell_size**
+
++----------+---------------------------+
+| *Setter* | set_bake_cell_size(value) |
++----------+---------------------------+
+| *Getter* | get_bake_cell_size() |
++----------+---------------------------+
+
+Grid subdivision size for lightmapper calculation. Default value of ``0.25`` will work for most cases. Increase for better lighting on small details or if your scene is very large.
.. _class_BakedLightmap_bake_energy:
.. _class_BakedLightmap_bake_energy:
- :ref:`float<class_float>` **bake_energy**
- :ref:`float<class_float>` **bake_energy**
++----------+-------------------+
+| *Setter* | set_energy(value) |
++----------+-------------------+
+| *Getter* | get_energy() |
++----------+-------------------+
+
.. _class_BakedLightmap_bake_extents:
.. _class_BakedLightmap_bake_extents:
-- :ref:`Vector3<class_Vector3>` **bake_extents** - Size of affected area.
+- :ref:`Vector3<class_Vector3>` **bake_extents**
+
++----------+--------------------+
+| *Setter* | set_extents(value) |
++----------+--------------------+
+| *Getter* | get_extents() |
++----------+--------------------+
+
+Size of affected area.
.. _class_BakedLightmap_bake_hdr:
.. _class_BakedLightmap_bake_hdr:
-- :ref:`bool<class_bool>` **bake_hdr** - If ``true`` lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller lightmap. Default value:``false``.
+- :ref:`bool<class_bool>` **bake_hdr**
+
++----------+----------------+
+| *Setter* | set_hdr(value) |
++----------+----------------+
+| *Getter* | is_hdr() |
++----------+----------------+
+
+If ``true`` lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller lightmap. Default value:``false``.
.. _class_BakedLightmap_bake_mode:
.. _class_BakedLightmap_bake_mode:
-- :ref:`BakeMode<enum_BakedLightmap_BakeMode>` **bake_mode** - Lightmapping mode. See :ref:`BakeMode<enum_@GlobalScope_BakeMode>`.
+Lightmapping mode. See :ref:`BakeMode<enum_@GlobalScope_BakeMode>`.
.. _class_BakedLightmap_bake_propagation:
.. _class_BakedLightmap_bake_propagation:
- :ref:`float<class_float>` **bake_propagation**
- :ref:`float<class_float>` **bake_propagation**
++----------+------------------------+
+| *Setter* | set_propagation(value) |
++----------+------------------------+
+| *Getter* | get_propagation() |
++----------+------------------------+
+
.. _class_BakedLightmap_bake_quality:
.. _class_BakedLightmap_bake_quality:
-- :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` **bake_quality** - Three quality modes are available. Higher quality requires more rendering time. See :ref:`BakeQuality<enum_@GlobalScope_BakeQuality>`.
+Three quality modes are available. Higher quality requires more rendering time. See :ref:`BakeQuality<enum_@GlobalScope_BakeQuality>`.
.. _class_BakedLightmap_capture_cell_size:
.. _class_BakedLightmap_capture_cell_size:
-- :ref:`float<class_float>` **capture_cell_size** - Grid size used for real-time capture information on dynamic objects. Cannot be larger than :ref:`bake_cell_size<class_BakedLightmap_bake_cell_size>`.
This signal is emitted every time the button is toggled or pressed (i.e. activated, so on ``button_down`` if "Click on press" is active and on ``button_up`` otherwise).
This signal is emitted every time the button is toggled or pressed (i.e. activated, so on ``button_down`` if "Click on press" is active and on ``button_up`` otherwise).
This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the *pressed* argument.
This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the *pressed* argument.
-
Enumerations
Enumerations
------------
------------
.. _enum_BaseButton_ActionMode:
.. _enum_BaseButton_ActionMode:
-enum **ActionMode**
+enum **ActionMode**:
- **ACTION_MODE_BUTTON_PRESS** = **0** --- Require just a press to consider the button clicked.
- **ACTION_MODE_BUTTON_PRESS** = **0** --- Require just a press to consider the button clicked.
- **ACTION_MODE_BUTTON_RELEASE** = **1** --- Require a press and a subsequent release before considering the button clicked.
- **ACTION_MODE_BUTTON_RELEASE** = **1** --- Require a press and a subsequent release before considering the button clicked.
.. _enum_BaseButton_DrawMode:
.. _enum_BaseButton_DrawMode:
-enum **DrawMode**
+enum **DrawMode**:
- **DRAW_NORMAL** = **0** --- The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons.
- **DRAW_NORMAL** = **0** --- The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons.
- **DRAW_PRESSED** = **1** --- The state of buttons are pressed.
- **DRAW_PRESSED** = **1** --- The state of buttons are pressed.
- **DRAW_HOVER** = **2** --- The state of buttons are hovered.
- **DRAW_HOVER** = **2** --- The state of buttons are hovered.
- **DRAW_DISABLED** = **3** --- The state of buttons are disabled.
- **DRAW_DISABLED** = **3** --- The state of buttons are disabled.
-
Description
Description
-----------
-----------
@@ -87,64 +108,126 @@ Property Descriptions
.. _class_BaseButton_action_mode:
.. _class_BaseButton_action_mode:
-- :ref:`ActionMode<enum_BaseButton_ActionMode>` **action_mode** - Determines when the button is considered clicked, one of the ACTION_MODE\_\* constants.
+Determines when the button is considered clicked, one of the ACTION_MODE\_\* constants.
.. _class_BaseButton_button_mask:
.. _class_BaseButton_button_mask:
-- :ref:`int<class_int>` **button_mask** - Binary mask to choose which mouse buttons this button will respond to.
+- :ref:`int<class_int>` **button_mask**
+
++----------+------------------------+
+| *Setter* | set_button_mask(value) |
++----------+------------------------+
+| *Getter* | get_button_mask() |
++----------+------------------------+
+
+Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, set this to 3, because it's BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT.
To allow both left-click and right-click, set this to 3, because it's BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT.
.. _class_BaseButton_disabled:
.. _class_BaseButton_disabled:
-- :ref:`bool<class_bool>` **disabled** - If ``true`` the button is in disabled state and can't be clicked or toggled.
+- :ref:`bool<class_bool>` **disabled**
+
++----------+---------------------+
+| *Setter* | set_disabled(value) |
++----------+---------------------+
+| *Getter* | is_disabled() |
++----------+---------------------+
+
+If ``true`` the button is in disabled state and can't be clicked or toggled.
.. _class_BaseButton_enabled_focus_mode:
.. _class_BaseButton_enabled_focus_mode:
-- :ref:`FocusMode<enum_Control_FocusMode>` **enabled_focus_mode** - Focus access mode to use when switching between enabled/disabled (see :ref:`Control.set_focus_mode<class_Control_set_focus_mode>` and :ref:`disabled<class_BaseButton_disabled>`).
+Focus access mode to use when switching between enabled/disabled (see :ref:`Control.set_focus_mode<class_Control_set_focus_mode>` and :ref:`disabled<class_BaseButton_disabled>`).
.. _class_BaseButton_group:
.. _class_BaseButton_group:
-- :ref:`ButtonGroup<class_ButtonGroup>` **group** - :ref:`ButtonGroup<class_ButtonGroup>` associated to the button.
+:ref:`ButtonGroup<class_ButtonGroup>` associated to the button.
.. _class_BaseButton_pressed:
.. _class_BaseButton_pressed:
-- :ref:`bool<class_bool>` **pressed** - If ``true`` the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
+- :ref:`bool<class_bool>` **pressed**
+
++----------+--------------------+
+| *Setter* | set_pressed(value) |
++----------+--------------------+
+| *Getter* | is_pressed() |
++----------+--------------------+
+
+If ``true`` the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
.. _class_BaseButton_shortcut:
.. _class_BaseButton_shortcut:
-- :ref:`ShortCut<class_ShortCut>` **shortcut** - Shortcut associated to the button.
+- :ref:`ShortCut<class_ShortCut>` **shortcut**
+
++----------+---------------------+
+| *Setter* | set_shortcut(value) |
++----------+---------------------+
+| *Getter* | get_shortcut() |
++----------+---------------------+
+
+Shortcut associated to the button.
.. _class_BaseButton_toggle_mode:
.. _class_BaseButton_toggle_mode:
-- :ref:`bool<class_bool>` **toggle_mode** - If ``true`` the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
+- :ref:`bool<class_bool>` **toggle_mode**
++----------+------------------------+
+| *Setter* | set_toggle_mode(value) |
++----------+------------------------+
+| *Getter* | is_toggle_mode() |
++----------+------------------------+
+
+If ``true`` the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW\_\* enum.
Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW\_\* enum.
-- :ref:`Vector3<class_Vector3>` **x** - The basis matrix's x vector.
+- :ref:`Vector3<class_Vector3>` **x**
+
+The basis matrix's x vector.
.. _class_Basis_y:
.. _class_Basis_y:
-- :ref:`Vector3<class_Vector3>` **y** - The basis matrix's y vector.
+- :ref:`Vector3<class_Vector3>` **y**
+
+The basis matrix's y vector.
.. _class_Basis_z:
.. _class_Basis_z:
-- :ref:`Vector3<class_Vector3>` **z** - The basis matrix's z vector.
+- :ref:`Vector3<class_Vector3>` **z**
+The basis matrix's z vector.
Method Descriptions
Method Descriptions
-------------------
-------------------
-.. _class_Basis_Basis:
+.. _class_Basis_Basis:
- :ref:`Basis<class_Basis>` **Basis** **(** :ref:`Quat<class_Quat>` from **)**
- :ref:`Basis<class_Basis>` **Basis** **(** :ref:`Quat<class_Quat>` from **)**
Create a rotation matrix from the given quaternion.
Create a rotation matrix from the given quaternion.
-.. _class_Basis_Basis:
+.. _class_Basis_Basis:
- :ref:`Basis<class_Basis>` **Basis** **(** :ref:`Vector3<class_Vector3>` from **)**
- :ref:`Basis<class_Basis>` **Basis** **(** :ref:`Vector3<class_Vector3>` from **)**
Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle).
Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle).
Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle).
Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle).
This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code.
This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code.
Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
- :ref:`Vector3<class_Vector3>` **xform** **(** :ref:`Vector3<class_Vector3>` v **)**
- :ref:`Vector3<class_Vector3>` **xform** **(** :ref:`Vector3<class_Vector3>` v **)**
Return a vector transformed (multiplied) by the matrix.
Return a vector transformed (multiplied) by the matrix.
-.. _class_Basis_xform_inv:
+.. _class_Basis_xform_inv:
- :ref:`Vector3<class_Vector3>` **xform_inv** **(** :ref:`Vector3<class_Vector3>` v **)**
- :ref:`Vector3<class_Vector3>` **xform_inv** **(** :ref:`Vector3<class_Vector3>` v **)**
Return a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection.
Return a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection.
Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to ``threshold`` or less, and true in other case.
Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to ``threshold`` or less, and true in other case.
-.. _class_BitMap_get_bit:
+.. _class_BitMap_get_bit:
- :ref:`bool<class_bool>` **get_bit** **(** :ref:`Vector2<class_Vector2>` position **)** const
- :ref:`bool<class_bool>` **get_bit** **(** :ref:`Vector2<class_Vector2>` position **)** const
Adds a character to the font, where ``character`` is the unicode value, ``texture`` is the texture index, ``rect`` is the region in the texture (in pixels!), ``align`` is the (optional) alignment for the character and ``advance`` is the (optional) advance.
Adds a character to the font, where ``character`` is the unicode value, ``texture`` is the texture index, ``rect`` is the region in the texture (in pixels!), ``align`` is the (optional) alignment for the character and ``advance`` is the (optional) advance.
Adds a kerning pair to the ``BitmapFont`` as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
Adds a kerning pair to the ``BitmapFont`` as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
- :ref:`bool<class_bool>` **bool** **(** :ref:`int<class_int>` from **)**
- :ref:`bool<class_bool>` **bool** **(** :ref:`int<class_int>` from **)**
Cast an :ref:`int<class_int>` value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case.
Cast an :ref:`int<class_int>` value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case.
-.. _class_bool_bool:
+.. _class_bool_bool:
- :ref:`bool<class_bool>` **bool** **(** :ref:`float<class_float>` from **)**
- :ref:`bool<class_bool>` **bool** **(** :ref:`float<class_float>` from **)**
Cast a :ref:`float<class_float>` value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case.
Cast a :ref:`float<class_float>` value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case.
-.. _class_bool_bool:
+.. _class_bool_bool:
- :ref:`bool<class_bool>` **bool** **(** :ref:`String<class_String>` from **)**
- :ref:`bool<class_bool>` **bool** **(** :ref:`String<class_String>` from **)**
Cast a :ref:`String<class_String>` value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: ``bool('False')`` returns true, ``bool('')``. returns false
Cast a :ref:`String<class_String>` value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: ``bool('False')`` returns true, ``bool('')``. returns false
- **ALIGN_BEGIN** = **0** --- Aligns children with the beginning of the container.
- **ALIGN_BEGIN** = **0** --- Aligns children with the beginning of the container.
- **ALIGN_CENTER** = **1** --- Aligns children with the center of the container.
- **ALIGN_CENTER** = **1** --- Aligns children with the center of the container.
- **ALIGN_END** = **2** --- Aligns children with the end of the container.
- **ALIGN_END** = **2** --- Aligns children with the end of the container.
-
Description
Description
-----------
-----------
@@ -45,16 +53,22 @@ Property Descriptions
.. _class_BoxContainer_alignment:
.. _class_BoxContainer_alignment:
-- :ref:`AlignMode<enum_BoxContainer_AlignMode>` **alignment** - The alignment of the container's children (must be one of ALIGN_BEGIN, ALIGN_CENTER, or ALIGN_END).
+Text alignment policy for the button's text, use one of the ALIGN\_\* constants.
.. _class_Button_clip_text:
.. _class_Button_clip_text:
-- :ref:`bool<class_bool>` **clip_text** - When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default.
+- :ref:`bool<class_bool>` **clip_text**
+
++----------+----------------------+
+| *Setter* | set_clip_text(value) |
++----------+----------------------+
+| *Getter* | get_clip_text() |
++----------+----------------------+
+
+When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default.
- **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``).
- **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``).
@@ -60,19 +91,18 @@ enum **DopplerTracking**
.. _enum_Camera_Projection:
.. _enum_Camera_Projection:
-enum **Projection**
+enum **Projection**:
- **PROJECTION_PERSPECTIVE** = **0** --- Perspective Projection (object's size on the screen becomes smaller when far away).
- **PROJECTION_PERSPECTIVE** = **0** --- Perspective Projection (object's size on the screen becomes smaller when far away).
- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
.. _enum_Camera_KeepAspect:
.. _enum_Camera_KeepAspect:
-enum **KeepAspect**
+enum **KeepAspect**:
- **KEEP_WIDTH** = **0** --- Preserves the horizontal aspect ratio.
- **KEEP_WIDTH** = **0** --- Preserves the horizontal aspect ratio.
- **KEEP_HEIGHT** = **1** --- Preserves the vertical aspect ratio.
- **KEEP_HEIGHT** = **1** --- Preserves the vertical aspect ratio.
-
Description
Description
-----------
-----------
@@ -83,128 +113,222 @@ Property Descriptions
.. _class_Camera_cull_mask:
.. _class_Camera_cull_mask:
-- :ref:`int<class_int>` **cull_mask** - The culling mask that describes which 3D render layers are rendered by this camera.
+- :ref:`int<class_int>` **cull_mask**
+
++----------+----------------------+
+| *Setter* | set_cull_mask(value) |
++----------+----------------------+
+| *Getter* | get_cull_mask() |
++----------+----------------------+
+
+The culling mask that describes which 3D render layers are rendered by this camera.
.. _class_Camera_current:
.. _class_Camera_current:
-- :ref:`bool<class_bool>` **current** - If ``true`` the ancestor :ref:`Viewport<class_Viewport>` is currently using this Camera. Default value: ``false``.
+- :ref:`bool<class_bool>` **current**
+
++----------+--------------------+
+| *Setter* | set_current(value) |
++----------+--------------------+
+| *Getter* | is_current() |
++----------+--------------------+
+
+If ``true`` the ancestor :ref:`Viewport<class_Viewport>` is currently using this Camera. Default value: ``false``.
.. _class_Camera_doppler_tracking:
.. _class_Camera_doppler_tracking:
-- :ref:`DopplerTracking<enum_Camera_DopplerTracking>` **doppler_tracking** - If not ``DOPPLER_TRACKING_DISABLED`` this Camera will simulate the Doppler effect for objects changed in particular ``_process`` methods. Default value: ``DOPPLER_TRACKING_DISABLED``.
+If not ``DOPPLER_TRACKING_DISABLED`` this Camera will simulate the Doppler effect for objects changed in particular ``_process`` methods. Default value: ``DOPPLER_TRACKING_DISABLED``.
.. _class_Camera_environment:
.. _class_Camera_environment:
-- :ref:`Environment<class_Environment>` **environment** - The :ref:`Environment<class_Environment>` to use for this Camera.
+The :ref:`Environment<class_Environment>` to use for this Camera.
.. _class_Camera_far:
.. _class_Camera_far:
-- :ref:`float<class_float>` **far** - The distance to the far culling boundary for this Camera relative to its local z-axis.
+- :ref:`float<class_float>` **far**
+
++----------+-----------------+
+| *Setter* | set_zfar(value) |
++----------+-----------------+
+| *Getter* | get_zfar() |
++----------+-----------------+
+
+The distance to the far culling boundary for this Camera relative to its local z-axis.
.. _class_Camera_fov:
.. _class_Camera_fov:
-- :ref:`float<class_float>` **fov** - The camera's field of view angle (in degrees). Only applicable in perspective mode. Since :ref:`keep_aspect<class_Camera_keep_aspect>` locks one axis, ``fov`` sets the other axis' field of view angle.
+- :ref:`float<class_float>` **fov**
+
++----------+----------------+
+| *Setter* | set_fov(value) |
++----------+----------------+
+| *Getter* | get_fov() |
++----------+----------------+
+
+The camera's field of view angle (in degrees). Only applicable in perspective mode. Since :ref:`keep_aspect<class_Camera_keep_aspect>` locks one axis, ``fov`` sets the other axis' field of view angle.
.. _class_Camera_h_offset:
.. _class_Camera_h_offset:
-- :ref:`float<class_float>` **h_offset** - The horizontal (X) offset of the Camera viewport.
+- :ref:`float<class_float>` **h_offset**
+
++----------+---------------------+
+| *Setter* | set_h_offset(value) |
++----------+---------------------+
+| *Getter* | get_h_offset() |
++----------+---------------------+
+
+The horizontal (X) offset of the Camera viewport.
.. _class_Camera_keep_aspect:
.. _class_Camera_keep_aspect:
-- :ref:`KeepAspect<enum_Camera_KeepAspect>` **keep_aspect** - The axis to lock during :ref:`fov<class_Camera_fov>`/:ref:`size<class_Camera_size>` adjustments. Can be either ``KEEP_WIDTH`` or ``KEEP_HEIGHT``.
+The axis to lock during :ref:`fov<class_Camera_fov>`/:ref:`size<class_Camera_size>` adjustments. Can be either ``KEEP_WIDTH`` or ``KEEP_HEIGHT``.
.. _class_Camera_near:
.. _class_Camera_near:
-- :ref:`float<class_float>` **near** - The distance to the near culling boundary for this Camera relative to its local z-axis.
+- :ref:`float<class_float>` **near**
+
++----------+------------------+
+| *Setter* | set_znear(value) |
++----------+------------------+
+| *Getter* | get_znear() |
++----------+------------------+
+
+The distance to the near culling boundary for this Camera relative to its local z-axis.
.. _class_Camera_projection:
.. _class_Camera_projection:
-- :ref:`Projection<enum_Camera_Projection>` **projection** - The camera's projection mode. In ``PROJECTION_PERSPECTIVE`` mode, objects' z-distance from the camera's local space scales their perceived size.
+The camera's projection mode. In ``PROJECTION_PERSPECTIVE`` mode, objects' z-distance from the camera's local space scales their perceived size.
.. _class_Camera_size:
.. _class_Camera_size:
-- :ref:`float<class_float>` **size** - The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since :ref:`keep_aspect<class_Camera_keep_aspect>` locks on axis, ``size`` sets the other axis' size length.
+- :ref:`float<class_float>` **size**
+
++----------+-----------------+
+| *Setter* | set_size(value) |
++----------+-----------------+
+| *Getter* | get_size() |
++----------+-----------------+
+
+The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since :ref:`keep_aspect<class_Camera_keep_aspect>` locks on axis, ``size`` sets the other axis' size length.
.. _class_Camera_v_offset:
.. _class_Camera_v_offset:
-- :ref:`float<class_float>` **v_offset** - The vertical (Y) offset of the Camera viewport.
Returns ``true`` if the given position is behind the Camera. Note that a position which returns ``false`` may still be outside the Camera's field of view.
Returns ``true`` if the given position is behind the Camera. Note that a position which returns ``false`` may still be outside the Camera's field of view.
-.. _class_Camera_make_current:
+.. _class_Camera_make_current:
- void **make_current** **(** **)**
- void **make_current** **(** **)**
Makes this camera the current Camera for the :ref:`Viewport<class_Viewport>` (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
Makes this camera the current Camera for the :ref:`Viewport<class_Viewport>` (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc.
Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc.
Returns a normal vector in worldspace, that is the result of projecting a point on the :ref:`Viewport<class_Viewport>` rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
Returns a normal vector in worldspace, that is the result of projecting a point on the :ref:`Viewport<class_Viewport>` rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
Returns a 3D position in worldspace, that is the result of projecting a point on the :ref:`Viewport<class_Viewport>` rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
Returns a 3D position in worldspace, that is the result of projecting a point on the :ref:`Viewport<class_Viewport>` rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
Sets the camera projection to orthogonal mode, by specifying a width and the *near* and *far* clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
Sets the camera projection to orthogonal mode, by specifying a width and the *near* and *far* clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
Sets the camera projection to perspective mode, by specifying a *FOV* Y angle in degrees (FOV means Field of View), and the *near* and *far* clip planes in worldspace units.
Sets the camera projection to perspective mode, by specifying a *FOV* Y angle in degrees (FOV means Field of View), and the *near* and *far* clip planes in worldspace units.
+The Camera2D's anchor point. See ``ANCHOR_MODE_*`` constants.
.. _class_Camera2D_current:
.. _class_Camera2D_current:
-- :ref:`bool<class_bool>` **current** - If ``true`` the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera ``current`` will disable this one.
+- :ref:`bool<class_bool>` **current**
+
++----------+--------------+
+| *Getter* | is_current() |
++----------+--------------+
+
+If ``true`` the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera ``current`` will disable this one.
.. _class_Camera2D_custom_viewport:
.. _class_Camera2D_custom_viewport:
-- :ref:`Node<class_Node>` **custom_viewport** - The custom :ref:`Viewport<class_Viewport>` node attached to the ``Camera2D``. If null or not a :ref:`Viewport<class_Viewport>`, uses the default viewport instead.
+- :ref:`Node<class_Node>` **custom_viewport**
+
++----------+----------------------------+
+| *Setter* | set_custom_viewport(value) |
++----------+----------------------------+
+| *Getter* | get_custom_viewport() |
++----------+----------------------------+
+
+The custom :ref:`Viewport<class_Viewport>` node attached to the ``Camera2D``. If null or not a :ref:`Viewport<class_Viewport>`, uses the default viewport instead.
.. _class_Camera2D_drag_margin_bottom:
.. _class_Camera2D_drag_margin_bottom:
-- :ref:`float<class_float>` **drag_margin_bottom** - Bottom margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
+Bottom margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
.. _class_Camera2D_drag_margin_h_enabled:
.. _class_Camera2D_drag_margin_h_enabled:
-- :ref:`bool<class_bool>` **drag_margin_h_enabled** - If ``true`` the camera only moves when reaching the horizontal drag margins. If ``false`` the camera moves horizontally regardless of margins. Default value: ``true``.
+If ``true`` the camera only moves when reaching the horizontal drag margins. If ``false`` the camera moves horizontally regardless of margins. Default value: ``true``.
.. _class_Camera2D_drag_margin_left:
.. _class_Camera2D_drag_margin_left:
-- :ref:`float<class_float>` **drag_margin_left** - Left margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
+- :ref:`float<class_float>` **drag_margin_left**
+
++----------+------------------------+
+| *Setter* | set_drag_margin(value) |
++----------+------------------------+
+| *Getter* | get_drag_margin() |
++----------+------------------------+
+
+Left margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
.. _class_Camera2D_drag_margin_right:
.. _class_Camera2D_drag_margin_right:
-- :ref:`float<class_float>` **drag_margin_right** - Right margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
+Right margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
.. _class_Camera2D_drag_margin_top:
.. _class_Camera2D_drag_margin_top:
-- :ref:`float<class_float>` **drag_margin_top** - Top margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
+- :ref:`float<class_float>` **drag_margin_top**
+
++----------+------------------------+
+| *Setter* | set_drag_margin(value) |
++----------+------------------------+
+| *Getter* | get_drag_margin() |
++----------+------------------------+
+
+Top margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen.
.. _class_Camera2D_drag_margin_v_enabled:
.. _class_Camera2D_drag_margin_v_enabled:
-- :ref:`bool<class_bool>` **drag_margin_v_enabled** - If ``true`` the camera only moves when reaching the vertical drag margins. If ``false`` the camera moves vertically regardless of margins. Default value: ``true``.
+If ``true`` the camera only moves when reaching the vertical drag margins. If ``false`` the camera moves vertically regardless of margins. Default value: ``true``.
.. _class_Camera2D_editor_draw_drag_margin:
.. _class_Camera2D_editor_draw_drag_margin:
-- :ref:`bool<class_bool>` **editor_draw_drag_margin** - If ``true`` draws the camera's drag margin rectangle in the editor. Default value: ``false``
+If ``true`` the camera smoothly stops when reaches its limits. Default value: ``false``
.. _class_Camera2D_limit_top:
.. _class_Camera2D_limit_top:
-- :ref:`int<class_int>` **limit_top** - Top scroll limit in pixels. The camera stops moving when reaching this value.
+- :ref:`int<class_int>` **limit_top**
+
++----------+------------------+
+| *Setter* | set_limit(value) |
++----------+------------------+
+| *Getter* | get_limit() |
++----------+------------------+
+
+Top scroll limit in pixels. The camera stops moving when reaching this value.
.. _class_Camera2D_offset:
.. _class_Camera2D_offset:
-- :ref:`Vector2<class_Vector2>` **offset** - The camera's offset, useful for looking around or camera shake animations.
+- :ref:`Vector2<class_Vector2>` **offset**
+
++----------+-------------------+
+| *Setter* | set_offset(value) |
++----------+-------------------+
+| *Getter* | get_offset() |
++----------+-------------------+
+
+The camera's offset, useful for looking around or camera shake animations.
.. _class_Camera2D_offset_h:
.. _class_Camera2D_offset_h:
-- :ref:`float<class_float>` **offset_h** - The horizontal offset of the camera, relative to the drag margins. Default value: ``0``
+- :ref:`float<class_float>` **offset_h**
+
++----------+---------------------+
+| *Setter* | set_h_offset(value) |
++----------+---------------------+
+| *Getter* | get_h_offset() |
++----------+---------------------+
+
+The horizontal offset of the camera, relative to the drag margins. Default value: ``0``
.. _class_Camera2D_offset_v:
.. _class_Camera2D_offset_v:
-- :ref:`float<class_float>` **offset_v** - The vertical offset of the camera, relative to the drag margins. Default value: ``0``
+- :ref:`float<class_float>` **offset_v**
+
++----------+---------------------+
+| *Setter* | set_v_offset(value) |
++----------+---------------------+
+| *Getter* | get_v_offset() |
++----------+---------------------+
+
+The vertical offset of the camera, relative to the drag margins. Default value: ``0``
.. _class_Camera2D_rotating:
.. _class_Camera2D_rotating:
-- :ref:`bool<class_bool>` **rotating** - If ``true`` the camera rotates with the target. Default value: ``false``
+- :ref:`bool<class_bool>` **rotating**
+
++----------+---------------------+
+| *Setter* | set_rotating(value) |
++----------+---------------------+
+| *Getter* | is_rotating() |
++----------+---------------------+
+
+If ``true`` the camera rotates with the target. Default value: ``false``
.. _class_Camera2D_smoothing_enabled:
.. _class_Camera2D_smoothing_enabled:
-- :ref:`bool<class_bool>` **smoothing_enabled** - If ``true`` the camera smoothly moves towards the target at :ref:`smoothing_speed<class_Camera2D_smoothing_speed>`. Default value: ``false``
+If ``true`` the camera smoothly moves towards the target at :ref:`smoothing_speed<class_Camera2D_smoothing_speed>`. Default value: ``false``
.. _class_Camera2D_smoothing_speed:
.. _class_Camera2D_smoothing_speed:
-- :ref:`float<class_float>` **smoothing_speed** - Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing_enabled<class_Camera2D_smoothing_enabled>` is ``true``
+- :ref:`float<class_float>` **smoothing_speed**
+
++----------+-----------------------------+
+| *Setter* | set_follow_smoothing(value) |
++----------+-----------------------------+
+| *Getter* | get_follow_smoothing() |
++----------+-----------------------------+
+
+Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing_enabled<class_Camera2D_smoothing_enabled>` is ``true``
.. _class_Camera2D_zoom:
.. _class_Camera2D_zoom:
-- :ref:`Vector2<class_Vector2>` **zoom** - The camera's zoom relative to the viewport. Values larger than ``Vector2(1, 1)`` zoom out and smaller values zoom in. For an example, use ``Vector2(0.5, 0.5)`` for a 2x zoom in, and ``Vector2(4, 4)`` for a 4x zoom out.
+- :ref:`Vector2<class_Vector2>` **zoom**
+
++----------+-----------------+
+| *Setter* | set_zoom(value) |
++----------+-----------------+
+| *Getter* | get_zoom() |
++----------+-----------------+
+The camera's zoom relative to the viewport. Values larger than ``Vector2(1, 1)`` zoom out and smaller values zoom in. For an example, use ``Vector2(0.5, 0.5)`` for a 2x zoom in, and ``Vector2(4, 4)`` for a 4x zoom out.
Method Descriptions
Method Descriptions
-------------------
-------------------
-.. _class_Camera2D_align:
+.. _class_Camera2D_align:
- void **align** **(** **)**
- void **align** **(** **)**
Align the camera to the tracked node
Align the camera to the tracked node
-.. _class_Camera2D_clear_current:
+.. _class_Camera2D_clear_current:
- void **clear_current** **(** **)**
- void **clear_current** **(** **)**
Removes any ``Camera2D`` from the ancestor :ref:`Viewport<class_Viewport>`'s internal currently-assigned camera.
Removes any ``Camera2D`` from the ancestor :ref:`Viewport<class_Viewport>`'s internal currently-assigned camera.
- **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
- **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
- **BLEND_MODE_DISABLED** = **5** --- Disable blending mode. Colors including alpha are written as is. Only applicable for render targets with a transparent background. No lighting will be applied.
- **BLEND_MODE_DISABLED** = **5** --- Disable blending mode. Colors including alpha are written as is. Only applicable for render targets with a transparent background. No lighting will be applied.
-
Constants
Constants
---------
---------
@@ -162,7 +183,6 @@ Constants
- **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed.
- **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed.
- **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas.
- **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas.
- **NOTIFICATION_EXIT_CANVAS** = **33** --- Canvas item has exited the canvas.
- **NOTIFICATION_EXIT_CANVAS** = **33** --- Canvas item has exited the canvas.
-
Description
Description
-----------
-----------
@@ -181,308 +201,363 @@ Tutorials
- :doc:`../tutorials/2d/2d_transforms`
- :doc:`../tutorials/2d/2d_transforms`
- :doc:`../tutorials/2d/custom_drawing_in_2d`
- :doc:`../tutorials/2d/custom_drawing_in_2d`
-
Property Descriptions
Property Descriptions
---------------------
---------------------
.. _class_CanvasItem_light_mask:
.. _class_CanvasItem_light_mask:
-- :ref:`int<class_int>` **light_mask** - The rendering layers in which this ``CanvasItem`` responds to :ref:`Light2D<class_Light2D>` nodes. Default value: ``1``.
+- :ref:`int<class_int>` **light_mask**
+
++----------+-----------------------+
+| *Setter* | set_light_mask(value) |
++----------+-----------------------+
+| *Getter* | get_light_mask() |
++----------+-----------------------+
+
+The rendering layers in which this ``CanvasItem`` responds to :ref:`Light2D<class_Light2D>` nodes. Default value: ``1``.
.. _class_CanvasItem_material:
.. _class_CanvasItem_material:
-- :ref:`Material<class_Material>` **material** - The material applied to textures on this ``CanvasItem``. Default value: ``null``.
+- :ref:`Material<class_Material>` **material**
+
++----------+---------------------+
+| *Setter* | set_material(value) |
++----------+---------------------+
+| *Getter* | get_material() |
++----------+---------------------+
+
+The material applied to textures on this ``CanvasItem``. Default value: ``null``.
.. _class_CanvasItem_modulate:
.. _class_CanvasItem_modulate:
-- :ref:`Color<class_Color>` **modulate** - The color applied to textures on this ``CanvasItem``. Default value: ``Color(1, 1, 1, 1)`` (opaque "white").
+- :ref:`Color<class_Color>` **modulate**
+
++----------+---------------------+
+| *Setter* | set_modulate(value) |
++----------+---------------------+
+| *Getter* | get_modulate() |
++----------+---------------------+
+
+The color applied to textures on this ``CanvasItem``. Default value: ``Color(1, 1, 1, 1)`` (opaque "white").
.. _class_CanvasItem_self_modulate:
.. _class_CanvasItem_self_modulate:
-- :ref:`Color<class_Color>` **self_modulate** - The color applied to textures on this ``CanvasItem``. This is not inherited by children ``CanvasItem``\ s. Default value: ``Color(1, 1, 1, 1)`` (opaque "white")..
+- :ref:`Color<class_Color>` **self_modulate**
+
++----------+--------------------------+
+| *Setter* | set_self_modulate(value) |
++----------+--------------------------+
+| *Getter* | get_self_modulate() |
++----------+--------------------------+
+
+The color applied to textures on this ``CanvasItem``. This is not inherited by children ``CanvasItem``\ s. Default value: ``Color(1, 1, 1, 1)`` (opaque "white")..
.. _class_CanvasItem_show_behind_parent:
.. _class_CanvasItem_show_behind_parent:
-- :ref:`bool<class_bool>` **show_behind_parent** - If ``true`` the object draws behind its parent. Default value: ``false``.
+- :ref:`bool<class_bool>` **show_behind_parent**
+
++----------+---------------------------------+
+| *Setter* | set_draw_behind_parent(value) |
++----------+---------------------------------+
+| *Getter* | is_draw_behind_parent_enabled() |
++----------+---------------------------------+
+
+If ``true`` the object draws behind its parent. Default value: ``false``.
.. _class_CanvasItem_show_on_top:
.. _class_CanvasItem_show_on_top:
-- :ref:`bool<class_bool>` **show_on_top** - If ``true`` the object draws on top of its parent. Default value: ``true``.
+- :ref:`bool<class_bool>` **show_on_top**
+
+If ``true`` the object draws on top of its parent. Default value: ``true``.
.. _class_CanvasItem_use_parent_material:
.. _class_CanvasItem_use_parent_material:
-- :ref:`bool<class_bool>` **use_parent_material** - If ``true`` the parent ``CanvasItem``'s :ref:`material<class_CanvasItem_material>` property is used as this one's material. Default value: ``false``.
Draws multiple, parallel lines with a uniform ``width``, segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between ``points`` and ``colors``.
Draws multiple, parallel lines with a uniform ``width``, segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between ``points`` and ``colors``.
Draws interconnected line segments with a uniform ``width``, segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between ``points`` and ``colors``.
Draws interconnected line segments with a uniform ``width``, segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between ``points`` and ``colors``.
Draws a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
Draws a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
Returns ``true`` if the node is present in the :ref:`SceneTree<class_SceneTree>`, its :ref:`visible<class_CanvasItem_visible>` property is ``true`` and its inherited visibility is also ``true``.
Returns ``true`` if the node is present in the :ref:`SceneTree<class_SceneTree>`, its :ref:`visible<class_CanvasItem_visible>` property is ``true`` and its inherited visibility is also ``true``.