core.plugins.billboards.cl.zad_imageloader
Zeros AdvertKit Image Loader (Client). Client-side image loading and caching functions.
- zad.f.ImageLoader.GetCacheFilename(id) → stringSource ☍
-
Generate a safe filename from an ID or URL.
Parameters
- idstringThe ID or URL to convert.
Returns
- stringsafe filename for caching.
- zad.f.ImageLoader.GetContentType(headers) → string|nilSource ☍
-
Read the media type from a response's headers. Header names are matched case-insensitively: Steam's legacy CDN answers over HTTP/2, which sends them lowercase.
Parameters
- headerstable<string, string>The response headers from
http.Fetch.
Returns
- string|nilThe lowercased media type without parameters, or nil if absent.
- headerstable<string, string>The response headers from
- zad.f.ImageLoader.GetMaterial(id, callback)Source ☍
-
Load and cache a material from a URL.
Parameters
- idstringThe image URL or ID.
- callbackfunctionThe callback function to receive the material or false on failure.