Skip to content
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

Fix unwanted roll #5083 #5092

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

NathanMOlson
Copy link
Contributor

@NathanMOlson NathanMOlson commented Nov 21, 2024

Launch Checklist

Fix #5083.

Use spherical linear interpolation only when rollEnabled is true. Otherwise, use linear interpolation of Euler angles.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Write tests for all new functionality.
  • Add an entry to CHANGELOG.md under the ## main section.

@NathanMOlson NathanMOlson marked this pull request as draft November 21, 2024 18:09
src/ui/camera.test.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.81%. Comparing base (3f1686e) to head (77c3258).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5092   +/-   ##
=======================================
  Coverage   91.80%   91.81%           
=======================================
  Files         279      279           
  Lines       38332    38341    +9     
  Branches     4999     4998    -1     
=======================================
+ Hits        35192    35201    +9     
  Misses       3007     3007           
  Partials      133      133           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@NathanMOlson NathanMOlson changed the title add failing unit test to demonstrate #5083 Fix unwanted roll #5083 Nov 21, 2024
src/ui/camera.ts Outdated Show resolved Hide resolved
src/ui/map.ts Outdated Show resolved Hide resolved
src/ui/camera.test.ts Outdated Show resolved Hide resolved
tr.setRoll(eulerAngles.roll);
tr.setPitch(eulerAngles.pitch);
tr.setBearing(eulerAngles.bearing);
export function updateRotation(startRotation: quat, endRotation: quat, startEulerAngles: RollPitchBearing, endEulerAngles: RollPitchBearing, tr: ITransform, k: number, useSlerp: boolean) {
Copy link
Collaborator

@HarelM HarelM Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to define a type for this method to pass the parameters as there are many parameters now, too many for my taste...

@HarelM
Copy link
Collaborator

HarelM commented Nov 22, 2024

We've just migrated the code to vitest, I'm trying to figure out if the coverage reports is accurate.
Cc: @birkskyum

@birkskyum
Copy link
Member

We've just migrated the code to vitest, I'm trying to figure out if the coverage reports is accurate. Cc: @birkskyum

It appear to be reporting at least some code as Covered on main
https://app.codecov.io/gh/maplibre/maplibre-gl-js/blob/main/src%2Fdata%2Ffeature_position_map.ts

And uncovered in this PR
https://app.codecov.io/gh/maplibre/maplibre-gl-js/pull/5092/blob/src/data/feature_position_map.ts

Despite being identical

@HarelM
Copy link
Collaborator

HarelM commented Nov 23, 2024

The report comment is saying that there is a missing uploaded file (8 files instead of 9).
I'm rerunning the CI now, see if it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map ends up with roll when rollEnabled=false
3 participants