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 {
|
|
|
|
border: 1px solid black;
|
|
|
|
}
|
|
|
|
</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-20 10:43:04 +02:00
|
|
|
<div>
|
|
|
|
<!-- 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>
|
|
|
|
<div>
|
2023-10-21 21:24:58 +02:00
|
|
|
<span id="errorMessage"></span>
|
2023-10-21 01:48:45 +02:00
|
|
|
<span id="coordinateDisplay"> </span>
|
|
|
|
</div>
|
2023-10-21 17:12:43 +02:00
|
|
|
<br>
|
2023-10-21 01:48:45 +02:00
|
|
|
<div>
|
2023-10-21 17:12:43 +02:00
|
|
|
<span id="statsInfo"> </span>
|
|
|
|
</div>
|
2023-10-21 21:24:58 +02:00
|
|
|
<div id="configDiv">
|
2023-10-21 17:12:43 +02:00
|
|
|
<hr>
|
2023-10-21 21:24:58 +02:00
|
|
|
<div id="biomeConfigDiv">
|
2023-10-21 17:12:43 +02:00
|
|
|
<h2>Biome configuration</h2>
|
2023-10-20 10:43:04 +02:00
|
|
|
<form id="biomeForm">
|
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-20 11:24:38 +02:00
|
|
|
<button id="addBiomeButton" type="button">Add</button>
|
|
|
|
<button id="removeBiomeButton" type="button">Remove</button>
|
2023-10-20 10:43:04 +02:00
|
|
|
<br>
|
2023-10-20 11:24:38 +02:00
|
|
|
<div id="biomeEditElements">
|
|
|
|
<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-20 17:22:48 +02:00
|
|
|
<hr>
|
2023-10-21 21:24:58 +02:00
|
|
|
<div id="viewConfigDiv">
|
2023-10-21 17:12:43 +02:00
|
|
|
<h2>Diagram view settings</h2>
|
2023-10-20 17:22:48 +02:00
|
|
|
<form id="viewForm">
|
2023-10-21 13:59:19 +02:00
|
|
|
<label for="inputViewY">Show biomes at Y:</label>
|
|
|
|
<input id="inputViewY" type="number" value="0" step="1">
|
|
|
|
|
|
|
|
<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 21:24:58 +02:00
|
|
|
<div id="noiseConfigDiv">
|
2023-10-21 17:55:32 +02:00
|
|
|
<h2>Noise parameters</h2>
|
2023-10-21 17:12:43 +02:00
|
|
|
<form id="noiseForm">
|
2023-10-21 17:55:32 +02:00
|
|
|
<button id="inputNoiseReset" type="button">Reset</button>
|
|
|
|
<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 17:12:43 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-10-21 21:24:58 +02:00
|
|
|
</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>
|