interface: set charge magnitude

This commit is contained in:
root 2025-04-27 10:05:59 +00:00
parent 642d1c5cdd
commit be6d6ba000
2 changed files with 19 additions and 2 deletions

View file

@ -68,10 +68,16 @@ aside > container > div {
<body>
<aside class="js">
<container>
<div style="width:100%">
<div>
<button onclick="toggle_physics()">Physics</button>
<input id="checkbox-physics" type="checkbox" disabled>
</div>
<form style="display:grid;grid-template-columns:1fr auto;gap:5px;">
<input id="input-charge" type="range" min="-1.5" max="1.5" step="0.25"
style="min-width:100px;max-width:128px;"
oninput="set_charge(-Math.pow(10, input_charge.valueAsNumber))">
<input type="reset">
</form>
<div>
<button onclick="toggle_skeleton()">Skeleton</button>
<input id="checkbox-skeleton" type="checkbox" disabled>
@ -108,6 +114,10 @@ Source code: <a href="https://git.atomic.garden/root/sphere-electrons">https://g
</noscript>
<script src="thomson-problem.js"></script>
<script src="sketch.js"></script>
<script>document.querySelectorAll(".js").forEach(e => e.style = "display:initial");</script>
<script>
document.querySelectorAll(".js").forEach(e => e.style = "display:initial");
const input_charge = document.getElementById("input-charge");
input_charge.oninput();
</script>
</body>
</html>