drawWell(){
// 动态墙材质
function DynamicWallMaterialProperty(options) {
// 默认参数设置
this._definitionChanged = new Cesium.Event()
this._color = undefined
this._colorSubscription = undefined
this.color = options.color
this.duration = options.duration
this.trailImage = options.trailImage
this._time = (new Date()).getTime()
}
Object.defineProperties(DynamicWallMaterialProperty.prototype, {
isConstant: {
get: function() {
return false
}
},
definitionChanged: {
get: function() {
return this._definitionChanged
}
},
color: Cesium.createPropertyDescriptor('color')
})
DynamicWallMaterialProperty.prototype.getType = function(time) {
return 'DynamicWall'
}
DynamicWallMaterialProperty.prototype.getValue = function(time, result) {
if (!Cesium.defined(result)) {
result = {}
}
result.color = Cesium.Property.getValueOrClonedDefault(this._color, time, Cesium.Color.WHITE, result.color)
if (this.trailImage) {
result.image = this.trailImage
} else {
result.image = Cesium.Material.DynamicWallImage
}
if (this.duration) {
result.time
Cesium绘制动态立体墙效果
于 2023-02-14 13:52:40 首次发布