libpov_2025/index.html

220 lines
8.2 KiB
HTML
Raw Normal View History

2023-10-20 02:54:39 +02:00
<!DOCTYPE html>
<html lang="en">
2023-10-20 02:54:39 +02:00
<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-21 23:45:40 +02:00
<link rel="stylesheet" href="./dark_style.css">
2023-10-22 02:21:20 +02:00
<title>MiBPoV—Minetest Biome Point Visualizer</title>
2023-10-23 01:48:15 +02:00
<!-- Include Voronoi diagram API, required to calculate Voronoi diagrams -->
2023-10-20 02:54:39 +02:00
<script src="./rhill-voronoi-core.js"></script>
</head>
2023-10-21 23:45:40 +02:00
2023-10-20 02:54:39 +02:00
<body>
2023-10-22 02:21:20 +02:00
<h1>MiBPoV—Minetest Biome Point Visualizer</h1>
2023-10-23 01:46:24 +02:00
<div class="contentContainer" id="noscriptContainer">
2023-10-22 02:45:26 +02:00
<noscript>
<div class="borderedWarning">
2023-10-22 02:47:09 +02:00
ERROR: This tool requires JavaScript to work, but JavaScript is disabled in your browser.
2023-10-22 02:45:26 +02:00
</div>
</noscript>
2023-10-23 01:46:24 +02:00
</div>
2023-10-27 17:06:27 +02:00
2023-10-23 01:46:24 +02:00
<!-- The main content container starts hidden so it doesn't clutter
the page in noscript mode. It will be unhidden once the JavaScript loads -->
<div id="mainContentContainer" class="contentContainer" hidden>
2023-10-27 17:06:27 +02:00
<div id="modeContainer">
<button id="modernModeButton" type="button">Modern biomes</button>
<button id="v6ModeButton" type="button">v6 biomes</button>
</div>
2023-10-21 23:45:40 +02:00
<div id="canvasContainer">
2023-10-20 12:34:37 +02:00
<canvas id="voronoiCanvas" width="500" height="500">
2023-10-21 23:45:40 +02:00
A Voronoi diagram is supposed to be here but for some reason it cannot be displayed. This tool is useless without this functionality.
2023-10-20 02:54:39 +02:00
</canvas>
2023-10-20 10:43:04 +02:00
</div>
2023-10-27 17:06:27 +02:00
2023-10-21 23:45:40 +02:00
<div id="diagramInfoContainer" class="borderedSection">
2023-10-21 21:35:20 +02:00
<span id="errorMessage" hidden></span>
<span id="altitudeDisplay"></span>
<br>
<span id="rangeDisplay">&nbsp;</span>
<br>
<span id="coordinateDisplay">&nbsp;</span>
<br>
2023-10-21 01:48:45 +02:00
</div>
2023-10-27 17:06:27 +02:00
<div id="biomeConfigContainerOuter">
2023-10-22 02:11:36 +02:00
<h2 class="configHeader"><span class="collapser" id="biomeConfigHeaderLink"></span> Biome configuration</h2>
2023-10-21 23:45:40 +02:00
<div id="biomeConfigContainer" class="configFrame">
2023-10-20 10:43:04 +02:00
<form id="biomeForm">
2023-10-21 23:45:40 +02:00
<div id="biomeSelectorContainer">
2023-10-21 22:44:09 +02:00
<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 23:45:40 +02:00
<div id="biomeButtonContainer">
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-24 16:06:15 +02:00
<label for="inputBiomeName">Name:&nbsp;</label>
2023-10-27 12:40:40 +02:00
<input id="inputBiomeName" type="text" size="45">
2023-10-23 03:10:59 +02:00
<br>
2023-10-24 16:06:15 +02:00
<div id="biomeColorSection">
<label>Color:&nbsp;</label>
</div>
2023-10-20 10:43:04 +02:00
<br>
2023-10-24 16:06:15 +02:00
<label for="inputHeat">Heat:&nbsp;</label>
2023-10-27 16:03:17 +02:00
<input id="inputHeat" type="number" value="50" step="1" size="10" min="-1e6" max="1e6">
2023-10-24 16:06:15 +02:00
<label for="inputHumidity">Humidity:&nbsp;</label>
2023-10-27 16:03:17 +02:00
<input id="inputHumidity" type="number" value="50" step="1" size="10" min="-1e6" max="1e6">
2023-10-24 16:06:15 +02:00
<br>
<label for="inputMinY">Min. Y:&nbsp;</label>
2023-10-27 12:40:40 +02:00
<input id="inputMinY" type="number" value="-31000" step="1" size="10">
2023-10-24 16:06:15 +02:00
<label for="inputMaxY">Max. Y:&nbsp;</label>
2023-10-27 12:40:40 +02:00
<input id="inputMaxY" type="number" value="31000" step="1" size="10">
2023-10-20 10:43:04 +02:00
</div>
</form>
2023-10-20 13:31:23 +02:00
</div>
2023-10-27 17:06:27 +02:00
</div>
2023-10-27 19:41:21 +02:00
<div id="biomeV6ConfigContainerOuter" hidden>
<h2 class="configHeader"><span class="collapser" id="biomeV6ConfigHeaderLink"></span> v6 Biome configuration</h2>
<div id="biomeV6ConfigContainer" class="configFrame">
<form id="biomeV6Form">
<div>Flags:
<input id="inputCheckboxV6Snowbiomes" type="checkbox" checked>
<label for="inputCheckboxV6Snowbiomes">snowbiomes</label>
<input id="inputCheckboxV6Jungles" type="checkbox" checked>
<label for="inputCheckboxV6Jungles">jungles</label>
</div>
<div>
<label for="inputV6FreqDesert">Desert noise threshold:&nbsp;</label>
<input id="inputV6FreqDesert" type="number" value="0.45" step="0.01" size="10" disabled>
</div>
</form>
</div>
</div>
2023-10-27 17:06:27 +02:00
<div id="viewConfigContainerOuter">
2023-10-22 02:11:36 +02:00
<h2 class="configHeader"><span class="collapser" id="viewConfigHeaderLink"></span> Diagram view settings</h2>
<div id="viewConfigContainer" class="configFrame">
2023-10-20 17:22:48 +02:00
<form id="viewForm">
2023-10-24 16:06:15 +02:00
<label for="inputViewY">Altitude:&nbsp;</label>
2023-10-27 12:40:40 +02:00
<input id="inputViewY" type="number" value="0" step="1" size="10">
2023-10-21 13:59:19 +02:00
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>
2023-10-23 02:47:00 +02:00
<input id="inputCheckboxAxes" type="checkbox">
<label for="inputCheckboxAxes">Show axes</label>
2023-10-21 13:59:19 +02:00
<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-27 17:06:27 +02:00
<div id="noiseConfigContainerOuter">
<h2 class="configHeader"><span class="collapser" id="noiseConfigHeaderLink"></span> Noise parameters</h2>
2023-10-22 02:11:36 +02:00
<div class="configFrame" id="noiseConfigContainer">
2023-10-21 17:12:43 +02:00
<form id="noiseForm">
2023-10-27 17:06:27 +02:00
<h3>Heat (<code id="noiseSettingNameHeat">mg_biome_np_heat</code>)</h3>
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHeatOffset">Offset:&nbsp;</label>
2023-10-27 18:34:49 +02:00
<input id="inputNoiseHeatOffset" type="number" value="50" step=0.01 size="10">
2023-10-21 17:12:43 +02:00
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHeatScale">Scale:&nbsp;</label>
2023-10-27 18:34:49 +02:00
<input id="inputNoiseHeatScale" type="number" value="50" step=0.01 size="10">
2023-10-21 17:12:43 +02:00
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHeatOctaves">Octaves:&nbsp;</label>
2023-10-27 12:53:50 +02:00
<input id="inputNoiseHeatOctaves" type="number" value="3" step="1" min="1" max="65535" size="10">
2023-10-21 17:12:43 +02:00
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHeatPersistence">Persistence:&nbsp;</label>
2023-10-27 15:13:36 +02:00
<input id="inputNoiseHeatPersistence" type="number" value="0.5" step=0.01 size="10">
2023-10-21 17:12:43 +02:00
2023-10-27 17:06:27 +02:00
<h3>Humidity (<code id="noiseSettingNameHumidity">mg_biome_np_humidity</code>)</h3>
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHumidityOffset">Offset:&nbsp;</label>
2023-10-27 18:34:49 +02:00
<input id="inputNoiseHumidityOffset" type="number" value="50" step=0.01 size="10">
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHumidityScale">Scale:&nbsp;</label>
2023-10-27 18:34:49 +02:00
<input id="inputNoiseHumidityScale" type="number" value="50" step=0.01 size="10">
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHumidityOctaves">Octaves:&nbsp;</label>
2023-10-27 12:53:50 +02:00
<input id="inputNoiseHumidityOctaves" type="number" value="3" step="1" min="1" max="65535" size="10">
2023-10-24 16:06:15 +02:00
<label for="inputNoiseHumidityPersistence">Persistence:&nbsp;</label>
2023-10-27 15:13:36 +02:00
<input id="inputNoiseHumidityPersistence" type="number" value="0.5" step=0.01 size="10">
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>
</div>
2023-10-25 03:24:42 +02:00
2023-10-27 17:06:27 +02:00
<div id="importContainerOuter">
<h2 class="configHeader"><span class="collapser" id="importHeaderLink"></span> Import</h2>
<div class="configFrame" id="importContainer" style="display:none">
2023-10-25 03:24:42 +02:00
<form id="importForm">
2023-10-25 10:19:21 +02:00
<p><b>WARNING</b>: Importing will replace all the biomes!</p>
2023-10-25 03:24:42 +02:00
<label for="inputImport">Put JSON text here:</label>
<br>
2023-10-27 12:30:19 +02:00
<textarea id="inputImport" rows="12" cols="80"></textarea>
2023-10-25 03:24:42 +02:00
<br>
<button id="inputImportSubmit" type="button">Import</button>
2023-10-27 12:30:19 +02:00
<div id="importResultOuter" hidden><br><div id="importResultMessage"></div></div>
2023-10-25 03:24:42 +02:00
</form>
</div>
</div>
2023-10-27 17:06:27 +02:00
<div id="exportContainerOuter">
<h2 class="configHeader"><span class="collapser" id="exportHeaderLink"></span> Export</h2>
<div class="configFrame" id="exportContainer" style="display:none">
2023-10-25 03:24:42 +02:00
<form id="exportForm">
<div>
2023-10-27 16:24:18 +02:00
<button id="inputExportLua" type="button">Export as <span class="exportEmphasis">Lua</span></button>
<button id="inputExportJSON" type="button">Export as <span class="exportEmphasis">JSON</span></button>
<button id="inputExportAmidstForMinetest" type="button">Export as <span class="exportEmphasis">Amidst for Minetest</span> biome profile</button>
2023-10-25 03:24:42 +02:00
<button id="inputExportClear" type="button">Clear</button>
</div>
<div id="exportSectionOuter" hidden><br><span id="exportLabel"></span>
<pre id="exportSectionText"></pre>
</div>
</form>
2023-10-21 22:44:09 +02:00
</div>
2023-10-25 03:24:42 +02:00
</div>
2023-10-27 17:06:27 +02:00
2023-10-25 03:24:42 +02:00
</div>
2023-10-21 23:45:40 +02:00
<hr>
<div class="contentContainer">
<!-- footer -->
2023-10-24 23:43:33 +02:00
<p><a title="MiBPoV manual" href="./manual.html">Manual</a> | <a title="MiBPoV source code" href="https://codeberg.org/Wuzzy/MiBPoV">Source code</a> | <a title="MiBPoV bug tracker" href="https://codeberg.org/Wuzzy/MiBPoV/issues">Bug tracker</a> | <a title="License" href="./license.html">License</a></p>
<p>This is free software released under the <a title="License" href="./license.html">MIT License</a>. Code by <a title="Wuzzys Personal Website" href="https://wuzzy.codeberg.page/">Wuzzy</a>. Uses <a title="Javascript-Voronoi Git repository webpage" href="https://github.com/gorhill/Javascript-Voronoi/">Javascript-Voronoi</a> by <a title="Raymond Hills personal website" href="http://www.raymondhill.net/">Raymond Hill</a>.</p>
2023-10-21 23:45:40 +02:00
</div>
2023-10-23 01:48:15 +02:00
<!-- The main script handling all the UI stuff -->
<script src="./mibpov.js"></script>
2023-10-20 02:54:39 +02:00
</body>
</html>