cesium雷达扫描

有意者聊qq:1125346480

   function showRadarScan() {

            var cartographicCenter = new Cesium.Cartographic(Cesium.Math.toRadians(116.397289), Cesium.Math.toRadians(39.968679), 32);
            var scanColor = new Cesium.Color(1.0, 0.0, 0.0, 1);

            lastStage = addRadarScanPostStage(viewer, cartographicCenter, 1000, scanColor, 3000);
        }
        showRadarScan()


        // 清除
        // viewer.scene.postProcessStages.remove(lastStage);
        /*
          添加雷达扫描线
          viewer
          cartographicCenter 扫描中心
          radius  半径 米
          scanColor 扫描颜色
          duration 持续时间 毫秒
        */
        function addRadarScanPostStage(viewer, cartographicCenter, radius, scanColor, duration) {
            var _Cartesian3Center = Cesium.Cartographic.toCartesian(cartographicCenter);
            var _Cartesian4Center = new Cesium.Cartesian4(_Cartesian3Center.x, _Cartesian3Center.y, _Cartesian3Center.z, 1);

            var _CartographicCenter1 = new Cesium.Cartographic(cartographicCenter.longitude, cartographicCenter.latitude, cartographicCenter.height + 500);
            var _Cartesian3Center1 = Cesium.Cartographic.toCartesian(_CartographicCenter1);
            var _Cartesian4Center1 = new Cesium.Cartesian4(_Cartesian3Center1.x, _Cartesian3Center1.y, _Cartesian3Center1.z, 1);

            var _CartographicCenter2 = new Cesium.Cartographic(cartographicCenter.longitude + Cesium.Math.toRadians(0.001), cartographicCenter.latitude, cartographicCenter.height);
            var _Cartesian3Center2 = Cesium.Cartographic.toCartesian(_CartographicCenter2);
            var _Cartesian4Center2 = new Cesium.Cartesian4(_Cartesian3Center2.x, _Cartesian3Center2.y, _Cartesian3Center2.z, 1);
            var _RotateQ = new Cesium.Quaternion();
            var _RotateM = new Cesium.Matrix3();

            var _time = (new Date()).getTime();

            var _scratchCartesian4Center = new Cesium.Cart

你可能感兴趣的:(webgl,3d,canvas)