[v3.0.0-beta.3] flyTo Animation Drops frames and stutters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
When triggering the flyTo animation, the map drops frames and the console fills with `'requestAnimationFrame' handler took Xms` warnings. This is happening on the basemap but also legacy styles.
I've tried simplifying the animation and removing things like pitch, explicitly enabling WebGL2, etc. Still, the issue persists to the same level.
**mapbox-gl-js version**: 3.0.0-beta.3
**browser**: Chrome, Firefox, Safari
### Steps to Trigger Behavior
1. Load the map
2. Click a button to zoom from level 5 to 16
3. Check the console to see requestAnimationFrame warnings
### Link to Demonstration
https://jsfiddle.net/garydevenay/1dgu5jh2/23/
### Expected Behavior
Smooth zoom transition without dropped frames
### Actual Behavior
Stuttery animation and lots of dropped frames.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the animation from the linked JSFiddle by calling flyTo to zoom from level 5 to 16, then inspect the requestAnimationFrame warnings and frame rate in Chrome, Firefox, and Safari. Compare the basemap and legacy-style cases; done means the transition is smooth without dropped frames or prolonged handler warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100