Generate canvas tiles using 2d noise from seed. Major/minor pass preserves primary detail quadrants cross-resolution.
seed
-- Start value for recursive noise. Default is Math.random().size
-- Size of canvas. Default is 64.count
-- Total canvases. Default is 1.
import { seedmap } from "./seedmap.js";
// parameters
let seed = Math.random();
let size = 64;
let count = 2;
// run...
let res = seedmap(seed, size, count);
console.log(res)
{
dat: {pos: 4800, neg: 6400, time: 24.0},
map: [canvas, canvas],
max: 64,
min: 4,
seed: 12345678,
}
sequenceDiagram
loop count
Major->>+Minor: seed
Minor-->Minor: quadrant/2
end
Note over Major,Minor: composite