Can enter arbitrary noise values again

This commit is contained in:
Wuzzy 2023-10-27 15:13:36 +02:00
parent 1f78957383
commit 1452d5eb50
2 changed files with 6 additions and 9 deletions

View File

@ -110,29 +110,29 @@ A Voronoi diagram is supposed to be here but for some reason it cannot be displa
<form id="noiseForm">
<h3>Heat (<code>mg_biome_np_heat</code>)</h3>
<label for="inputNoiseHeatOffset">Offset:&nbsp;</label>
<input id="inputNoiseHeatOffset" type="number" value="50" size="10" min="-1e7" max="1e7">
<input id="inputNoiseHeatOffset" type="number" value="50" size="10">
<label for="inputNoiseHeatScale">Scale:&nbsp;</label>
<input id="inputNoiseHeatScale" type="number" value="50" size="10" min="-1e7" max="1e7">
<input id="inputNoiseHeatScale" type="number" value="50" size="10">
<label for="inputNoiseHeatOctaves">Octaves:&nbsp;</label>
<input id="inputNoiseHeatOctaves" type="number" value="3" step="1" min="1" max="65535" size="10">
<label for="inputNoiseHeatPersistence">Persistence:&nbsp;</label>
<input id="inputNoiseHeatPersistence" type="number" value="0.5" step=0.01 size="10" min="-1e7" max="1e7">
<input id="inputNoiseHeatPersistence" type="number" value="0.5" step=0.01 size="10">
<h3>Humidity (<code>mg_biome_np_humidity</code>)</h3>
<label for="inputNoiseHumidityOffset">Offset:&nbsp;</label>
<input id="inputNoiseHumidityOffset" type="number" value="50" size="10" min="-1e7" max="1e7">
<input id="inputNoiseHumidityOffset" type="number" value="50" size="10">
<label for="inputNoiseHumidityScale">Scale:&nbsp;</label>
<input id="inputNoiseHumidityScale" type="number" value="50" size="10" min="-1e7" max="1e7">
<input id="inputNoiseHumidityScale" type="number" value="50" size="10">
<label for="inputNoiseHumidityOctaves">Octaves:&nbsp;</label>
<input id="inputNoiseHumidityOctaves" type="number" value="3" step="1" min="1" max="65535" size="10">
<label for="inputNoiseHumidityPersistence">Persistence:&nbsp;</label>
<input id="inputNoiseHumidityPersistence" type="number" value="0.5" step=0.01 size="10" min="-1e7" max="1e7">
<input id="inputNoiseHumidityPersistence" type="number" value="0.5" step=0.01 size="10">
<h3>Reset</h3>
<button id="inputNoiseReset" type="button">Reset noise parameters</button>

View File

@ -1679,9 +1679,6 @@ function updateNoiseParam(noiseName, noiseValueName, element) {
return;
}
let val = +element.value;
if (val < +element.min || val > +element.max) {
return;
}
noises[noiseName][noiseValueName] = val;
clear();
updateAreaVars();