screenCtx.stroke();
        }

        // 主循环
        function animate(time) {
            // 计算FPS
            const deltaTime = time - lastTime;
            lastTime = time;
            fps++;
            avgFps = (avgFps * (deltaTime - 1) + fps) / deltaTime;
            fpsCounter.innerText = `FPS: ${fps} AVG FPS: ${avgFps.toFixed(2)} Earth Day: ${earthDays.toFixed(2)}`;

            // 重置FPS计数器
            if (deltaTime > 1000) {
                fps = 0;
            }

            //