From 59ec67e8509820e3db444d6a2d4f207a5dd3ea1a Mon Sep 17 00:00:00 2001 From: arne Date: Sun, 21 Jul 2024 00:47:18 +0200 Subject: [PATCH] Even randomer --- src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 906342a..934d9ee 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,8 +13,10 @@ const height_ = 594 const cellSize_ = 12 const padding_ = 5 // * cellSize -const xSeeds_ = Math.random().toString(2).substring(46, 54) -const ySeeds_ = Math.random().toString(2).substring(46, 54) +const randomSeed = () => Math.random().toString(2).split('.').pop()!.slice(Math.floor(Math.random() * -9)) + +const xSeeds_ = randomSeed() +const ySeeds_ = randomSeed() const unit_ = 'mm' // turn these into reactive values to trigger re-rendering on change