feat: add octaves to noise node
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m8s

This commit is contained in:
2024-04-30 13:15:56 +02:00
parent 43493522bd
commit eafc9c99c8
11 changed files with 51 additions and 82 deletions

View File

@@ -69,10 +69,10 @@
function handleMouseMove(ev: MouseEvent) {
if (!ev.ctrlKey && typeof min === "number" && typeof max === "number") {
const vx = (ev.clientX - rect.left) / rect.width;
value = Math.max(Math.min(Math.floor(min + (max - min) * vx), max), min);
value = Math.max(Math.min(Math.round(min + (max - min) * vx), max), min);
} else {
const vx = ev.clientX - downX;
value = downV + Math.floor(vx / 10);
value = downV + Math.round(vx / 10);
}
}
</script>