GisEyeSquaresBackgroundMaterialProperty

new GisEye.GisEyeSquaresBackgroundMaterialProperty(options)

背景方块纹理

Name Type Description
options object

入参对象

Name Type Default Description
bgColor Cesium.Color new Cesium.Color(0.01, 0.16, 0.42, 1.0) optional

背景颜色

rectColor Cesium.Color new Cesium.Color(0.01, 0.26, 0.57, 1.0) optional

方块颜色

rate object {x: 5,y: 1,z: 1} optional

速率(x、y代表运动方向速率,z代表旋转速率)

rectMinSize Number 0.03 optional

方块最小尺寸

rectMaxSize Number 0.05 optional

方块最大尺寸

repeatNum Number 1 optional

重复数量

alpha Number 1 optional

透明度

isTranslucent boolean true optional

是否透明

Example:
let lon = 104;
  let lat = 30;
  viewer.entities.add({
    polyline: {
      positions: Cesium.Cartesian3.fromDegreesArrayHeights([
        lon - 0.2+1, lat, 0.0,
        lon + 0.2+1, lat, 0.0,
      ]),
      width: 20.0,
      material: new GisEye.GisEyeSquaresBackgroundMaterialProperty({
        bgColor: new Cesium.Color(0.01, 0.16, 0.42, 1.0),
        rectColor: new Cesium.Color(0.01, 0.26, 0.57, 1.0),
        rate:{
            x: 5,
            y: 1,
            z: 1
        },
        rectMinSize: 0.03,
        rectMaxSize: 0.05,
        repeatNum: 10,
        alpha:1,
        isTranslucent:true
      })
    }
  });
  viewer.entities.add({
    polygon: {
      hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights([
        lon - 0.2 +1, lat - 0.1, 0,
        lon + 0.2+1, lat - 0.1, 0,
        lon + 0.2+1, lat - 0.5, 0,
        lon - 0.2+1, lat - 0.5, 0,
      ]),
      material: new GisEye.GisEyeSquaresBackgroundMaterialProperty({
        bgColor: new Cesium.Color(0.01, 0.16, 0.42, 1.0),
        rectColor: new Cesium.Color(0.01, 0.26, 0.57, 1.0),
        rate:{
          x: 5,
          y: 1,
          z: 1
        },
        rectMinSize: 0.03,
        rectMaxSize: 0.05,
        repeatNum: 1,
        alpha:1,
        isTranslucent:true
      })
    }
  });
  viewer.entities.add({
    wall: {
      positions: Cesium.Cartesian3.fromDegreesArrayHeights([
        lon - 0.2+1.5, lat - 0.1, 10000,
        lon + 0.2+1.5, lat - 0.1, 10000,
        lon + 0.2+1.5, lat - 0.5, 10000,
        lon - 0.2+1.5, lat - 0.5, 10000,
        lon - 0.2+1.5, lat - 0.1, 10000,
      ]),
      material: new GisEye.GisEyeSquaresBackgroundMaterialProperty({
        bgColor: new Cesium.Color(0.01, 0.16, 0.42, 1.0),
        rectColor: new Cesium.Color(0.01, 0.26, 0.57, 1.0),
        rate:{
          x: 5,
          y: 1,
          z: 1
        },
        rectMinSize: 0.03,
        rectMaxSize: 0.05,
        repeatNum: 10,
        alpha:1,
        isTranslucent:true
      })
    }
  });