代码
import {Engine, DynamicSky} from '@baidumap/mapv-three';

const engine = new Engine('map', {
  map: {
    provider: null,
    center: [0, 0, 180],
    range: 440,
    pitch: 85,
    heading: 90,
  },
  rendering: {
    sky: null,
    enableAnimationLoop: true,
  },
  clock: {
    currentTime: new Date(2026, 5, 21, 15),
  },
});

const sky = engine.add(new DynamicSky());
sky.cloudsCoverage = 0.55;
const control = document.getElementById('clouds');
control.addEventListener('click', () => {
  const enabled = control.getAttribute('aria-pressed') !== 'true';
  sky.enableCloudsPass = enabled;
  control.setAttribute('aria-pressed', String(enabled));
});

观察动态天空中的体积云。关闭云层,可以对照纯大气背景。

预览