Skip to content

Commit

Permalink
Merge pull request #10379 from godotengine/classref/sync-aa8d9b8
Browse files Browse the repository at this point in the history
classref: Sync with current master branch (aa8d9b8)
  • Loading branch information
mhilbrunner authored Dec 7, 2024
2 parents 1ed0e56 + 406e44b commit 469176a
Show file tree
Hide file tree
Showing 43 changed files with 675 additions and 68 deletions.
53 changes: 50 additions & 3 deletions classes/class_audiostreamwav.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ Methods
.. table::
:widths: auto

+---------------------------------------+-------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_wav<class_AudioStreamWAV_method_save_to_wav>`\ (\ path\: :ref:`String<class_String>`\ ) |
+---------------------------------------+-------------------------------------------------------------------------------------------------------+
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`load_from_buffer<class_AudioStreamWAV_method_load_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_wav<class_AudioStreamWAV_method_save_to_wav>`\ (\ path\: :ref:`String<class_String>`\ ) |
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

.. rst-class:: classref-section-separator

Expand Down Expand Up @@ -298,6 +302,49 @@ If ``true``, audio is stereo.
Method Descriptions
-------------------

.. _class_AudioStreamWAV_method_load_from_buffer:

.. rst-class:: classref-method

:ref:`AudioStreamWAV<class_AudioStreamWAV>` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_AudioStreamWAV_method_load_from_buffer>`

Creates a new **AudioStreamWAV** instance from the given buffer. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.

The usage of ``options`` is identical to :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`.

.. rst-class:: classref-item-separator

----

.. _class_AudioStreamWAV_method_load_from_file:

.. rst-class:: classref-method

:ref:`AudioStreamWAV<class_AudioStreamWAV>` **load_from_file**\ (\ path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_AudioStreamWAV_method_load_from_file>`

Creates a new **AudioStreamWAV** instance from the given file path. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.

\ **Example:** Load the first file dropped as a WAV and play it:

::

@onready var audio_player = $AudioStreamPlayer
func _ready():
get_window().files_dropped.connect(_on_files_dropped)
func _on_files_dropped(files):
if files[0].get_extension() == "wav":
audio_player.stream = AudioStreamWAV.load_from_file(files[0], {
"force/max_rate": true,
"force/max_rate_hz": 11025
})
audio_player.play()

.. rst-class:: classref-item-separator

----

.. _class_AudioStreamWAV_method_save_to_wav:

.. rst-class:: classref-method
Expand Down
8 changes: 5 additions & 3 deletions classes/class_csgshape3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Properties
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`Operation<enum_CSGShape3D_Operation>` | :ref:`operation<class_CSGShape3D_property_operation>` | ``0`` |
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`snap<class_CSGShape3D_property_snap>` | ``0.001`` |
| :ref:`float<class_float>` | :ref:`snap<class_CSGShape3D_property_snap>` | |
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`use_collision<class_CSGShape3D_property_use_collision>` | ``false`` |
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
Expand Down Expand Up @@ -231,14 +231,16 @@ The operation that is performed on this shape. This is ignored for the first CSG

.. rst-class:: classref-property

:ref:`float<class_float>` **snap** = ``0.001`` :ref:`🔗<class_CSGShape3D_property_snap>`
:ref:`float<class_float>` **snap** :ref:`🔗<class_CSGShape3D_property_snap>`

.. rst-class:: classref-property-setget

- |void| **set_snap**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_snap**\ (\ )

Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. The top-level CSG shape's snap value is used for the entire CSG tree.
**Deprecated:** The CSG library no longer uses snapping.

This property does nothing.

.. rst-class:: classref-item-separator

Expand Down
2 changes: 1 addition & 1 deletion classes/class_cubemaparray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The primary benefit of **CubemapArray**\ s is that they can be accessed in shade

\ **Note:** Godot uses **CubemapArray**\ s internally for many effects, including the :ref:`Sky<class_Sky>` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections>` to ``true``. To create such a texture file yourself, reimport your image files using the import presets of the File System dock.

\ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend.
\ **Note:** **CubemapArray** is not supported in the Compatibility renderer.

.. rst-class:: classref-reftable-group

Expand Down
36 changes: 36 additions & 0 deletions classes/class_diraccess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ Methods
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_link<class_DirAccess_method_create_link>`\ (\ source\: :ref:`String<class_String>`, target\: :ref:`String<class_String>`\ ) |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`DirAccess<class_DirAccess>` | :ref:`create_temp<class_DirAccess_method_create_temp>`\ (\ prefix\: :ref:`String<class_String>` = "", keep\: :ref:`bool<class_bool>` = false\ ) |static| |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`current_is_dir<class_DirAccess_method_current_is_dir>`\ (\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`dir_exists<class_DirAccess_method_dir_exists>`\ (\ path\: :ref:`String<class_String>`\ ) |
Expand Down Expand Up @@ -159,6 +161,8 @@ Methods
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_space_left<class_DirAccess_method_get_space_left>`\ (\ ) |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_bundle<class_DirAccess_method_is_bundle>`\ (\ path\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_case_sensitive<class_DirAccess_method_is_case_sensitive>`\ (\ path\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_link<class_DirAccess_method_is_link>`\ (\ path\: :ref:`String<class_String>`\ ) |
Expand Down Expand Up @@ -300,6 +304,24 @@ Creates symbolic link between files or folders.

----

.. _class_DirAccess_method_create_temp:

.. rst-class:: classref-method

:ref:`DirAccess<class_DirAccess>` **create_temp**\ (\ prefix\: :ref:`String<class_String>` = "", keep\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_DirAccess_method_create_temp>`

Creates a temporary directory. This directory will be freed when the returned **DirAccess** is freed.

If ``prefix`` is not empty, it will be prefixed to the directory name, separated by a ``-``.

If ``keep`` is ``true``, the directory is not deleted when the returned **DirAccess** is freed.

Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error<class_DirAccess_method_get_open_error>` to check the error that occurred.

.. rst-class:: classref-item-separator

----

.. _class_DirAccess_method_current_is_dir:

.. rst-class:: classref-method
Expand Down Expand Up @@ -518,6 +540,20 @@ Returns the available space on the current directory's disk, in bytes. Returns `

----

.. _class_DirAccess_method_is_bundle:

.. rst-class:: classref-method

:ref:`bool<class_bool>` **is_bundle**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_DirAccess_method_is_bundle>`

Returns ``true`` if the directory is a macOS bundle.

\ **Note:** This method is implemented on macOS.

.. rst-class:: classref-item-separator

----

.. _class_DirAccess_method_is_case_sensitive:

.. rst-class:: classref-method
Expand Down
Loading

0 comments on commit 469176a

Please sign in to comment.