UNPKG

gisthreemap

Version:

基于webGL的三维api

41 lines (33 loc) 1.04 kB
/* * @Description: 动态扩散墙的墙体效果(参考开源代码)(不同高度透明度不同) */ class WallDiffuseMaterialProperty { constructor(options) { this._definitionChanged = new Cesium.Event(); this._color = undefined; this.color = options.color; }; get isConstant() { return false; } get definitionChanged() { return this._definitionChanged; } getType(time) { return Cesium.Material.WallDiffuseMaterialType; } getValue(time, result) { if (!Cesium.defined(result)) { result = {}; } result.color = Cesium.Property.getValueOrDefault(this._color, time, Cesium.Color.RED, result.color); return result } equals(other) { return (this === other || (other instanceof WallDiffuseMaterialProperty && Cesium.Property.equals(this._color, other._color)) ) } } export default WallDiffuseMaterialProperty