classref: Sync with current master branch (68ad520)

This commit is contained in:
Godot Organization
2024-03-16 03:19:36 +00:00
parent 0664ab75ab
commit 55c8a88dfe
57 changed files with 3017 additions and 1332 deletions
+15 -7
View File
@@ -788,6 +788,10 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value
Make a script with static variables to not persist after all references are lost. If the script is loaded again the static variables will revert to their default values.
\ **Note:** As annotations describe their subject, the :ref:`@static_unload<class_@GDScript_annotation_@static_unload>` annotation must be placed before the class definition and inheritance.
\ **Warning:** Currently, due to a bug, scripts are never freed, even if :ref:`@static_unload<class_@GDScript_annotation_@static_unload>` annotation is used.
.. rst-class:: classref-item-separator
----
@@ -877,6 +881,8 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile
assert(speed >= 0 and speed < 20) # You can also combine the two conditional statements in one check.
assert(speed < 20, "the speed limit is 20") # Show a message.
\ **Note:** :ref:`assert<class_@GDScript_method_assert>` is a keyword, not a function. So you cannot access it as a :ref:`Callable<class_Callable>` or use it inside expressions.
.. rst-class:: classref-item-separator
----
@@ -955,7 +961,7 @@ Returns an array of dictionaries representing the current call stack. See also :
Starting from ``_ready()``, ``bar()`` would print:
.. code::
.. code:: text
[{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]
@@ -987,7 +993,7 @@ Returns the passed ``instance`` converted to a Dictionary. Can be useful for ser
Prints out:
.. code::
.. code:: text
[@subpath, @path, foo]
[, res://test.gd, bar]
@@ -1010,7 +1016,7 @@ Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value mus
- A :ref:`Script<class_Script>` (you can use any class, including inner one).
Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays) and is more performant. Use the operator instead of this method if you do not need dynamic type checking.
Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need dynamic type checking.
Examples:
@@ -1091,6 +1097,8 @@ Returns a :ref:`Resource<class_Resource>` from the filesystem located at ``path`
# Create instance of a scene.
var diamond = preload("res://diamond.tscn").instantiate()
\ **Note:** :ref:`preload<class_@GDScript_method_preload>` is a keyword, not a function. So you cannot access it as a :ref:`Callable<class_Callable>`.
.. rst-class:: classref-item-separator
----
@@ -1105,7 +1113,7 @@ Like :ref:`@GlobalScope.print<class_@GlobalScope_method_print>`, but includes th
The output in the console may look like the following:
.. code::
.. code:: text
Test print
At: res://test.gd:15:_process()
@@ -1126,7 +1134,7 @@ Prints a stack trace at the current code location. See also :ref:`get_stack<clas
The output in the console may look like the following:
.. code::
.. code:: text
Frame 0 - res://test.gd:16 in function '_process'
@@ -1175,7 +1183,7 @@ To iterate over an :ref:`Array<class_Array>` backwards, use:
Output:
.. code::
.. code:: text
9
6
@@ -1190,7 +1198,7 @@ To iterate over :ref:`float<class_float>`, convert them in the loop.
Output:
.. code::
.. code:: text
0.3
0.2
+2 -2
View File
@@ -6849,7 +6849,7 @@ For complex use cases where multiple ranges are needed, consider using :ref:`Cur
:ref:`int<class_int>` **rid_allocate_id**\ (\ )
Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
Allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers.
.. rst-class:: classref-item-separator
@@ -6861,7 +6861,7 @@ Allocates a unique ID which can be used by the implementation to construct a RID
:ref:`RID<class_RID>` **rid_from_int64**\ (\ base\: :ref:`int<class_int>`\ )
Creates a RID from a ``base``. This is used mainly from native extensions to build servers.
Creates an RID from a ``base``. This is used mainly from native extensions to build servers.
.. rst-class:: classref-item-separator
+4 -4
View File
@@ -72,9 +72,9 @@ Methods
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Button<class_Button>` | :ref:`get_ok_button<class_AcceptDialog_method_get_ok_button>`\ (\ ) |
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`register_text_enter<class_AcceptDialog_method_register_text_enter>`\ (\ line_edit\: :ref:`Control<class_Control>`\ ) |
| |void| | :ref:`register_text_enter<class_AcceptDialog_method_register_text_enter>`\ (\ line_edit\: :ref:`LineEdit<class_LineEdit>`\ ) |
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_button<class_AcceptDialog_method_remove_button>`\ (\ button\: :ref:`Control<class_Control>`\ ) |
| |void| | :ref:`remove_button<class_AcceptDialog_method_remove_button>`\ (\ button\: :ref:`Button<class_Button>`\ ) |
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
@@ -295,7 +295,7 @@ Returns the OK :ref:`Button<class_Button>` instance.
.. rst-class:: classref-method
|void| **register_text_enter**\ (\ line_edit\: :ref:`Control<class_Control>`\ )
|void| **register_text_enter**\ (\ line_edit\: :ref:`LineEdit<class_LineEdit>`\ )
Registers a :ref:`LineEdit<class_LineEdit>` in the dialog. When the enter key is pressed, the dialog will be accepted.
@@ -307,7 +307,7 @@ Registers a :ref:`LineEdit<class_LineEdit>` in the dialog. When the enter key is
.. rst-class:: classref-method
|void| **remove_button**\ (\ button\: :ref:`Control<class_Control>`\ )
|void| **remove_button**\ (\ button\: :ref:`Button<class_Button>`\ )
Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``button`` must be a :ref:`Button<class_Button>` added with :ref:`add_button<class_AcceptDialog_method_add_button>` or :ref:`add_cancel_button<class_AcceptDialog_method_add_cancel_button>` method. After removal, pressing the ``button`` will no longer emit this dialog's :ref:`custom_action<class_AcceptDialog_signal_custom_action>` or :ref:`canceled<class_AcceptDialog_signal_canceled>` signals.
+8
View File
@@ -501,6 +501,12 @@ Returns the last element of the array. Prints an error and returns ``null`` if t
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.
::
var array = ["a", "b", "c", "c", "d", "e"]
print(array.bsearch("c", true)) # Prints 2, at the first matching element.
print(array.bsearch("c", false)) # Prints 4, after the last matching element, pointing to "d".
\ **Note:** Calling :ref:`bsearch<class_Array_method_bsearch>` on an unsorted array results in unexpected behavior.
.. rst-class:: classref-item-separator
@@ -515,6 +521,8 @@ Finds the index of an existing value (or the insertion index that maintains sort
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:** The custom method must accept the two arguments in any order, you cannot rely on that the first argument will always be from the array.
\ **Note:** Calling :ref:`bsearch_custom<class_Array_method_bsearch_custom>` on an unsorted array results in unexpected behavior.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -234,7 +234,7 @@ The ``arrays`` argument is an array of arrays. Each of the :ref:`Mesh.ARRAY_MAX<
The ``blend_shapes`` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as ``arrays``, but :ref:`Mesh.ARRAY_VERTEX<class_Mesh_constant_ARRAY_VERTEX>`, :ref:`Mesh.ARRAY_NORMAL<class_Mesh_constant_ARRAY_NORMAL>`, and :ref:`Mesh.ARRAY_TANGENT<class_Mesh_constant_ARRAY_TANGENT>` are set if and only if they are set in ``arrays`` and all other entries are ``null``.
The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents a LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of a LOD also increases the distance that the objects has to be from the camera before the LOD is used.
The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used.
The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
+1 -1
View File
@@ -12,7 +12,7 @@ AudioStream
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`, :ref:`AudioStreamPolyphonic<class_AudioStreamPolyphonic>`, :ref:`AudioStreamRandomizer<class_AudioStreamRandomizer>`, :ref:`AudioStreamWAV<class_AudioStreamWAV>`
**Inherited By:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamInteractive<class_AudioStreamInteractive>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`, :ref:`AudioStreamPlaylist<class_AudioStreamPlaylist>`, :ref:`AudioStreamPolyphonic<class_AudioStreamPolyphonic>`, :ref:`AudioStreamRandomizer<class_AudioStreamRandomizer>`, :ref:`AudioStreamSynchronized<class_AudioStreamSynchronized>`, :ref:`AudioStreamWAV<class_AudioStreamWAV>`
Base class for audio streams.
+555
View File
@@ -0,0 +1,555 @@
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamInteractive.xml.
.. _class_AudioStreamInteractive:
AudioStreamInteractive
======================
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Audio stream that can playback music interactively, combining clips and a transition table.
.. rst-class:: classref-introduction-group
Description
-----------
This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and the transition rules via the :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`. Additionally, this stream export a property parameter to control the playback via :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, :ref:`AudioStreamPlayer2D<class_AudioStreamPlayer2D>`, or :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>`.
The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------+-------------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`clip_count<class_AudioStreamInteractive_property_clip_count>` | ``0`` |
+-----------------------+-------------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`initial_clip<class_AudioStreamInteractive_property_initial_clip>` | ``0`` |
+-----------------------+-------------------------------------------------------------------------+-------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`, from_time\: :ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>`, to_time\: :ref:`TransitionToTime<enum_AudioStreamInteractive_TransitionToTime>`, fade_mode\: :ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>`, fade_beats\: :ref:`float<class_float>`, use_filler_clip\: :ref:`bool<class_bool>` = false, filler_clip\: :ref:`int<class_int>` = -1, hold_previous\: :ref:`bool<class_bool>` = false\ ) |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`erase_transition<class_AudioStreamInteractive_method_erase_transition>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>` | :ref:`get_clip_auto_advance<class_AudioStreamInteractive_method_get_clip_auto_advance>`\ (\ clip_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_clip_auto_advance_next_clip<class_AudioStreamInteractive_method_get_clip_auto_advance_next_clip>`\ (\ clip_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`get_clip_name<class_AudioStreamInteractive_method_get_clip_name>`\ (\ clip_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioStream<class_AudioStream>` | :ref:`get_clip_stream<class_AudioStreamInteractive_method_get_clip_stream>`\ (\ clip_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_transition_fade_beats<class_AudioStreamInteractive_method_get_transition_fade_beats>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` | :ref:`get_transition_fade_mode<class_AudioStreamInteractive_method_get_transition_fade_mode>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_transition_filler_clip<class_AudioStreamInteractive_method_get_transition_filler_clip>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>` | :ref:`get_transition_from_time<class_AudioStreamInteractive_method_get_transition_from_time>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_transition_list<class_AudioStreamInteractive_method_get_transition_list>`\ (\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TransitionToTime<enum_AudioStreamInteractive_TransitionToTime>` | :ref:`get_transition_to_time<class_AudioStreamInteractive_method_get_transition_to_time>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_transition<class_AudioStreamInteractive_method_has_transition>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_transition_holding_previous<class_AudioStreamInteractive_method_is_transition_holding_previous>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_transition_using_filler_clip<class_AudioStreamInteractive_method_is_transition_using_filler_clip>`\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_clip_auto_advance<class_AudioStreamInteractive_method_set_clip_auto_advance>`\ (\ clip_index\: :ref:`int<class_int>`, mode\: :ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>`\ ) |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_clip_auto_advance_next_clip<class_AudioStreamInteractive_method_set_clip_auto_advance_next_clip>`\ (\ clip_index\: :ref:`int<class_int>`, auto_advance_next_clip\: :ref:`int<class_int>`\ ) |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_clip_name<class_AudioStreamInteractive_method_set_clip_name>`\ (\ clip_index\: :ref:`int<class_int>`, name\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_clip_stream<class_AudioStreamInteractive_method_set_clip_stream>`\ (\ clip_index\: :ref:`int<class_int>`, stream\: :ref:`AudioStream<class_AudioStream>`\ ) |
+---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumerations
------------
.. _enum_AudioStreamInteractive_TransitionFromTime:
.. rst-class:: classref-enumeration
enum **TransitionFromTime**:
.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_IMMEDIATE:
.. rst-class:: classref-enumeration-constant
:ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>` **TRANSITION_FROM_TIME_IMMEDIATE** = ``0``
Start transition as soon as possible, don't wait for any specific time position.
.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_NEXT_BEAT:
.. rst-class:: classref-enumeration-constant
:ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>` **TRANSITION_FROM_TIME_NEXT_BEAT** = ``1``
Transition when the clip playback position reaches the next beat.
.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_NEXT_BAR:
.. rst-class:: classref-enumeration-constant
:ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>` **TRANSITION_FROM_TIME_NEXT_BAR** = ``2``
Transition when the clip playback position reaches the next bar.
.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_END:
.. rst-class:: classref-enumeration-constant
:ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>` **TRANSITION_FROM_TIME_END** = ``3``
Transition when the current clip finished playing.
.. rst-class:: classref-item-separator
----
.. _enum_AudioStreamInteractive_TransitionToTime:
.. rst-class:: classref-enumeration
enum **TransitionToTime**:
.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_SAME_POSITION:
.. rst-class:: classref-enumeration-constant
:ref:`TransitionToTime<enum_AudioStreamInteractive_TransitionToTime>` **TRANSITION_TO_TIME_SAME_POSITION** = ``0``
Transition to the same position in the destination clip. This is useful when both clips have exactly the same length and the music should fade between them.
.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_START:
.. rst-class:: classref-enumeration-constant
:ref:`TransitionToTime<enum_AudioStreamInteractive_TransitionToTime>` **TRANSITION_TO_TIME_START** = ``1``
Transition to the start of the destination clip.
.. rst-class:: classref-item-separator
----
.. _enum_AudioStreamInteractive_FadeMode:
.. rst-class:: classref-enumeration
enum **FadeMode**:
.. _class_AudioStreamInteractive_constant_FADE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` **FADE_DISABLED** = ``0``
Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end.
.. _class_AudioStreamInteractive_constant_FADE_IN:
.. rst-class:: classref-enumeration-constant
:ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` **FADE_IN** = ``1``
Use a fade-in in the next clip, let the current clip finish.
.. _class_AudioStreamInteractive_constant_FADE_OUT:
.. rst-class:: classref-enumeration-constant
:ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` **FADE_OUT** = ``2``
Use a fade-out in the current clip, the next clip will start by itself.
.. _class_AudioStreamInteractive_constant_FADE_CROSS:
.. rst-class:: classref-enumeration-constant
:ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` **FADE_CROSS** = ``3``
Use a cross-fade between clips.
.. _class_AudioStreamInteractive_constant_FADE_AUTOMATIC:
.. rst-class:: classref-enumeration-constant
:ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` **FADE_AUTOMATIC** = ``4``
Use automatic fade logic depending on the transition from/to. It is recommended to use this by default.
.. rst-class:: classref-item-separator
----
.. _enum_AudioStreamInteractive_AutoAdvanceMode:
.. rst-class:: classref-enumeration
enum **AutoAdvanceMode**:
.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_DISABLED:
.. rst-class:: classref-enumeration-constant
:ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>` **AUTO_ADVANCE_DISABLED** = ``0``
Disable auto-advance (default).
.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_ENABLED:
.. rst-class:: classref-enumeration-constant
:ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>` **AUTO_ADVANCE_ENABLED** = ``1``
Enable auto-advance, a clip must be specified.
.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_RETURN_TO_HOLD:
.. rst-class:: classref-enumeration-constant
:ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>` **AUTO_ADVANCE_RETURN_TO_HOLD** = ``2``
Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Constants
---------
.. _class_AudioStreamInteractive_constant_CLIP_ANY:
.. rst-class:: classref-constant
**CLIP_ANY** = ``-1``
This constant describes that any clip is valid for a specific transition as either source or destination.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_AudioStreamInteractive_property_clip_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **clip_count** = ``0``
.. rst-class:: classref-property-setget
- |void| **set_clip_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_clip_count**\ (\ )
Amount of clips contained in this interactive player.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_property_initial_clip:
.. rst-class:: classref-property
:ref:`int<class_int>` **initial_clip** = ``0``
.. rst-class:: classref-property-setget
- |void| **set_initial_clip**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_initial_clip**\ (\ )
Index of the initial clip, which will be played first when this stream is played.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_AudioStreamInteractive_method_add_transition:
.. rst-class:: classref-method
|void| **add_transition**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`, from_time\: :ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>`, to_time\: :ref:`TransitionToTime<enum_AudioStreamInteractive_TransitionToTime>`, fade_mode\: :ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>`, fade_beats\: :ref:`float<class_float>`, use_filler_clip\: :ref:`bool<class_bool>` = false, filler_clip\: :ref:`int<class_int>` = -1, hold_previous\: :ref:`bool<class_bool>` = false\ )
Add a transition between two clips. Provide the indices of the source and destination clips, or use the :ref:`CLIP_ANY<class_AudioStreamInteractive_constant_CLIP_ANY>` constant to indicate that transition happens to/from any clip to this one.
\* ``from_time`` indicates the moment in the current clip the transition will begin after triggered.
\* ``to_time`` indicates the time in the next clip that the playback will start from.
\* ``fade_mode`` indicates how the fade will happen between clips. If unsure, just use :ref:`FADE_AUTOMATIC<class_AudioStreamInteractive_constant_FADE_AUTOMATIC>` which uses the most common type of fade for each situation.
\* ``fade_beats`` indicates how many beats the fade will take. Using decimals is allowed.
\* ``use_filler_clip`` indicates that there will be a filler clip used between the source and destination clips.
\* ``filler_clip`` the index of the filler clip.
\* If ``hold_previous`` is used, then this clip will be remembered. This can be used together with :ref:`AUTO_ADVANCE_RETURN_TO_HOLD<class_AudioStreamInteractive_constant_AUTO_ADVANCE_RETURN_TO_HOLD>` to return to this clip after another is done playing.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_erase_transition:
.. rst-class:: classref-method
|void| **erase_transition**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ )
Erase a transition by providing ``from_clip`` and ``to_clip`` clip indices. :ref:`CLIP_ANY<class_AudioStreamInteractive_constant_CLIP_ANY>` can be used for either argument or both.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_clip_auto_advance:
.. rst-class:: classref-method
:ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>` **get_clip_auto_advance**\ (\ clip_index\: :ref:`int<class_int>`\ ) |const|
Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance<class_AudioStreamInteractive_method_set_clip_auto_advance>`.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_clip_auto_advance_next_clip:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_clip_auto_advance_next_clip**\ (\ clip_index\: :ref:`int<class_int>`\ ) |const|
Return the clip towards which the clip referenced by ``clip_index`` will auto-advance to.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_clip_name:
.. rst-class:: classref-method
:ref:`StringName<class_StringName>` **get_clip_name**\ (\ clip_index\: :ref:`int<class_int>`\ ) |const|
Return the name of a clip.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_clip_stream:
.. rst-class:: classref-method
:ref:`AudioStream<class_AudioStream>` **get_clip_stream**\ (\ clip_index\: :ref:`int<class_int>`\ ) |const|
Return the :ref:`AudioStream<class_AudioStream>` associated with a clip.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_transition_fade_beats:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_transition_fade_beats**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return the time (in beats) for a transition (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_transition_fade_mode:
.. rst-class:: classref-method
:ref:`FadeMode<enum_AudioStreamInteractive_FadeMode>` **get_transition_fade_mode**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return the mode for a transition (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_transition_filler_clip:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_transition_filler_clip**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return the filler clip for a transition (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_transition_from_time:
.. rst-class:: classref-method
:ref:`TransitionFromTime<enum_AudioStreamInteractive_TransitionFromTime>` **get_transition_from_time**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return the source time position for a transition (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_transition_list:
.. rst-class:: classref-method
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_transition_list**\ (\ ) |const|
Return the list of transitions (from, to interleaved).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_get_transition_to_time:
.. rst-class:: classref-method
:ref:`TransitionToTime<enum_AudioStreamInteractive_TransitionToTime>` **get_transition_to_time**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return the destination time position for a transition (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_has_transition:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_transition**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return true if a given transition exists (was added via :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_is_transition_holding_previous:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_transition_holding_previous**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_is_transition_using_filler_clip:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_transition_using_filler_clip**\ (\ from_clip\: :ref:`int<class_int>`, to_clip\: :ref:`int<class_int>`\ ) |const|
Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition<class_AudioStreamInteractive_method_add_transition>`).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_set_clip_auto_advance:
.. rst-class:: classref-method
|void| **set_clip_auto_advance**\ (\ clip_index\: :ref:`int<class_int>`, mode\: :ref:`AutoAdvanceMode<enum_AudioStreamInteractive_AutoAdvanceMode>`\ )
Set whether a clip will auto-advance by changing the auto-advance mode.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_set_clip_auto_advance_next_clip:
.. rst-class:: classref-method
|void| **set_clip_auto_advance_next_clip**\ (\ clip_index\: :ref:`int<class_int>`, auto_advance_next_clip\: :ref:`int<class_int>`\ )
Set the index of the next clip towards which this clip will auto advance to when finished. If the clip being played loops, then auto-advance will be ignored.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_set_clip_name:
.. rst-class:: classref-method
|void| **set_clip_name**\ (\ clip_index\: :ref:`int<class_int>`, name\: :ref:`StringName<class_StringName>`\ )
Set the name of the current clip (for easier identification).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamInteractive_method_set_clip_stream:
.. rst-class:: classref-method
|void| **set_clip_stream**\ (\ clip_index\: :ref:`int<class_int>`, stream\: :ref:`AudioStream<class_AudioStream>`\ )
Set the :ref:`AudioStream<class_AudioStream>` associated with the current clip.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
+1 -1
View File
@@ -12,7 +12,7 @@ AudioStreamPlayback
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`AudioStreamPlaybackPolyphonic<class_AudioStreamPlaybackPolyphonic>`, :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>`
**Inherited By:** :ref:`AudioStreamPlaybackInteractive<class_AudioStreamPlaybackInteractive>`, :ref:`AudioStreamPlaybackPlaylist<class_AudioStreamPlaybackPlaylist>`, :ref:`AudioStreamPlaybackPolyphonic<class_AudioStreamPlaybackPolyphonic>`, :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>`, :ref:`AudioStreamPlaybackSynchronized<class_AudioStreamPlaybackSynchronized>`
Meta class for playing back audio.
@@ -0,0 +1,74 @@
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml.
.. _class_AudioStreamPlaybackInteractive:
AudioStreamPlaybackInteractive
==============================
**Inherits:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Playback component of :ref:`AudioStreamInteractive<class_AudioStreamInteractive>`.
.. rst-class:: classref-introduction-group
Description
-----------
Playback component of :ref:`AudioStreamInteractive<class_AudioStreamInteractive>`. Contains functions to change the currently played clip.
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`switch_to_clip<class_AudioStreamPlaybackInteractive_method_switch_to_clip>`\ (\ clip_index\: :ref:`int<class_int>`\ ) |
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`switch_to_clip_by_name<class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name>`\ (\ clip_name\: :ref:`StringName<class_StringName>`\ ) |
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_AudioStreamPlaybackInteractive_method_switch_to_clip:
.. rst-class:: classref-method
|void| **switch_to_clip**\ (\ clip_index\: :ref:`int<class_int>`\ )
Switch to a clip (by index).
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name:
.. rst-class:: classref-method
|void| **switch_to_clip_by_name**\ (\ clip_name\: :ref:`StringName<class_StringName>`\ )
Switch to a clip (by name).
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
@@ -0,0 +1,24 @@
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml.
.. _class_AudioStreamPlaybackPlaylist:
AudioStreamPlaybackPlaylist
===========================
**Inherits:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Playback class used for :ref:`AudioStreamPlaylist<class_AudioStreamPlaylist>`.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
@@ -0,0 +1,26 @@
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml.
.. _class_AudioStreamPlaybackSynchronized:
AudioStreamPlaybackSynchronized
===============================
**Inherits:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
.. container:: contribute
There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
+189
View File
@@ -0,0 +1,189 @@
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml.
.. _class_AudioStreamPlaylist:
AudioStreamPlaylist
===================
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
:ref:`AudioStream<class_AudioStream>` that includes sub-streams and plays them back like a playslit.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+---------------------------+----------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`fade_time<class_AudioStreamPlaylist_property_fade_time>` | ``0.3`` |
+---------------------------+----------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`loop<class_AudioStreamPlaylist_property_loop>` | ``true`` |
+---------------------------+----------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`shuffle<class_AudioStreamPlaylist_property_shuffle>` | ``false`` |
+---------------------------+----------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`stream_count<class_AudioStreamPlaylist_property_stream_count>` | ``0`` |
+---------------------------+----------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_bpm<class_AudioStreamPlaylist_method_get_bpm>`\ (\ ) |const| |
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioStream<class_AudioStream>` | :ref:`get_list_stream<class_AudioStreamPlaylist_method_get_list_stream>`\ (\ stream_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_list_stream<class_AudioStreamPlaylist_method_set_list_stream>`\ (\ stream_index\: :ref:`int<class_int>`, audio_stream\: :ref:`AudioStream<class_AudioStream>`\ ) |
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Constants
---------
.. _class_AudioStreamPlaylist_constant_MAX_STREAMS:
.. rst-class:: classref-constant
**MAX_STREAMS** = ``64``
Maximum amount of streams supported in the playlist.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_AudioStreamPlaylist_property_fade_time:
.. rst-class:: classref-property
:ref:`float<class_float>` **fade_time** = ``0.3``
.. rst-class:: classref-property-setget
- |void| **set_fade_time**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_fade_time**\ (\ )
Fade time used when a stream ends, when going to the next one. Streams are expected to have an extra bit of audio after the end to help with fading.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamPlaylist_property_loop:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **loop** = ``true``
.. rst-class:: classref-property-setget
- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **has_loop**\ (\ )
If true, the playlist will loop, otherwise the playlist when end when the last stream is played.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamPlaylist_property_shuffle:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **shuffle** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_shuffle**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_shuffle**\ (\ )
Shuffle the playlist. Streams are played in random order.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamPlaylist_property_stream_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **stream_count** = ``0``
.. rst-class:: classref-property-setget
- |void| **set_stream_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_stream_count**\ (\ )
Amount of streams in the playlist.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_AudioStreamPlaylist_method_get_bpm:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_bpm**\ (\ ) |const|
Return the bpm of the playlist, which can vary depending on the clip being played.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamPlaylist_method_get_list_stream:
.. rst-class:: classref-method
:ref:`AudioStream<class_AudioStream>` **get_list_stream**\ (\ stream_index\: :ref:`int<class_int>`\ ) |const|
Get the stream at playback position index.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamPlaylist_method_set_list_stream:
.. rst-class:: classref-method
|void| **set_list_stream**\ (\ stream_index\: :ref:`int<class_int>`, audio_stream\: :ref:`AudioStream<class_AudioStream>`\ )
Set the stream at playback position index.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
+153
View File
@@ -0,0 +1,153 @@
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml.
.. _class_AudioStreamSynchronized:
AudioStreamSynchronized
=======================
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Stream that can be fitted with sub-streams, which will be played in-sync.
.. rst-class:: classref-introduction-group
Description
-----------
This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams being at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------+--------------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`stream_count<class_AudioStreamSynchronized_property_stream_count>` | ``0`` |
+-----------------------+--------------------------------------------------------------------------+-------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioStream<class_AudioStream>` | :ref:`get_sync_stream<class_AudioStreamSynchronized_method_get_sync_stream>`\ (\ stream_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_sync_stream_volume<class_AudioStreamSynchronized_method_get_sync_stream_volume>`\ (\ stream_index\: :ref:`int<class_int>`\ ) |const| |
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_sync_stream<class_AudioStreamSynchronized_method_set_sync_stream>`\ (\ stream_index\: :ref:`int<class_int>`, audio_stream\: :ref:`AudioStream<class_AudioStream>`\ ) |
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_sync_stream_volume<class_AudioStreamSynchronized_method_set_sync_stream_volume>`\ (\ stream_index\: :ref:`int<class_int>`, volume_db\: :ref:`float<class_float>`\ ) |
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Constants
---------
.. _class_AudioStreamSynchronized_constant_MAX_STREAMS:
.. rst-class:: classref-constant
**MAX_STREAMS** = ``32``
Maximum amount of streams that can be synchrohized.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_AudioStreamSynchronized_property_stream_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **stream_count** = ``0``
.. rst-class:: classref-property-setget
- |void| **set_stream_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_stream_count**\ (\ )
Set the total amount of streams that will be played back synchronized.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_AudioStreamSynchronized_method_get_sync_stream:
.. rst-class:: classref-method
:ref:`AudioStream<class_AudioStream>` **get_sync_stream**\ (\ stream_index\: :ref:`int<class_int>`\ ) |const|
Get one of the synchronized streams, by index.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamSynchronized_method_get_sync_stream_volume:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_sync_stream_volume**\ (\ stream_index\: :ref:`int<class_int>`\ ) |const|
Get the volume of one of the synchronized streams, by index.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamSynchronized_method_set_sync_stream:
.. rst-class:: classref-method
|void| **set_sync_stream**\ (\ stream_index\: :ref:`int<class_int>`, audio_stream\: :ref:`AudioStream<class_AudioStream>`\ )
Set one of the synchronized streams, by index.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamSynchronized_method_set_sync_stream_volume:
.. rst-class:: classref-method
|void| **set_sync_stream_volume**\ (\ stream_index\: :ref:`int<class_int>`, volume_db\: :ref:`float<class_float>`\ )
Set the volume of one of the synchronized streams, by index.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
+14
View File
@@ -129,6 +129,8 @@ Methods
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Callable<class_Callable>` | :ref:`create<class_Callable_method_create>`\ (\ variant\: :ref:`Variant<class_Variant>`, method\: :ref:`StringName<class_StringName>`\ ) |static| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_argument_count<class_Callable_method_get_argument_count>`\ (\ ) |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_bound_arguments<class_Callable_method_get_bound_arguments>`\ (\ ) |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_bound_arguments_count<class_Callable_method_get_bound_arguments_count>`\ (\ ) |const| |
@@ -317,6 +319,18 @@ Creates a new **Callable** for the method named ``method`` in the specified ``va
----
.. _class_Callable_method_get_argument_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_argument_count**\ (\ ) |const|
Returns the total number of arguments this **Callable** should take, including optional arguments. This means that any arguments bound with :ref:`bind<class_Callable_method_bind>` are *subtracted* from the result, and any arguments unbound with :ref:`unbind<class_Callable_method_unbind>` are *added* to the result.
.. rst-class:: classref-item-separator
----
.. _class_Callable_method_get_bound_arguments:
.. rst-class:: classref-method
+61 -47
View File
@@ -29,53 +29,55 @@ Methods
.. table::
:widths: auto
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`can_instantiate<class_ClassDB_method_can_instantiate>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_exists<class_ClassDB_method_class_exists>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`class_get_enum_constants<class_ClassDB_method_class_get_enum_constants>`\ (\ class\: :ref:`StringName<class_StringName>`, enum\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`class_get_enum_list<class_ClassDB_method_class_get_enum_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`class_get_integer_constant<class_ClassDB_method_class_get_integer_constant>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`class_get_integer_constant_enum<class_ClassDB_method_class_get_integer_constant_enum>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`class_get_integer_constant_list<class_ClassDB_method_class_get_integer_constant_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`class_get_method_list<class_ClassDB_method_class_get_method_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`class_get_property<class_ClassDB_method_class_get_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`class_get_property_list<class_ClassDB_method_class_get_property_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`class_get_signal<class_ClassDB_method_class_get_signal>`\ (\ class\: :ref:`StringName<class_StringName>`, signal\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`class_get_signal_list<class_ClassDB_method_class_get_signal_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_enum<class_ClassDB_method_class_has_enum>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_integer_constant<class_ClassDB_method_class_has_integer_constant>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_method<class_ClassDB_method_class_has_method>`\ (\ class\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_signal<class_ClassDB_method_class_has_signal>`\ (\ class\: :ref:`StringName<class_StringName>`, signal\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`class_set_property<class_ClassDB_method_class_set_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_class_list<class_ClassDB_method_get_class_list>`\ (\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_inheriters_from_class<class_ClassDB_method_get_inheriters_from_class>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`get_parent_class<class_ClassDB_method_get_parent_class>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`instantiate<class_ClassDB_method_instantiate>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_class_enabled<class_ClassDB_method_is_class_enabled>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_parent_class<class_ClassDB_method_is_parent_class>`\ (\ class\: :ref:`StringName<class_StringName>`, inherits\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`can_instantiate<class_ClassDB_method_can_instantiate>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_exists<class_ClassDB_method_class_exists>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`class_get_enum_constants<class_ClassDB_method_class_get_enum_constants>`\ (\ class\: :ref:`StringName<class_StringName>`, enum\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`class_get_enum_list<class_ClassDB_method_class_get_enum_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`class_get_integer_constant<class_ClassDB_method_class_get_integer_constant>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`class_get_integer_constant_enum<class_ClassDB_method_class_get_integer_constant_enum>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`class_get_integer_constant_list<class_ClassDB_method_class_get_integer_constant_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`class_get_method_argument_count<class_ClassDB_method_class_get_method_argument_count>`\ (\ class\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`class_get_method_list<class_ClassDB_method_class_get_method_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`class_get_property<class_ClassDB_method_class_get_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`class_get_property_list<class_ClassDB_method_class_get_property_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`class_get_signal<class_ClassDB_method_class_get_signal>`\ (\ class\: :ref:`StringName<class_StringName>`, signal\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`class_get_signal_list<class_ClassDB_method_class_get_signal_list>`\ (\ class\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_enum<class_ClassDB_method_class_has_enum>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_integer_constant<class_ClassDB_method_class_has_integer_constant>`\ (\ class\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_method<class_ClassDB_method_class_has_method>`\ (\ class\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`class_has_signal<class_ClassDB_method_class_has_signal>`\ (\ class\: :ref:`StringName<class_StringName>`, signal\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`class_set_property<class_ClassDB_method_class_set_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_class_list<class_ClassDB_method_get_class_list>`\ (\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_inheriters_from_class<class_ClassDB_method_get_inheriters_from_class>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`get_parent_class<class_ClassDB_method_get_parent_class>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`instantiate<class_ClassDB_method_instantiate>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_class_enabled<class_ClassDB_method_is_class_enabled>`\ (\ class\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_parent_class<class_ClassDB_method_is_parent_class>`\ (\ class\: :ref:`StringName<class_StringName>`, inherits\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
@@ -170,6 +172,18 @@ Returns an array with the names all the integer constants of ``class`` or its an
----
.. _class_ClassDB_method_class_get_method_argument_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **class_get_method_argument_count**\ (\ class\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, no_inheritance\: :ref:`bool<class_bool>` = false\ ) |const|
Returns the number of arguments of the method ``method`` of ``class`` or its ancestry if ``no_inheritance`` is ``false``.
.. rst-class:: classref-item-separator
----
.. _class_ClassDB_method_class_get_method_list:
.. rst-class:: classref-method
+1 -1
View File
@@ -1757,7 +1757,7 @@ Constructs a color from an `OK HSL profile <https://bottosson.github.io/posts/co
:ref:`Color<class_Color>` **from_rgbe9995**\ (\ rgbe\: :ref:`int<class_int>`\ ) |static|
Decodes a **Color** from a RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995<class_Image_constant_FORMAT_RGBE9995>`.
Decodes a **Color** from an RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995<class_Image_constant_FORMAT_RGBE9995>`.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -203,7 +203,7 @@ Generates an RSA :ref:`CryptoKey<class_CryptoKey>` that can be used for creating
Generates a self-signed :ref:`X509Certificate<class_X509Certificate>` from the given :ref:`CryptoKey<class_CryptoKey>` and ``issuer_name``. The certificate validity will be defined by ``not_before`` and ``not_after`` (first valid date and last valid date). The ``issuer_name`` must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).
A small example to generate an RSA key and a X509 self-signed certificate.
A small example to generate an RSA key and an X509 self-signed certificate.
.. tabs::
+1 -1
View File
@@ -351,7 +351,7 @@ If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web b
If ``true``, the exported game will support threads. It requires `a "cross-origin isolated" website <https://web.dev/articles/coop-coep>`__, which may be difficult to set up and is limited for security reasons (such as not being able to communicate with third-party websites).
If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on a HTTPS website.
If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on an HTTPS website.
.. rst-class:: classref-item-separator
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -129,7 +129,7 @@ Limiting the FPS can be useful to reduce the host machine's power consumption, w
If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is **Enabled** or **Adaptive**, the setting takes precedence and the max FPS number cannot exceed the monitor's refresh rate.
If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__.
If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__.
See also :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` and :ref:`ProjectSettings.application/run/max_fps<class_ProjectSettings_property_application/run/max_fps>`.
@@ -280,7 +280,7 @@ To detect whether the current build is 64-bit, you can use the fact that all 64-
\ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name<class_OS_method_get_processor_name>`). For example, when running a ``x86_32`` Godot binary on a ``x86_64`` system, the returned value will still be ``"x86_32"``.
\ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name<class_OS_method_get_processor_name>`). For example, when running an ``x86_32`` Godot binary on an ``x86_64`` system, the returned value will still be ``"x86_32"``.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -2060,7 +2060,7 @@ The default exposure used for tonemapping. Higher values result in a brighter im
- |void| **set_tonemapper**\ (\ value\: :ref:`ToneMapper<enum_Environment_ToneMapper>`\ )
- :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper**\ (\ )
The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.)
The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.)
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -840,7 +840,7 @@ Returns the next bits from the file as a floating-point number.
:ref:`String<class_String>` **get_sha256**\ (\ path\: :ref:`String<class_String>`\ ) |static|
Returns a SHA-256 :ref:`String<class_String>` representing the file at the given path or an empty :ref:`String<class_String>` on failure.
Returns an SHA-256 :ref:`String<class_String>` representing the file at the given path or an empty :ref:`String<class_String>` on failure.
.. rst-class:: classref-item-separator
+21 -2
View File
@@ -78,6 +78,8 @@ Properties
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`data<class_FontFile_property_data>` | ``PackedByteArray()`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_FontFile_property_disable_embedded_bitmaps>` | ``true`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`int<class_int>` | :ref:`fixed_size<class_FontFile_property_fixed_size>` | ``0`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`fixed_size_scale_mode<class_FontFile_property_fixed_size_scale_mode>` | ``0`` |
@@ -315,6 +317,23 @@ Contents of the dynamic font source file.
----
.. _class_FontFile_property_disable_embedded_bitmaps:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true``
.. rst-class:: classref-property-setget
- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_disable_embedded_bitmaps**\ (\ )
If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
.. rst-class:: classref-item-separator
----
.. _class_FontFile_property_fixed_size:
.. rst-class:: classref-property
@@ -614,7 +633,7 @@ Removes all font cache entries.
|void| **clear_glyphs**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
Removes all rendered glyphs information from the cache entry.
Removes all rendered glyph information from the cache entry.
\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture<class_FontFile_method_remove_texture>` to remove them manually.
@@ -1398,7 +1417,7 @@ Sets array containing glyph packing data.
|void| **set_transform**\ (\ cache_index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ )
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
.. rst-class:: classref-item-separator
+31 -12
View File
@@ -40,17 +40,19 @@ Properties
.. table::
:widths: auto
+-------------------------+---------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`buffer<class_GLTFBufferView_property_buffer>` | ``-1`` |
+-------------------------+---------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`byte_length<class_GLTFBufferView_property_byte_length>` | ``0`` |
+-------------------------+---------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>` | ``0`` |
+-------------------------+---------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` | ``-1`` |
+-------------------------+---------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`indices<class_GLTFBufferView_property_indices>` | ``false`` |
+-------------------------+---------------------------------------------------------------+-----------+
+-------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`buffer<class_GLTFBufferView_property_buffer>` | ``-1`` |
+-------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`byte_length<class_GLTFBufferView_property_byte_length>` | ``0`` |
+-------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>` | ``0`` |
+-------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` | ``-1`` |
+-------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`indices<class_GLTFBufferView_property_indices>` | ``false`` |
+-------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`vertex_attributes<class_GLTFBufferView_property_vertex_attributes>` | ``false`` |
+-------------------------+---------------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
@@ -152,7 +154,24 @@ The stride, in bytes, between interleaved data. If ``-1``, this buffer view is n
- |void| **set_indices**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_indices**\ (\ )
True if the GLTFBufferView's OpenGL GPU buffer type is an ``ELEMENT_ARRAY_BUFFER`` used for vertex indices (integer constant ``34963``). False if the buffer type is ``ARRAY_BUFFER`` used for vertex attributes (integer constant ``34962``) or when any other value. See `Buffers, BufferViews, and Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ for possible values. This property is set but never used, setting this property will do nothing.
True if the GLTFBufferView's OpenGL GPU buffer type is an ``ELEMENT_ARRAY_BUFFER`` used for vertex indices (integer constant ``34963``). False if the buffer type is any other value. See `Buffers, BufferViews, and Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ for possible values. This property is set on import and used on export.
.. rst-class:: classref-item-separator
----
.. _class_GLTFBufferView_property_vertex_attributes:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **vertex_attributes** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_vertex_attributes**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_vertex_attributes**\ (\ )
True if the GLTFBufferView's OpenGL GPU buffer type is an ``ARRAY_BUFFER`` used for vertex attributes (integer constant ``34962``). False if the buffer type is any other value. See `Buffers, BufferViews, and Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ for possible values. This property is set on import and used on export.
.. rst-class:: classref-section-separator
+1 -1
View File
@@ -12,7 +12,7 @@ GLTFMesh
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
GLTFMesh represents an GLTF mesh.
GLTFMesh represents a GLTF mesh.
.. rst-class:: classref-introduction-group
+1 -1
View File
@@ -12,7 +12,7 @@ GLTFTexture
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
GLTFTexture represents a texture in an GLTF file.
GLTFTexture represents a texture in a GLTF file.
.. rst-class:: classref-introduction-group
+3 -3
View File
@@ -34,7 +34,7 @@ The :ref:`HashType<enum_HashingContext_HashType>` enum shows the supported hashi
# Check that file exists.
if not FileAccess.file_exists(path):
return
# Start a SHA-256 context.
# Start an SHA-256 context.
var ctx = HashingContext.new()
ctx.start(HashingContext.HASH_SHA256)
# Open the file to hash.
@@ -58,7 +58,7 @@ The :ref:`HashType<enum_HashingContext_HashType>` enum shows the supported hashi
{
return;
}
// Start a SHA-256 context.
// Start an SHA-256 context.
var ctx = new HashingContext();
ctx.Start(HashingContext.HashType.Sha256);
// Open the file to hash.
@@ -158,7 +158,7 @@ Closes the current context, and return the computed hash.
:ref:`Error<enum_@GlobalScope_Error>` **start**\ (\ type\: :ref:`HashType<enum_HashingContext_HashType>`\ )
Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256<class_HashingContext_constant_HASH_SHA256>` to start computation of a SHA-256).
Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256<class_HashingContext_constant_HASH_SHA256>` to start computation of an SHA-256).
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -1458,7 +1458,7 @@ Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (*
:ref:`Error<enum_@GlobalScope_Error>` **load_svg_from_string**\ (\ svg_str\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0\ )
Loads an image from the string contents of a SVG file (**.svg**).
Loads an image from the string contents of an SVG file (**.svg**).
\ **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the ``module_svg_enabled=no`` SCons option.
+1 -1
View File
@@ -145,7 +145,7 @@ The ``arrays`` argument is an array of arrays. Each of the :ref:`Mesh.ARRAY_MAX<
The ``blend_shapes`` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as ``arrays``, but :ref:`Mesh.ARRAY_VERTEX<class_Mesh_constant_ARRAY_VERTEX>`, :ref:`Mesh.ARRAY_NORMAL<class_Mesh_constant_ARRAY_NORMAL>`, and :ref:`Mesh.ARRAY_TANGENT<class_Mesh_constant_ARRAY_TANGENT>` are set if and only if they are set in ``arrays`` and all other entries are ``null``.
The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents a LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of a LOD also increases the distance that the objects has to be from the camera before the LOD is used.
The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used.
The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
+1 -1
View File
@@ -644,7 +644,7 @@ Returns the current value of the joypad axis at given index (see :ref:`JoyAxis<e
:ref:`String<class_String>` **get_joy_guid**\ (\ device\: :ref:`int<class_int>`\ ) |const|
Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names and mappings based on this GUID.
Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names and mappings based on this GUID.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -110,7 +110,7 @@ Returns ``true`` when using the eraser end of a stylus pen.
- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
- :ref:`Vector2<class_Vector2>` **get_position**\ (\ )
The drag position.
The drag position in the viewport the node is in, using the coordinate system of this viewport.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -119,7 +119,7 @@ The touch index in the case of a multi-touch event. One index = one finger.
- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
- :ref:`Vector2<class_Vector2>` **get_position**\ (\ )
The touch position, in screen (global) coordinates.
The touch position in the viewport the node is in, using the coordinate system of this viewport.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -257,7 +257,7 @@ Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multi
Returns the sender's peer ID for the RPC currently being executed.
\ **Note:** If not inside an RPC this method will return 0.
\ **Note:** This method returns ``0`` when called outside of an RPC. As such, the original peer ID may be lost when code execution is delayed (such as with GDScript's ``await`` keyword).
.. rst-class:: classref-item-separator
+133 -43
View File
@@ -21,6 +21,38 @@ Description
**NativeMenu** handles low-level access to the OS native global menu bar and popup menus.
\ **Note:** This is low-level API, consider using :ref:`MenuBar<class_MenuBar>` with :ref:`MenuBar.prefer_global_menu<class_MenuBar_property_prefer_global_menu>` set to ``true``, and :ref:`PopupMenu<class_PopupMenu>` with :ref:`PopupMenu.prefer_native_menu<class_PopupMenu_property_prefer_native_menu>` set to ``true``.
To create a menu, use :ref:`create_menu<class_NativeMenu_method_create_menu>`, add menu items using ``add_*_item`` methods. To remove a menu, use :ref:`free_menu<class_NativeMenu_method_free_menu>`.
::
var menu
func _menu_callback(item_id):
if item_id == "ITEM_CUT":
cut()
elif item_id == "ITEM_COPY":
copy()
elif item_id == "ITEM_PASTE":
paste()
func _enter_tree():
# Create new menu and add items:
menu = NativeMenu.create_menu()
NativeMenu.add_item(menu, "Cut", _menu_callback, Callable(), "ITEM_CUT")
NativeMenu.add_item(menu, "Copy", _menu_callback, Callable(), "ITEM_COPY")
NativeMenu.add_separator(menu)
NativeMenu.add_item(menu, "Paste", _menu_callback, Callable(), "ITEM_PASTE")
func _on_button_pressed():
# Show popup menu at mouse position:
NativeMenu.popup(menu, DisplayServer.mouse_get_position())
func _exit_tree():
# Remove menu when it's no longer needed:
NativeMenu.free_menu(menu)
.. rst-class:: classref-reftable-group
Methods
@@ -116,6 +148,8 @@ Methods
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_item<class_NativeMenu_method_remove_item>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_interface_direction<class_NativeMenu_method_set_interface_direction>`\ (\ rid\: :ref:`RID<class_RID>`, is_rtl\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_item_accelerator<class_NativeMenu_method_set_item_accelerator>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_item_callback<class_NativeMenu_method_set_item_callback>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
@@ -188,6 +222,30 @@ enum **Feature**:
**NativeMenu** supports native popup menus.
.. _class_NativeMenu_constant_FEATURE_OPEN_CLOSE_CALLBACK:
.. rst-class:: classref-enumeration-constant
:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_OPEN_CLOSE_CALLBACK** = ``2``
**NativeMenu** supports menu open and close callbacks.
.. _class_NativeMenu_constant_FEATURE_HOVER_CALLBACK:
.. rst-class:: classref-enumeration-constant
:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_HOVER_CALLBACK** = ``3``
**NativeMenu** supports menu item hover callback.
.. _class_NativeMenu_constant_FEATURE_KEY_CALLBACK:
.. rst-class:: classref-enumeration-constant
:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_KEY_CALLBACK** = ``4``
**NativeMenu** supports menu item accelerator/key callback.
.. rst-class:: classref-item-separator
----
@@ -269,7 +327,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -289,7 +349,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -309,7 +371,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -331,7 +395,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -351,7 +417,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -375,7 +443,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -397,7 +467,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** ``accelerator`` and ``key_callback`` are ignored on Windows.
.. rst-class:: classref-item-separator
@@ -413,7 +485,7 @@ Adds a separator between items to the global menu ``rid``. Separators also occup
Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -429,7 +501,7 @@ Adds an item that will act as a submenu of the global menu ``rid``. The ``submen
Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -443,7 +515,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde
Removes all items from the global menu ``rid``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -457,7 +529,7 @@ Removes all items from the global menu ``rid``.
Creates a new global menu object.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -471,7 +543,7 @@ Creates a new global menu object.
Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -485,7 +557,7 @@ Returns the index of the item with the specified ``tag``. Index is automatically
Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -499,7 +571,7 @@ Returns the index of the item with the specified ``text``. Index is automaticall
Frees a global menu object created by this **NativeMenu**.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -527,7 +599,7 @@ Returns the accelerator of the item at index ``idx``. Accelerators are special c
Returns the callback of the item at index ``idx``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -541,7 +613,7 @@ Returns the callback of the item at index ``idx``.
Returns number of items in the global menu ``rid``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -555,7 +627,7 @@ Returns number of items in the global menu ``rid``.
Returns the icon of the item at index ``idx``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -597,7 +669,7 @@ Returns the callback of the item accelerator at index ``idx``.
Returns number of states of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -611,7 +683,7 @@ Returns number of states of a multistate item. See :ref:`add_multistate_item<cla
Returns the state of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -625,7 +697,7 @@ Returns the state of a multistate item. See :ref:`add_multistate_item<class_Nati
Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item<class_NativeMenu_method_add_submenu_item>` for more info on how to add a submenu.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -639,7 +711,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item<
Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_tag<class_NativeMenu_method_set_item_tag>`, which provides a simple way of assigning context data to items.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -653,7 +725,7 @@ Returns the metadata of the specified item, which might be of any type. You can
Returns the text of the item at index ``idx``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -723,7 +795,7 @@ b]Note:** This method is implemented only on macOS.
Returns global menu size.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -765,7 +837,7 @@ Returns readable name of a special system menu.
Returns ``true`` if the specified ``feature`` is supported by the current **NativeMenu**, ``false`` otherwise.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -779,7 +851,7 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Nati
Returns ``true`` if ``rid`` is valid global menu.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -807,7 +879,7 @@ Returns ``true`` if a special system menu is supported.
Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -821,7 +893,7 @@ Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if
Returns ``true`` if the item at index ``idx`` is checked.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -837,7 +909,7 @@ Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled i
See :ref:`set_item_disabled<class_NativeMenu_method_set_item_disabled>` for more info on how to disable an item.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -869,7 +941,7 @@ Returns ``true`` if the item at index ``idx`` has radio button-style checkabilit
\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -897,7 +969,7 @@ Return ``true`` is global menu is a special system menu.
Shows the global menu at ``position`` in the screen coordinates.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -913,7 +985,21 @@ Removes the item at index ``idx`` from the global menu ``rid``.
\ **Note:** The indices of items after the removed item will be shifted by one.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
----
.. _class_NativeMenu_method_set_interface_direction:
.. rst-class:: classref-method
|void| **set_interface_direction**\ (\ rid\: :ref:`RID<class_RID>`, is_rtl\: :ref:`bool<class_bool>`\ )
Sets the menu text layout directtion.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -943,7 +1029,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when an item
\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -957,7 +1043,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when an item
Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -971,7 +1057,7 @@ Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the ty
Sets the checkstate status of the item at index ``idx``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -985,7 +1071,7 @@ Sets the checkstate status of the item at index ``idx``.
Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1029,9 +1115,9 @@ Sets the callback of the item at index ``idx``. The callback is emitted when an
Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
\ **Note:** This method is not supported by macOS "_dock" menu items.
\ **Note:** This method is not supported by macOS Dock menu items.
.. rst-class:: classref-item-separator
@@ -1075,7 +1161,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc
Sets number of state of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1091,7 +1177,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f
\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1105,7 +1191,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f
Sets the state of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1119,7 +1205,7 @@ Sets the state of a multistate item. See :ref:`add_multistate_item<class_NativeM
Sets the submenu RID of the item at index ``idx``. The submenu is a global menu that would be shown when the item is clicked.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1133,7 +1219,7 @@ Sets the submenu RID of the item at index ``idx``. The submenu is a global menu
Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_tag<class_NativeMenu_method_get_item_tag>`, which provides a simple way of assigning context data to items.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1147,7 +1233,7 @@ Sets the metadata of an item, which may be of any type. You can later get it wit
Sets the text of the item at index ``idx``.
\ **Note:** This method is implemented only on macOS.
\ **Note:** This method is implemented on macOS and Windows.
.. rst-class:: classref-item-separator
@@ -1189,6 +1275,8 @@ Sets the minimum width of the global menu.
Registers callable to emit when the menu is about to show.
\ **Note:** This method is implemented only on macOS.
.. rst-class:: classref-item-separator
----
@@ -1201,6 +1289,8 @@ Registers callable to emit when the menu is about to show.
Registers callable to emit when the menu is about to closed.
\ **Note:** This method is implemented only on macOS.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
@@ -34,12 +34,18 @@ Methods
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_obstruction_outline<class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline>`\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_projected_obstruction<class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction>`\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_traversable_outline<class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline>`\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear<class_NavigationMeshSourceGeometryData2D_method_clear>`\ (\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions>`\ (\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines>`\ (\ ) |const| |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions>`\ (\ ) |const| |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines>`\ (\ ) |const| |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData2D_method_has_data>`\ (\ ) |
@@ -48,6 +54,8 @@ Methods
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines>`\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions>`\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines>`\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) |
+----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -72,6 +80,18 @@ Adds the outline points of a shape as obstructed area.
----
.. _class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction:
.. rst-class:: classref-method
|void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ )
Adds a projected obstruction shape to the source geometry. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline:
.. rst-class:: classref-method
@@ -96,6 +116,18 @@ Clears the internal data.
----
.. _class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions:
.. rst-class:: classref-method
|void| **clear_projected_obstructions**\ (\ )
Clears all projected obstructions.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines:
.. rst-class:: classref-method
@@ -108,6 +140,22 @@ Returns all the obstructed area outlines arrays.
----
.. _class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **get_projected_obstructions**\ (\ ) |const|
Returns the projected obstructions as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries:
- ``vertices`` - A :ref:`PackedFloat32Array<class_PackedFloat32Array>` that defines the outline points of the projected shape.
- ``carve`` - A :ref:`bool<class_bool>` that defines how the projected shape affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines:
.. rst-class:: classref-method
@@ -152,6 +200,28 @@ Adds the geometry data of another **NavigationMeshSourceGeometryData2D** to the
Sets all the obstructed area outlines arrays.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions:
.. rst-class:: classref-method
|void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ )
Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
.. tabs::
.. code-tab:: gdscript
"vertices" : PackedFloat32Array
"carve" : bool
.. rst-class:: classref-item-separator
----
@@ -31,27 +31,35 @@ Methods
.. table::
:widths: auto
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_faces<class_NavigationMeshSourceGeometryData3D_method_add_faces>`\ (\ faces\: :ref:`PackedVector3Array<class_PackedVector3Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_mesh<class_NavigationMeshSourceGeometryData3D_method_add_mesh>`\ (\ mesh\: :ref:`Mesh<class_Mesh>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_mesh_array<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>`\ (\ mesh_array\: :ref:`Array<class_Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear<class_NavigationMeshSourceGeometryData3D_method_clear>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_NavigationMeshSourceGeometryData3D_method_get_indices>`\ (\ ) |const| |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertices<class_NavigationMeshSourceGeometryData3D_method_get_vertices>`\ (\ ) |const| |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData3D_method_has_data>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`merge<class_NavigationMeshSourceGeometryData3D_method_merge>`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_indices<class_NavigationMeshSourceGeometryData3D_method_set_indices>`\ (\ indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_vertices<class_NavigationMeshSourceGeometryData3D_method_set_vertices>`\ (\ vertices\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_faces<class_NavigationMeshSourceGeometryData3D_method_add_faces>`\ (\ faces\: :ref:`PackedVector3Array<class_PackedVector3Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_mesh<class_NavigationMeshSourceGeometryData3D_method_add_mesh>`\ (\ mesh\: :ref:`Mesh<class_Mesh>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_mesh_array<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>`\ (\ mesh_array\: :ref:`Array<class_Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_projected_obstruction<class_NavigationMeshSourceGeometryData3D_method_add_projected_obstruction>`\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, elevation\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, carve\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear<class_NavigationMeshSourceGeometryData3D_method_clear>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_projected_obstructions<class_NavigationMeshSourceGeometryData3D_method_clear_projected_obstructions>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_NavigationMeshSourceGeometryData3D_method_get_indices>`\ (\ ) |const| |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_projected_obstructions<class_NavigationMeshSourceGeometryData3D_method_get_projected_obstructions>`\ (\ ) |const| |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertices<class_NavigationMeshSourceGeometryData3D_method_get_vertices>`\ (\ ) |const| |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData3D_method_has_data>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`merge<class_NavigationMeshSourceGeometryData3D_method_merge>`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_indices<class_NavigationMeshSourceGeometryData3D_method_set_indices>`\ (\ indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_projected_obstructions<class_NavigationMeshSourceGeometryData3D_method_set_projected_obstructions>`\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_vertices<class_NavigationMeshSourceGeometryData3D_method_set_vertices>`\ (\ vertices\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
@@ -98,6 +106,18 @@ Adds an :ref:`Array<class_Array>` the size of :ref:`Mesh.ARRAY_MAX<class_Mesh_co
----
.. _class_NavigationMeshSourceGeometryData3D_method_add_projected_obstruction:
.. rst-class:: classref-method
|void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, elevation\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, carve\: :ref:`bool<class_bool>`\ )
Adds a projected obstruction shape to the source geometry. The ``vertices`` are considered projected on a xz-axes plane, placed at the global y-axis ``elevation`` and extruded by ``height``. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData3D_method_clear:
.. rst-class:: classref-method
@@ -110,6 +130,18 @@ Clears the internal data.
----
.. _class_NavigationMeshSourceGeometryData3D_method_clear_projected_obstructions:
.. rst-class:: classref-method
|void| **clear_projected_obstructions**\ (\ )
Clears all projected obstructions.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData3D_method_get_indices:
.. rst-class:: classref-method
@@ -122,6 +154,26 @@ Returns the parsed source geometry data indices array.
----
.. _class_NavigationMeshSourceGeometryData3D_method_get_projected_obstructions:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **get_projected_obstructions**\ (\ ) |const|
Returns the projected obstructions as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries:
- ``vertices`` - A :ref:`PackedFloat32Array<class_PackedFloat32Array>` that defines the outline points of the projected shape.
- ``elevation`` - A :ref:`float<class_float>` that defines the projected shape placement on the y-axis.
- ``height`` - A :ref:`float<class_float>` that defines how much the projected shape is extruded along the y-axis.
- ``carve`` - A :ref:`bool<class_bool>` that defines how the obstacle affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData3D_method_get_vertices:
.. rst-class:: classref-method
@@ -168,6 +220,30 @@ Sets the parsed source geometry data indices. The indices need to be matched wit
\ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMeshSourceGeometryData3D_method_set_projected_obstructions:
.. rst-class:: classref-method
|void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ )
Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
.. tabs::
.. code-tab:: gdscript
"vertices" : PackedFloat32Array
"elevation" : float
"height" : float
"carve" : bool
.. rst-class:: classref-item-separator
----
+57 -17
View File
@@ -14,20 +14,18 @@ NavigationObstacle2D
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area.
2D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents.
.. rst-class:: classref-introduction-group
Description
-----------
2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly.
An obstacle needs a navigation map and outline :ref:`vertices<class_NavigationObstacle2D_property_vertices>` defined to work correctly. The outlines can not cross or overlap.
If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap.
Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh<class_NavigationObstacle2D_property_affect_navigation_mesh>` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places. If :ref:`carve_navigation_mesh<class_NavigationObstacle2D_property_carve_navigation_mesh>` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius.
Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent.
Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map.
With :ref:`avoidance_enabled<class_NavigationObstacle2D_property_avoidance_enabled>` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map.
.. rst-class:: classref-introduction-group
@@ -44,17 +42,21 @@ Properties
.. table::
:widths: auto
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle2D_property_avoidance_enabled>` | ``true`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle2D_property_avoidance_layers>` | ``1`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle2D_property_radius>` | ``0.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_NavigationObstacle2D_property_velocity>` | ``Vector2(0, 0)`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`vertices<class_NavigationObstacle2D_property_vertices>` | ``PackedVector2Array()`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`affect_navigation_mesh<class_NavigationObstacle2D_property_affect_navigation_mesh>` | ``false`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle2D_property_avoidance_enabled>` | ``true`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle2D_property_avoidance_layers>` | ``1`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`carve_navigation_mesh<class_NavigationObstacle2D_property_carve_navigation_mesh>` | ``false`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle2D_property_radius>` | ``0.0`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_NavigationObstacle2D_property_velocity>` | ``Vector2(0, 0)`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`vertices<class_NavigationObstacle2D_property_vertices>` | ``PackedVector2Array()`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
.. rst-class:: classref-reftable-group
@@ -85,6 +87,23 @@ Methods
Property Descriptions
---------------------
.. _class_NavigationObstacle2D_property_affect_navigation_mesh:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **affect_navigation_mesh** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_affect_navigation_mesh**\ (\ )
If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices<class_NavigationObstacle2D_property_vertices>` defined shape.
.. rst-class:: classref-item-separator
----
.. _class_NavigationObstacle2D_property_avoidance_enabled:
.. rst-class:: classref-property
@@ -119,6 +138,27 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat
----
.. _class_NavigationObstacle2D_property_carve_navigation_mesh:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **carve_navigation_mesh** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_carve_navigation_mesh**\ (\ )
If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius).
It will still be affected by further postprocessing of the baking process, like edge and polygon simplification.
Requires :ref:`affect_navigation_mesh<class_NavigationObstacle2D_property_affect_navigation_mesh>` to be enabled.
.. rst-class:: classref-item-separator
----
.. _class_NavigationObstacle2D_property_radius:
.. rst-class:: classref-property
+61 -21
View File
@@ -14,20 +14,18 @@ NavigationObstacle3D
**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area.
3D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents.
.. rst-class:: classref-introduction-group
Description
-----------
3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly.
An obstacle needs a navigation map and outline :ref:`vertices<class_NavigationObstacle3D_property_vertices>` defined to work correctly. The outlines can not cross or overlap and are restricted to a plane projection. This means the y-axis of the vertices is ignored, instead the obstacle's global y-axis position is used for placement. The projected shape is extruded by the obstacles height along the y-axis.
If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap.
Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places, e.g. inside "solid" geometry or on top of it. If :ref:`carve_navigation_mesh<class_NavigationObstacle3D_property_carve_navigation_mesh>` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius.
Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent.
Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map.
With :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map.
.. rst-class:: classref-introduction-group
@@ -44,21 +42,25 @@ Properties
.. table::
:widths: auto
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` | ``true`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` | ``1`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`height<class_NavigationObstacle3D_property_height>` | ``1.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``0.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`use_3d_avoidance<class_NavigationObstacle3D_property_use_3d_avoidance>` | ``false`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_NavigationObstacle3D_property_velocity>` | ``Vector3(0, 0, 0)`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`vertices<class_NavigationObstacle3D_property_vertices>` | ``PackedVector3Array()`` |
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` | ``false`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` | ``true`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` | ``1`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`carve_navigation_mesh<class_NavigationObstacle3D_property_carve_navigation_mesh>` | ``false`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`height<class_NavigationObstacle3D_property_height>` | ``1.0`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``0.0`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`bool<class_bool>` | :ref:`use_3d_avoidance<class_NavigationObstacle3D_property_use_3d_avoidance>` | ``false`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_NavigationObstacle3D_property_velocity>` | ``Vector3(0, 0, 0)`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`vertices<class_NavigationObstacle3D_property_vertices>` | ``PackedVector3Array()`` |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
.. rst-class:: classref-reftable-group
@@ -89,6 +91,23 @@ Methods
Property Descriptions
---------------------
.. _class_NavigationObstacle3D_property_affect_navigation_mesh:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **affect_navigation_mesh** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_affect_navigation_mesh**\ (\ )
If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices<class_NavigationObstacle3D_property_vertices>` and :ref:`height<class_NavigationObstacle3D_property_height>` defined shape.
.. rst-class:: classref-item-separator
----
.. _class_NavigationObstacle3D_property_avoidance_enabled:
.. rst-class:: classref-property
@@ -123,6 +142,27 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat
----
.. _class_NavigationObstacle3D_property_carve_navigation_mesh:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **carve_navigation_mesh** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_carve_navigation_mesh**\ (\ )
If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius).
It will still be affected by further postprocessing of the baking process, like edge and polygon simplification.
Requires :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` to be enabled.
.. rst-class:: classref-item-separator
----
.. _class_NavigationObstacle3D_property_height:
.. rst-class:: classref-property
+16
View File
@@ -121,6 +121,8 @@ Methods
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_meta_list<class_Object_method_get_meta_list>`\ (\ ) |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_method_argument_count<class_Object_method_get_method_argument_count>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_method_list<class_Object_method_get_method_list>`\ (\ ) |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_property_list<class_Object_method_get_property_list>`\ (\ ) |const| |
@@ -1230,6 +1232,20 @@ Returns the object's metadata entry names as a :ref:`PackedStringArray<class_Pac
----
.. _class_Object_method_get_method_argument_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_method_argument_count**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |const|
Returns the number of arguments of the given ``method`` by name.
\ **Note:** In C#, ``method`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``MethodName`` class to avoid allocating a new :ref:`StringName<class_StringName>` on each call.
.. rst-class:: classref-item-separator
----
.. _class_Object_method_get_method_list:
.. rst-class:: classref-method
@@ -30,7 +30,11 @@ Methods
:widths: auto
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`\ (\ ) |virtual| |
| :ref:`int<class_int>` | :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`_get_composition_layer_count<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_count>`\ (\ ) |virtual| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`_get_composition_layer_order<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_order>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_requested_extensions<class_OpenXRExtensionWrapperExtension_private_method__get_requested_extensions>`\ (\ ) |virtual| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -98,9 +102,39 @@ Method Descriptions
.. rst-class:: classref-method
:ref:`int<class_int>` **_get_composition_layer**\ (\ ) |virtual|
:ref:`int<class_int>` **_get_composition_layer**\ (\ index\: :ref:`int<class_int>`\ ) |virtual|
Returns a pointer to a ``XrCompositionLayerBaseHeader`` struct to provide a composition layer. This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`.
Returns a pointer to an ``XrCompositionLayerBaseHeader`` struct to provide the given composition layer.
This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`.
.. rst-class:: classref-item-separator
----
.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **_get_composition_layer_count**\ (\ ) |virtual|
Returns the number of composition layers this extension wrapper provides via :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`.
This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`.
.. rst-class:: classref-item-separator
----
.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_order:
.. rst-class:: classref-method
:ref:`int<class_int>` **_get_composition_layer_order**\ (\ index\: :ref:`int<class_int>`\ ) |virtual|
Returns an integer that will be used to sort the given composition layer provided via :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of ``0``, so layers provided by this method should probably be above or below (but not exactly) ``0``.
This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`.
.. rst-class:: classref-item-separator
+19
View File
@@ -48,6 +48,8 @@ Properties
+-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`item_count<class_PopupMenu_property_item_count>` | ``0`` |
+-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`prefer_native_menu<class_PopupMenu_property_prefer_native_menu>` | ``false`` |
+-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`submenu_popup_delay<class_PopupMenu_property_submenu_popup_delay>` | ``0.3`` |
+-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
| :ref:`SystemMenus<enum_NativeMenu_SystemMenus>` | :ref:`system_menu_id<class_PopupMenu_property_system_menu_id>` | ``0`` |
@@ -428,6 +430,23 @@ The number of items currently in the list.
----
.. _class_PopupMenu_property_prefer_native_menu:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **prefer_native_menu** = ``false``
.. rst-class:: classref-property-setget
- |void| **set_prefer_native_menu**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_prefer_native_menu**\ (\ )
If ``true``, :ref:`MenuBar<class_MenuBar>` will use native menu when supported.
.. rst-class:: classref-item-separator
----
.. _class_PopupMenu_property_submenu_popup_delay:
.. rst-class:: classref-property
+12 -4
View File
@@ -2090,7 +2090,7 @@ Limiting the FPS can be useful to reduce system power consumption, which reduces
If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is set to ``Enabled`` or ``Adaptive``, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__.
If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__.
If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Disabled``, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios.
@@ -2530,6 +2530,8 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w
:ref:`int<class_int>` **debug/gdscript/warnings/constant_used_as_function** = ``1``
**Deprecated:** This warning is never produced. Instead, an error is generated if the expression type is known at compile time.
When set to ``warn`` or ``error``, produces a warning or an error respectively when a constant is used as a function.
.. rst-class:: classref-item-separator
@@ -2544,6 +2546,8 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w
When set to ``warn`` or ``error``, produces a warning or an error respectively when deprecated keywords are used.
\ **Note:** There are currently no deprecated keywords, so this warning is never produced.
.. rst-class:: classref-item-separator
----
@@ -2590,6 +2594,8 @@ If ``true``, scripts in the ``res://addons`` folder will not generate warnings.
:ref:`int<class_int>` **debug/gdscript/warnings/function_used_as_property** = ``1``
**Deprecated:** This warning is never produced. When a function is used as a property, a :ref:`Callable<class_Callable>` is returned.
When set to ``warn`` or ``error``, produces a warning or an error respectively when using a function as if it is a property.
.. rst-class:: classref-item-separator
@@ -2724,6 +2730,8 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w
:ref:`int<class_int>` **debug/gdscript/warnings/property_used_as_function** = ``1``
**Deprecated:** This warning is never produced. Instead, an error is generated if the expression type is known at compile time.
When set to ``warn`` or ``error``, produces a warning or an error respectively when using a property as if it is a function.
.. rst-class:: classref-item-separator
@@ -3014,7 +3022,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w
:ref:`int<class_int>` **debug/gdscript/warnings/unused_signal** = ``1``
When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never emitted.
When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never explicitly used in the class.
.. rst-class:: classref-item-separator
@@ -4420,7 +4428,7 @@ The command-line arguments to append to Godot's own command line when running th
It is possible to make another executable run Godot by using the ``%command%`` placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed *before* the placeholder, whereas Godot-specific arguments should be placed *after* the placeholder.
For example, this can be used to force the project to run on the dedicated GPU in a NVIDIA Optimus system on Linux:
For example, this can be used to force the project to run on the dedicated GPU in an NVIDIA Optimus system on Linux:
::
@@ -4528,7 +4536,7 @@ Override for :ref:`filesystem/import/blender/enabled<class_ProjectSettings_prope
If ``true``, Autodesk FBX 3D scene files with the ``.fbx`` extension will be imported by converting them to glTF 2.0.
This requires configuring a path to a FBX2glTF executable in the editor settings at :ref:`EditorSettings.filesystem/import/fbx2gltf/fbx2gltf_path<class_EditorSettings_property_filesystem/import/fbx2gltf/fbx2gltf_path>`.
This requires configuring a path to an FBX2glTF executable in the editor settings at :ref:`EditorSettings.filesystem/import/fbx2gltf/fbx2gltf_path<class_EditorSettings_property_filesystem/import/fbx2gltf/fbx2gltf_path>`.
.. rst-class:: classref-item-separator
+4 -2
View File
@@ -335,6 +335,8 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Ray
Returns the normal of the intersecting object's shape at the collision point, or ``Vector2(0, 0)`` if the ray starts inside the shape and :ref:`hit_from_inside<class_RayCast2D_property_hit_from_inside>` is ``true``.
\ **Note:** Check that :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned normal is valid and up-to-date.
.. rst-class:: classref-item-separator
----
@@ -345,9 +347,9 @@ Returns the normal of the intersecting object's shape at the collision point, or
:ref:`Vector2<class_Vector2>` **get_collision_point**\ (\ ) |const|
Returns the collision point at which the ray intersects the closest object. If :ref:`hit_from_inside<class_RayCast2D_property_hit_from_inside>` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray.
Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If :ref:`hit_from_inside<class_RayCast2D_property_hit_from_inside>` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray.
\ **Note:** This point is in the **global** coordinate system.
\ **Note:** Check that :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date.
.. rst-class:: classref-item-separator
+4 -2
View File
@@ -410,6 +410,8 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Ray
Returns the normal of the intersecting object's shape at the collision point, or ``Vector3(0, 0, 0)`` if the ray starts inside the shape and :ref:`hit_from_inside<class_RayCast3D_property_hit_from_inside>` is ``true``.
\ **Note:** Check that :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned normal is valid and up-to-date.
.. rst-class:: classref-item-separator
----
@@ -420,9 +422,9 @@ Returns the normal of the intersecting object's shape at the collision point, or
:ref:`Vector3<class_Vector3>` **get_collision_point**\ (\ ) |const|
Returns the collision point at which the ray intersects the closest object. If :ref:`hit_from_inside<class_RayCast3D_property_hit_from_inside>` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray.
Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If :ref:`hit_from_inside<class_RayCast3D_property_hit_from_inside>` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray.
\ **Note:** This point is in the **global** coordinate system.
\ **Note:** Check that :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date.
.. rst-class:: classref-item-separator
+1 -1
View File
@@ -11568,7 +11568,7 @@ If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`Pr
|void| **viewport_set_use_hdr_2d**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>`.
If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>`.
\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons.
@@ -47,6 +47,8 @@ Properties
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterDynamicFont_property_compress>` | ``true`` |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_ResourceImporterDynamicFont_property_disable_embedded_bitmaps>` | ``true`` |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+
| :ref:`Array<class_Array>` | :ref:`fallbacks<class_ResourceImporterDynamicFont_property_fallbacks>` | ``[]`` |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`force_autohinter<class_ResourceImporterDynamicFont_property_force_autohinter>` | ``false`` |
@@ -127,6 +129,18 @@ If ``true``, uses lossless compression for the resulting font.
----
.. _class_ResourceImporterDynamicFont_property_disable_embedded_bitmaps:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true``
If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
.. rst-class:: classref-item-separator
----
.. _class_ResourceImporterDynamicFont_property_fallbacks:
.. rst-class:: classref-property
+2 -2
View File
@@ -12,7 +12,7 @@ ResourceImporterMP3
**Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Imports a MP3 audio file for playback.
Imports an MP3 audio file for playback.
.. rst-class:: classref-introduction-group
@@ -21,7 +21,7 @@ Description
MP3 is a lossy audio format, with worse audio quality compared to :ref:`ResourceImporterOggVorbis<class_ResourceImporterOggVorbis>` at a given bitrate.
In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using a MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression.
In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression.
MP3 requires more CPU to decode than :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices.
+1 -1
View File
@@ -21,7 +21,7 @@ Description
Ogg Vorbis is a lossy audio format, with better audio quality compared to :ref:`ResourceImporterMP3<class_ResourceImporterMP3>` at a given bitrate.
In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using a MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression.
In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression.
Ogg Vorbis requires more CPU to decode than :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices.
+85 -71
View File
@@ -24,77 +24,79 @@ Methods
.. table::
:widths: auto
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_can_instantiate<class_ScriptExtension_private_method__can_instantiate>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_editor_can_reload_from_file<class_ScriptExtension_private_method__editor_can_reload_from_file>`\ (\ ) |virtual| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Script<class_Script>` | :ref:`_get_base_script<class_ScriptExtension_private_method__get_base_script>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`_get_class_icon_path<class_ScriptExtension_private_method__get_class_icon_path>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_constants<class_ScriptExtension_private_method__get_constants>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_documentation<class_ScriptExtension_private_method__get_documentation>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`_get_global_name<class_ScriptExtension_private_method__get_global_name>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`_get_instance_base_type<class_ScriptExtension_private_method__get_instance_base_type>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ScriptLanguage<class_ScriptLanguage>` | :ref:`_get_language<class_ScriptExtension_private_method__get_language>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`_get_member_line<class_ScriptExtension_private_method__get_member_line>`\ (\ member\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`_get_members<class_ScriptExtension_private_method__get_members>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_method_info<class_ScriptExtension_private_method__get_method_info>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`_get_property_default_value<class_ScriptExtension_private_method__get_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`_get_rpc_config<class_ScriptExtension_private_method__get_rpc_config>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_method_list<class_ScriptExtension_private_method__get_script_method_list>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_property_list<class_ScriptExtension_private_method__get_script_property_list>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_signal_list<class_ScriptExtension_private_method__get_script_signal_list>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`_get_source_code<class_ScriptExtension_private_method__get_source_code>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_method<class_ScriptExtension_private_method__has_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_property_default_value<class_ScriptExtension_private_method__has_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_script_signal<class_ScriptExtension_private_method__has_script_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_source_code<class_ScriptExtension_private_method__has_source_code>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_static_method<class_ScriptExtension_private_method__has_static_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_inherits_script<class_ScriptExtension_private_method__inherits_script>`\ (\ script\: :ref:`Script<class_Script>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``void*`` | :ref:`_instance_create<class_ScriptExtension_private_method__instance_create>`\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_instance_has<class_ScriptExtension_private_method__instance_has>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_abstract<class_ScriptExtension_private_method__is_abstract>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_placeholder_fallback_enabled<class_ScriptExtension_private_method__is_placeholder_fallback_enabled>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_tool<class_ScriptExtension_private_method__is_tool>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_valid<class_ScriptExtension_private_method__is_valid>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_placeholder_erased<class_ScriptExtension_private_method__placeholder_erased>`\ (\ placeholder\: ``void*``\ ) |virtual| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``void*`` | :ref:`_placeholder_instance_create<class_ScriptExtension_private_method__placeholder_instance_create>`\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_reload<class_ScriptExtension_private_method__reload>`\ (\ keep_state\: :ref:`bool<class_bool>`\ ) |virtual| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_set_source_code<class_ScriptExtension_private_method__set_source_code>`\ (\ code\: :ref:`String<class_String>`\ ) |virtual| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_update_exports<class_ScriptExtension_private_method__update_exports>`\ (\ ) |virtual| |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_can_instantiate<class_ScriptExtension_private_method__can_instantiate>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_editor_can_reload_from_file<class_ScriptExtension_private_method__editor_can_reload_from_file>`\ (\ ) |virtual| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Script<class_Script>` | :ref:`_get_base_script<class_ScriptExtension_private_method__get_base_script>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`_get_class_icon_path<class_ScriptExtension_private_method__get_class_icon_path>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_constants<class_ScriptExtension_private_method__get_constants>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_documentation<class_ScriptExtension_private_method__get_documentation>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`_get_global_name<class_ScriptExtension_private_method__get_global_name>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`_get_instance_base_type<class_ScriptExtension_private_method__get_instance_base_type>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ScriptLanguage<class_ScriptLanguage>` | :ref:`_get_language<class_ScriptExtension_private_method__get_language>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`_get_member_line<class_ScriptExtension_private_method__get_member_line>`\ (\ member\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`_get_members<class_ScriptExtension_private_method__get_members>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_method_info<class_ScriptExtension_private_method__get_method_info>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`_get_property_default_value<class_ScriptExtension_private_method__get_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`_get_rpc_config<class_ScriptExtension_private_method__get_rpc_config>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`_get_script_method_argument_count<class_ScriptExtension_private_method__get_script_method_argument_count>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_method_list<class_ScriptExtension_private_method__get_script_method_list>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_property_list<class_ScriptExtension_private_method__get_script_property_list>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_signal_list<class_ScriptExtension_private_method__get_script_signal_list>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`_get_source_code<class_ScriptExtension_private_method__get_source_code>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_method<class_ScriptExtension_private_method__has_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_property_default_value<class_ScriptExtension_private_method__has_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_script_signal<class_ScriptExtension_private_method__has_script_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_source_code<class_ScriptExtension_private_method__has_source_code>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_has_static_method<class_ScriptExtension_private_method__has_static_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_inherits_script<class_ScriptExtension_private_method__inherits_script>`\ (\ script\: :ref:`Script<class_Script>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``void*`` | :ref:`_instance_create<class_ScriptExtension_private_method__instance_create>`\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_instance_has<class_ScriptExtension_private_method__instance_has>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_abstract<class_ScriptExtension_private_method__is_abstract>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_placeholder_fallback_enabled<class_ScriptExtension_private_method__is_placeholder_fallback_enabled>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_tool<class_ScriptExtension_private_method__is_tool>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_valid<class_ScriptExtension_private_method__is_valid>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_placeholder_erased<class_ScriptExtension_private_method__placeholder_erased>`\ (\ placeholder\: ``void*``\ ) |virtual| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``void*`` | :ref:`_placeholder_instance_create<class_ScriptExtension_private_method__placeholder_instance_create>`\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_reload<class_ScriptExtension_private_method__reload>`\ (\ keep_state\: :ref:`bool<class_bool>`\ ) |virtual| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_set_source_code<class_ScriptExtension_private_method__set_source_code>`\ (\ code\: :ref:`String<class_String>`\ ) |virtual| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_update_exports<class_ScriptExtension_private_method__update_exports>`\ (\ ) |virtual| |
+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
@@ -301,6 +303,18 @@ Method Descriptions
----
.. _class_ScriptExtension_private_method__get_script_method_argument_count:
.. rst-class:: classref-method
:ref:`Variant<class_Variant>` **_get_script_method_argument_count**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const|
Return the expected argument count for the given ``method``, or ``null`` if it can't be determined (which will then fall back to the default behavior).
.. rst-class:: classref-item-separator
----
.. _class_ScriptExtension_private_method__get_script_method_list:
.. rst-class:: classref-method
+1 -1
View File
@@ -401,7 +401,7 @@ Removes the index array by expanding the vertex array.
**Deprecated:** This method is unused internally, as it does not preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods<class_ImporterMesh_method_generate_lods>` instead.
Generates a LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices.
Generates an LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices.
.. rst-class:: classref-item-separator
+19
View File
@@ -42,6 +42,8 @@ Properties
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+
| :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`antialiasing<class_SystemFont_property_antialiasing>` | ``1`` |
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+
| :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_SystemFont_property_disable_embedded_bitmaps>` | ``true`` |
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+
| :ref:`bool<class_bool>` | :ref:`font_italic<class_SystemFont_property_font_italic>` | ``false`` |
+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_names<class_SystemFont_property_font_names>` | ``PackedStringArray()`` |
@@ -110,6 +112,23 @@ Font anti-aliasing mode.
----
.. _class_SystemFont_property_disable_embedded_bitmaps:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true``
.. rst-class:: classref-property-setget
- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_disable_embedded_bitmaps**\ (\ )
If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
.. rst-class:: classref-item-separator
----
.. _class_SystemFont_property_font_italic:
.. rst-class:: classref-property
+62 -6
View File
@@ -62,6 +62,8 @@ Methods
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`font_get_disable_embedded_bitmaps<class_TextServer_method_font_get_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
@@ -194,6 +196,8 @@ Methods
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`font_set_descent<class_TextServer_method_font_set_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`font_set_disable_embedded_bitmaps<class_TextServer_method_font_set_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) |
@@ -358,6 +362,10 @@ Methods
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`shaped_text_get_object_glyph<class_TextServer_method_shaped_text_get_object_glyph>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_object_range<class_TextServer_method_shaped_text_get_object_range>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
@@ -1575,7 +1583,7 @@ Creates a new variation existing font which is reusing the same glyph cache and
:ref:`RID<class_RID>` **create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
Creates a new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
\ **Note:** Direction is ignored if server does not support :ref:`FEATURE_BIDI_LAYOUT<class_TextServer_constant_FEATURE_BIDI_LAYOUT>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
@@ -1603,7 +1611,7 @@ Draws box displaying character hexadecimal code. Used for replacing missing char
|void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
Removes all rendered glyphs information from the cache entry.
Removes all rendered glyph information from the cache entry.
\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` to remove them manually.
@@ -1741,6 +1749,18 @@ Returns the font descent (number of pixels below the baseline).
----
.. _class_TextServer_method_font_get_disable_embedded_bitmaps:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
Returns whether the font's embedded bitmap loading is disabled.
.. rst-class:: classref-item-separator
----
.. _class_TextServer_method_font_get_embolden:
.. rst-class:: classref-method
@@ -2549,6 +2569,18 @@ Sets the font descent (number of pixels below the baseline).
----
.. _class_TextServer_method_font_set_disable_embedded_bitmaps:
.. rst-class:: classref-method
|void| **font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ )
If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
.. rst-class:: classref-item-separator
----
.. _class_TextServer_method_font_set_embolden:
.. rst-class:: classref-method
@@ -2925,7 +2957,7 @@ Sets array containing glyph packing data.
|void| **font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ )
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
@@ -3193,7 +3225,7 @@ Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
:ref:`int<class_int>` **name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |const|
Converts readable feature, variation, script or language name to OpenType tag.
Converts readable feature, variation, script, or language name to OpenType tag.
.. rst-class:: classref-item-separator
@@ -3279,7 +3311,7 @@ Returns text span metadata.
|void| **shaped_set_span_update_font**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ )
Changes text span font, font size and OpenType features, without changing the text.
Changes text span font, font size, and OpenType features, without changing the text.
.. rst-class:: classref-item-separator
@@ -3577,6 +3609,30 @@ Breaks text to the lines and columns. Returns character ranges for each segment.
----
.. _class_TextServer_method_shaped_text_get_object_glyph:
.. rst-class:: classref-method
:ref:`int<class_int>` **shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
Returns the glyph index of the inline object.
.. rst-class:: classref-item-separator
----
.. _class_TextServer_method_shaped_text_get_object_range:
.. rst-class:: classref-method
:ref:`Vector2i<class_Vector2i>` **shaped_text_get_object_range**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
Returns the character range of the inline object.
.. rst-class:: classref-item-separator
----
.. _class_TextServer_method_shaped_text_get_object_rect:
.. rst-class:: classref-method
@@ -4134,7 +4190,7 @@ Strips diacritics from the string.
:ref:`String<class_String>` **tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |const|
Converts OpenType tag to readable feature, variation, script or language name.
Converts OpenType tag to readable feature, variation, script, or language name.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -25,7 +25,7 @@ This class conforms with as many of the ISO 8601 standards as possible. All date
Conversion methods assume "the same timezone", and do not handle timezone conversions or DST automatically. Leap seconds are also not handled, they must be done manually if desired. Suffixes such as "Z" are not handled, you need to strip them away manually.
When getting time information from the system, the time can either be in the local timezone or UTC depending on the ``utc`` parameter. However, the :ref:`get_unix_time_from_system<class_Time_method_get_unix_time_from_system>` method always returns the time in UTC.
When getting time information from the system, the time can either be in the local timezone or UTC depending on the ``utc`` parameter. However, the :ref:`get_unix_time_from_system<class_Time_method_get_unix_time_from_system>` method always uses UTC as it returns the seconds passed since the `Unix epoch <https://en.wikipedia.org/wiki/Unix_time>`__.
\ **Important:** The ``_from_system`` methods use the system clock that the user can manually set. **Never use** this method for precise time calculation since its results are subject to automatic adjustments by the user or the operating system. **Always use** :ref:`get_ticks_usec<class_Time_method_get_ticks_usec>` or :ref:`get_ticks_msec<class_Time_method_get_ticks_msec>` for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
@@ -559,7 +559,7 @@ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The str
:ref:`float<class_float>` **get_unix_time_from_system**\ (\ ) |const|
Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC.
Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. The Unix timestamp is the number of seconds passed since 1970-01-01 at 00:00:00, the `Unix epoch <https://en.wikipedia.org/wiki/Unix_time>`__.
\ **Note:** Unlike other methods that use integer timestamps, this method returns the timestamp as a :ref:`float<class_float>` for sub-second precision.
+1 -1
View File
@@ -1781,7 +1781,7 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern.
- |void| **set_use_hdr_2d**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_using_hdr_2d**\ (\ )
If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients.
If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients.
\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons.
+1 -1
View File
@@ -23,7 +23,7 @@ Provides a low-level interface for creating parsers for `XML <https://en.wikiped
To parse XML, you must open a file with the :ref:`open<class_XMLParser_method_open>` method or a buffer with the :ref:`open_buffer<class_XMLParser_method_open_buffer>` method. Then, the :ref:`read<class_XMLParser_method_read>` method must be called to parse the next nodes. Most of the methods take into consideration the currently parsed node.
Here is an example of using **XMLParser** to parse a SVG file (which is based on XML), printing each element and its attributes as a dictionary:
Here is an example of using **XMLParser** to parse an SVG file (which is based on XML), printing each element and its attributes as a dictionary:
.. tabs::
+6
View File
@@ -335,11 +335,14 @@ Resources
class_audioeffectstereoenhance
class_audiostream
class_audiostreamgenerator
class_audiostreaminteractive
class_audiostreammicrophone
class_audiostreammp3
class_audiostreamoggvorbis
class_audiostreamplaylist
class_audiostreampolyphonic
class_audiostreamrandomizer
class_audiostreamsynchronized
class_audiostreamwav
class_basematerial3d
class_bitmap
@@ -691,9 +694,12 @@ Other objects
class_audioserver
class_audiostreamgeneratorplayback
class_audiostreamplayback
class_audiostreamplaybackinteractive
class_audiostreamplaybackoggvorbis
class_audiostreamplaybackplaylist
class_audiostreamplaybackpolyphonic
class_audiostreamplaybackresampled
class_audiostreamplaybacksynchronized
class_callbacktweener
class_camerafeed
class_cameraserver