spritesheet_batched 
Vars | |
cache_job_id | If there is currently an async cache job, its ID. |
---|---|
cache_result | Used to prevent async cache refresh jobs from looping on failure. |
entries_json | JSON encoded version of entries. |
force_cache | Forces use of the smart cache. This is for unit tests, please respect the config <3 |
fully_generated | If this spritesheet exists in a completed state. |
ignore_dir_errors | If we should avoid propogating 'invalid dir' errors from rust-g. Because sometimes, you just don't know what dirs are valid. |
job_id | If there is currently an async job, its ID |
load_immediately | If this asset should be fully loaded on new Defaults to false so we can process this stuff nicely |
sizes | list("32x32") |
sprites | "foo_bar" -> list("32x32", 5, entry_obj) |
Procs | |
create_spritesheets | Call insert_icon or insert_all_icons here, building a spritesheet! |
css_tag | |
get_background_url | Returns the URL to put in the background:url of the CSS asset |
icon_size_id | Returns the size class (ex design32x32) for a given sprite's icon |
should_refresh | Returns true if the cache should be invalidated/doesn't exist. |
Var Details
cache_job_id 
If there is currently an async cache job, its ID.
cache_result 
Used to prevent async cache refresh jobs from looping on failure.
entries_json 
JSON encoded version of entries.
force_cache 
Forces use of the smart cache. This is for unit tests, please respect the config <3
fully_generated 
If this spritesheet exists in a completed state.
ignore_dir_errors 
If we should avoid propogating 'invalid dir' errors from rust-g. Because sometimes, you just don't know what dirs are valid.
job_id 
If there is currently an async job, its ID
load_immediately 
If this asset should be fully loaded on new Defaults to false so we can process this stuff nicely
sizes 
list("32x32")
sprites 
"foo_bar" -> list("32x32", 5, entry_obj)
Proc Details
create_spritesheets
Call insert_icon or insert_all_icons here, building a spritesheet!
css_tag
Third party helpers
get_background_url
Returns the URL to put in the background:url of the CSS asset
icon_size_id
Returns the size class (ex design32x32) for a given sprite's icon
Arguments:
- sprite_name - The sprite to get the size of
should_refresh
Returns true if the cache should be invalidated/doesn't exist.