tangrams / bubble-wrap

Bubble Wrap basemap style
http://tangrams.github.io/bubble-wrap/
MIT License
27 stars 21 forks source link

refactor pattern-dots #261

Closed meetar closed 6 years ago

meetar commented 6 years ago

This updates the pattern-dots style with a refactored transition between zoom levels. In both versions, the transition "splits" a dot into three other dots which take their place in a "brick" pattern. In the old style, the new split dots shrink briefly before enlarging as they take their final position:

olddots

This caused a momentary lightening of the fill when crossing integer zoom levels, as the density of the pattern dips briefly. View this effect by zooming in and out here: https://mapzen.com/tangram/view/?api=5/1227#13.6333/45.2459/-114.7776

I've simplified the function while (afaik) not removing any functionality, added a couple of comments, made some parameters more clear, and kept the new "split" dots from shrinking, which maintains pattern density better across zoom levels:

newdots

View it in action here: https://mapzen.com/tangram/view/?api=5/1228#15.2625/45.2478/-114.7737

sensescape commented 6 years ago

this looks great!