2023-10-20 02:54:39 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2023-10-20 14:37:07 +02:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<link rel="icon" href="./favicon.png">
|
2023-10-20 02:54:39 +02:00
|
|
|
<title>Minetest Biome Point Visualizer</title>
|
|
|
|
<style>
|
|
|
|
canvas {
|
2023-10-21 22:44:09 +02:00
|
|
|
border: 3px solid #b0b0b0;
|
|
|
|
}
|
|
|
|
body {
|
|
|
|
background-color: #303030;
|
|
|
|
color: white;
|
|
|
|
font-family: sans-serif;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
button, select, input {
|
|
|
|
background-color: #303030;
|
|
|
|
color: white;
|
|
|
|
border-color: #ffffff;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 1px;
|
|
|
|
}
|
|
|
|
input:invalid {
|
|
|
|
background-color: #cf3030;
|
|
|
|
color: black;
|
|
|
|
}
|
|
|
|
input:disabled {
|
|
|
|
background-color: #101010;
|
|
|
|
color: #404040;
|
|
|
|
border-color: #606060;
|
|
|
|
}
|
|
|
|
input {
|
|
|
|
margin-top: 0.2em;
|
|
|
|
margin-bottom: 0.2em;
|
|
|
|
padding: 0.4em;
|
|
|
|
}
|
|
|
|
select {
|
|
|
|
width: 20em;
|
|
|
|
}
|
|
|
|
button:active {
|
|
|
|
background-color: white;
|
|
|
|
border-color: #808080;
|
|
|
|
color: black;
|
|
|
|
}
|
|
|
|
#biomeButtonDiv {
|
|
|
|
margin-top: 0.5em;
|
|
|
|
}
|
|
|
|
#mainContentDiv {
|
|
|
|
margin: 1em;
|
|
|
|
}
|
|
|
|
.borderedSection {
|
|
|
|
border-color: #606060;
|
|
|
|
border-width: 2px;
|
|
|
|
border-style: solid;
|
|
|
|
padding: 0.5em;
|
|
|
|
margin-top: 0em;
|
|
|
|
}
|
|
|
|
.configFrame {
|
|
|
|
border-color: #606060;
|
|
|
|
border-width: 0px 2px 2px 2px;
|
|
|
|
border-style: solid;
|
|
|
|
padding: 0.5em;
|
|
|
|
margin-top: 0em;
|
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 0.3em;
|
|
|
|
background-color: #4040bf;
|
|
|
|
color: white;
|
|
|
|
padding: 0.5em;
|
|
|
|
}
|
|
|
|
h2 {
|
|
|
|
background-color: #6060df80;
|
|
|
|
color: white;
|
|
|
|
padding-left: 0.4em;
|
|
|
|
padding-top: 0.1em;
|
|
|
|
padding-bottom: 0.1em;
|
|
|
|
margin-top: 1em;
|
|
|
|
margin-bottom: 0.2em;
|
|
|
|
}
|
|
|
|
h2.configHeader {
|
|
|
|
margin-bottom: 0em;
|
|
|
|
}
|
|
|
|
h3 {
|
|
|
|
background-color: #8080df20;
|
|
|
|
color: white;
|
|
|
|
padding-left: 0.3em;
|
|
|
|
padding-top: 0.1em;
|
|
|
|
padding-bottom: 0.1em;
|
|
|
|
margin-top: 0.2em;
|
|
|
|
margin-bottom: 0.2em;
|
2023-10-20 02:54:39 +02:00
|
|
|
}
|
2023-10-21 23:04:38 +02:00
|
|
|
.statAltitude {
|
|
|
|
font-weight: bold;
|
|
|
|
color: #ffff00;
|
|
|
|
}
|
|
|
|
.statHeat{
|
|
|
|
font-weight: bold;
|
|
|
|
color: #eb4737;
|
|
|
|
}
|
|
|
|
.statHumidity{
|
|
|
|
font-weight: bold;
|
|
|
|
color: #2d8af0;
|
|
|
|
}
|
|
|
|
|
2023-10-20 02:54:39 +02:00
|
|
|
</style>
|
2023-10-20 10:43:04 +02:00
|
|
|
<!-- Voronoi diagram API -->
|
2023-10-20 02:54:39 +02:00
|
|
|
<script src="./rhill-voronoi-core.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Minetest Biome Point Visualizer</h1>
|
2023-10-21 22:44:09 +02:00
|
|
|
<div id="mainContentDiv">
|
|
|
|
<div id="canvasDiv">
|
2023-10-20 10:43:04 +02:00
|
|
|
<!-- TODO: Add proper canvas browser fallback by listing the voronoi points -->
|
2023-10-20 12:34:37 +02:00
|
|
|
<canvas id="voronoiCanvas" width="500" height="500">
|
2023-10-20 02:54:39 +02:00
|
|
|
A voronoi diagram is supposed to be here but for some reason it cannot be displayed.
|
|
|
|
</canvas>
|
2023-10-20 10:43:04 +02:00
|
|
|
</div>
|
2023-10-21 22:44:09 +02:00
|
|
|
<div id="diagramInfoDiv" class="borderedSection">
|
2023-10-21 21:35:20 +02:00
|
|
|
<span id="errorMessage" hidden></span>
|
|
|
|
<span id="altitudeDisplay"></span>
|
|
|
|
<br>
|
2023-10-21 23:04:38 +02:00
|
|
|
<span id="rangeDisplay"> </span>
|
|
|
|
<br>
|
|
|
|
<span id="coordinateDisplay"> </span>
|
|
|
|
<br>
|
2023-10-21 01:48:45 +02:00
|
|
|
</div>
|
2023-10-21 22:44:09 +02:00
|
|
|
<div id="configFrame">
|
|
|
|
<h2 class="configHeader">Biome configuration</h2>
|
|
|
|
<div id="biomeConfigDiv" class="configFrame">
|
2023-10-20 10:43:04 +02:00
|
|
|
<form id="biomeForm">
|
2023-10-21 22:44:09 +02:00
|
|
|
<div id="biomeSelectorDiv">
|
|
|
|
<h3>Biome list</h3>
|
2023-10-20 11:24:38 +02:00
|
|
|
<label for="biomeSelector">Biomes:<br>
|
2023-10-20 12:34:37 +02:00
|
|
|
<select id="biomeSelector" name="biomeList" size="8"></select>
|
2023-10-20 10:43:04 +02:00
|
|
|
</label>
|
|
|
|
<br>
|
2023-10-21 22:44:09 +02:00
|
|
|
<div id="biomeButtonDiv">
|
2023-10-20 11:24:38 +02:00
|
|
|
<button id="addBiomeButton" type="button">Add</button>
|
|
|
|
<button id="removeBiomeButton" type="button">Remove</button>
|
2023-10-21 22:44:09 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-20 11:24:38 +02:00
|
|
|
<div id="biomeEditElements">
|
2023-10-21 22:44:09 +02:00
|
|
|
<h3>Selected biome</h3>
|
2023-10-20 11:24:38 +02:00
|
|
|
<label for="inputHeat">Heat:
|
2023-10-20 18:38:31 +02:00
|
|
|
<input id="inputHeat" type="number" value="50" step="1">
|
2023-10-20 10:43:04 +02:00
|
|
|
</label>
|
2023-10-20 11:24:38 +02:00
|
|
|
<label for="inputHumidity">Humidity:
|
2023-10-20 18:38:31 +02:00
|
|
|
<input id="inputHumidity" type="number" value="50" step="1">
|
2023-10-20 10:43:04 +02:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
2023-10-20 14:03:45 +02:00
|
|
|
<label for="inputMinY">Min. Y:
|
2023-10-20 16:12:20 +02:00
|
|
|
<input id="inputMinY" type="number" value="-31000" step="100">
|
2023-10-20 10:43:04 +02:00
|
|
|
</label>
|
2023-10-20 14:03:45 +02:00
|
|
|
<label for="inputMaxY">Max. Y:
|
2023-10-20 16:12:20 +02:00
|
|
|
<input id="inputMaxY" type="number" value="31000" step="100">
|
2023-10-20 10:43:04 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</form>
|
2023-10-20 13:31:23 +02:00
|
|
|
</div>
|
2023-10-21 21:24:58 +02:00
|
|
|
<div id="viewConfigDiv">
|
2023-10-21 22:44:09 +02:00
|
|
|
<h2 class="configHeader">Diagram view settings</h2>
|
|
|
|
<div class="configFrame">
|
2023-10-20 17:22:48 +02:00
|
|
|
<form id="viewForm">
|
2023-10-21 21:35:20 +02:00
|
|
|
<label for="inputViewY">Altitude:</label>
|
2023-10-21 13:59:19 +02:00
|
|
|
<input id="inputViewY" type="number" value="0" step="1">
|
|
|
|
|
2023-10-21 22:44:09 +02:00
|
|
|
<br>
|
|
|
|
|
2023-10-21 13:59:19 +02:00
|
|
|
<input id="inputCheckboxPoints" type="checkbox" checked>
|
|
|
|
<label for="inputCheckboxPoints">Show points</label>
|
|
|
|
|
|
|
|
<input id="inputCheckboxNames" type="checkbox" checked>
|
|
|
|
<label for="inputCheckboxNames">Show names</label>
|
|
|
|
|
|
|
|
<input id="inputCheckboxGrid" type="checkbox" checked>
|
|
|
|
<label for="inputCheckboxGrid">Show grid</label>
|
|
|
|
|
|
|
|
<input id="inputCheckboxCellColors" type="checkbox" checked>
|
|
|
|
<label for="inputCheckboxCellColors">Colorize cells</label>
|
2023-10-20 17:22:48 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-10-21 22:44:09 +02:00
|
|
|
</div>
|
2023-10-21 21:24:58 +02:00
|
|
|
<div id="noiseConfigDiv">
|
2023-10-21 22:44:09 +02:00
|
|
|
<h2 class="configHeader">Noise parameters</h2>
|
|
|
|
<div class="configFrame">
|
2023-10-21 17:12:43 +02:00
|
|
|
<form id="noiseForm">
|
2023-10-21 17:55:32 +02:00
|
|
|
<h3>Heat</h3>
|
|
|
|
<label for="inputNoiseHeatOffset">Offset:</label>
|
|
|
|
<input id="inputNoiseHeatOffset" type="number" value="50">
|
2023-10-21 17:12:43 +02:00
|
|
|
|
2023-10-21 17:55:32 +02:00
|
|
|
<label for="inputNoiseHeatScale">Scale:</label>
|
|
|
|
<input id="inputNoiseHeatScale" type="number" value="50">
|
2023-10-21 17:12:43 +02:00
|
|
|
|
2023-10-21 17:55:32 +02:00
|
|
|
<label for="inputNoiseHeatOctaves">Octaves:</label>
|
|
|
|
<input id="inputNoiseHeatOctaves" type="number" value="3" step="1" min="1">
|
2023-10-21 17:12:43 +02:00
|
|
|
|
2023-10-21 17:55:32 +02:00
|
|
|
<label for="inputNoiseHeatPersistence">Persistence:</label>
|
|
|
|
<input id="inputNoiseHeatPersistence" type="number" value="0.5" step=0.1>
|
2023-10-21 17:12:43 +02:00
|
|
|
|
2023-10-21 17:55:32 +02:00
|
|
|
<h3>Humidity</h3>
|
|
|
|
<label for="inputNoiseHumidityOffset">Offset:</label>
|
|
|
|
<input id="inputNoiseHumidityOffset" type="number" value="50">
|
|
|
|
|
|
|
|
<label for="inputNoiseHumidityScale">Scale:</label>
|
|
|
|
<input id="inputNoiseHumidityScale" type="number" value="50">
|
|
|
|
|
|
|
|
<label for="inputNoiseHumidityOctaves">Octaves:</label>
|
|
|
|
<input id="inputNoiseHumidityOctaves" type="number" value="3" step="1" min="1">
|
|
|
|
|
|
|
|
<label for="inputNoiseHumidityPersistence">Persistence:</label>
|
|
|
|
<input id="inputNoiseHumidityPersistence" type="number" value="0.5" step=0.1>
|
2023-10-21 22:44:09 +02:00
|
|
|
|
|
|
|
<h3>Reset</h3>
|
|
|
|
<button id="inputNoiseReset" type="button">Reset noise parameters</button>
|
2023-10-21 17:12:43 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-10-21 21:24:58 +02:00
|
|
|
</div>
|
2023-10-21 22:44:09 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-20 13:31:23 +02:00
|
|
|
<script src="./biome-ui.js"></script>
|
2023-10-20 02:54:39 +02:00
|
|
|
</body>
|
|
|
|
</html>
|