By using refresh top mode, you send only the dirty rectangle coordinates for the top 20% of the screen (where the live graphs live). The bottom 80% (static logos or menus) never redraws, conserving bandwidth. Scenario C: Video Streaming Synchronization Problem: In a multi-viewer setup (e.g., security cameras), one stream falls behind the others. The "top" stream (the primary focus) is out of sync.
// "Top" logic: Clear only the upper hemisphere of the depth buffer this.renderer.autoClear = false; this.renderer.clearDepth(); // Clear depth to force top-layer redraw // Render only specified layers (e.g., layer 0 and 1, ignoring background layer 2) this.renderer.render(this.scene, this.camera); // Reset this.renderer.autoClear = autoClear; viewerframe mode refresh top
let refreshing = false; function safeRefreshTop() if (refreshing) return; refreshing = true; viewerframe.refreshTop(); setTimeout(() => refreshing = false; , 16); // Release after one frame By using refresh top mode, you send only