Optimize and robustify asset prefetching and material loading.

- Parallelize asset prefetching (max 4 workers) with retry logic and on-screen error banner, replacing silent failures and cryptic WASM out-of-bounds crashes with explicit missing-file errors.
- Support binary Uint8Array/ArrayBuffer in C++ asset registry via typed_memory_view, preventing Embind string coercion from corrupting binary shader packages into ASCII text.
- Automatically glob .mat files in CMake instead of maintaining a manual list.
- Add missing reflection materials to prefetch arrays.
- Disable caching for index.html in web server so template/script updates apply on normal page reload without stale cache issues, the file is small so caching had a negligible upside.
- Add null resource and payload validation in ObjectManager::LoadMaterial before constructing Filament materials.

PiperOrigin-RevId: 963364509
Change-Id: I7de79df6a5cede4e54683415ee193f1c5a665286
This commit is contained in:
Matija Kecman
2026-08-12 04:38:02 -07:00
committed by Copybara-Service
parent fb03be0e4f
commit fca913b4f5
6 changed files with 95 additions and 54 deletions
@@ -479,8 +479,12 @@ def _run_server(
content_type = _CONTENT_TYPES.get(
os.path.splitext(full)[1], "application/octet-stream"
)
cacheable = not rel.endswith("index.html")
return Response(
200, "OK", _http_headers(content_type, len(body), cacheable=True), body
200,
"OK",
_http_headers(content_type, len(body), cacheable=cacheable),
body,
)
async def main_loop() -> None: