From 7c71041ac3b43ba059acef85fc078c60ef01a005 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 23 Sep 2023 03:18:39 +0000 Subject: [PATCH] classref: Sync with current master branch (c12d635) --- classes/class_aabb.rst | 2 +- classes/class_audioserver.rst | 14 +- classes/class_canvastexture.rst | 7 + classes/class_displayserver.rst | 4 +- classes/class_editorexportplatformmacos.rst | 14 ++ classes/class_editorexportplatformwindows.rst | 14 ++ classes/class_gltfdocument.rst | 57 ++++++- classes/class_gltfdocumentextension.rst | 140 +++++++++++++----- classes/class_image.rst | 18 ++- classes/class_itemlist.rst | 14 ++ classes/class_joint2d.rst | 29 ++++ classes/class_joint3d.rst | 29 ++++ classes/class_line2d.rst | 31 +++- classes/class_occluderinstance3d.rst | 2 + ..._physicsserver3drenderingserverhandler.rst | 72 +++++++-- classes/class_projectsettings.rst | 24 ++- classes/class_regex.rst | 2 +- classes/class_vector2i.rst | 16 ++ classes/class_vector3i.rst | 16 ++ classes/class_vector4i.rst | 16 ++ classes/class_viewport.rst | 2 + 21 files changed, 455 insertions(+), 68 deletions(-) diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index a8b724131d1..2b0a60ea6b6 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -396,7 +396,7 @@ Returns the scalar length of the shortest axis of the **AABB**. :ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** |const| -Returns the support point in a given direction. This is useful for collision detection algorithms. +Returns the vertex of the AABB that's the farthest in a given direction. This point is commonly known as the support point in collision detection algorithms. .. rst-class:: classref-item-separator diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index c794da4b515..2aa1c5e2564 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -155,7 +155,19 @@ Signals **bus_layout_changed** **(** **)** -Emitted when the :ref:`AudioBusLayout` changes. +Emitted when an audio bus is added, deleted, or moved. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioServer_signal_bus_renamed: + +.. rst-class:: classref-signal + +**bus_renamed** **(** :ref:`int` bus_index, :ref:`StringName` old_name, :ref:`StringName` new_name **)** + +Emitted when the audio bus at ``bus_index`` is renamed from ``old_name`` to ``new_name``. .. rst-class:: classref-section-separator diff --git a/classes/class_canvastexture.rst b/classes/class_canvastexture.rst index bbe7817f4fa..61e53b65180 100644 --- a/classes/class_canvastexture.rst +++ b/classes/class_canvastexture.rst @@ -23,6 +23,13 @@ Description \ **Note:** **CanvasTexture** cannot be used in 3D rendering. For physically-based materials in 3D, use :ref:`BaseMaterial3D` instead. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`2D Lights and Shadows <../tutorials/2d/2d_lights_and_shadows>` + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index afb947f5098..24b3e3a5454 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -1282,11 +1282,11 @@ Window view: OpenGL context (only with the GL Compatibility renderer): -- Windows: ``HGLRC`` for the window. +- Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). - Linux: ``GLXContext*`` for the window. -- macOS: ``NSOpenGLContext*`` for the window. +- macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). - Android: ``EGLContext`` for the window. diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index 70435a5dc7b..12df1a84d3b 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -40,6 +40,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`application/copyright_localized` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_angle` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/icon` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/icon_interpolation` | @@ -268,6 +270,18 @@ Copyright notice for the bundle visible to the user (localized). ---- +.. _class_EditorExportPlatformMacOS_property_application/export_angle: + +.. rst-class:: classref-property + +:ref:`int` **application/export_angle** + +If set to ``1``, ANGLE libraries are exported with the exported application. If set to ``0``, ANGLE libraries are exported only if :ref:`ProjectSettings.rendering/gl_compatibility/driver` is set to ``"opengl3_angle"``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformMacOS_property_application/icon: .. rst-class:: classref-property diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index 16f1fdb5692..2199ab1d5b4 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -36,6 +36,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/copyright` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_angle` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/file_description` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/file_version` | @@ -148,6 +150,18 @@ Copyright notice for the bundle visible to the user. Optional. See `StringFileIn ---- +.. _class_EditorExportPlatformWindows_property_application/export_angle: + +.. rst-class:: classref-property + +:ref:`int` **application/export_angle** + +If set to ``1``, ANGLE libraries are exported with the exported application. If set to ``0``, ANGLE libraries are exported only if :ref:`ProjectSettings.rendering/gl_compatibility/driver` is set to ``"opengl3_angle"``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWindows_property_application/file_description: .. rst-class:: classref-property diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index cdd1de20dcc..b8e25dbe15f 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -21,7 +21,7 @@ Description GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene. -All of the data in a GLTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. +All of the data in a GLTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState` objects. GLTFDocument can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension`. This allows for custom data to be imported and exported. @@ -36,6 +36,20 @@ Tutorials .. rst-class:: classref-reftable-group +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`image_format` | ``"PNG"`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`lossy_quality` | ``0.75`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + Methods ------- @@ -66,6 +80,47 @@ Methods .. rst-class:: classref-descriptions-group +Property Descriptions +--------------------- + +.. _class_GLTFDocument_property_image_format: + +.. rst-class:: classref-property + +:ref:`String` **image_format** = ``"PNG"`` + +.. rst-class:: classref-property-setget + +- void **set_image_format** **(** :ref:`String` value **)** +- :ref:`String` **get_image_format** **(** **)** + +The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array. + +By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_property_lossy_quality: + +.. rst-class:: classref-property + +:ref:`float` **lossy_quality** = ``0.75`` + +.. rst-class:: classref-property-setget + +- void **set_lossy_quality** **(** :ref:`float` value **)** +- :ref:`float` **get_lossy_quality** **(** **)** + +If :ref:`image_format` is a lossy image format, this determines the lossy quality of the image. On a range of ``0.0`` to ``1.0``, where ``0.0`` is the lowest quality and ``1.0`` is the highest quality. A lossy quality of ``1.0`` is not the same as lossless. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 94bdd6b8dfd..d006c0f00c6 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -35,37 +35,45 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preserialize` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_image_file_extension` **(** **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_image_data` **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preserialize` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_image_file_extension` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_saveable_image_formats` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_image_data` **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_save_image_at_path` **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`String` file_path, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_serialize_image_to_bytes` **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`Dictionary` image_dict, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_serialize_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` gltf_texture, :ref:`String` image_format **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -96,7 +104,7 @@ Runs when converting the data from a Godot scene node. This method can be used t :ref:`Error` **_export_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| -Part of the export process. This method is run after :ref:`_export_preserialize` and before :ref:`_export_post`. +Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_export_post`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json`. This method can be used to modify the final JSON of each node. @@ -138,7 +146,7 @@ The return value is used to determine if this **GLTFDocumentExtension** instance :ref:`Error` **_export_preserialize** **(** :ref:`GLTFState` state **)** |virtual| -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_node`. +Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_get_saveable_image_formats`. This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem`. @@ -152,7 +160,7 @@ This method can be used to alter the state before performing serialization. It r :ref:`Node3D` **_generate_scene_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| -Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_import_post_parse`. +Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_import_node`. Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. @@ -172,6 +180,20 @@ Returns the file extension to use for saving image data into, for example, ``".p ---- +.. _class_GLTFDocumentExtension_method__get_saveable_image_formats: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_saveable_image_formats** **(** **)** |virtual| + +Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_node`. + +Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the :ref:`GLTFDocument`'s :ref:`GLTFDocument.image_format` is in this array. If this **GLTFDocumentExtension** is selected as the image exporter, one of the :ref:`_save_image_at_path` or :ref:`_serialize_image_to_bytes` methods will run next, otherwise :ref:`_export_node` will run next. If the format name contains ``"Lossy"``, the lossy quality slider will be displayed. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_method__get_supported_extensions: .. rst-class:: classref-method @@ -192,7 +214,7 @@ Returns an array of the GLTF extensions supported by this GLTFDocumentExtension :ref:`Error` **_import_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| -Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_import_post`. +Part of the import process. This method is run after :ref:`_generate_scene_node` and before :ref:`_import_post`. This method can be used to make modifications to each of the generated Godot scene nodes. @@ -220,7 +242,7 @@ This method can be used to modify the final Godot scene generated by the import :ref:`Error` **_import_post_parse** **(** :ref:`GLTFState` state **)** |virtual| -Part of the import process. This method is run after :ref:`_generate_scene_node` and before :ref:`_import_node`. +Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_generate_scene_node`. This method can be used to modify any of the data imported so far, including any scene nodes, before running the final per-node import step. @@ -262,7 +284,7 @@ Runs when parsing image data from a GLTF file. The data could be sourced from a :ref:`Error` **_parse_node_extensions** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| -Part of the import process. This method is run after :ref:`_get_supported_extensions` and before :ref:`_generate_scene_node`. +Part of the import process. This method is run after :ref:`_get_supported_extensions` and before :ref:`_import_post_parse`. Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by :ref:`_generate_scene_node`. The return value should be a member of the :ref:`Error` enum. @@ -280,6 +302,50 @@ Part of the import process. This method is run after :ref:`_parse_image_data` **_save_image_at_path** **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`String` file_path, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| + +Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. + +This method is run when saving images separately from the GLTF file. When images are embedded, :ref:`_serialize_image_to_bytes` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_method__serialize_image_to_bytes: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **_serialize_image_to_bytes** **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`Dictionary` image_dict, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| + +Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. + +This method is run when embedding images in the GLTF file. When images are saved separately, :ref:`_save_image_at_path` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. + +This method must set the image MIME type in the ``image_dict`` with the ``"mimeType"`` key. For example, for a PNG image, it would be set to ``"image/png"``. The return value must be a :ref:`PackedByteArray` containing the image data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_method__serialize_texture_json: + +.. rst-class:: classref-method + +:ref:`Error` **_serialize_texture_json** **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` gltf_texture, :ref:`String` image_format **)** |virtual| + +Part of the export process. This method is run after :ref:`_save_image_at_path` or :ref:`_serialize_image_to_bytes`, and before :ref:`_export_node`. Note that this method only runs when this **GLTFDocumentExtension** is selected as the image exporter. + +This method can be used to set up the extensions for the texture JSON by editing ``texture_json``. The extension must also be added as used extension with :ref:`GLTFState.add_used_extension`, be sure to set ``required`` to ``true`` if you are not providing a fallback. + .. |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.)` diff --git a/classes/class_image.rst b/classes/class_image.rst index 0f4c5804ece..acefb74ca04 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -107,6 +107,8 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_height` **(** **)** |const| | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_mipmap_count` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_mipmap_offset` **(** :ref:`int` mipmap **)** |const| | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y **)** |const| | @@ -1160,7 +1162,9 @@ Flips the image vertically. :ref:`Error` **generate_mipmaps** **(** :ref:`bool` renormalize=false **)** -Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is ``0``. +Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is ``0``. Enabling ``renormalize`` when generating mipmaps for normal textures will make sure all resulting vector values are normalized. + +It is possible to check if the image has mipmaps by calling :ref:`has_mipmaps` or :ref:`get_mipmap_count`. .. rst-class:: classref-item-separator @@ -1202,6 +1206,18 @@ Returns the image's height. ---- +.. _class_Image_method_get_mipmap_count: + +.. rst-class:: classref-method + +:ref:`int` **get_mipmap_count** **(** **)** |const| + +Returns the number of mipmap levels or 0 if the image has no mipmaps. The largest main level image is not counted as a mipmap level by this method, so if you want to include it you can add 1 to this count. + +.. rst-class:: classref-item-separator + +---- + .. _class_Image_method_get_mipmap_offset: .. rst-class:: classref-method diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 3be8ea7e63a..0fb2dd23303 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -92,6 +92,8 @@ Methods +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`ensure_current_is_visible` **(** **)** | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_list_size` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_at_position` **(** :ref:`Vector2` position, :ref:`bool` exact=false **)** |const| | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** |const| | @@ -683,6 +685,18 @@ Ensure current selection is visible, adjusting the scroll position as necessary. ---- +.. _class_ItemList_method_force_update_list_size: + +.. rst-class:: classref-method + +void **force_update_list_size** **(** **)** + +Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like :ref:`auto_height`, change. The method can be used to trigger the update ahead of next drawing pass. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_method_get_item_at_position: .. rst-class:: classref-method diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index 51980de0208..21853eccf9f 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -41,6 +41,18 @@ Properties | :ref:`NodePath` | :ref:`node_b` | ``NodePath("")`` | +---------------------------------+--------------------------------------------------------------------+------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------+------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -116,6 +128,23 @@ The first body attached to the joint. Must derive from :ref:`PhysicsBody2D`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Joint2D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| + +Returns the joint's :ref:`RID`. + .. |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.)` diff --git a/classes/class_joint3d.rst b/classes/class_joint3d.rst index a9c7691fd56..d6bf3fe9a6f 100644 --- a/classes/class_joint3d.rst +++ b/classes/class_joint3d.rst @@ -48,6 +48,18 @@ Properties | :ref:`int` | :ref:`solver_priority` | ``1`` | +---------------------------------+------------------------------------------------------------------------------------------+------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------+------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -121,6 +133,23 @@ The node attached to the second side (B) of the joint. The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Joint3D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| + +Returns the joint's :ref:`RID`. + .. |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.)` diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 794f2f3ba28..4eba1d7afcf 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -47,6 +47,8 @@ Properties +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ | :ref:`LineCapMode` | :ref:`begin_cap_mode` | ``0`` | +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`closed` | ``false`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ | :ref:`Color` | :ref:`default_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ | :ref:`LineCapMode` | :ref:`end_cap_mode` | ``0`` | @@ -238,7 +240,28 @@ If ``true``, the polyline's border will be anti-aliased. - void **set_begin_cap_mode** **(** :ref:`LineCapMode` value **)** - :ref:`LineCapMode` **get_begin_cap_mode** **(** **)** -The style of the beginning of the polyline. Use :ref:`LineCapMode` constants. +The style of the beginning of the polyline, if :ref:`closed` is ``false``. Use :ref:`LineCapMode` constants. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Line2D_property_closed: + +.. rst-class:: classref-property + +:ref:`bool` **closed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_closed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_closed** **(** **)** + +If ``true`` and the polyline has more than 2 points, the last point and the first one will be connected by a segment. + +\ **Note:** The shape of the closing segment is not guaranteed to be seamless if a :ref:`width_curve` is provided. + +\ **Note:** The joint between the closing segment and the first segment is drawn first and it samples the :ref:`gradient` and the :ref:`width_curve` at the beginning. This is an implementation detail that might change in a future version. .. rst-class:: classref-item-separator @@ -272,7 +295,7 @@ The color of the polyline. Will not be used if a gradient is set. - void **set_end_cap_mode** **(** :ref:`LineCapMode` value **)** - :ref:`LineCapMode` **get_end_cap_mode** **(** **)** -The style of the end of the polyline. Use :ref:`LineCapMode` constants. +The style of the end of the polyline, if :ref:`closed` is ``false``. Use :ref:`LineCapMode` constants. .. rst-class:: classref-item-separator @@ -289,7 +312,7 @@ The style of the end of the polyline. Use :ref:`LineCapMode` value **)** - :ref:`Gradient` **get_gradient** **(** **)** -The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. +The gradient is drawn through the whole line from start to finish. The :ref:`default_color` will not be used if this property is set. .. rst-class:: classref-item-separator @@ -408,7 +431,7 @@ The style to render the :ref:`texture` of the pol - void **set_width** **(** :ref:`float` value **)** - :ref:`float` **get_width** **(** **)** -The polyline's width +The polyline's width. .. rst-class:: classref-item-separator diff --git a/classes/class_occluderinstance3d.rst b/classes/class_occluderinstance3d.rst index 077b7283678..d8323a2041e 100644 --- a/classes/class_occluderinstance3d.rst +++ b/classes/class_occluderinstance3d.rst @@ -29,6 +29,8 @@ The occlusion culling system works by rendering the occluders on the CPU in para \ **Note:** Occlusion culling is only effective if :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling` is ``true``. Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_physicsserver3drenderingserverhandler.rst b/classes/class_physicsserver3drenderingserverhandler.rst index 2dd0506ee4e..0aff75dfa33 100644 --- a/classes/class_physicsserver3drenderingserverhandler.rst +++ b/classes/class_physicsserver3drenderingserverhandler.rst @@ -22,13 +22,19 @@ Methods .. table:: :widths: auto - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_normal` **(** :ref:`int` vertex_id, const void* normals **)** |virtual| | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_normal` **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_aabb` **(** :ref:`AABB` aabb **)** | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_normal` **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex` **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -45,9 +51,7 @@ Method Descriptions void **_set_aabb** **(** :ref:`AABB` aabb **)** |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Called by the :ref:`PhysicsServer3D` to set the bounding box for the :ref:`SoftBody3D`. .. rst-class:: classref-item-separator @@ -57,11 +61,11 @@ void **_set_aabb** **(** :ref:`AABB` aabb **)** |virtual| .. rst-class:: classref-method -void **_set_normal** **(** :ref:`int` vertex_id, const void* normals **)** |virtual| +void **_set_normal** **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** |virtual| -.. container:: contribute +Called by the :ref:`PhysicsServer3D` to set the normal for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** The ``normal`` parameter used to be of type ``const void*`` prior to Godot 4.2. .. rst-class:: classref-item-separator @@ -71,11 +75,47 @@ void **_set_normal** **(** :ref:`int` vertex_id, const void* normals .. rst-class:: classref-method -void **_set_vertex** **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| +void **_set_vertex** **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** |virtual| + +Called by the :ref:`PhysicsServer3D` to set the position for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. + +\ **Note:** The ``vertex`` parameter used to be of type ``const void*`` prior to Godot 4.2. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method_set_aabb: + +.. rst-class:: classref-method + +void **set_aabb** **(** :ref:`AABB` aabb **)** + +Sets the bounding box for the :ref:`SoftBody3D`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method_set_normal: + +.. rst-class:: classref-method + +void **set_normal** **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** + +Sets the normal for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method_set_vertex: + +.. rst-class:: classref-method -.. container:: contribute +void **set_vertex** **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the position for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. .. |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.)` diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 7d25a0740b8..3b08f8f2eda 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -133,6 +133,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`audio/video/video_delay_compensation_ms` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`collada/use_ambient` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`compression/formats/gzip/compression_level` | ``-1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`compression/formats/zlib/compression_level` | ``-1`` | @@ -2184,6 +2186,18 @@ Setting to hardcode audio delay when playing video. Best to leave this untouched ---- +.. _class_ProjectSettings_property_collada/use_ambient: + +.. rst-class:: classref-property + +:ref:`bool` **collada/use_ambient** = ``false`` + +If ``true``, ambient lights will be imported from COLLADA models as :ref:`DirectionalLight3D`. If ``false``, ambient lights will be ignored. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_compression/formats/gzip/compression_level: .. rst-class:: classref-property @@ -8750,12 +8764,12 @@ The default gravity strength in 3D (in meters per second squared). .. code-tab:: gdscript # Set the default gravity strength to 9.8. - PhysicsServer3D.area_set_param(get_viewport().find_world().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) + PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) .. code-tab:: csharp // Set the default gravity strength to 9.8. - PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); @@ -8779,12 +8793,12 @@ The default gravity direction in 3D. .. code-tab:: gdscript # Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) + PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) .. code-tab:: csharp // Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) @@ -10246,6 +10260,8 @@ If ``true``, :ref:`OccluderInstance3D` nodes will be u \ **Note:** Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 19574c3c12e..833ca1976ce 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -28,7 +28,7 @@ To begin, the RegEx object needs to be compiled with the search pattern using :r var regex = RegEx.new() regex.compile("\\w-(\\d+)") -The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. +The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. In GDScript, you can also use raw string literals (r-strings). For example, ``compile(r'"(?:\\.|[^"])*"')`` would be read the same. Using :ref:`search`, you can find the pattern within the given text. If a pattern is found, :ref:`RegExMatch` is returned and you can retrieve details of the results using methods such as :ref:`RegExMatch.get_string` and :ref:`RegExMatch.get_start`. diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 07b62279a80..56b3dfdb12f 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -183,6 +183,22 @@ Zero vector, a vector with all components set to ``0``. One vector, a vector with all components set to ``1``. +.. _class_Vector2i_constant_MIN: + +.. rst-class:: classref-constant + +**MIN** = ``Vector2i(-2147483648, -2147483648)`` + +Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector2.INF`. + +.. _class_Vector2i_constant_MAX: + +.. rst-class:: classref-constant + +**MAX** = ``Vector2i(2147483647, 2147483647)`` + +Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector2.INF`. + .. _class_Vector2i_constant_LEFT: .. rst-class:: classref-constant diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index f34f4a28746..f5bf5c78bc8 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -191,6 +191,22 @@ Zero vector, a vector with all components set to ``0``. One vector, a vector with all components set to ``1``. +.. _class_Vector3i_constant_MIN: + +.. rst-class:: classref-constant + +**MIN** = ``Vector3i(-2147483648, -2147483648, -2147483648)`` + +Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector3.INF`. + +.. _class_Vector3i_constant_MAX: + +.. rst-class:: classref-constant + +**MAX** = ``Vector3i(2147483647, 2147483647, 2147483647)`` + +Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector3.INF`. + .. _class_Vector3i_constant_LEFT: .. rst-class:: classref-constant diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index 8d6b7ef8551..6b98458efd7 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -190,6 +190,22 @@ Zero vector, a vector with all components set to ``0``. One vector, a vector with all components set to ``1``. +.. _class_Vector4i_constant_MIN: + +.. rst-class:: classref-constant + +**MIN** = ``Vector4i(-2147483648, -2147483648, -2147483648, -2147483648)`` + +Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector4.INF`. + +.. _class_Vector4i_constant_MAX: + +.. rst-class:: classref-constant + +**MAX** = ``Vector4i(2147483647, 2147483647, 2147483647, 2147483647)`` + +Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector4.INF`. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 4e901756ca9..d861733e4cf 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -1657,6 +1657,8 @@ If ``true``, :ref:`OccluderInstance3D` nodes will be u \ **Note:** Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. + .. rst-class:: classref-item-separator ----