From 9a21d4f7863a55919c3b856d87511d5b07f4b1a5 Mon Sep 17 00:00:00 2001 From: tim h Date: Thu, 24 Nov 2022 00:02:04 -0600 Subject: [PATCH] tweak to overmask """formula""", updates it for fancy new slider Former-commit-id: 9ecd7c40e154270e66eb36677f64656cc616cdb0 --- js/ui/tool/dream.js | 4 +++- js/ui/toolbar.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index 36fbc05..b3bbef2 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -108,7 +108,9 @@ function applyOvermask(canvas, ctx, px) { omCtx.arc( (i / 4) % tmpOvermaskCanvas.width, Math.floor(i / 4 / tmpOvermaskCanvas.width), - scaleFactor + rando, // was 4 * sf + rando, too big + scaleFactor + + rando + + (rando > scaleFactor ? rando / scaleFactor : scaleFactor / rando), // was 4 * sf + rando, too big, but i think i want it more ... random 0, 2 * Math.PI, true diff --git a/js/ui/toolbar.js b/js/ui/toolbar.js index 0aa31c4..a45d186 100644 --- a/js/ui/toolbar.js +++ b/js/ui/toolbar.js @@ -223,11 +223,11 @@ tools.dream = toolbar.registerTool( state.ctxmenu.overMaskPxLabel = _toolbar_input.slider( state, "overMaskPx", - "Overmask px (0 to disable):", + "Overmask px", 0, 128, 1 - ).label; + ).slider; } menu.appendChild(state.ctxmenu.snapToGridLabel);