Sfoglia il codice sorgente

classref: Sync with current 3.3 branch

Rémi Verschelde 4 anni fa
parent
commit
a415c81f6a

+ 5 - 5
classes/class_camera.rst

@@ -239,15 +239,15 @@ The distance to the far culling boundary for this camera relative to its local Z
 
 
 The camera's field of view angle (in degrees). Only applicable in perspective mode. Since :ref:`keep_aspect<class_Camera_property_keep_aspect>` locks one axis, ``fov`` sets the other axis' field of view angle.
 The camera's field of view angle (in degrees). Only applicable in perspective mode. Since :ref:`keep_aspect<class_Camera_property_keep_aspect>` locks one axis, ``fov`` sets the other axis' field of view angle.
 
 
-For reference, the default vertical field of view value (``75.0``) is equivalent to a horizontal FOV of:
+For reference, the default vertical field of view value (``70.0``) is equivalent to a horizontal FOV of:
 
 
-- ~91.31 degrees in a 4:3 viewport
+- ~86.07 degrees in a 4:3 viewport
 
 
-- ~101.67 degrees in a 16:10 viewport
+- ~96.50 degrees in a 16:10 viewport
 
 
-- ~107.51 degrees in a 16:9 viewport
+- ~102.45 degrees in a 16:9 viewport
 
 
-- ~121.63 degrees in a 21:9 viewport
+- ~117.06 degrees in a 21:9 viewport
 
 
 ----
 ----
 
 

+ 6 - 2
classes/class_editorresourcepreview.rst

@@ -67,7 +67,9 @@ Check if the resource changed, if so, it will be invalidated and the correspondi
 
 
 - void **queue_edited_resource_preview** **(** :ref:`Resource<class_Resource>` resource, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` receiver_func, :ref:`Variant<class_Variant>` userdata **)**
 - void **queue_edited_resource_preview** **(** :ref:`Resource<class_Resource>` resource, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` receiver_func, :ref:`Variant<class_Variant>` userdata **)**
 
 
-Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
+Queue the ``resource`` being edited for preview. Once the preview is ready, the ``receiver``'s ``receiver_func`` will be called. The ``receiver_func`` must take the following four arguments: :ref:`String<class_String>` path, :ref:`Texture<class_Texture>` preview, :ref:`Texture<class_Texture>` thumbnail_preview, :ref:`Variant<class_Variant>` userdata. ``userdata`` can be anything, and will be returned when ``receiver_func`` is called.
+
+**Note**: If it was not possible to create the preview the ``receiver_func`` will still be called, but the preview will be null.
 
 
 ----
 ----
 
 
@@ -75,7 +77,9 @@ Queue a resource being edited for preview (using an instance). Once the preview
 
 
 - void **queue_resource_preview** **(** :ref:`String<class_String>` path, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` receiver_func, :ref:`Variant<class_Variant>` userdata **)**
 - void **queue_resource_preview** **(** :ref:`String<class_String>` path, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` receiver_func, :ref:`Variant<class_Variant>` userdata **)**
 
 
-Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
+Queue a resource file located at ``path`` for preview. Once the preview is ready, the ``receiver``'s ``receiver_func`` will be called. The ``receiver_func`` must take the following four arguments: :ref:`String<class_String>` path, :ref:`Texture<class_Texture>` preview, :ref:`Texture<class_Texture>` thumbnail_preview, :ref:`Variant<class_Variant>` userdata. ``userdata`` can be anything, and will be returned when ``receiver_func`` is called.
+
+**Note**: If it was not possible to create the preview the ``receiver_func`` will still be called, but the preview will be null.
 
 
 ----
 ----
 
 

+ 1 - 1
classes/class_meshdatatool.rst

@@ -30,7 +30,7 @@ Below is an example of how MeshDataTool may be used.
     mdt.create_from_surface(mesh, 0)
     mdt.create_from_surface(mesh, 0)
     for i in range(mdt.get_vertex_count()):
     for i in range(mdt.get_vertex_count()):
         var vertex = mdt.get_vertex(i)
         var vertex = mdt.get_vertex(i)
-        # In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
+        # In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
         vertex += mdt.get_vertex_normal(i)
         vertex += mdt.get_vertex_normal(i)
         # Save your change.
         # Save your change.
         mdt.set_vertex(i, vertex)
         mdt.set_vertex(i, vertex)

+ 1 - 1
classes/class_networkedmultiplayerenet.rst

