GlobeEffect

new Cesium.GlobeEffect(viewer)

地球特效:云、天空盒
Name Type Default Description
viewer Viewer 视图对象
options.cloudsDuration Number 100000 optional 旋转周期时间,单位毫秒。
options.cloudsImgSource Object buildModuleUrl('Assets/Images/clouds.png') optional 云层图片路径。
Example:
let GlobeEffect = new Cesium.GlobeEffect(viewer, { cloudsDuration: 10000, cloudsImgSource:buildModuleUrl('Assets/Images/clouds.png')});
GlobeEffect.addGlobeClouds(); // 添加云层
GlobeEffect.addDefaultSkyBox('skyBox3'); // 添加天空盒
GlobeEffect.removeGlobeClouds(); // 移除云层
GlobeEffect.removeSkyBox(); // 移除天空盒

Members

云效果旋转周期
云图片路径

Methods

addDefaultSkyBox()Boolean

添加天空盒
Returns:
true
修改场景的天空盒
Name Type Description
skybox SkyBox 天空盒对象
Example:
let skybox = new Cesium.SkyBox({
  sources: {
    positiveX: 'Assets/Textures/SkyBox2/front.jpg',
    negativeX: 'Assets/Textures/SkyBox2/back.jpg',
    positiveY: 'Assets/Textures/SkyBox2/left.jpg',
    negativeY: 'Assets/Textures/SkyBox2/right.jpg',
    positiveZ: 'Assets/Textures/SkyBox2/top.jpg',
    negativeZ: 'Assets/Textures/SkyBox2/down.jpg'
  }
});
GlobeEffect.changeSkyBox(skybox);

removeGlobeClouds()Boolean

移除云
Returns:
true
移除天空盒
Returns:
true