xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
694 stars 279 forks source link

[FEATURE] Extend pattern to end point #1532

Closed paireks closed 2 weeks ago

paireks commented 2 weeks ago

Here I just wanted to add an option to extend the last segment to end point (this option is turned on for blue lines below). It could be helpful if someone wants to see the real length / start and end point of the line, but can deal with the fact pattern at the end is slightly different. It is a usual practice in different programs, but handled in a various different ways.

2024-06-11_23h44_16

xeolabs commented 2 weeks ago

Cool, makes sense. Another thought: this dashing is similar to CanvasRenderingContext2D: setLineDash(), and therefore quite conventional, so I think it's worth actually building it into xeokit via a pattern parameter option for wherever lines are generated, rather than use a callback function, like I was thinking earlier.