mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
97 lines
3.8 KiB
ReStructuredText
97 lines
3.8 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the AtlasTexture.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_AtlasTexture:
|
|
|
|
AtlasTexture
|
|
============
|
|
|
|
**Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
|
|
|
|
Description
|
|
-----------
|
|
|
|
:ref:`Texture2D<class_Texture2D>` resource aimed at managing big textures files that pack multiple smaller textures. Consists of a :ref:`Texture2D<class_Texture2D>`, a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-----------------------------------+-------------------------------------------------------------+-------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`atlas<class_AtlasTexture_property_atlas>` | |
|
|
+-----------------------------------+-------------------------------------------------------------+-------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`filter_clip<class_AtlasTexture_property_filter_clip>` | ``false`` |
|
|
+-----------------------------------+-------------------------------------------------------------+-------------------------+
|
|
| :ref:`Rect2<class_Rect2>` | :ref:`margin<class_AtlasTexture_property_margin>` | ``Rect2( 0, 0, 0, 0 )`` |
|
|
+-----------------------------------+-------------------------------------------------------------+-------------------------+
|
|
| :ref:`Rect2<class_Rect2>` | :ref:`region<class_AtlasTexture_property_region>` | ``Rect2( 0, 0, 0, 0 )`` |
|
|
+-----------------------------------+-------------------------------------------------------------+-------------------------+
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_AtlasTexture_property_atlas:
|
|
|
|
- :ref:`Texture2D<class_Texture2D>` **atlas**
|
|
|
|
+----------+------------------+
|
|
| *Setter* | set_atlas(value) |
|
|
+----------+------------------+
|
|
| *Getter* | get_atlas() |
|
|
+----------+------------------+
|
|
|
|
The texture that contains the atlas. Can be any :ref:`Texture2D<class_Texture2D>` subtype.
|
|
|
|
----
|
|
|
|
.. _class_AtlasTexture_property_filter_clip:
|
|
|
|
- :ref:`bool<class_bool>` **filter_clip**
|
|
|
|
+-----------+------------------------+
|
|
| *Default* | ``false`` |
|
|
+-----------+------------------------+
|
|
| *Setter* | set_filter_clip(value) |
|
|
+-----------+------------------------+
|
|
| *Getter* | has_filter_clip() |
|
|
+-----------+------------------------+
|
|
|
|
If ``true``, clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
|
|
|
|
----
|
|
|
|
.. _class_AtlasTexture_property_margin:
|
|
|
|
- :ref:`Rect2<class_Rect2>` **margin**
|
|
|
|
+-----------+-------------------------+
|
|
| *Default* | ``Rect2( 0, 0, 0, 0 )`` |
|
|
+-----------+-------------------------+
|
|
| *Setter* | set_margin(value) |
|
|
+-----------+-------------------------+
|
|
| *Getter* | get_margin() |
|
|
+-----------+-------------------------+
|
|
|
|
The margin around the region. The :ref:`Rect2<class_Rect2>`'s :ref:`Rect2.size<class_Rect2_property_size>` parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin.
|
|
|
|
----
|
|
|
|
.. _class_AtlasTexture_property_region:
|
|
|
|
- :ref:`Rect2<class_Rect2>` **region**
|
|
|
|
+-----------+-------------------------+
|
|
| *Default* | ``Rect2( 0, 0, 0, 0 )`` |
|
|
+-----------+-------------------------+
|
|
| *Setter* | set_region(value) |
|
|
+-----------+-------------------------+
|
|
| *Getter* | get_region() |
|
|
+-----------+-------------------------+
|
|
|
|
The AtlasTexture's used region.
|
|
|