220 lines
8.4 KiB
HTML
220 lines
8.4 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>LiBPoV—Luanti Biome Point Visualizer</title>
|
||
<!-- Include Voronoi diagram API, required to calculate Voronoi diagrams -->
|
||
<script src="./rhill-voronoi-core.js"></script>
|
||
</head>
|
||
|
||
|
||
<body>
|
||
<h1>LiBPoV—Luanti 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="modeContainer">
|
||
<button id="modernModeButton" type="button" class="activeBiomeModeButton">Biome points</button>
|
||
<button id="v6ModeButton" type="button">v6 biomes</button>
|
||
</div>
|
||
|
||
<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 id="biomeConfigContainerOuter">
|
||
<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" size="45">
|
||
|
||
<br>
|
||
|
||
<div id="biomeColorSection">
|
||
<label>Color: </label>
|
||
</div>
|
||
|
||
<br>
|
||
|
||
<label for="inputHeat">Heat: </label>
|
||
<input id="inputHeat" class="numInput" type="number" value="50" step="1" min="-1e6" max="1e6">
|
||
<label for="inputHumidity">Humidity: </label>
|
||
<input id="inputHumidity" class="numInput" type="number" value="50" step="1" min="-1e6" max="1e6">
|
||
|
||
<br>
|
||
|
||
<label for="inputMinY">Min. Y: </label>
|
||
<input id="inputMinY" class="numInput" type="number" value="-31000" step="1">
|
||
<label for="inputMaxY">Max. Y: </label>
|
||
<input id="inputMaxY" class="numInput" type="number" value="31000" step="1">
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="biomeV6ConfigContainerOuter" hidden>
|
||
<h2 class="configHeader"><span class="collapser" id="biomeV6ConfigHeaderLink">▼</span> 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: </label>
|
||
<input id="inputV6FreqDesert" class="numInput" type="number" value="0.45" step="0.01" disabled>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="viewConfigContainerOuter">
|
||
<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" class="numInput" 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 id="noiseConfigContainerOuter">
|
||
<h2 class="configHeader"><span class="collapser" id="noiseConfigHeaderLink">▼</span> Noise parameters</h2>
|
||
<div class="configFrame" id="noiseConfigContainer">
|
||
<form id="noiseForm">
|
||
<h3>Heat (<code id="noiseSettingNameHeat">mg_biome_np_heat</code>)</h3>
|
||
<label for="inputNoiseHeatOffset">Offset: </label>
|
||
<input id="inputNoiseHeatOffset" class="numInput" type="number" value="50" step=0.01>
|
||
|
||
<label for="inputNoiseHeatScale">Scale: </label>
|
||
<input id="inputNoiseHeatScale" class="numInput" type="number" value="50" step=0.01>
|
||
|
||
<label for="inputNoiseHeatOctaves">Octaves: </label>
|
||
<input id="inputNoiseHeatOctaves" class="numInput" type="number" value="3" step="1" min="1" max="65535">
|
||
|
||
<label for="inputNoiseHeatPersistence">Persistence: </label>
|
||
<input id="inputNoiseHeatPersistence" class="numInput" type="number" value="0.5" step=0.01>
|
||
|
||
<h3>Humidity (<code id="noiseSettingNameHumidity">mg_biome_np_humidity</code>)</h3>
|
||
<label for="inputNoiseHumidityOffset">Offset: </label>
|
||
<input id="inputNoiseHumidityOffset" class="numInput" type="number" value="50" step=0.01>
|
||
|
||
<label for="inputNoiseHumidityScale">Scale: </label>
|
||
<input id="inputNoiseHumidityScale" class="numInput" type="number" value="50" step=0.01>
|
||
|
||
<label for="inputNoiseHumidityOctaves">Octaves: </label>
|
||
<input id="inputNoiseHumidityOctaves" class="numInput" type="number" value="3" step="1" min="1" max="65535">
|
||
|
||
<label for="inputNoiseHumidityPersistence">Persistence: </label>
|
||
<input id="inputNoiseHumidityPersistence" class="numInput" type="number" value="0.5" step=0.01>
|
||
|
||
<h3>Reset</h3>
|
||
<button id="inputNoiseReset" type="button">Reset noise parameters</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="importContainerOuter">
|
||
<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" rows="12" cols="80"></textarea>
|
||
<br>
|
||
<button id="inputImportSubmit" type="button">Import</button>
|
||
<div id="importResultOuter" hidden><br><div id="importResultMessage"></div></div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="exportContainerOuter">
|
||
<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 <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>
|
||
<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="LiBPoV manual" href="./manual.html">Manual</a> | <a title="LiBPoV source code" href="https://codeberg.org/Wuzzy/LiBPoV">Source code</a> | <a title="LiBPoV bug tracker" href="https://codeberg.org/Wuzzy/LiBPoV/issues">Bug tracker</a> | <a title="License" data-jslicense="1" 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="./libpov.js"></script>
|
||
|
||
</body>
|
||
</html>
|