Skip to content

Commit 406e44b

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (aa8d9b8)
1 parent d2ae3e5 commit 406e44b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+675
-68
lines changed

classes/class_audiostreamwav.rst

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ Methods
6262
.. table::
6363
:widths: auto
6464

65-
+---------------------------------------+-------------------------------------------------------------------------------------------------------+
66-
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_wav<class_AudioStreamWAV_method_save_to_wav>`\ (\ path\: :ref:`String<class_String>`\ ) |
67-
+---------------------------------------+-------------------------------------------------------------------------------------------------------+
65+
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
66+
| :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| |
67+
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
68+
| :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| |
69+
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
70+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_wav<class_AudioStreamWAV_method_save_to_wav>`\ (\ path\: :ref:`String<class_String>`\ ) |
71+
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6872

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

@@ -298,6 +302,49 @@ If ``true``, audio is stereo.
298302
Method Descriptions
299303
-------------------
300304

305+
.. _class_AudioStreamWAV_method_load_from_buffer:
306+
307+
.. rst-class:: classref-method
308+
309+
: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>`
310+
311+
Creates a new **AudioStreamWAV** instance from the given buffer. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.
312+
313+
The usage of ``options`` is identical to :ref:`load_from_file<class_AudioStreamWAV_method_load_from_file>`.
314+
315+
.. rst-class:: classref-item-separator
316+
317+
----
318+
319+
.. _class_AudioStreamWAV_method_load_from_file:
320+
321+
.. rst-class:: classref-method
322+
323+
: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>`
324+
325+
Creates a new **AudioStreamWAV** instance from the given file path. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`.
326+
327+
\ **Example:** Load the first file dropped as a WAV and play it:
328+
329+
::
330+
331+
@onready var audio_player = $AudioStreamPlayer
332+
333+
func _ready():
334+
get_window().files_dropped.connect(_on_files_dropped)
335+
336+
func _on_files_dropped(files):
337+
if files[0].get_extension() == "wav":
338+
audio_player.stream = AudioStreamWAV.load_from_file(files[0], {
339+
"force/max_rate": true,
340+
"force/max_rate_hz": 11025
341+
})
342+
audio_player.play()
343+
344+
.. rst-class:: classref-item-separator
345+
346+
----
347+
301348
.. _class_AudioStreamWAV_method_save_to_wav:
302349

303350
.. rst-class:: classref-method

classes/class_csgshape3d.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Properties
5959
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
6060
| :ref:`Operation<enum_CSGShape3D_Operation>` | :ref:`operation<class_CSGShape3D_property_operation>` | ``0`` |
6161
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
62-
| :ref:`float<class_float>` | :ref:`snap<class_CSGShape3D_property_snap>` | ``0.001`` |
62+
| :ref:`float<class_float>` | :ref:`snap<class_CSGShape3D_property_snap>` | |
6363
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
6464
| :ref:`bool<class_bool>` | :ref:`use_collision<class_CSGShape3D_property_use_collision>` | ``false`` |
6565
+---------------------------------------------+-------------------------------------------------------------------------+-----------+
@@ -231,14 +231,16 @@ The operation that is performed on this shape. This is ignored for the first CSG
231231

232232
.. rst-class:: classref-property
233233

234-
:ref:`float<class_float>` **snap** = ``0.001`` :ref:`🔗<class_CSGShape3D_property_snap>`
234+
:ref:`float<class_float>` **snap** :ref:`🔗<class_CSGShape3D_property_snap>`
235235

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

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

241-
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.
241+
**Deprecated:** The CSG library no longer uses snapping.
242+
243+
This property does nothing.
242244

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

classes/class_cubemaparray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The primary benefit of **CubemapArray**\ s is that they can be accessed in shade
2525

2626
\ **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.
2727

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

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

classes/class_diraccess.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Methods
129129
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
130130
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_link<class_DirAccess_method_create_link>`\ (\ source\: :ref:`String<class_String>`, target\: :ref:`String<class_String>`\ ) |
131131
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
132+
| :ref:`DirAccess<class_DirAccess>` | :ref:`create_temp<class_DirAccess_method_create_temp>`\ (\ prefix\: :ref:`String<class_String>` = "", keep\: :ref:`bool<class_bool>` = false\ ) |static| |
133+
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
132134
| :ref:`bool<class_bool>` | :ref:`current_is_dir<class_DirAccess_method_current_is_dir>`\ (\ ) |const| |
133135
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
134136
| :ref:`bool<class_bool>` | :ref:`dir_exists<class_DirAccess_method_dir_exists>`\ (\ path\: :ref:`String<class_String>`\ ) |
@@ -159,6 +161,8 @@ Methods
159161
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
160162
| :ref:`int<class_int>` | :ref:`get_space_left<class_DirAccess_method_get_space_left>`\ (\ ) |
161163
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
164+
| :ref:`bool<class_bool>` | :ref:`is_bundle<class_DirAccess_method_is_bundle>`\ (\ path\: :ref:`String<class_String>`\ ) |const| |
165+
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
162166
| :ref:`bool<class_bool>` | :ref:`is_case_sensitive<class_DirAccess_method_is_case_sensitive>`\ (\ path\: :ref:`String<class_String>`\ ) |const| |
163167
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
164168
| :ref:`bool<class_bool>` | :ref:`is_link<class_DirAccess_method_is_link>`\ (\ path\: :ref:`String<class_String>`\ ) |
@@ -300,6 +304,24 @@ Creates symbolic link between files or folders.
300304

301305
----
302306

307+
.. _class_DirAccess_method_create_temp:
308+
309+
.. rst-class:: classref-method
310+
311+
:ref:`DirAccess<class_DirAccess>` **create_temp**\ (\ prefix\: :ref:`String<class_String>` = "", keep\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_DirAccess_method_create_temp>`
312+
313+
Creates a temporary directory. This directory will be freed when the returned **DirAccess** is freed.
314+
315+
If ``prefix`` is not empty, it will be prefixed to the directory name, separated by a ``-``.
316+
317+
If ``keep`` is ``true``, the directory is not deleted when the returned **DirAccess** is freed.
318+
319+
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.
320+
321+
.. rst-class:: classref-item-separator
322+
323+
----
324+
303325
.. _class_DirAccess_method_current_is_dir:
304326

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

519541
----
520542

543+
.. _class_DirAccess_method_is_bundle:
544+
545+
.. rst-class:: classref-method
546+
547+
:ref:`bool<class_bool>` **is_bundle**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_DirAccess_method_is_bundle>`
548+
549+
Returns ``true`` if the directory is a macOS bundle.
550+
551+
\ **Note:** This method is implemented on macOS.
552+
553+
.. rst-class:: classref-item-separator
554+
555+
----
556+
521557
.. _class_DirAccess_method_is_case_sensitive:
522558

523559
.. rst-class:: classref-method

0 commit comments

Comments
 (0)