in modules/main/src/lib/layers/segments-layer.ts [79:117]
render({ nebula }: Record<string, any>) {
const defaultColor: [number, number, number, number] = [0x0, 0x0, 0x0, 0xff];
const { objects, updateTrigger } = this.deckCache;
return new PathMarkerLayer<any>({
id: `segments-${this.id}`,
data: objects,
opacity: 1,
fp64: false,
jointRounded: this.jointRounded,
capRounded: this.capRounded,
pickable: true,
sizeScale: this.arrowSize || 6,
parameters: {
depthTest: false,
blend: !this.noBlend,
blendEquation: GL.MAX,
},
getPath: (nf: any) => nf.geoJson.geometry.coordinates,
getColor: (nf: any) => toDeckColor(nf.style.lineColor, defaultColor),
getWidth: (nf: any) => nf.style.lineWidthMeters || 1,
getZLevel: (nf: any) => nf.style.zLevel * 255,
getDirection: (nf: any) => NEBULA_TO_DECK_DIRECTIONS[nf.style.arrowStyle],
getMarkerColor: (nf: any) => toDeckColor(nf.style.arrowColor, defaultColor),
getMarkerPercentages: this._calcMarkerPercentages,
updateTriggers: { all: updateTrigger },
highlightedObjectIndex: this._getHighlightedObjectIndex({ nebula }),
highlightColor: toDeckColor(this.highlightColor),
dashJustified: this.dashed,
getDashArray: this.dashed ? (nf) => nf.style.dashArray : null,
markerLayerProps:
this.markerLayerProps ||
(PathMarkerLayer as Record<string, any>).defaultProps.markerLayerProps,
nebulaLayer: this,
});
}