完善开发环境工具、音乐服务和界面性能
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user