AtlasTexture.xml 2.0 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AtlasTexture" inherits="Texture2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A texture that crops out part of another Texture2D.
  5. </brief_description>
  6. <description>
  7. [Texture2D] resource that draws only part of its [member atlas] texture, as defined by the [member region]. An additional [member margin] can also be set, which is useful for small adjustments.
  8. Multiple [AtlasTexture] resources can be cropped from the same [member atlas]. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls.
  9. [b]Note:[/b] [AtlasTexture] cannot be used in an [AnimatedTexture], and may not tile properly in nodes such as [TextureRect], when inside other [AtlasTexture] resources.
  10. </description>
  11. <tutorials>
  12. </tutorials>
  13. <members>
  14. <member name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas">
  15. The texture that contains the atlas. Can be any type inheriting from [Texture2D], including another [AtlasTexture].
  16. </member>
  17. <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false">
  18. If [code]true[/code], the area outside of the [member region] is clipped to avoid bleeding of the surrounding texture pixels.
  19. </member>
  20. <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2(0, 0, 0, 0)">
  21. The margin around the [member region]. Useful for small adjustments. If the [member Rect2.size] of this property ("w" and "h" in the editor) is set, the drawn texture is resized to fit within the margin.
  22. </member>
  23. <member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2(0, 0, 0, 0)">
  24. The region used to draw the [member atlas].
  25. </member>
  26. <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
  27. </members>
  28. </class>