Render v6 biome names on diagram
This commit is contained in:
parent
2441c6b997
commit
4da33da71c
56
mibpov.js
56
mibpov.js
@ -96,8 +96,8 @@ const CELL_COLOR_NEUTRAL = "#888888";
|
||||
const CELL_COLOR_V6_NORMAL = "#6b7f5c";
|
||||
const CELL_COLOR_V6_JUNGLE = "#345644";
|
||||
const CELL_COLOR_V6_DESERT = "#a7822c";
|
||||
const CELL_COLOR_V6_TAIGA = "#ccccff";
|
||||
const CELL_COLOR_V6_TUNDRA = "#aaaaff";
|
||||
const CELL_COLOR_V6_TAIGA = "#548583";
|
||||
const CELL_COLOR_V6_TUNDRA = "#6371b4";
|
||||
|
||||
// Mapgen v6 biome thresholds
|
||||
const MGV6_FREQ_HOT = 0.4
|
||||
@ -1304,18 +1304,50 @@ function drawV6() {
|
||||
|
||||
context.closePath();
|
||||
context.stroke();
|
||||
} else {
|
||||
// TODO;
|
||||
}
|
||||
|
||||
if (showGrid) {
|
||||
putGrid(context, GRID_STEP_V6);
|
||||
}
|
||||
if (showAxes) {
|
||||
putAxes(context);
|
||||
}
|
||||
if (showGrid) {
|
||||
putGrid(context, GRID_STEP_V6);
|
||||
}
|
||||
if (showAxes) {
|
||||
putAxes(context);
|
||||
}
|
||||
|
||||
putResizeCorner(context);
|
||||
// Biome names
|
||||
if (showNames) {
|
||||
context.font = "120% sans-serif";
|
||||
context.fillStyle = "#FFFFFFBB";
|
||||
context.textAlign = "center";
|
||||
context.textBaseline = "middle";
|
||||
|
||||
if (v6_flag_snowbiomes) {
|
||||
context.fillText("Taiga", cx_snow/2, cy_snow2/2);
|
||||
context.fillText("Tundra", cx_snow/2, cy_snow2+((h-cy_snow2)/2));
|
||||
context.fillText("Jungle", cx_hot + (w-cx_hot)/2, cy_hot2/2);
|
||||
} else if (v6_flag_jungles) {
|
||||
context.fillText("Jungle", cx_hot + (w-cx_hot)/2, cy_hot2/2);
|
||||
}
|
||||
if (v6_flag_snowbiomes) {
|
||||
context.fillText("Desert", cx_hot + (w-cx_hot)/2, cy_hot2+((h-cy_hot2)/2));
|
||||
} else {
|
||||
if (v6_flag_jungles) {
|
||||
context.fillText("Desert", cx_hot + (w-cx_hot)/2, cy_hot2+((h-cy_hot2)/2));
|
||||
} else {
|
||||
context.fillText("Desert", cx_hot + (w-cx_hot)/2, h/2);
|
||||
}
|
||||
}
|
||||
if (v6_flag_snowbiomes) {
|
||||
context.fillText("Normal", cx_snow + (cx_hot-cx_snow)/2, h-h/4);
|
||||
} else {
|
||||
if (v6_flag_jungles) {
|
||||
context.fillText("Normal", cx_hot/2, cy_hot2 + (h-cy_hot2)/2);
|
||||
} else {
|
||||
context.fillText("Normal", cx_hot/2, h/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
putResizeCorner(context);
|
||||
}
|
||||
}
|
||||
|
||||
function draw(recalculate) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user