直接上效果图
直接上关键代码:
由于是sdk中摘出,不能直接运行。关键在于PolylineMaterialAppearance
中new Material
的配置:
var instance = new GeometryInstance({
geometry: new GroundPolylineGeometry({
width:5,
positions: this.points
}),
attributes: {}
});
const materialOpts = {
fabric:{
type : 'PolylineDash',
uniforms:{
color:{
red:1,
green:1,
blue:0,
alpha:1
},
gapColor:{
red:1,
green:1,
blue:1,
alpha:1
},
dashLength:50
}
}
}
this._primitive = this.parent.add(new GroundPolylinePrimitive({
asynchronous: false,
geometryInstances: