()
| 807 | } |
| 808 | |
| 809 | function startRenderLoop() { |
| 810 | if (rafRunning) return; |
| 811 | |
| 812 | if (renderMode === "pending") { |
| 813 | rafRunning = true; |
| 814 | _rafId = requestAnimationFrame(renderLoop); |
| 815 | return; |
| 816 | } |
| 817 | |
| 818 | const hasRenderer = |
| 819 | renderMode === "webgpu" |
| 820 | ? webgpuRenderer !== null |
| 821 | : offscreenCanvas !== null && offscreenCtx !== null; |
| 822 | |
| 823 | if (!hasRenderer) return; |
| 824 | |
| 825 | rafRunning = true; |
| 826 | _rafId = requestAnimationFrame(renderLoop); |
| 827 | } |
| 828 | |
| 829 | function stopRenderLoop() { |
| 830 | if (_rafId !== null) { |
no outgoing calls
no test coverage detected