先上效果图
实现方法
const DEF_OPT = {
color: Cesium.Color.BLUE,
duration: 3000,
count: 2.0,
freely: 'vertical',
direction: '-'
}
CV.PolylineTrailLinkMaterialProperty = class {
constructor(options) {
options = options || DEF_OPT
this._definitionChanged = new Cesium.Event();
this._color = undefined;
this._colorSubscription = undefined;
this.color = options.color;
this.duration = options.duration;
this._time = new Date().getTime();
this.create(options)
}
get isConstant() {
return false
}
get definitionChanged() {
return this._definitionChanged
}
getType(time) {
return "PolylineTrailLink";
}
getValue (time, result) {
if (!Cesium.defined(result)) {
result = {};
}
result.color = Cesium.Property.getValueOrClonedDefault(
this._color,
time,
Cesium.Color.WHITE,
result.color