[client] Alter colour scheme
This commit is contained in:
parent
1fb6c1f13e
commit
ce6b76c8ba
2 changed files with 11 additions and 9 deletions
|
@ -21,7 +21,11 @@ export default {
|
|||
},
|
||||
|
||||
colour_scale: {
|
||||
min: "rgba(255, 255, 255, 0.9)",
|
||||
max: "#00ff00"
|
||||
"-150": "rgba(255, 255, 255, 0)",
|
||||
"-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)"
|
||||
}
|
||||
};
|
||||
|
|
|
@ -80,13 +80,11 @@ class LayerAI {
|
|||
this.map_bounds.west -= Config.border.lng;
|
||||
|
||||
// Setup the colour scale
|
||||
this.colour_scale = chroma.scale([
|
||||
Config.colour_scale.min,
|
||||
Config.colour_scale.max
|
||||
]).domain([
|
||||
this.index.properties.rssi_min,
|
||||
this.index.properties.rssi_max
|
||||
]);
|
||||
this.colour_scale = chroma.scale(
|
||||
Object.values(Config.colour_scale),
|
||||
).domain(
|
||||
Object.keys(Config.colour_scale).map(item => parseInt(item, 10))
|
||||
);
|
||||
|
||||
// Setup the web worker army
|
||||
for(let i = 0; i < (navigator.hardwareConcurrency || 4); i++) {
|
||||
|
|
Loading…
Reference in a new issue