@@ -320,7 +320,7 @@ Configure the :ref:`CryptoKey<class_CryptoKey>` to use when :ref:`use_dtls<class
 
 
 Sets the timeout parameters for a peer.	The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds.
 Sets the timeout parameters for a peer.	The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds.
 
 
-The ``timeout_limit`` is a factor that, multiplied by a value based on the avarage round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached ``timeout_min``. The ``timeout_max`` parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.
+The ``timeout_limit`` is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached ``timeout_min``. The ``timeout_max`` parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.
 
 
 .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
 .. |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.)`
 .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`

+ 1 - 1
classes/class_node2d.rst

@@ -262,7 +262,7 @@ If ``true``, the node's Z index is relative to its parent's Z index. If this nod
 | *Getter*  | get_z_index()      |
 | *Getter*  | get_z_index()      |
 +-----------+--------------------+
 +-----------+--------------------+
 
 
-Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others.
+Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between :ref:`VisualServer.CANVAS_ITEM_Z_MIN<class_VisualServer_constant_CANVAS_ITEM_Z_MIN>` and :ref:`VisualServer.CANVAS_ITEM_Z_MAX<class_VisualServer_constant_CANVAS_ITEM_Z_MAX>` (inclusive).
 
 
 Method Descriptions
 Method Descriptions
 -------------------
 -------------------

+ 2 - 2
classes/class_os.rst

@@ -1476,7 +1476,7 @@ Returns a string that is unique to the device.
 
 
 Returns the current UNIX epoch timestamp in seconds.
 Returns the current UNIX epoch timestamp in seconds.
 
 
-**Important:** This is the system clock that the user can manully set. **Never use** this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. **Always use** :ref:`get_ticks_usec<class_OS_method_get_ticks_usec>` or :ref:`get_ticks_msec<class_OS_method_get_ticks_msec>` for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
+**Important:** This is the system clock that the user can manually set. **Never use** this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. **Always use** :ref:`get_ticks_usec<class_OS_method_get_ticks_usec>` or :ref:`get_ticks_msec<class_OS_method_get_ticks_msec>` for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
 
 
 ----
 ----
 
 
@@ -1488,7 +1488,7 @@ Gets an epoch time value from a dictionary of time values.
 
 
 ``datetime`` must be populated with the following keys: ``year``, ``month``, ``day``, ``hour``, ``minute``, ``second``.
 ``datetime`` must be populated with the following keys: ``year``, ``month``, ``day``, ``hour``, ``minute``, ``second``.
 
 
-If the dictionary is empty ``0`` is returned.
+If the dictionary is empty ``0`` is returned. If some keys are omitted, they default to the equivalent values for the UNIX epoch timestamp 0 (1970-01-01 at 00:00:00 UTC).
 
 
 You can pass the output from :ref:`get_datetime_from_unix_time<class_OS_method_get_datetime_from_unix_time>` directly into this function. Daylight Savings Time (``dst``), if present, is ignored.
 You can pass the output from :ref:`get_datetime_from_unix_time<class_OS_method_get_datetime_from_unix_time>` directly into this function. Daylight Savings Time (``dst``), if present, is ignored.
 
 

+ 4 - 2
classes/class_projectsettings.rst

@@ -20,7 +20,7 @@ Contains global variables accessible from everywhere. Use :ref:`get_setting<clas
 
 
 When naming a Project Settings property, use the full path to the setting including the category. For example, ``"application/config/name"`` for the project name. Category and property names can be viewed in the Project Settings dialog.
 When naming a Project Settings property, use the full path to the setting including the category. For example, ``"application/config/name"`` for the project name. Category and property names can be viewed in the Project Settings dialog.
 
 
-**Feature tags:** Project settings can be overriden for specific platforms and configurations (debug, release, ...) using `feature tags <https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html>`_.
+**Feature tags:** Project settings can be overridden for specific platforms and configurations (debug, release, ...) using `feature tags <https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html>`_.
 
 
 **Overriding:** Any project setting can be overridden by creating a file named ``override.cfg`` in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' `feature tags <https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html>`_ in account. Therefore, make sure to *also* override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
 **Overriding:** Any project setting can be overridden by creating a file named ``override.cfg`` in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' `feature tags <https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html>`_ in account. Therefore, make sure to *also* override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
 
 
@@ -1814,7 +1814,9 @@ If ``true``, keeps the screen on (even in case of inactivity), so the screensave
 | *Default* | ``"landscape"`` |
 | *Default* | ``"landscape"`` |
 +-----------+-----------------+
 +-----------+-----------------+
 
 
-Default orientation on mobile devices.
+The default screen orientation to use on mobile devices.
+
+**Note:** When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set :ref:`display/window/size/width<class_ProjectSettings_property_display/window/size/width>` and :ref:`display/window/size/height<class_ProjectSettings_property_display/window/size/height>` accordingly.
 
 
 ----
 ----
 
 

+ 2 - 0
classes/class_resource.rst

@@ -138,6 +138,8 @@ Duplicates the resource, returning a new resource. By default, sub-resources are
 
 
 **Note:** If ``subresources`` is ``true``, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
 **Note:** If ``subresources`` is ``true``, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
 
 
+**Note:** When duplicating a resource, only ``export``\ ed properties are copied. Other properties will be set to their default value in the new resource.
+
 ----
 ----
 
 
 .. _class_Resource_method_emit_changed:
 .. _class_Resource_method_emit_changed:

