      if (fpsHistory.length > fpsHistoryLength) {
                    fpsHistory.shift();
                }

                const avgFps = fpsHistory.reduce((sum, val) => sum + val, 0) / fpsHistory.length;

                document.getElementById('fps').textContent = Math.round(fps);
                document.getElementById('avgFps').textContent = Math.round(avgFps);

                frameCount = 0;
                lastFpsUpdate = timestamp;
            }
        }

        // 初始化
        drawOrbits()