GTNewHorizons / GTNH-Web-Map

A 1.7.10 Dynmap fork with improved support for modded blocks and machines
Apache License 2.0
21 stars 1 forks source link

Feature: Data shader + web tooltip and/or map overlays #14

Open dvdmandt opened 1 month ago

dvdmandt commented 1 month ago

I want to add a shader that can encode various data into RGB colors. Such values could be biome id, max block height, max block height (3 layers of 'ground' blocks) and GT pollution (logarithmically or exponentially scaled). The idea would be to load this map in the background without rendering it, and sample pixels from it which can be decoded client side to create a nice tooltip, and perhaps some form of map overlay.

The biome data would be combined with a new JSON containing biome data like name, humidity and temperature. Those values could initially be shown in a WAILA style tooltip on mouse move, but it should also be possible to create an overlay for a regular textured terrain map (the classic 'flat' map) to show biome "borders" and a translucent overlay for example.

Creating the data shader itself should be fairly trivial, creating the client components could definitely use help from someone more familiar with JavaScript and/or Leaflet.