cesium 雷达卫星扫描效果

cesium 雷达卫星扫描效果

直接上代码
/**
* @Description:雷达扫描卫星
* @author BJGiser
* @date 2023/07/20
**/
export default function addSatellite(opt) {
   if (!opt) opt = {};

   var length = opt.length;

   // 地面位置(垂直地面)
   var positionOnEllipsoid = Cesium.Cartesian3.fromDegrees(opt.x, opt.y, opt.z);
   // 矩阵计算
   var modelMatrix = Cesium.Matrix4.multiplyByTranslation(
       Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid),
       new Cesium.Cartesian3(0.0, 0.0, length * 0.5), new Cesium.Matrix4()
   );
   // 创建雷达放射波
   var cylinderGeometry = new Cesium.CylinderGeometry({
       length: length,
       topRadius: 0.0,
       bottomRadius: opt.bottomRadius || length * 0.5,
       vertexFormat: Cesium.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat
   });
   //  创建GeometryInstance
   var redCone = new Cesium.GeometryInstance({
       geometry: cylinderGeometry,
       modelMatrix: modelMatrix,
   });
   // 创建Primitive
   //....

   return radar;
}
效果图

你可能感兴趣的:(cesium,javascript,前端)