文章参考别人代码,在这里记录下过程防止忘记
1.创建纹理
export const createTexture = (params) => {
if (!params) params = {
}
const {
img = '/img/flow_line.png', second = 5000 } = params
function PolylineTrailLinkMaterialProperty(color, duration, d) {
this._definitionChanged = new Cesium.Event()
this._color = undefined
this._colorSubscription = undefined
this.color = color
this.duration = duration || 3000
this._time = new Date().getTime()
this._d = d
this.isTranslucent = function () {

这篇博客介绍了如何在Cesium中创建动态纹理线的步骤,包括定义`PolylineTrailLinkMaterialProperty`类来实现时间依赖的线效果,并提供了创建和应用这种材质的方法。在示例中,创建了一条宽度为5的折线,其颜色和透明度随时间变化,动态效果由指定的纹理图片控制。
最低0.47元/天 解锁文章
6502

被折叠的 条评论
为什么被折叠?



