Skip to content

Material

图片轨迹线材质 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: new 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 = 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);

轨迹墙体材质 WallTrailMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
colorObject颜色Cesium.Color.fromBytes(0, 255, 255, 255)
speedNumber速度1
durationNumber动画方向 (1.0/-1.0)1.0
  • @returns
返回值type描述
materialObject材质。
js
let options = {
  color: new Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
  speed: 20,
  direction: -1.0, // 1.0表示从下往上,-1.0表示从上往下
};
let material = CM.Material.WallTrailMaterial(options);

线条轨迹墙体材质 WallLineTrailMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
colorObject颜色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: new Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
  speed: 2,
  repeat: { x: 1, y: 2 },
  direction: -1.0, // 1.0表示从下往上,-1.0表示从上往下
};
let material = CM.Material.WallLineTrailMaterial(options);

图片轨迹墙体材质 WallImageTrailMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
imageString图片地址-
colorObject颜色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 = {
  image: require("../../assets/icon/arrow.png"),
  color: new Cesium.Color.fromCssColorString("rgba(255, 134, 27, 1)"),
  repeat: { x: 100, y: 1 },
  speed: 20,
  direction: 1.0, // 1.0表示正向,-1.0表示反向
};
let material = CM.Material.WallImageTrailMaterial(options);

创建水波纹扩散材质 CircleWaveMaterial

  • @param
参数名type描述默认值
optionsObject材质配置,属性参考下表-
options 属性
属性名type描述默认值
colorString颜色-
speedString动画速度3
countNumber波浪数量1
gradientNumber渐变曲率0.1
  • @returns
返回值type描述
materialObject材质。
js
let options = {
  color: new Cesium.Color.fromCssColorString("#41A97F"),
  speed: 12.0,
  count: 3,
  gradient: 0.2,
};
let material = CM.Material.CircleWaveMaterial(options);