Skip to content

v0.13.1

Compare
Choose a tag to compare
@bcamper bcamper released this 23 Aug 22:12
· 676 commits to master since this release

Mostly internal refactoring to provide more flexibility and better performance on platforms such as iOS Mobile Safari that are sensitive to main thread/UI locking.

Bug Fixes

  • Fix a few cases where labels would render incorrectly due to improper placement in the Canvas text atlas.
  • Skip boundary labels if neither a left nor a right value was found. Fixes issue where some tiles wouldn't render; collision detection would never resolve for a given style/tile combination consisting of only empty boundary labels.

Internal

  • Use 512px tiles for non-tiled data sources, for better label placement (fewer tile boundaries).
  • Refactor Canvas text atlas creation for labels, to allow a single tile to place labels across multiple textures, with a maximum texture size per atlas of 2048x2048 pixels; the max texture size was chosen as a balance between minimizing the number of textures created, and the time needed to instantiate a GL texture from a Canvas element, which can cause a significant main thread lock on some platforms.
  • Add "background task" model, to allow some long-running processes on the main thread (such as Canvas text label rendering) to be time-sliced across multiple animation frames; this ameliorates thread and UI locking when these processes take several frames (e.g. hundreds of milliseconds or more) to complete. Background tasks can be paused when individual tasks (or all tasks collectively) surpass a certain time threshold per frame, or when the user is interacting with the map.
  • A given rendering style can now have multiple mesh "variants", which can vary by rendering state such as uniform values; this is used to vary the label atlas texture sampler when a given tile/style combination has more than one label texture.
  • Remove optional stringification of worker message payloads, due to inconclusive benefit on current browser generations.
  • Upgrade browserify.