mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-05 05:37:09 +00:00
When parallel workers each load a page independently, the first frame captured by a worker could show an uninitialized WebGL render state — typically a single flash frame with wrong 3D object orientation or missing MeshPhysicalMaterial transmission effects. This happened because the Three.js transmission pipeline needs at least one prior render to populate its internal render targets. Fix: after session initialization (page ready, fonts loaded, videos ready), perform three warm-up seeks via the __hf protocol before marking the session as initialized. The seeks prime the page's render pipeline at t=0, t=duration/2, and t=0 again, ensuring WebGL buffers and transmission render targets are fully initialized before real frame capture begins. Affects both screenshot and beginFrame capture modes.