I'm working on getting deck.gl to work alongside Leaflet (https://github.com/visgl/deck.gl/issues/5588).
Basically, when the Leaflet map pans or zooms, the deck.gl view needs to be synced so that things render in the right places. This seems to be working okay here: https://codepen.io/clebal/pen/rNjdzzr
It's using the map bounds to update deck.gl. As is apparent in the codepen, this doesn't work well during zoom (deck.gl doesn't animate alongside Leaflet).
My understanding is that Leaflet animates using CSS so there really aren't any intermediate states to tap into.
A workaround I've seen is to override the internal _animateMove method and call and use timers to update deck.gl periodically throughout the 250ms Leaflet takes to finish the zoom animation.
This part is all relatively straightforward, the challenge I'm facing is how to actually calculating what the bounding box would be at a fractional zoom. e.g. 25ms into the animation (making the simplifying assumption that the CSS animation is linear which isn't actually the case), I'd need to be able to calculate what the bounding box for a map at zoom 11.10 would be (the map itself doesn't need to update). I can hopefully then use this bounding box to perform the calculations on the deck.gl side.
Does Leaflet support this calculation out of the box? Is there any code in the Leaflet codebase I can reference to help achieve this (or even using external tools like turf, etc)?