------
Speaking of maps, I got to work a fun zoom project a few years ago: https://map.fieldmuseum.org/
We used https://openlayers.org/ and thought long and hard about how to best handle zooming and variable levels of information density & visual hierarchy. If you zoom all the way out, we just highlight where the building is relative to the surroundings. As you start to zoom in, we start to highlight major exhibitions and entrances. Then as you zoom in more, we start showing recommended paths, smaller exhibitions, etc. The label sizes try to scale up and down at each level, smoothly, in order to balance readability and density.
Eventually you can reach the max zoom level and the labels will just grow bigger and bigger, but the SVGs dynamically shrink so they remain pictograms and not just contextless-lines.
Then if you keep going, you eventually find microscopic easter eggs :)
The code is pretty jank (and abandoned), but it's FOSS vanilla JS/HTML/CSS, and the only dependency is on OpenLayers: https://github.com/arcataroger/openlayers_indoor_map
From a quick skim of the source code this is mostly precalulated. Basically each document is rendered as one rectange, where the shader converts the current position to the row/column of the character to be rendered. There is one texture that holds the length and starting offset of each line (using one pixel per line), and another texture that for each offset tells you which glyph to render (using one pixel per glyp). The third texture is the glyph map that holds the actual glpyhs (a simple 256x256 texture of all supported characters). The last texture is static, the other two are calculated once as the document is loaded, and there is a neat shader that uses all three textures to render the actual document view. Since the shader is sampled at fewer points if the rectangle takes up fewer pixels on your screen this works out well for zoomed out views.
like google maps.