189 lines
6.9 KiB
HTML
189 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
<link rel="icon" href="./favicon.png">
|
||
<link rel="stylesheet" href="./dark_style.css">
|
||
<title>MiBPoV—Minetest Biome Point Visualizer</title>
|
||
<!-- Include Voronoi diagram API, required to calculate Voronoi diagrams -->
|
||
<script src="./rhill-voronoi-core.js"></script>
|
||
</head>
|
||
|
||
|
||
<body>
|
||
<h1>MiBPoV—Minetest Biome Point Visualizer</h1>
|
||
<div class="contentContainer" id="noscriptContainer">
|
||
<noscript>
|
||
<div class="borderedWarning">
|
||
ERROR: This tool requires JavaScript to work, but JavaScript is disabled in your browser.
|
||
</div>
|
||
</noscript>
|
||
</div>
|
||
<!-- 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>
|
||
<div id="canvasContainer">
|
||
<canvas id="voronoiCanvas" width="500" height="500">
|
||
A Voronoi diagram is supposed to be here but for some reason it cannot be displayed. This tool is useless without this functionality.
|
||
</canvas>
|
||
</div>
|
||
<div id="diagramInfoContainer" class="borderedSection">
|
||
<span id="errorMessage" hidden></span>
|
||
<span id="altitudeDisplay"></span>
|
||
<br>
|
||
<span id="rangeDisplay"> </span>
|
||
<br>
|
||
<span id="coordinateDisplay"> </span>
|
||
<br>
|
||
</div>
|
||
<div>
|
||
<h2 class="configHeader"><span class="collapser" id="biomeConfigHeaderLink">▼</span> Biome configuration</h2>
|
||
<div id="biomeConfigContainer" class="configFrame">
|
||
<form id="biomeForm">
|
||
<div id="biomeSelectorContainer">
|
||
<h3>Biome list</h3>
|
||
<label for="biomeSelector">Biomes:<br>
|
||
<select id="biomeSelector" name="biomeList" size="8"></select>
|
||
</label>
|
||
<br>
|
||
<div id="biomeButtonContainer">
|
||
<button id="addBiomeButton" type="button">Add</button>
|
||
<button id="removeBiomeButton" type="button">Remove</button>
|
||
</div>
|
||
</div>
|
||
<div id="biomeEditElements">
|
||
<h3>Selected biome</h3>
|
||
<label for="inputBiomeName">Name: </label>
|
||
<input id="inputBiomeName" type="text">
|
||
|
||
<br>
|
||
|
||
<div id="biomeColorSection">
|
||
<label>Color: </label>
|
||
</div>
|
||
|
||
<br>
|
||
|
||
<label for="inputHeat">Heat: </label>
|
||
<input id="inputHeat" type="number" value="50" step="1">
|
||
<label for="inputHumidity">Humidity: </label>
|
||
<input id="inputHumidity" type="number" value="50" step="1">
|
||
|
||
<br>
|
||
|
||
<label for="inputMinY">Min. Y: </label>
|
||
<input id="inputMinY" type="number" value="-31000" step="1">
|
||
<label for="inputMaxY">Max. Y: </label>
|
||
<input id="inputMaxY" type="number" value="31000" step="1">
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<div>
|
||
<h2 class="configHeader"><span class="collapser" id="viewConfigHeaderLink">▼</span> Diagram view settings</h2>
|
||
<div id="viewConfigContainer" class="configFrame">
|
||
<form id="viewForm">
|
||
<label for="inputViewY">Altitude: </label>
|
||
<input id="inputViewY" type="number" value="0" step="1">
|
||
|
||
<br>
|
||
|
||
<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="inputCheckboxAxes" type="checkbox">
|
||
<label for="inputCheckboxAxes">Show axes</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>
|
||
<div>
|
||
<h2 class="configHeader"><span class="collapser" id="noiseConfigHeaderLink">▼</span> Noise parameters</h2>
|
||
<div class="configFrame" id="noiseConfigContainer">
|
||
<form id="noiseForm">
|
||
<h3>Heat (<code>mg_biome_np_heat</code>)</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 (<code>mg_biome_np_humidity</code>)</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>
|
||
|
||
<h3>Reset</h3>
|
||
<button id="inputNoiseReset" type="button">Reset noise parameters</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div>
|
||
<h2 class="configHeader"><span class="collapser" id="importHeaderLink">▶</span> Import</h2>
|
||
<div class="configFrame" id="importContainer" style="display:none">
|
||
<form id="importForm">
|
||
<p><b>WARNING</b>: Importing will replace all the biomes!</p>
|
||
<label for="inputImport">Put JSON text here:</label>
|
||
<br>
|
||
<textarea id="inputImport" type="text" rows="12" cols="80"></textarea>
|
||
<br>
|
||
<button id="inputImportSubmit" type="button">Import</button>
|
||
<div id="importResultOuter" hidden><br><div id="importResultMessage"></div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div>
|
||
<h2 class="configHeader"><span class="collapser" id="exportHeaderLink">▶</span> Export</h2>
|
||
<div class="configFrame" id="exportContainer" style="display:none">
|
||
<form id="exportForm">
|
||
<div>
|
||
<button id="inputExportLua" type="button">Export as Lua</button>
|
||
<button id="inputExportJSON" type="button">Export as JSON</button>
|
||
<button id="inputExportAmidstForMinetest" type="button">Export as Amidst for Minetest biome profile</button>
|
||
<button id="inputExportClear" type="button">Clear</button>
|
||
</div>
|
||
<div id="exportSectionOuter" hidden><br><span id="exportLabel"></span>
|
||
<pre id="exportSectionText"></pre>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
<div class="contentContainer">
|
||
<!-- footer -->
|
||
<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="Wuzzy’s 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 Hill’s personal website" href="http://www.raymondhill.net/">Raymond Hill</a>.</p>
|
||
</div>
|
||
|
||
<!-- The main script handling all the UI stuff -->
|
||
<script src="./mibpov.js"></script>
|
||
|
||
</body>
|
||
</html>
|