// name:"圆闪烁",
    function f1() {
        var x=1;
        var flog=true;
        viewer.entities.add({
            name:"圆形区域闪烁",
            position:Cesium.Cartesian3.fromDegrees(lon,lat,0),
            ellipse : {
                semiMinorAxis : 2000.0,
                semiMajorAxis : 2000.0,
                height : 0,
                material:new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(function () {
                    if(flog){
                        x=x-0.05;
                        if(x<=0){
                            flog=false;
                        }
                    }else{
                        x=x+0.05;
                        if(x>=1){
                            flog=true;
                        }
                    }
                    return Cesium.Color.RED.withAlpha(x);
                },false))
            }
        });

    }f1();
    function f2(){
        var x=1;
        var flog=true;
        viewer.entities.add({
            name:"圆点point闪烁",
            position:Cesium.Cartesian3.fromDegrees(lon+0.03,lat+0.03,0),
            point : {
                show : true, // default
                color :new Cesium.CallbackProperty(function () {
                    if(flog){
                        x=x-0.05;
                        if(x<=0){
                            flog=false;
                        }
                    }else{
                        x=x+0.05;
                        if(x>=1){
                            flog=true;
                        }
                    }
                    return Cesium.Color.RED.withAlpha(x);
                },false),
                pixelSize : 10, // default: 1
                outlineWidth :0
            }
        });

    } f2();
    viewer.zoomTo(viewer.entities);

  

相关文章:

  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2021-06-15
  • 2021-09-30
  • 2020-11-04
猜你喜欢
  • 2021-08-09
  • 2021-06-01
  • 2021-07-22
  • 2021-07-23
  • 2021-10-01
  • 2022-12-23
  • 2021-04-05
相关资源
相似解决方案