Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

SFEX.Material:setTextureURL

C๐Ÿท๏ธ Material

Part of StarfallEx namespace

๐Ÿ”— External
Material:setTextureURL(key, url, cb, done)
View on GitHub|lua/starfall/libs_cl/material.lua:580
๐Ÿ“‹ Has LDoc๐Ÿ‘๏ธ 0 viewsUpdated 2 months ago

Description

Loads an online image or base64 data to the specified texture key If the texture in key is not set to a rendertarget, a rendertarget will be created and used.

Parameters

NameTypeDescription
keystringThe key name to set. $basetexture is the key name for most purposes.
urlstringThe URL or base64 data
cb?functionAn optional callback called when image is loaded. Passes nil if it fails or Passes the material, url, width, height, and layout function which can be called with x, y, w, h, pixelated to reposition the image in the texture. Setting the optional 'pixelated' argument to True tells the image to use nearest-neighbor interpolation
done?functionAn optional callback called when the image is done loading. Passes the material, url

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.