@logomarks/generate 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/LICENSE +21 -0
- package/README.md +46 -2
- package/package.json +29 -4
- package/src/controls.js +41 -0
- package/src/draw.js +60 -0
- package/src/finish.js +172 -0
- package/src/generate.js +274 -0
- package/src/guard.js +66 -0
- package/src/index.d.ts +111 -0
- package/src/index.js +10 -0
- package/src/presets.js +37 -0
- package/src/random.js +23 -0
- package/src/raster.js +52 -0
- package/src/recipes/arcs.js +83 -0
- package/src/recipes/arcstep.js +45 -0
- package/src/recipes/bands.js +90 -0
- package/src/recipes/bars.js +106 -0
- package/src/recipes/bite.js +65 -0
- package/src/recipes/blades.js +38 -0
- package/src/recipes/bloom.js +53 -0
- package/src/recipes/burst.js +44 -0
- package/src/recipes/capsules.js +36 -0
- package/src/recipes/chevrons.js +45 -0
- package/src/recipes/cut.js +80 -0
- package/src/recipes/flare.js +39 -0
- package/src/recipes/halfsq.js +53 -0
- package/src/recipes/hex.js +58 -0
- package/src/recipes/horizon.js +51 -0
- package/src/recipes/index.js +95 -0
- package/src/recipes/invert.js +40 -0
- package/src/recipes/iso.js +35 -0
- package/src/recipes/leaves.js +45 -0
- package/src/recipes/letter.js +204 -0
- package/src/recipes/links.js +63 -0
- package/src/recipes/lobes.js +28 -0
- package/src/recipes/loops.js +28 -0
- package/src/recipes/pixelarc.js +51 -0
- package/src/recipes/rings.js +82 -0
- package/src/recipes/route.js +107 -0
- package/src/recipes/seam.js +30 -0
- package/src/recipes/shear.js +61 -0
- package/src/recipes/spiral.js +42 -0
- package/src/recipes/split.js +54 -0
- package/src/recipes/stack.js +71 -0
- package/src/recipes/steps.js +35 -0
- package/src/recipes/stripes.js +66 -0
- package/src/recipes/strips.js +39 -0
- package/src/recipes/tiles.js +60 -0
- package/src/recipes/trine.js +37 -0
- package/src/recipes/turns.js +41 -0
- package/src/recipes/twin.js +64 -0
- package/src/recipes/venn.js +54 -0
- package/src/recipes/wavecut.js +36 -0
- package/src/recipes/waves.js +40 -0
- package/src/shapes.js +54 -0
- package/src/tuning.js +67 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Venn: two to four circles or squares overlapping in a row, a triangle, a square or round a ring, combined by ONE
|
|
3
|
+
* rule: exclusive-or (where they overlap is cut away), each laid over the one before with a gap round it, or the
|
|
4
|
+
* overlaps knocked out by the gap. How far they overlap is a control. After overlapping-disc and interlocking-square
|
|
5
|
+
* marks.
|
|
6
|
+
*/
|
|
7
|
+
import { U, D, X, I, circle, rect, rr, grown } from '@logomarks/core/geometry';
|
|
8
|
+
import { over } from '@logomarks/core/geometry';
|
|
9
|
+
import { BOX, GAP, tidy } from '../draw.js';
|
|
10
|
+
|
|
11
|
+
/** @type {import('../index.js').Control[]} */
|
|
12
|
+
export const controls = [
|
|
13
|
+
{ key: 'count', label: 'Shapes', type: 'range', min: 2, max: 4, step: 1, value: 3 },
|
|
14
|
+
{ key: 'shape', label: 'Shape', type: 'choice', options: ['circle', 'square', 'rounded'], value: 'circle' },
|
|
15
|
+
{ key: 'layout', label: 'Layout', type: 'choice', options: ['row', 'triangle', 'square', 'ring'], value: 'triangle' },
|
|
16
|
+
{ key: 'overlap', label: 'Overlap', type: 'range', min: 0.15, max: 0.6, step: 0.01, value: 0.38 },
|
|
17
|
+
{ key: 'combine', label: 'Combine', type: 'choice', options: ['xor', 'over', 'knockout'], value: 'xor' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
/** The centres for `n` shapes of radius r overlapping by `o` (a share of the diameter), before fitting. */
|
|
21
|
+
function centres(layout, n, r, o) {
|
|
22
|
+
const d = 2 * r * (1 - o);
|
|
23
|
+
if (layout === 'row') return Array.from({ length: n }, (_, k) => [(k - (n - 1) / 2) * d, 0]);
|
|
24
|
+
if (layout === 'square' && n === 4) return [[-d / 2, -d / 2], [d / 2, -d / 2], [d / 2, d / 2], [-d / 2, d / 2]];
|
|
25
|
+
// triangle (and ring, and square for 2 or 3): round a circle so neighbours sit d apart
|
|
26
|
+
const R = n === 2 ? d / 2 : d / (2 * Math.sin(Math.PI / n)), start = layout === 'ring' ? 0 : -90;
|
|
27
|
+
return Array.from({ length: n }, (_, k) => { const a = ((start + (360 * k) / n) * Math.PI) / 180; return [R * Math.cos(a), R * Math.sin(a)]; });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** One shape of radius r at (x, y). */
|
|
31
|
+
function one(kind, x, y, r) {
|
|
32
|
+
if (kind === 'square') return rect(x - r, y - r, 2 * r, 2 * r);
|
|
33
|
+
if (kind === 'rounded') return rr(x - r, y - r, 2 * r, 2 * r, r * 0.35);
|
|
34
|
+
return circle(x, y, r, 128);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** The mark for resolved params. */
|
|
38
|
+
export function build(p) {
|
|
39
|
+
const n = p.count, r = 100, cs = centres(p.layout, n, r, p.overlap);
|
|
40
|
+
const shapes = cs.map(([x, y]) => one(p.shape, BOX.cx + x, BOX.cy + y, r));
|
|
41
|
+
let s = shapes[0];
|
|
42
|
+
for (const q of shapes.slice(1)) {
|
|
43
|
+
if (p.combine === 'xor') s = X(s, q);
|
|
44
|
+
else if (p.combine === 'over') s = over(s, q, GAP);
|
|
45
|
+
else s = U(D(s, grown(q, GAP / 2)), D(q, grown(s, GAP / 2))); // knockout: every overlap cut away with a gap
|
|
46
|
+
}
|
|
47
|
+
if (p.combine === 'knockout') {
|
|
48
|
+
// knockout drawn pairwise: the overlap of any two goes, parted by the gap
|
|
49
|
+
const ov = [];
|
|
50
|
+
for (let i = 0; i < n; i++) for (let j = i + 1; j < n; j++) ov.push(I(shapes[i], shapes[j]));
|
|
51
|
+
s = D(U(...shapes), grown(U(...ov), GAP / 2));
|
|
52
|
+
}
|
|
53
|
+
return tidy(s);
|
|
54
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Squiggle: one solid cut in two by a wavy line, or with one edge worn into a wave and a loose squiggle running beside
|
|
3
|
+
* it. At least a wave and a half: a single S through a disc is a known symbol.
|
|
4
|
+
*/
|
|
5
|
+
import { U, D, I, rect, circle, rr, regular, poly, rot, stroke } from '@logomarks/core/geometry';
|
|
6
|
+
import { BOX, GAP, tidy } from '../draw.js';
|
|
7
|
+
|
|
8
|
+
/** @type {import('../index.js').Control[]} */
|
|
9
|
+
export const controls = [
|
|
10
|
+
{ key: 'body', label: 'Body', type: 'choice', options: ['disc', 'rounded', 'square', 'hexagon'], value: 'disc' },
|
|
11
|
+
{ key: 'move', label: 'Move', type: 'choice', options: ['split', 'edge'], value: 'split' },
|
|
12
|
+
{ key: 'waves', label: 'Waves', type: 'range', min: 1.5, max: 3.5, step: 0.5, value: 2 },
|
|
13
|
+
{ key: 'swell', label: 'Wave height', type: 'range', min: 0.05, max: 0.13, step: 0.005, value: 0.09 },
|
|
14
|
+
{ key: 'at', label: 'Position', type: 'range', min: 0.3, max: 0.7, step: 0.01, value: 0.5 },
|
|
15
|
+
{ key: 'angle', label: 'Angle', type: 'choice', options: ['0', '45', '90', '135'], value: '0' },
|
|
16
|
+
{ key: 'spacing', label: 'Gap', type: 'range', min: 1, max: 2.2, step: 0.1, value: 1.3 },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
/** A level wave line across the canvas at height y. */
|
|
20
|
+
const wave = (y, waves, amp) => Array.from({ length: 241 }, (_, i) => { const t = i / 240, x = BOX.x0 - 60 + t * (BOX.size + 120); return [x, y + amp * Math.sin(((x - BOX.x0) / BOX.size) * waves * 2 * Math.PI)]; });
|
|
21
|
+
|
|
22
|
+
/** The mark for resolved params. */
|
|
23
|
+
export function build(p) {
|
|
24
|
+
const { cx, cy, x0, y0, size } = BOX, R = size / 2, g = GAP * p.spacing, amp = p.swell * size;
|
|
25
|
+
const body = p.body === 'rounded' ? rr(x0, y0, size, size, size * 0.2) : p.body === 'square' ? rect(x0, y0, size, size) : p.body === 'hexagon' ? regular(cx, cy, R * 1.06, 6, 0) : circle(cx, cy, R, 128);
|
|
26
|
+
const y = y0 + size * p.at, line = wave(y, p.waves, amp);
|
|
27
|
+
let s;
|
|
28
|
+
if (p.move === 'split') s = D(body, stroke(line, g, { chunk: 8 }));
|
|
29
|
+
else {
|
|
30
|
+
// everything below the wave goes; a squiggle of the band's own weight runs beside the worn edge
|
|
31
|
+
const w = Math.max(GAP * 1.5, size * 0.085), below = poly([...line, [BOX.x1 + 60, BOX.y1 + 90], [x0 - 60, BOX.y1 + 90]]);
|
|
32
|
+
const kept = D(body, below), free = I(stroke(wave(y + g + w / 2 + 2, p.waves, amp), w, { chunk: 8 }), rect(x0, y0 - 9, size, 2 * size));
|
|
33
|
+
s = U(D(kept, stroke(line, 2, { chunk: 8 })), I(free, rect(cx - R * 0.86, y0, R * 1.72, 2 * size)));
|
|
34
|
+
}
|
|
35
|
+
return tidy(rot(s, Number(p.angle), cx, cy));
|
|
36
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Waves: two to six wavy bands, the house gap between them, each a sine of its own phase (step it for a twist, or keep
|
|
3
|
+
* it for parallel waves), clipped to a square, a disc or nothing. After stacked waves, Havyon-style triple waves and wavy
|
|
4
|
+
* stripes.
|
|
5
|
+
*/
|
|
6
|
+
import { U, I, poly, rect, circle } from '@logomarks/core/geometry';
|
|
7
|
+
import { BOX, GAP } from '../draw.js';
|
|
8
|
+
|
|
9
|
+
/** @type {import('../index.js').Control[]} */
|
|
10
|
+
export const controls = [
|
|
11
|
+
{ key: 'count', label: 'Bands', type: 'range', min: 2, max: 6, step: 1, value: 3 },
|
|
12
|
+
{ key: 'weight', label: 'Weight', type: 'range', min: 0.4, max: 0.85, step: 0.01, value: 0.6 },
|
|
13
|
+
{ key: 'amplitude', label: 'Height', type: 'range', min: 0.02, max: 0.2, step: 0.005, value: 0.08 },
|
|
14
|
+
{ key: 'waves', label: 'Waves across', type: 'range', min: 0.5, max: 3, step: 0.25, value: 1 },
|
|
15
|
+
{ key: 'phase', label: 'Phase step', type: 'range', min: 0, max: 180, step: 5, value: 0 },
|
|
16
|
+
{ key: 'clip', label: 'Clip', type: 'choice', options: ['none', 'square', 'circle'], value: 'none' },
|
|
17
|
+
{ key: 'ends', label: 'Ends', type: 'choice', options: ['square', 'round'], value: 'round' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
/** The mark for resolved params. */
|
|
21
|
+
export function build(p) {
|
|
22
|
+
const n = p.count, A = p.amplitude * BOX.size, span = BOX.size - 2 * A;
|
|
23
|
+
const pitch = span / n, gap = Math.max(GAP, pitch * (1 - p.weight)), t = pitch - gap, parts = [], steps = 80;
|
|
24
|
+
const clip = p.clip !== 'none';
|
|
25
|
+
const x0 = clip ? BOX.x0 - 40 : BOX.x0, x1 = clip ? BOX.x1 + 40 : BOX.x1;
|
|
26
|
+
for (let k = 0; k < n; k++) {
|
|
27
|
+
const yc = BOX.y0 + A + k * pitch + t / 2, ph = (p.phase * k * Math.PI) / 180;
|
|
28
|
+
const y = (x) => yc + A * Math.sin(((x - BOX.x0) / BOX.size) * Math.PI * 2 * p.waves + ph);
|
|
29
|
+
const xs = Array.from({ length: steps + 1 }, (_, i) => x0 + ((x1 - x0) * i) / steps);
|
|
30
|
+
const r = p.ends === 'round' && !clip ? t / 2 : 0;
|
|
31
|
+
const xa = x0 + r, xb = x1 - r, xr = xs.filter((x) => x >= xa && x <= xb);
|
|
32
|
+
const band = [poly([...xr.map((x) => [x, y(x) - t / 2]), ...xr.slice().reverse().map((x) => [x, y(x) + t / 2])])];
|
|
33
|
+
if (r) band.push(circle(xa, y(xa), r, 40), circle(xb, y(xb), r, 40));
|
|
34
|
+
parts.push(U(...band));
|
|
35
|
+
}
|
|
36
|
+
const s = U(...parts);
|
|
37
|
+
if (p.clip === 'square') return I(s, rect(BOX.x0, BOX.y0, BOX.size, BOX.size));
|
|
38
|
+
if (p.clip === 'circle') return I(s, circle(BOX.cx, BOX.cy, BOX.size / 2, 128));
|
|
39
|
+
return s;
|
|
40
|
+
}
|
package/src/shapes.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The primitive shapes the recipes stack, turn and tile: each drawn inside a box (x, y, w, h) and turned a number of
|
|
3
|
+
* quarter turns about the box's centre.
|
|
4
|
+
*/
|
|
5
|
+
import { U, D, I, rect, poly, circle, ellipse, rot, mapPts } from '@logomarks/core/geometry';
|
|
6
|
+
|
|
7
|
+
/** Every primitive's name, in the order a picker lists them. */
|
|
8
|
+
export const PRIMITIVES = ['square', 'circle', 'half', 'quarter', 'triangle', 'parallelogram', 'pill', 'ring', 'arch', 'chevron', 'diamond', 'leaf'];
|
|
9
|
+
|
|
10
|
+
/** A quarter circle's points from angle a0 to a1 (degrees) round (cx, cy) at radius r. */
|
|
11
|
+
function arc(cx, cy, r, a0, a1, n = 32) {
|
|
12
|
+
return Array.from({ length: n + 1 }, (_, i) => {
|
|
13
|
+
const a = ((a0 + ((a1 - a0) * i) / n) * Math.PI) / 180;
|
|
14
|
+
return [cx + r * Math.cos(a), cy + r * Math.sin(a)];
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** An ellipse or circle filling a box. */
|
|
19
|
+
function oval(x, y, w, h) {
|
|
20
|
+
return Math.abs(w - h) < 0.5 ? circle(x + w / 2, y + h / 2, w / 2, 96) : ellipse(x + w / 2, y + h / 2, w / 2, h / 2, 0, 96);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Primitive `type` in the box (x, y, w, h), turned `turns` quarter turns about the box's centre. */
|
|
24
|
+
export function primitive(type, x, y, w, h, turns = 0) {
|
|
25
|
+
const s = draw(type, x, y, w, h);
|
|
26
|
+
const t = ((turns % 4) + 4) % 4;
|
|
27
|
+
if (!t) return s;
|
|
28
|
+
// a quarter turn of a non-square box would spill out of it: squash back to the box
|
|
29
|
+
const cx = x + w / 2, cy = y + h / 2, turned = rot(s, 90 * t, cx, cy);
|
|
30
|
+
if (t % 2 === 0 || Math.abs(w - h) < 0.5) return turned;
|
|
31
|
+
return mapPts(turned, ([px, py]) => [cx + ((px - cx) * w) / h, cy + ((py - cy) * h) / w]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The primitive, unturned. */
|
|
35
|
+
function draw(type, x, y, w, h) {
|
|
36
|
+
const x1 = x + w, y1 = y + h, cx = x + w / 2, cy = y + h / 2, m = Math.min(w, h);
|
|
37
|
+
switch (type) {
|
|
38
|
+
case 'circle': return oval(x, y, w, h);
|
|
39
|
+
case 'half': return poly([[x, y1], ...arc(cx, y1, w / 2, 180, 360).map(([px, py]) => [px, y1 - ((y1 - py) * h) / (w / 2)])]);
|
|
40
|
+
case 'quarter': return poly([[x, y1], ...arc(x, y1, 1, 270, 360).map(([px, py]) => [x + (px - x) * w, y1 + (py - y1) * h])]);
|
|
41
|
+
case 'triangle': return poly([[x, y1], [cx, y], [x1, y1]]);
|
|
42
|
+
case 'parallelogram': { const d = Math.min(w * 0.45, h); return poly([[x, y1], [x1 - d, y1], [x1, y], [x + d, y]]); }
|
|
43
|
+
case 'pill': return w >= h ? U(rect(x + h / 2, y, w - h, h), circle(x + h / 2, cy, h / 2, 64), circle(x1 - h / 2, cy, h / 2, 64)) : U(rect(x, y + w / 2, w, h - w), circle(cx, y + w / 2, w / 2, 64), circle(cx, y1 - w / 2, w / 2, 64));
|
|
44
|
+
case 'ring': { const t = m * 0.3; return D(oval(x, y, w, h), oval(x + t, y + t, w - 2 * t, h - 2 * t)); }
|
|
45
|
+
case 'arch': { const t = m * 0.32, r = w / 2; const outer = U(rect(x, y + r, w, Math.max(0, h - r)), I(circle(cx, y + r, r, 96), rect(x, y, w, r))); const ir = r - t; return ir > 4 ? D(outer, U(rect(x + t, y + r, w - 2 * t, h), I(circle(cx, y + r, ir, 96), rect(x + t, y + t, w - 2 * t, r)))) : outer; }
|
|
46
|
+
case 'chevron': { const t = m * 0.36; return poly([[x, y1], [cx, y], [x1, y1], [x1 - t * 1.1, y1], [cx, y + t * 1.6], [x + t * 1.1, y1]]); }
|
|
47
|
+
case 'diamond': return poly([[cx, y], [x1, cy], [cx, y1], [x, cy]]);
|
|
48
|
+
case 'leaf': return I(circle(x1, y1, Math.max(w, h), 128), circle(x, y, Math.max(w, h), 128), rect(x, y, w, h));
|
|
49
|
+
// not in PRIMITIVES (turns only): a crescent, a disc less the same disc shifted right; a kite with a notched tail
|
|
50
|
+
case 'blade': return D(oval(x, y, w, h), oval(x + w * 0.42, y - h * 0.08, w, h));
|
|
51
|
+
case 'kite': return D(poly([[cx, y], [x1, y + h * 0.38], [cx, y1], [x, y + h * 0.38]]), poly([[cx - w * 0.14, y1 + 1], [cx, y1 - h * 0.24], [cx + w * 0.14, y1 + 1]]));
|
|
52
|
+
default: return rect(x, y, w, h);
|
|
53
|
+
}
|
|
54
|
+
}
|
package/src/tuning.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tuning: for each recipe, what a shuffle draws. The sliders keep their whole range for a hand; a shuffle stays in the
|
|
3
|
+
* part of it that gives a mark worth keeping (heavy weight, few big parts, the house gap) and makes ONE move: the
|
|
4
|
+
* second moves (a slant, a taper, a twist, a second cut) are `rare`, the chance a shuffle touches them at all. From
|
|
5
|
+
* contact sheets of every recipe's shuffles, judged against the live set. `value` here replaces a control's default.
|
|
6
|
+
*/
|
|
7
|
+
const R = (lo, hi) => ({ random: [lo, hi] });
|
|
8
|
+
const rare = (p, lo, hi) => (lo === undefined ? { rare: p } : { rare: p, random: [lo, hi] });
|
|
9
|
+
const of = (...o) => ({ random: o });
|
|
10
|
+
|
|
11
|
+
export const TUNING = {
|
|
12
|
+
bars: { count: R(2, 4), weight: R(0.58, 0.8), cutSize: R(0.1, 0.2), cutAt: R(0.35, 0.65), lengths: { rare: 0.3 }, ends: { rare: 0.25 }, slant: rare(0.15, -20, 20), level: { rare: 0.1 }, cutAngle: rare(0.25, -35, 35), spine: { rare: 0.2 }, widths: { rare: 0.08, random: ['growing', 'thin-thick'] } },
|
|
13
|
+
bands: { count: R(2, 3), weight: R(0.6, 0.8), ends: { rare: 0.3 }, slant: rare(0.15, -18, 18) },
|
|
14
|
+
twin: { thickness: R(0.3, 0.42), slant: rare(0.3, -22, 22) },
|
|
15
|
+
stack: { layout: of('stack', 'row', 'overlap', 'nest'), count: R(2, 3), order: of('AB', 'ABA', 'A'), step: { rare: 0.2 }, combine: of('gap', 'over', 'cut'), size: rare(0.3, 0.75, 1), overlap: R(0.2, 0.45) },
|
|
16
|
+
shear: { rows: R(1, 2), cols: R(2, 3), lean: of('same', 'rows', 'chevron'), angle: R(18, 32), drop: { rare: 0.25 }, spacing: R(1, 1.5), taper: rare(0.12, 0.1, 0.3), lengths: { rare: 0.3 }, slide: rare(0.2, 0.15, 0.4) },
|
|
17
|
+
turns: { count: of('3', '4', '5', '6'), size: R(0.32, 0.46), stretch: rare(0.3, 0.8, 1.4), radius: R(0.06, 0.26), tilt: rare(0.35, -30, 30) },
|
|
18
|
+
burst: { rays: R(5, 10), ray: of('bar', 'wedge', 'pill', 'drop'), width: R(0.1, 0.18), inner: R(0.06, 0.28), alternate: rare(0.2, 0.2, 0.45), twist: rare(0.2, -30, 30), move: { rare: 0.35 } },
|
|
19
|
+
tiles: { grid: R(2, 3), density: R(0.72, 1), symmetry: of('mirror', 'both', 'turn') },
|
|
20
|
+
route: { tracks: R(1, 1), steps: R(2, 3), weight: R(0.14, 0.2), node: of('none', 'diamond', 'square'), ends: of('square', 'node'), frame: { rare: 0.12 }, turns: { rare: 0.3 } },
|
|
21
|
+
arcs: { count: R(2, 3), weight: R(0.55, 0.8), core: { rare: 0.3 }, legs: R(0, 0.45), move: { rare: 0.3 }, corner: { rare: 0.35 }, slant: rare(0.1, -15, 15) },
|
|
22
|
+
rings: { count: R(2, 3), weight: R(0.55, 0.8), gaps: R(1, 2), gapSize: R(1.4, 3), centre: of('open', 'open', 'dot'), shape: of('circle', 'circle', 'rounded', 'hexagon'), offset: rare(0.15, 0.2, 0.5), breakKind: { rare: 0.15 } },
|
|
23
|
+
stripes: { stripes: R(4, 7), weight: R(0.5, 0.75), angle: R(-60, 60), move: of('none', 'shift', 'wave', 'taper', 'slot'), cover: rare(0.25, 0.5, 0.85), ends: { rare: 0.3 } },
|
|
24
|
+
chevrons: { count: R(2, 4), weight: R(0.5, 0.75), angle: R(75, 120), grow: rare(0.3, 0.15, 0.45), move: { rare: 0.35 } },
|
|
25
|
+
waves: { count: R(2, 4), weight: R(0.55, 0.8), amplitude: R(0.05, 0.13), waves: R(0.75, 1.5), phase: rare(0.15, 30, 180), clip: { rare: 0.35 } },
|
|
26
|
+
cut: { second: { rare: 0.2 } },
|
|
27
|
+
split: { cuts: R(1, 2), twist: rare(0.15, 2, 6), spacing: R(1, 2) },
|
|
28
|
+
venn: { count: R(2, 3), shape: of('circle', 'circle', 'rounded'), layout: of('row', 'triangle'), combine: of('xor', 'knockout'), overlap: R(0.28, 0.5) },
|
|
29
|
+
spiral: { turns: R(1.25, 2.5), tail: rare(0.3, 0.2, 0.5), squash: rare(0.2, 0.75, 0.9) },
|
|
30
|
+
bloom: { petals: R(4, 8), width: R(0.4, 0.8), twist: rare(0.25, -35, 35) },
|
|
31
|
+
links: { weight: R(0.1, 0.16) },
|
|
32
|
+
horizon: { lines: R(2, 4), stripes: R(2, 4), size: R(0.6, 0.9) },
|
|
33
|
+
steps: { count: R(3, 5), tread: R(0.45, 1), gap: rare(0.25, 1.2, 2), roundTreads: rare(0.25, 0.2, 0.5) },
|
|
34
|
+
hex: { rings: R(1, 1), density: R(0.5, 0.9), cell: { rare: 0.15 }, gap: R(1, 1.5) },
|
|
35
|
+
iso: { grid: R(2, 3), height: R(1, 2), density: R(0.5, 1) },
|
|
36
|
+
letter: { build: of('stencil', 'route', 'blocks'), weight: R(0.17, 0.26), slant: rare(0.12, -12, 12), spacing: R(1, 1.6) },
|
|
37
|
+
arcstep: { steps: R(1, 3), weight: R(0.66, 0.86), rise: rare(0.3, 0.7, 1.3), ends: { rare: 0.3 } },
|
|
38
|
+
halfsq: { grid: R(2, 2), halves: R(0.4, 0.75), parted: { rare: 0 } },
|
|
39
|
+
invert: { count: R(1, 3), weight: R(0.5, 0.66), region: of('half', 'half', 'quarter', 'disc'), shape: of('circle', 'circle', 'circle', 'rounded', 'hexagon'), size: R(0.34, 0.5) },
|
|
40
|
+
leaves: { softness: rare(0.3, 0.6, 1), spacing: rare(0.3, 0.8, 1.6), centre: { rare: 0.2 } },
|
|
41
|
+
lobes: { lobes: R(5, 8), depth: R(0.1, 0.22), inside: of('hole', 'hole', 'echo', 'solid'), hole: R(0.24, 0.42), spin: rare(0.3, 0, 40) },
|
|
42
|
+
loops: { petals: R(3, 6), weight: R(0.42, 0.56), spread: R(0.9, 1), stretch: rare(0.15, 1, 1.2), centre: of('open', 'open', 'dot') },
|
|
43
|
+
trine: { offset: R(0.14, 0.25), middle: of('open'), spacing: R(1, 1.6), spin: rare(0.4, 0, 120) },
|
|
44
|
+
strips: { layout: of('triangle', 'chevrons', 'diamond'), weight: R(0.17, 0.24), overhang: R(0.04, 0.12), spacing: R(0.9, 1.3) },
|
|
45
|
+
bite: { size: R(0.15, 0.22), depth: R(0.65, 1), slide: R(0.12, 0.2), softness: R(0.16, 0.28) },
|
|
46
|
+
blades: { count: R(2, 3), grow: R(0.25, 0.65), width: R(1.5, 2.4), belly: R(0.6, 1), edge: { rare: 0.2 }, lean: rare(0.3, -14, 14) },
|
|
47
|
+
wavecut: { move: of('split'), waves: R(1.5, 2.5), swell: R(0.07, 0.12), at: R(0.42, 0.58), spacing: R(1.1, 1.7) },
|
|
48
|
+
capsules: { count: R(2, 3), lengths: of('stagger', 'grow', 'middle'), lean: R(16, 30), short: R(0.5, 0.75), softness: R(0.6, 1), cut: { rare: 0.15 }, spacing: R(1, 1.4) },
|
|
49
|
+
flare: { rays: R(3, 5), inner: R(0.16, 0.3), spacing: R(1.2, 2), body: of('square', 'square', 'round') },
|
|
50
|
+
seam: { body: of('square', 'square', 'rounded', 'disc', 'hexagon'), at: R(0.4, 0.6), size: R(0.2, 0.36), reach: R(0.14, 0.26), spacing: R(1, 1.5) },
|
|
51
|
+
pixelarc: { curve: of('quarter', 'arch', 'hook'), grid: R(6, 9), weight: R(0.3, 0.42), bands: R(1, 1) },
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** The two to four controls of each recipe that decide the mark: a page shows these first, the rest under "More". */
|
|
55
|
+
export const MAIN = {
|
|
56
|
+
bars: ['count', 'weight', 'cut', 'ends'], bands: ['count', 'weight', 'join', 'extra'], twin: ['piece', 'thickness', 'corner', 'ends'], stack: ['layout', 'shapeA', 'shapeB', 'combine'],
|
|
57
|
+
shear: ['rows', 'cols', 'lean', 'angle'], turns: ['unit', 'count', 'size', 'join'], burst: ['rays', 'ray', 'width', 'inner'], tiles: ['grid', 'layout', 'set', 'symmetry'],
|
|
58
|
+
route: ['layout', 'steps', 'weight', 'node'], arcs: ['count', 'sweep', 'weight', 'legs'], rings: ['count', 'weight', 'gaps', 'shape'], stripes: ['shape', 'stripes', 'angle', 'move'],
|
|
59
|
+
chevrons: ['count', 'angle', 'weight', 'point'], waves: ['count', 'weight', 'amplitude', 'clip'], cut: ['body', 'cut', 'side', 'size'], split: ['shape', 'cuts', 'angle', 'slide'],
|
|
60
|
+
venn: ['count', 'shape', 'layout', 'combine'], spiral: ['turns', 'weight', 'start'], bloom: ['petals', 'petal', 'width', 'centre'], links: ['count', 'loop', 'layout', 'weight'],
|
|
61
|
+
horizon: ['sun', 'size', 'lines', 'style'], steps: ['count', 'shape', 'tread'], hex: ['layout', 'density', 'symmetry'],
|
|
62
|
+
iso: ['grid', 'layout', 'height'], letter: ['char', 'build', 'weight'],
|
|
63
|
+
arcstep: ['layout', 'steps', 'weight', 'corners'], halfsq: ['layout', 'halves', 'symmetry'], invert: ['count', 'weight', 'region', 'angle'], leaves: ['tile', 'order', 'facing'],
|
|
64
|
+
lobes: ['lobes', 'depth', 'inside'], loops: ['petals', 'weight', 'spread', 'centre'], trine: ['body', 'offset', 'middle'],
|
|
65
|
+
strips: ['layout', 'weight', 'overhang'], bite: ['place', 'size', 'depth', 'body'], blades: ['count', 'grow', 'width', 'belly'],
|
|
66
|
+
wavecut: ['body', 'move', 'waves', 'swell'], capsules: ['count', 'lengths', 'lean'], flare: ['origin', 'rays', 'body'], seam: ['joint', 'body', 'size', 'reach'], pixelarc: ['curve', 'grid', 'weight', 'bands'],
|
|
67
|
+
};
|