gisthreemap
Version:
基于webGL的三维api
46 lines (38 loc) • 1.2 kB
JavaScript
/*
* @Description: 扩散圆效果(参考开源代码)
* @Version: 1.0
*/
class CircleDiffuseMaterialProperty {
constructor(options) {
this._definitionChanged = new Cesium.Event();
this._color = undefined;
this._speed = undefined;
this.color = options.color;
this.speed = options.speed;
};
get isConstant() {
return false;
}
get definitionChanged() {
return this._definitionChanged;
}
getType(time) {
return Cesium.Material.CircleDiffuseMaterialType;
}
getValue(time, result) {
if (!Cesium.defined(result)) {
result = {};
}
result.color = Cesium.Property.getValueOrDefault(this._color, time, Cesium.Color.RED, result.color);
result.speed = Cesium.Property.getValueOrDefault(this._speed, time, 10, result.speed);
return result
}
equals(other) {
return (this === other ||
(other instanceof CircleDiffuseMaterialProperty &&
Cesium.Property.equals(this._color, other._color) &&
Cesium.Property.equals(this._speed, other._speed))
)
}
}
export default CircleDiffuseMaterialProperty