Revert "Checking in this because I'm not sure why it's not working"

This reverts commit 6e2036ac7d2c04d184715d2b6fa93a5b3ede8bfd.
This commit is contained in:
Mike Lynch 2025-04-06 15:49:25 +10:00
parent 6e2036ac7d
commit 6c42510a7d
2 changed files with 7 additions and 5 deletions

View File

@ -99,7 +99,7 @@ class DotMaker {
// case "hyper-out": // case "hyper-out":
// return 2 * maxr * Math.abs(d.x - this.cx) (d.y - this.cy)) / this.width; // return 2 * maxr * Math.abs(d.x - this.cx) (d.y - this.cy)) / this.width;
// case "hyper-in": // case "hyoer-in":
// return 2 * maxr * (0.5 * this.width - distance((d.x - this.cx), (d.y - this.cy))) / this.width; // return 2 * maxr * (0.5 * this.width - distance((d.x - this.cx), (d.y - this.cy))) / this.width;
case "noise": case "noise":

View File

@ -25,12 +25,15 @@ import random from "npm:random";
import * as resvg from 'npm:@resvg/resvg-wasm'; import * as resvg from 'npm:@resvg/resvg-wasm';
const CELL = 10; const CELL = 10;
const mag = 2; const MAG = 2;
const WIDTH = 20; const WIDTH = 20;
const HEIGHT = WIDTH; const HEIGHT = WIDTH;
const cell = view(Inputs.range([1,20], {value: 10, step:0.1, label: "Cell size"})); const cell = view(Inputs.range([1,20], {value: 10, step:1, label: "Cell size"}));
const aspect = view(Inputs.range([0.1,10], {value: 1, step:0.1, label: "Aspect ratio"})); const mag = view(Inputs.range([1,5], {value: 2, step:1, label: "Magnificaton"}));
const width = view(Inputs.range([1,40], {value: 20, step:1, label: "Width"}));
const height = view(Inputs.range([1,40], {value: 20, step:1, label: "Height"}));
``` ```
@ -124,7 +127,6 @@ if( palette_fn ) {
```js ```js
const height = width / aspect;
const dm = new DotMaker(width, height); const dm = new DotMaker(width, height);
const dots1 = dm.dots(1 / m1, n1, false); const dots1 = dm.dots(1 / m1, n1, false);