While covering PerformanceHUD leftover (Wave 8 a5 tick 2, tests only) the overlay render() path was driven with a mocked WebGLRenderer.
What happens:render() saves autoClear / autoClearColor / autoClearDepth, forces them false so the HUD can overlay without wiping the 3D colour buffer, then restores them afterrenderer.render(...). The restore sits inside the same try. If clearDepth() or render() throws, the catch only console.errors — the three flags stay false.
User-visible: a single HUD render exception (lost context, disposed camera, etc.) stops the main scene from clearing. Subsequent frames composite on stale colour/depth.
Fix: restore the three flags in a finally, or restore them in the catch before returning.
While covering `PerformanceHUD` leftover (Wave 8 a5 tick 2, tests only) the overlay `render()` path was driven with a mocked `WebGLRenderer`.
**What happens:** `render()` saves `autoClear` / `autoClearColor` / `autoClearDepth`, forces them false so the HUD can overlay without wiping the 3D colour buffer, then restores them *after* `renderer.render(...)`. The restore sits inside the same `try`. If `clearDepth()` or `render()` throws, the `catch` only `console.error`s — the three flags stay `false`.
**User-visible:** a single HUD render exception (lost context, disposed camera, etc.) stops the main scene from clearing. Subsequent frames composite on stale colour/depth.
**Fix:** restore the three flags in a `finally`, or restore them in the `catch` before returning.
**Repro (jsdom, mocked renderer):** `render` throws → `renderer.autoClear === false` after `PerformanceHUD.render` returns.
File: `projects/spikersoft/src/app/_components/threejs-performance-monitor/performance-hud.ts`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
While covering
PerformanceHUDleftover (Wave 8 a5 tick 2, tests only) the overlayrender()path was driven with a mockedWebGLRenderer.What happens:
render()savesautoClear/autoClearColor/autoClearDepth, forces them false so the HUD can overlay without wiping the 3D colour buffer, then restores them afterrenderer.render(...). The restore sits inside the sametry. IfclearDepth()orrender()throws, thecatchonlyconsole.errors — the three flags stayfalse.User-visible: a single HUD render exception (lost context, disposed camera, etc.) stops the main scene from clearing. Subsequent frames composite on stale colour/depth.
Fix: restore the three flags in a
finally, or restore them in thecatchbefore returning.Repro (jsdom, mocked renderer):
renderthrows →renderer.autoClear === falseafterPerformanceHUD.renderreturns.File:
projects/spikersoft/src/app/_components/threejs-performance-monitor/performance-hud.tsFixed in
spikersoft-angularPR #823 (a0f0ccd9). Closing.