-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
Sky Implementation according to spec #3645
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #3645 +/- ##
==========================================
- Coverage 87.91% 87.77% -0.14%
==========================================
Files 242 246 +4
Lines 33082 33361 +279
Branches 2158 2219 +61
==========================================
+ Hits 29084 29283 +199
- Misses 3029 3056 +27
- Partials 969 1022 +53 ☔ View full report in Codecov by Sentry. |
I've opened the following issue for the spec as I have forgot to add the diff part of the sky to the relevant place in the code. |
@prozessor13 can I delete |
@acalcutt feel free to fix the unit tests as well while you are at it :-) |
I'm not sure I understand those errors
isn't it a function? maplibre-gl-js/src/geo/transform.ts Lines 724 to 736 in 32ae12b
|
The tests are mocking stuff, if the mock doesn't have a function that the test need you'll see this error. |
I don’t think it’s worth waiting for GSoC if this is good to go… but we’ll need to find something else for GSoC. I didn’t realize this was so close to being done |
* try to fix calculateFogMatrix error * Raise expectedBytes for maplibre-gl.js size
I've merged the tests fix, and merged main branch. |
Increasing coverage is always an option. |
I've added the relevant unit test to make sure the bug won't happen in the future. |
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.
Adding the fog call systematically, even when not used could propably be avoided with a simple chech in the painter class.
This is now ready to be merged. I'll merge it tomorrow if there's no new review changes requirements. |
Good luck to us all. |
### Motivation Upgrade maplibre to latest version, so we can have sky box support. maplibre/maplibre-gl-js#3645 ### Modifications ### Verification
@@ -475,4 +475,44 @@ describe('#getStyle', () => { | |||
expect(spy).not.toHaveBeenCalled(); | |||
}); | |||
|
|||
describe('#setSky', () => { |
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.
How should one unset the sky? (revert back to the default white). It seems calling setSky({})
doesn't do it, and setSky()
isn't allowed by the typing but reverts back to white, as desired.. could the type just need a tweak?
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.
Does setSky(undefined) works?
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.
setSky()
and setSky(undefined)
work, but then reversing it seems to not work quite right. Turning the sky off is no problem, but then calling setSky with the same sky object as before doesn't render until the sky color value is different.
sky_toggle.mov
I think the typescript type should be relaxed to accept undefined.
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.
Feel free to submit a PR to fix this, probably a missing implementation for this case...
Fog was only added to the terrain... |
a Vector map with Fog will look cool. Please consider it :) |
Sure will, you should consider taking the time to implement this and open a PR :-) |
This PR is a successor of #1713 which is working with the actual maplibre-codebase. Writing Tests is still an open issue for which i currently do not have any time :/