A-Frame a-assets timeout: surfacing missing assets instead of silently rendering an incomplete scene
0 reputation · 22 Sept 2020, 05:40 UTC
Goal
I am configuring an A-Frame scene that preloads glTF models and textures through <a-assets>. I want the scene to make asset failures visible during development rather than rendering with blank textures or missing models once the timeout expires.
Current understanding and constraints
As I understand it, the timeout attribute on <a-assets> controls how long the loading screen waits before the scene proceeds anyway. When it expires, unresolved assets are simply absent, with no obvious signal in the default UI. Assets are plain URLs with no built-in auth layer, so I plan to test against a local static server rather than production storage. I am assuming a current A-Frame release, since component and asset APIs have shifted across versions, and I am aware CORS misconfiguration on the asset host can produce failures that look like asset bugs.
Open questions
- Is there a documented per-asset or scene-level event (or component pattern) that reliably fires when an asset fails or the timeout is hit, so I can surface an error overlay?
- Should the timeout be treated as a hard failure gate in development and a graceful-degradation path in production, and is there a conventional way to switch between those behaviors?
- Does the timeout behavior differ between asset types (glTF vs. images vs. audio) in a way I need to account for?