feat: further separate line and point picking
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 389
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
[Example](https://neuroglancer-demo.appspot.com/#!%7B%22dimensions%22:%7B%22x%22:%5B4e-9%2C%22m%22%5D%2C%22y%22:%5B4e-9%2C%22m%22%5D%2C%22z%22:%5B4e-8%2C%22m%22%5D%7D%2C%22position%22:%5B109601.359375%2C40558.98046875%2C5417.83740234375%5D%2C%22crossSectionScale%22:2.1875%2C%22projectionOrientation%22:%5B-0.06915239989757538%2C-0.987652599811554%2C-0.03065071813762188%2C0.13718903064727783%5D%2C%22projectionScale%22:1382.7372135147452%2C%22layers%22:%5B%7B%22type%22:%22image%22%2C%22source%22:%22precomputed://gs://neuroglancer-fafb-data/fafb_v14/fafb_v14_orig%22%2C%22tab%22:%22source%22%2C%22name%22:%22fafb_v14%22%2C%22visible%22:false%7D%2C%7B%22type%22:%22annotation%22%2C%22source%22:%7B%22url%22:%22local://annotations%22%2C%22transform%22:%7B%22outputDimensions%22:%7B%22x%22:%5B4e-9%2C%22m%22%5D%2C%22y%22:%5B4e-9%2C%22m%22%5D%2C%22z%22:%5B4e-8%2C%22m%22%5D%7D%7D%7D%2C%22tool%22:%22annotatePoint%22%2C%22tab%22:%22rendering%22%2C%22annotationColor%22:%22#9c622b%22%2C%22annotations%22:%5B%7B%22points%22:%5B%5B108931.3125%2C40827.875%2C5417.4189453125%5D%2C%5B109369.8359375%2C40425.5546875%2C5414.75244140625%5D%2C%5B110013.9140625%2C40753.9609375%2C5417.31591796875%5D%2C%5B110032.3359375%2C40458.1875%2C5417.4189453125%5D%5D%2C%22type%22:%22polyline%22%2C%22id%22:%22c0f225c19f910578431a073b6e6c4a2033e89a4d%22%7D%5D%2C%22shader%22:%22%5Cnvoid%20main%28%29%20%7B%5Cn%20%20setColor%28vec4%281.0%20%2C0.0%2C%200.0%2C%200.4%29%29%3B%5Cn%20%20setEndpointMarkerSize%28100.0%29%3B%5Cn%20%20setLineWidth%2820.0%29%3B%5Cn%20%20//setLineColor%28vec3%281.0%2C%201.0%2C%201.0%29%29%3B%5Cn%7D%5Cn%22%2C%22name%22:%22annotation%22%7D%5D%2C%22showAxisLines%22:false%2C%22showSlices%22:false%2C%22selectedLayer%22:%7B%22size%22:371%2C%22visible%22:true%2C%22layer%22:%22annotation%22%7D%2C%22layout%22:%223d%22%2C%22selection%22:%7B%22size%22:371%2C%22layers%22:%7B%22annotation%22:%7B%22annotationId%22:%2275662f1c2836bbde049ae798cf601baff142ad7f%22%2C%22annotationSource%22:0%2C%22annotationSubsource%22:%22default%22%7D%7D%7D%7D)
Because picking priority in the pick buffer is based on depth, for lines and points, the points don't get a clear separation from the line. Here you can see it quite well because I've made the lines and points very big for demonstration purposes, so it's still clear which you are picking. But in a more reasonably sized example, the visual distinction between a line and point where the two intersect is often not clear. You'd probably expect to pick the point in these intersection cases, since that is what it looks like you have selected. But near the centre of the point, it's quite easy to be picking the line instead.
This is quite prevalent in #991. However, it is a general annotation occurrence since they use the same line and point rendering. Open to any thoughts, and if we have a non skeleton specific solution to #991 and I can cherry-pick that out against master branch.
https://github.com/user-attachments/assets/34f455e3-1730-42ad-9578-22a6dfd178ee
Contributor guide
Research direction
No source file or test is named. Start by reproducing the linked example and tracing the shared annotation line-and-point rendering and pick-buffer behavior, especially the interaction with #991. Done means point selections are visually and interactively separated from intersecting lines without making line picking ambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100