-
-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to marker transparency #3431
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3431 +/- ##
==========================================
+ Coverage 74.72% 74.74% +0.01%
==========================================
Files 242 242
Lines 19113 19146 +33
Branches 4233 4240 +7
==========================================
+ Hits 14283 14311 +28
- Misses 4830 4835 +5 ☔ View full report in Codecov by Sentry. |
Looks good in general, can you add some videos with 2D and 3D after the fix? |
I see that some tests are failing... |
Thanks for the review @HarelM! There's no more consistently failing tests, I'm only seeing failures from flaky tests that are probably unrelated to this PR.
Just added a unit test for |
In general this looks good. See my last comment above. |
I have merged node 20 branch just now, which changes a bit how we use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANKS!!
According to the coverage the following lines are still not covered:
516, 520, and 534-535 are part of the changes made here. |
@HarelM Just expanded the test, I think it should cover most of those! How are you seeing the list of lines not covered? Going to https://app.codecov.io/gh/maplibre/maplibre-gl-js/pull/3431 I see "No Files covered by tests were changed" EDIT: Got them all but 520, not sure how to cover that one. |
Not sure why codecov is not presenting the lines... |
Fixes #2869. Markers now update when removing terrain.
disable-terrain.webm
Fixes #1134.
Instead of checking the position of the marker and the unprojected screenpoint in LngLat space, now we sample the depth texture (with function
terrain.depthAtPoint
) and convert the marker's position to depth in GL space (with functiontransform.lngLatToCameraDepth
) and compare these values.For more precision, I've adjusted the near plane. This means that buildings clip slightly sooner but it doesn't seem to be an issue.I reverted this change as it caused incorrect render order with DeckGL and extrusions. Some precision is lost but given the following double-check it's rarely noticeable.Fixes #2870
If the initial check at the marker's lng/lat finds a colission we check again at a position with elevation adjusted to the center of the marker. This resolves this issue where markers were being occluded by a small hill at the base that only covers a small portion of the marker.
fade-behind-hill.webm
Launch Checklist
CHANGELOG.md
under the## main
section.