AtlasTexture

Inherits: Texture < Resource < Reference < Object

Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.

Description

Texture resource aimed at managing big textures files that pack multiple smaller textures. Consists of a Texture, a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.

Note: AtlasTextures don’t support repetition. The Texture.FLAG_REPEAT and Texture.FLAG_MIRRORED_REPEAT flags are ignored when using an AtlasTexture.

Properties

Textureatlas 
boolfilter_clipfalse
intflags0 (parent override)
Rect2marginRect2( 0, 0, 0, 0 )
Rect2regionRect2( 0, 0, 0, 0 )

Property Descriptions

Setterset_atlas(value)
Getterget_atlas()

The texture that contains the atlas. Can be any Texture subtype.


Defaultfalse
Setterset_filter_clip(value)
Getterhas_filter_clip()

If true, clips the area outside of the region to avoid bleeding of the surrounding texture pixels.


DefaultRect2( 0, 0, 0, 0 )
Setterset_margin(value)
Getterget_margin()

The margin around the region. The Rect2‘s Rect2.size parameter (“w” and “h” in the editor) resizes the texture so it fits within the margin.


DefaultRect2( 0, 0, 0, 0 )
Setterset_region(value)
Getterget_region()

The AtlasTexture’s used region.