Part of StarfallEx namespace
๐ External
Material:setTextureURL(key, url, cb, done)๐ 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
| Name | Type | Description |
|---|---|---|
key | string | The key name to set. $basetexture is the key name for most purposes. |
url | string | The URL or base64 data |
cb? | function | An 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? | function | An 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.