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
732 stars 290 forks source link

XCD-144 Fix shaking measurement #1719

Open MichalDybizbanskiCreoox opened 3 weeks ago

MichalDybizbanskiCreoox commented 3 weeks ago

Not sure what was the original intention to hide measurement controls when camera was too close to them, but it causes glitches as described at https://creoox.atlassian.net/browse/XCD-175?focusedCommentId=13492 Removing this special logic seems to fix the reported issue.

xeolabs commented 3 weeks ago

With this PR, what is the behaviour of measurent controls when they intersect the front clipping plane?

MichalDybizbanskiCreoox commented 3 weeks ago

The lines are visible even when they are "behind" the camera, which is no good I guess. The opposite is not good either though, because if one end of a line is behind the camera, but the other is in front of it, a part of the line should be visible, but that's tricky to achieve with DOM elements.

MichalDybizbanskiCreoox commented 1 week ago

The PR has been updated since the previous comment to introduce a significant change to the architecture of DOM elements (Dot, Wire, Label) visuals management. Instead of being managed from a plugin abstraction that uses them (e.g. a DistanceMeasurement) the elements are now responsible for responding to view-related changes (camera, section planes etc) by themselves. image