feat: add octaves to noise node
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m8s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m8s
This commit is contained in:
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user