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

@ -52,7 +52,7 @@ body {
/* Secondary color */
--secondary-color: #6c757d;
--layer-0: var(--neutral-800);
--layer-0: var(--neutral-900);
--layer-1: var(--neutral-500);
--layer-2: var(--neutral-400);
--layer-3: var(--neutral-200);

View File

@ -1,6 +1,5 @@
<script lang="ts">
import { createEventDispatcher } from "svelte";
import { getBoundingValue } from "../helpers/getBoundingValue.js";
export let value = 0.5;
export let step = 0.01;

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>