mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
Currently including `zh_CN` and `es` which both have very high completion ratios. Others will be added once they reach a significant percentage too. These RST files will be used by godot-docs in place of its `classes` folder after we sync with https://github.com/godotengine/godot-docs/pull/5458. The update workflow is manual for now (example for `zh_CN`): - Build `godotengine/godot` in the branch we currently track (now `3.x`) - Run `godot --doctool -l zh_CN` - Run `cd doc && make rst LANGARG=zh_CN` - Copy `doc/_build/rst/*` to `classes/zh_CN/` here - Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
173 lines
11 KiB
ReStructuredText
173 lines
11 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the TextureLayered.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_TextureLayered:
|
|
|
|
TextureLayered
|
|
==============
|
|
|
|
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`Texture3D<class_Texture3D>`, :ref:`TextureArray<class_TextureArray>`
|
|
|
|
Clase base para tipos de texturas 3D.
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Base class for :ref:`Texture3D<class_Texture3D>` and :ref:`TextureArray<class_TextureArray>`. Cannot be used directly, but contains all the functions necessary for accessing and using :ref:`Texture3D<class_Texture3D>` and :ref:`TextureArray<class_TextureArray>`. Data is set on a per-layer basis. For :ref:`Texture3D<class_Texture3D>`\ s, the layer specifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for :ref:`TextureArray<class_TextureArray>`\ s, the layer specifies the array layer.
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
+-------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`data<class_TextureLayered_property_data>` | ``{"depth": 0,"flags": 7,"format": 37,"height": 0,"layers": [ ],"width": 0}`` |
|
|
+-------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`flags<class_TextureLayered_property_flags>` | ``7`` |
|
|
+-------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------+
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_depth<class_TextureLayered_method_get_depth>` **(** **)** |const| |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_TextureLayered_method_get_format>` **(** **)** |const| |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_height<class_TextureLayered_method_get_height>` **(** **)** |const| |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Image<class_Image>` | :ref:`get_layer_data<class_TextureLayered_method_get_layer_data>` **(** :ref:`int<class_int>` layer **)** |const| |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_width<class_TextureLayered_method_get_width>` **(** **)** |const| |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_data_partial<class_TextureLayered_method_set_data_partial>` **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` x_offset, :ref:`int<class_int>` y_offset, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap=0 **)** |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_layer_data<class_TextureLayered_method_set_layer_data>` **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)** |
|
|
+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Enumeraciones
|
|
--------------------------
|
|
|
|
.. _enum_TextureLayered_Flags:
|
|
|
|
.. _class_TextureLayered_constant_FLAGS_DEFAULT_TEXTURE_ARRAY:
|
|
|
|
.. _class_TextureLayered_constant_FLAGS_DEFAULT_TEXTURE_3D:
|
|
|
|
.. _class_TextureLayered_constant_FLAG_MIPMAPS:
|
|
|
|
.. _class_TextureLayered_constant_FLAG_REPEAT:
|
|
|
|
.. _class_TextureLayered_constant_FLAG_FILTER:
|
|
|
|
.. _class_TextureLayered_constant_FLAG_ANISOTROPIC_FILTER:
|
|
|
|
enum **Flags**:
|
|
|
|
- **FLAGS_DEFAULT_TEXTURE_ARRAY** = **7** --- Default flags for :ref:`TextureArray<class_TextureArray>`. :ref:`FLAG_MIPMAPS<class_TextureLayered_constant_FLAG_MIPMAPS>`, :ref:`FLAG_REPEAT<class_TextureLayered_constant_FLAG_REPEAT>` and :ref:`FLAG_FILTER<class_TextureLayered_constant_FLAG_FILTER>` are enabled.
|
|
|
|
- **FLAGS_DEFAULT_TEXTURE_3D** = **4** --- Default flags for :ref:`Texture3D<class_Texture3D>`. :ref:`FLAG_FILTER<class_TextureLayered_constant_FLAG_FILTER>` is enabled.
|
|
|
|
- **FLAG_MIPMAPS** = **1** --- Texture will generate mipmaps on creation.
|
|
|
|
- **FLAG_REPEAT** = **2** --- Texture will repeat when UV used is outside the 0-1 range.
|
|
|
|
- **FLAG_FILTER** = **4** --- Use filtering when reading from texture. Filtering smooths out pixels. Turning filtering off is slightly faster and more appropriate when you need access to individual pixels.
|
|
|
|
- **FLAG_ANISOTROPIC_FILTER** = **8** --- Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios.
|
|
|
|
This results in better-looking textures when viewed from oblique angles.
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_TextureLayered_property_data:
|
|
|
|
- :ref:`Dictionary<class_Dictionary>` **data**
|
|
|
|
+-----------+--------------------------------------------------------------------------------+
|
|
| *Default* | ``{"depth": 0,"flags": 7,"format": 37,"height": 0,"layers": [ ],"width": 0}`` |
|
|
+-----------+--------------------------------------------------------------------------------+
|
|
|
|
Returns a dictionary with all the data used by this texture.
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_property_flags:
|
|
|
|
- :ref:`int<class_int>` **flags**
|
|
|
|
+-----------+------------------+
|
|
| *Default* | ``7`` |
|
|
+-----------+------------------+
|
|
| *Setter* | set_flags(value) |
|
|
+-----------+------------------+
|
|
| *Getter* | get_flags() |
|
|
+-----------+------------------+
|
|
|
|
Specifies which :ref:`Flags<enum_TextureLayered_Flags>` apply to this texture.
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_TextureLayered_method_get_depth:
|
|
|
|
- :ref:`int<class_int>` **get_depth** **(** **)** |const|
|
|
|
|
Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_method_get_format:
|
|
|
|
- :ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const|
|
|
|
|
Devuelve el formato actual que está siendo usado por esta textura. Ver :ref:`Format<enum_Image_Format>` para más detalles.
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_method_get_height:
|
|
|
|
- :ref:`int<class_int>` **get_height** **(** **)** |const|
|
|
|
|
Devuelve la altura de la textura. La altura está típicamente representada por el eje Y.
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_method_get_layer_data:
|
|
|
|
- :ref:`Image<class_Image>` **get_layer_data** **(** :ref:`int<class_int>` layer **)** |const|
|
|
|
|
Devuelve un recurso de :ref:`Image<class_Image>` con los datos de la ``layer`` especificada.
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_method_get_width:
|
|
|
|
- :ref:`int<class_int>` **get_width** **(** **)** |const|
|
|
|
|
Devuelve el ancho de la textura. El ancho es típicamente representado por el eje X.
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_method_set_data_partial:
|
|
|
|
- void **set_data_partial** **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` x_offset, :ref:`int<class_int>` y_offset, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap=0 **)**
|
|
|
|
Partially sets the data for a specified ``layer`` by overwriting using the data of the specified ``image``. ``x_offset`` and ``y_offset`` determine where the :ref:`Image<class_Image>` is "stamped" over the texture. The ``image`` must fit within the texture.
|
|
|
|
----
|
|
|
|
.. _class_TextureLayered_method_set_layer_data:
|
|
|
|
- void **set_layer_data** **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)**
|
|
|
|
Sets the data for the specified layer. Data takes the form of a 2-dimensional :ref:`Image<class_Image>` resource.
|
|
|
|
.. |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.)`
|