mapbox-gl-js
mapbox-gl-js copied to clipboard
Adding debug AABB visualization
Closes https://github.com/mapbox/gl-js-team/issues/472
Also fixes an issue with tile bounds visualization during the transition not being correctly scaled, as demonstrated by changes in render tests.
The AABBs can be viewed from other angles with the transform.freezeTileCoverage
option
- [ ] Implement clipping to fix artifacts
- [X] include before/after visuals or gifs if this PR includes visual changes
- [ ] write tests for all new functionality
- [X] manually test the debug page
- [ ] tagged
@mapbox/gl-native
if this PR includes shader changes or needs a native port - [X] apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
looks nice and it's very useful!
My only concern here is that this very specialized tool adds ~700 bytes overhead to the gzipped bundle for all users, while it's a feature that would only be used by us, the developers. Could we perhaps limit it to the dev bundle and strip it out like we do with a few other debug code pieces?
Good call @mourner! I just implemented this, bringing the change down from +683 B to +88 B. I suspect that most of the remaining increase comes from the changes to transform._globePoint
that fix the tile visualization (which is not stripped out in production).