GeoSkyBox

天空盒

new Cesium.GeoSkyBox(options)

Name Type Description
options Object 参数选项:
Name Type Description
viewer Object 三维地球
show Boolean 是否显示天空盒
height Number 近景远景天空盒切换的相机距离地面的高度,默认值为20000米
groundType String 近景天空盒:Sunny,Sunset,BlueSky
distantType String 远景天空盒:MilkyWay,Starry
groundBoxImages Array 近景天空盒的六个贴图面的图片
distantBoxImages Array 远景天空盒的六个贴图面的图片
Example:
//使用内置天空盒
viewer.scene.skyBox = new Cesium.GeoSkyBox({
    viewer: viewer,
    groundType: "Sunny",
	   distantType: "MilkyWay",
    height: 10000
});
//使用自定义天空盒
viewer.scene.skyBox = new Cesium.GeoSkyBox({
     viewer: viewer,
	    groundBoxImages: [
			"/Assets/Images/skyBox/Right.jpg",
			"/Assets/Images/skyBox/Left.jpg",
			"/Assets/Images/skyBox/Front.jpg",
			"/Assets/Images/skyBox/Back.jpg",
			"/Assets/Images/skyBox/Up.jpg",
			"/Assets/Images/skyBox/Down.jpg",
      ],
		distantBoxImages: [
			"/Assets/Images/skyBox/tycho2t3_80_px2.jpg",
			"/Assets/Images/skyBox/tycho2t3_80_mx2.jpg",
			"/Assets/Images/skyBox/tycho2t3_80_py2.jpg",
			"/Assets/Images/skyBox/tycho2t3_80_my2.jpg",
			"/Assets/Images/skyBox/tycho2t3_80_pz2.jpg",
			"/Assets/Images/skyBox/tycho2t3_80_mz2.jpg",
		]
});
Demo:

Methods

destroy()

销毁对象