Lore archive · Warcraft Wiki, 2023 dump
API TextureBase SetTexture
Last wiki revision 2023-09-25
Sets the texture to an image. TextureBase:SetTexture([textureAsset, wrapModeHorizontal, wrapModeVertical, filterMode])
To clear the texture call this without any params or .
- textureAsset: - A FileID or the file path to a texture.
- wrapModeHorizontal: - If is enabled, sets the wrap behavior for pixels with an x coordinate outside the (0, 1) region of the texture coordinate space.
! wrapMode !! Description ! filterMode !! Description
- wrapModeVertical: - If is enabled, sets the wrap behavior for pixels with a y coordinate outside the (0, 1) region of the texture coordinate space.
- {| class="darktable zebra"
- -
- || Default; extends the texture edges infinitely.
- -
- || Fills the overflow with white.
- -
- || Fills the overflow with black.
- -
- || Fills overflow with a transparent black.
- -
- (or ) || Repeats the whole texture infinitely.
- -
- || Repeats the whole texture infinitely, mirroring adjacent iterations.
- }
- filterMode:
- {| class="darktable zebra"
- -
- ||Default; bilinear filtering.
- -
- || Also sampling mipmaps.
- -
- || Nearest-neighbor filtering.
- }
- Custom images must be in BLP, JPEG, PNG, or TGA format with power-of-two dimensions (e.g. 16x16, 8x32, 256x64). TGA images may have 8bpp grayscale, 24bpp RGB, or 32 bpp RGBA; RLE is supported.
- Unlike other formats, PNG files must explicitly include the ".png" extension when their file path is used in-game.
- Pixels outside the texture coordinate space may be sampled explicitly by, or implicitly by the tiling mechanism when the texture widget is larger than the default size of the texture file.
- Textures load asynchronously. For example, returns 0,0 until becomes ; and then it returns the native texture size. See also TextureLoadingGroupMixin:IsFullyLoaded.
- This API has a return value but it has no significance since it always returns , even for invalid FileIDs or parameters.
Shows an icon on the screen.
The texture will be stretched or compressed if tiling is disabled.
When tiling is enabled, wrap mode specifies how pixels outside the texture coordinate space will be handled.
Source
https://warcraft.wiki.gg/wiki/API_TextureBase_SetTexture · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.