完善开发环境工具、音乐服务和界面性能

This commit is contained in:
2026-08-17 03:09:59 +08:00
parent 8b2dd89d2f
commit 92e5c330f2
22 changed files with 1185 additions and 156 deletions
@@ -778,6 +778,7 @@
const defaultTarget = new THREE.Vector3(0, 0, 0);
const responsive = { scale: 1, cameraDistance: 74, y: 7 };
const visualState = detectVisualState();
let hostLightMode = false;
const renderStats = { elapsed: 0, frames: 0, qualityReduced: false };
const asyncTasks = new Map([
['three', { label: 'Three.js 模块', progress: 0 }],
@@ -2341,6 +2342,12 @@
return;
}
if (payload.type === 'performanceMode') {
hostLightMode = Boolean(payload.lightMode);
clock.getDelta();
return;
}
if (payload.type === 'ephemeris:complete') {
if (!acceptEphemerisRequest(payload)) {
return;
@@ -2484,6 +2491,10 @@
function animate() {
requestAnimationFrame(animate);
if (hostLightMode) {
clock.getDelta();
return;
}
const delta = Math.min(clock.getDelta(), 0.05);
const elapsed = clock.elapsedTime;
const animationFactor = visualState.animationsEnabled ? 1 : 0;