+ 5 - 1
classes/class_sky.rst

@@ -62,8 +62,12 @@ enum **RadianceSize**:
 
 
 - **RADIANCE_SIZE_1024** = **5** --- Radiance texture size is 1024×1024 pixels.
 - **RADIANCE_SIZE_1024** = **5** --- Radiance texture size is 1024×1024 pixels.
 
 
+**Note:** :ref:`RADIANCE_SIZE_1024<class_Sky_constant_RADIANCE_SIZE_1024>` is not exposed in the inspector as it is known to cause GPU hangs on certain systems.
+
 - **RADIANCE_SIZE_2048** = **6** --- Radiance texture size is 2048×2048 pixels.
 - **RADIANCE_SIZE_2048** = **6** --- Radiance texture size is 2048×2048 pixels.
 
 
+**Note:** :ref:`RADIANCE_SIZE_2048<class_Sky_constant_RADIANCE_SIZE_2048>` is not exposed in the inspector as it is known to cause GPU hangs on certain systems.
+
 - **RADIANCE_SIZE_MAX** = **7** --- Represents the size of the :ref:`RadianceSize<enum_Sky_RadianceSize>` enum.
 - **RADIANCE_SIZE_MAX** = **7** --- Represents the size of the :ref:`RadianceSize<enum_Sky_RadianceSize>` enum.
 
 
 Property Descriptions
 Property Descriptions
@@ -85,7 +89,7 @@ The ``Sky``'s radiance map size. The higher the radiance map size, the more deta
 
 
 See :ref:`RadianceSize<enum_Sky_RadianceSize>` constants for values.
 See :ref:`RadianceSize<enum_Sky_RadianceSize>` constants for values.
 
 
-**Note:** Some hardware will have trouble with higher radiance sizes, especially :ref:`RADIANCE_SIZE_512<class_Sky_constant_RADIANCE_SIZE_512>` and above. Only use such high values on high-end hardware.
+**Note:** You will only benefit from high radiance sizes if you have perfectly sharp reflective surfaces in your project and are not using :ref:`ReflectionProbe<class_ReflectionProbe>`\ s or :ref:`GIProbe<class_GIProbe>`\ s. For most projects, keeping :ref:`radiance_size<class_Sky_property_radiance_size>` to the default value is the best compromise between visuals and performance. Be careful when using high radiance size values as these can cause crashes on low-end GPUs.
 
 
 .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
 .. |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.)`
 .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`

+ 1 - 1
classes/class_streampeer.rst

@@ -18,7 +18,7 @@ Abstraction and base class for stream-based protocols.
 Description
 Description
 -----------
 -----------
 
 
-StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings.
+StreamPeer is an abstraction and base class for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings.
 
 
 Properties
 Properties
 ----------
 ----------

+ 1 - 1
classes/class_tilemap.rst

@@ -501,7 +501,7 @@ The light mask assigned to all light occluders in the TileMap. The TileSet's lig
 | *Getter*  | is_show_collision_enabled() |
 | *Getter*  | is_show_collision_enabled() |
 +-----------+-----------------------------+
 +-----------+-----------------------------+
 
 
-If ``true``, collision shapes are shown in the editor and at run-time. Requires **Visible Collision Shapes** to be enabled in the **Debug** menu for collision shapes to be visible at run-time.
+If ``true``, collision shapes are visible in the editor. Doesn't affect collision shapes visibility at runtime. To show collision shapes at runtime, enable **Visible Collision Shapes** in the **Debug** menu instead.
 
 
 ----
 ----
 
 

+ 1 - 1
classes/class_webrtcpeerconnection.rst

@@ -143,7 +143,7 @@ Valid ``options`` are:
 ::
 ::
 
 
     {
     {
-        "negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. data_channel_received will not be called.
+        "negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. "data_channel_received" will not be called.
         "id": 1, # When "negotiated" is true this value must also be set to the same value on both peer.
         "id": 1, # When "negotiated" is true this value must also be set to the same value on both peer.
     
     
         # Only one of maxRetransmits and maxPacketLifeTime can be specified, not both. They make the channel unreliable (but also better at real time).
         # Only one of maxRetransmits and maxPacketLifeTime can be specified, not both. They make the channel unreliable (but also better at real time).

+ 1 - 1
classes/class_webxrinterface.rst

@@ -22,7 +22,7 @@ As such, this interface is only available when running in an HTML5 export.
 
 
 WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones).
 WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones).
 
 
-Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that ``WebXRInterface`` is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes ``WebXRInterface`` quite a bit more complicated to intialize than other AR/VR interfaces.
+Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that ``WebXRInterface`` is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes ``WebXRInterface`` quite a bit more complicated to initialize than other AR/VR interfaces.
 
 
 Here's the minimum code required to start an immersive VR session:
 Here's the minimum code required to start an immersive VR session: