libpov_2025/index.html

114 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" href="./favicon.png">
<title>Minetest Biome Point Visualizer</title>
<style>
canvas {
border: 1px solid black;
}
</style>
<!-- Voronoi diagram API -->
<script src="./rhill-voronoi-core.js"></script>
</head>
<body>
<h1>Minetest Biome Point Visualizer</h1>
<div>
<!-- TODO: Add proper canvas browser fallback by listing the voronoi points -->
<canvas id="voronoiCanvas" width="500" height="500">
A voronoi diagram is supposed to be here but for some reason it cannot be displayed.
</canvas>
</div>
<div>
<span id="coordinateDisplay">&nbsp;</span>
</div>
<br>
<div>
<span id="statsInfo">&nbsp;</span>
</div>
<hr>
<div>
<h2>Biome configuration</h2>
<form id="biomeForm">
<label for="biomeSelector">Biomes:<br>
<select id="biomeSelector" name="biomeList" size="8"></select>
</label>
<br>
<button id="addBiomeButton" type="button">Add</button>
<button id="removeBiomeButton" type="button">Remove</button>
<br>
<div id="biomeEditElements">
<label for="inputHeat">Heat:
<input id="inputHeat" type="number" value="50" step="1">
</label>
<label for="inputHumidity">Humidity:
<input id="inputHumidity" type="number" value="50" step="1">
</label>
<br>
<label for="inputMinY">Min. Y:
<input id="inputMinY" type="number" value="-31000" step="100">
</label>
<label for="inputMaxY">Max. Y:
<input id="inputMaxY" type="number" value="31000" step="100">
</label>
</div>
</form>
</div>
<hr>
<div>
<h2>Diagram view settings</h2>
<form id="viewForm">
<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>
</form>
</div>
<div>
<h2>Noise parameters</h2>
<form id="noiseForm">
<button id="inputNoiseReset" type="button">Reset</button>
<h3>Heat</h3>
<label for="inputNoiseHeatOffset">Offset:</label>
<input id="inputNoiseHeatOffset" type="number" value="50">
<label for="inputNoiseHeatScale">Scale:</label>
<input id="inputNoiseHeatScale" type="number" value="50">
<label for="inputNoiseHeatOctaves">Octaves:</label>
<input id="inputNoiseHeatOctaves" type="number" value="3" step="1" min="1">
<label for="inputNoiseHeatPersistence">Persistence:</label>
<input id="inputNoiseHeatPersistence" type="number" value="0.5" step=0.1>
<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>
</form>
</div>
<script src="./biome-ui.js"></script>
</body>
</html>