cesium 雷达卫星扫描效果
直接上代码
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
});
var redCone = new Cesium.GeometryInstance({
geometry: cylinderGeometry,
modelMatrix: modelMatrix,
});
return radar;
}
效果图
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/1e460ebf5faf44c4bf14a4c7d3b9000e.png#pic_center)