Skip to content

图片轨迹线材质 PolylineImageTrailMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
imageString图片地址-
colorString颜色Cesium.Color.fromBytes(0, 255, 255, 255)
speedNumber速度1
repeatObject重复规则{ x: 1, y: 1 }
durationNumber动画方向 (1.0/-1.0)1.0
  • @returns
返回值type描述
materialObject材质。
js
let options = {
  color: Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
  speed: 10, // 速度
  image: require("./test.png"),
  repeat: { x: 1, y: 1 },
  direction: 1.0, // 1.0表示正向,-1.0表示反向
};
let material = new CM.Material.PolylineImageTrailMaterial(options);

颜色轨迹线材质 PolylineLightingTrailMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
colorString颜色Cesium.Color.fromBytes(0, 255, 255, 255)
speedNumber速度1
  • @returns
返回值type描述
materialObject材质。
js
let options = {
  color: new Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
  speed: 10,
};
let material = CM.Material.PolylineLightingTrailMaterial(options);

发光线材质 PolylineLightingMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
colorString颜色Cesium.Color.fromBytes(0, 255, 255, 255)
  • @returns
返回值type描述
materialObject材质。
js
let options = {
  color: new Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
};
let material = CM.Material.PolylineLightingMaterial(options);

流动线材质 PolylineFlowMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
colorString颜色Cesium.Color.fromBytes(0, 255, 255, 255)
speedNumber速度1
percentNumber动画颜色所占比例0.03
gradientNumber透明程度0.1
  • @returns
返回值type描述
materialObject材质。
js
let options = {
  color: new Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
  speed: 10,
  percent: 0.3, // 比例
  gradient: 0.3, // 透明程度
};
let material = CM.Material.PolylineFlowMaterial(options);