[client] Alter colour scheme

This commit is contained in:
Starbeamrainbowlabs 2019-08-07 13:36:33 +01:00
parent 1fb6c1f13e
commit ce6b76c8ba
2 changed files with 11 additions and 9 deletions

View file

@ -21,7 +21,11 @@ export default {
}, },
colour_scale: { colour_scale: {
min: "rgba(255, 255, 255, 0.9)", "-150": "rgba(255, 255, 255, 0)",
max: "#00ff00" "-120": "rgba(255, 0, 0, 0.5)",
"-100": "rgba(255, 150, 0, 0.5)",
"-80": "rgba(255, 255, 0, 0.5)",
"-60": "rgba(0, 255, 0, 0.5)",
"-40": "rgba(0, 0, 255, 0.5)"
} }
}; };

View file

@ -80,13 +80,11 @@ class LayerAI {
this.map_bounds.west -= Config.border.lng; this.map_bounds.west -= Config.border.lng;
// Setup the colour scale // Setup the colour scale
this.colour_scale = chroma.scale([ this.colour_scale = chroma.scale(
Config.colour_scale.min, Object.values(Config.colour_scale),
Config.colour_scale.max ).domain(
]).domain([ Object.keys(Config.colour_scale).map(item => parseInt(item, 10))
this.index.properties.rssi_min, );
this.index.properties.rssi_max
]);
// Setup the web worker army // Setup the web worker army
for(let i = 0; i < (navigator.hardwareConcurrency || 4); i++) { for(let i = 0; i < (navigator.hardwareConcurrency || 4); i++) {