cyborg_model_gallery 
Public stock artwork is encoded once per catalog generation, independently of private layouts. Keep file resources and small indexes, not duplicate JSON lists.
Vars | |
| assets | Owned resources are registered only on acquisition, avoiding global preloading. |
|---|---|
| catalog | The model catalog the gallery was last built from |
| catalog_asset | Asset name of the gallery's model list |
| department_assets | Asset name of each department's thumbnails, by department |
| generating | Whether or not a build is running, so everyone else waits for it |
| generation | Hash of the gallery's contents, which names its asset files |
| generation_failure | The exception the running or last build threw, thrown again to everyone who waited on that build |
Procs | |
| assets_for_department | Unknown departments select only the finite catalog, never a new resource. |
| build_catalog | Rebuilds the gallery's files when the catalog changed - its model list and each department's thumbnails. A failed build keeps the old files and throws to everyone waiting |
| ensure_ready | Waits out a running build, and throws again whatever that build threw |
| get_url_mappings | Returns the URL of each of the gallery's files |
| json_resource | Only a temporary serialization buffer exists; the round retains the file resource. |
| owned_asset | Reuse an identical current item without registering new global/preload entries. |
| register | Builds the gallery for the current catalog when assets load |
| send_to_viewer | Called before private state is captured. Native acquisition can yield while flushing. |
| ui_descriptor | No waits or generation here: the preflight already acquired this public selection. |
| unregister | Unregisters the gallery's files and forgets them |
Var Details
assets 
Owned resources are registered only on acquisition, avoiding global preloading.
catalog 
The model catalog the gallery was last built from
catalog_asset 
Asset name of the gallery's model list
department_assets 
Asset name of each department's thumbnails, by department
generating 
Whether or not a build is running, so everyone else waits for it
generation 
Hash of the gallery's contents, which names its asset files
generation_failure 
The exception the running or last build threw, thrown again to everyone who waited on that build
Proc Details
assets_for_department
Unknown departments select only the finite catalog, never a new resource.
build_catalog
Rebuilds the gallery's files when the catalog changed - its model list and each department's thumbnails. A failed build keeps the old files and throws to everyone waiting
ensure_ready
Waits out a running build, and throws again whatever that build threw
get_url_mappings
Returns the URL of each of the gallery's files
json_resource
Only a temporary serialization buffer exists; the round retains the file resource.
owned_asset
Reuse an identical current item without registering new global/preload entries.
register
Builds the gallery for the current catalog when assets load
send_to_viewer
Called before private state is captured. Native acquisition can yield while flushing.
ui_descriptor
No waits or generation here: the preflight already acquired this public selection.
unregister
Unregisters the gallery's files and forgets them