@logomarks/generate 0.4.1 → 0.5.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 +47 -0
- package/README.md +40 -6
- package/package.json +1 -1
- package/src/finish.js +18 -10
- package/src/generate.js +9 -4
- package/src/index.d.ts +4 -2
- package/src/index.js +1 -1
- package/src/presets.js +9 -0
- package/src/primitives.js +2 -2
- package/src/recipes/bars.js +2 -0
- package/src/recipes/bubble.js +90 -0
- package/src/recipes/check.js +77 -0
- package/src/recipes/chevrons.js +11 -1
- package/src/recipes/cloud.js +98 -0
- package/src/recipes/counter.js +12 -2
- package/src/recipes/cut.js +5 -0
- package/src/recipes/halfsq.js +4 -1
- package/src/recipes/index.js +10 -0
- package/src/recipes/invert.js +6 -1
- package/src/recipes/layers.js +66 -0
- package/src/recipes/leaves.js +38 -3
- package/src/recipes/peak.js +91 -0
- package/src/recipes/ribbon.js +41 -6
- package/src/recipes/rings.js +6 -3
- package/src/recipes/seam.js +5 -2
- package/src/recipes/shear.js +4 -1
- package/src/recipes/split.js +4 -1
- package/src/recipes/tiles.js +8 -1
- package/src/recipes/trine.js +7 -2
- package/src/recipes/turns.js +7 -0
- package/src/tuning.js +30 -6
package/src/recipes/turns.js
CHANGED
|
@@ -28,6 +28,13 @@ export const controls = [
|
|
|
28
28
|
export function build(params) {
|
|
29
29
|
const p = { ...params };
|
|
30
30
|
if (p.unit === 'blade' && p.count === '4') p.count = '5';
|
|
31
|
+
// four pills (or squares, or circles) turned round a centre meet on the axes in a plus (a cross): five instead
|
|
32
|
+
if (['pill', 'square', 'circle', 'arch', 'half'].includes(p.unit) && p.count === '4') p.count = '5';
|
|
33
|
+
// six pointed units round a centre resolve into a hexagram (two triangles: the Star of David, a religious sign the
|
|
34
|
+
// house bans): six triangles, kites, diamonds, chevrons, blades or wedge-ended units take five (or eight) instead
|
|
35
|
+
if (p.count === '6' && ['triangle', 'kite', 'diamond', 'chevron', 'blade', 'parallelogram', 'quarter'].includes(p.unit)) p.count = '5';
|
|
36
|
+
// pointed units fused round a centre are a solid star (five points too): pointed units keep a gap between them
|
|
37
|
+
if (p.join === 'merge' && ['triangle', 'kite', 'diamond', 'chevron'].includes(p.unit)) p.join = 'gap';
|
|
31
38
|
if (p.unit === 'kite' && p.count === '3' && p.face !== '180' && Math.abs(p.tilt) < 15) p.tilt = p.tilt < 0 ? -15 : 15;
|
|
32
39
|
const n = Number(p.count), s = p.size * BOX.size, w = s * Math.sqrt(p.stretch), h = s / Math.sqrt(p.stretch);
|
|
33
40
|
const cy = BOX.cy - p.radius * BOX.size - h / 2;
|
package/src/tuning.js
CHANGED
|
@@ -27,7 +27,7 @@ export const TUNING = {
|
|
|
27
27
|
rings: { count: R(3, 5), weight: R(0.5, 0.72), gaps: R(1, 2), gapSize: R(1.3, 2.6), spin: R(20, 60), centre: of('open', 'open', 'dot'), shape: of('circle', 'circle', 'rounded', 'square', 'chamfer', 'hexagon'), offset: { rare: 0 }, breakKind: { rare: 0.2 } }, // off centre by hand only: shuffled, rings crowd into a crescent
|
|
28
28
|
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 } },
|
|
29
29
|
// the arrowhead (the lead chevron solid) and the stem make an arrow or a download icon: by hand only
|
|
30
|
-
chevrons: { count: R(2, 4), body: { rare: 0.2 }, soft: { rare: 0.15 }, weight: R(0.5, 0.75), angle: R(75, 120), grow: rare(0.3, 0.15, 0.45), move: of('none', 'none', 'none', 'skip') },
|
|
30
|
+
chevrons: { count: R(2, 4), point: of('up', 'down'), body: { rare: 0.2 }, soft: { rare: 0.15 }, weight: R(0.5, 0.75), angle: R(75, 120), grow: rare(0.3, 0.15, 0.45), move: of('none', 'none', 'none', 'skip') },
|
|
31
31
|
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 } },
|
|
32
32
|
cut: { second: { rare: 0.2 } },
|
|
33
33
|
split: { cuts: R(1, 2), twist: rare(0.15, 2, 6), spacing: R(1, 2) },
|
|
@@ -40,8 +40,8 @@ export const TUNING = {
|
|
|
40
40
|
iso: { grid: R(2, 3), height: R(1, 2), density: R(0.5, 1) },
|
|
41
41
|
letter: { build: of('stencil', 'route', 'blocks', 'rails', 'hexfold', 'wedge'), weight: R(0.17, 0.26), slant: rare(0.12, -12, 12), spacing: R(1, 1.6) },
|
|
42
42
|
arcstep: { steps: R(1, 3), weight: R(0.66, 0.86), rise: rare(0.3, 0.7, 1.3), ends: { rare: 0.3 } },
|
|
43
|
-
halfsq: { grid: of('2x2'), rule: of('
|
|
44
|
-
invert: { count: R(1, 3), weight: R(0.5, 0.66), region: of('half', '
|
|
43
|
+
halfsq: { grid: of('2x2'), rule: of('same', 'checker', 'diagonal'), spacing: R(1, 1.3) },
|
|
44
|
+
invert: { count: R(1, 3), weight: R(0.5, 0.66), region: of('half', 'band', 'band'), shape: of('rounded', 'hexagon'), size: R(0.34, 0.5) }, // a circle swapped reads as a sign (©, Pac-Man, a pie, no entry): by hand only, a band
|
|
45
45
|
leaves: { softness: rare(0.3, 0.6, 1), spacing: rare(0.3, 0.8, 1.6), centre: { rare: 0.2 } },
|
|
46
46
|
lobes: { body: of('pebble', 'disc', 'square'), pieces: R(2, 3), cuts: of('tee'), bend: R(0.35, 0.95), balance: R(-0.1, 0.14), angle: R(0, 345), soften: R(0.5, 0.9), spacing: R(1, 1.4) },
|
|
47
47
|
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') },
|
|
@@ -70,10 +70,22 @@ export const TUNING = {
|
|
|
70
70
|
notch: { depth: R(0.28, 0.42), mouth: R(0.52, 0.74), seat: of('diamond', 'diamond', 'diamond', 'none'), width: R(0.72, 0.98), height: R(0.52, 0.95) },
|
|
71
71
|
nodes: { nodes: R(4, 5), size: R(0.15, 0.22), ring: R(0.12, 0.2), hole: R(0.22, 0.36), neck: R(0.45, 0.85), shape: of('round', 'round', 'square'), sizes: { rare: 0.25 }, spin: R(0, 45) },
|
|
72
72
|
xband: { angle: R(42, 56), weight: R(0.12, 0.17), bend: of('flat', 'flat', 'round'), double: { rare: 0.3 }, waist: R(1.1, 1.8), flat: R(0.1, 0.2) },
|
|
73
|
-
mirror: { body: of('hexagon', 'square', 'octagon', 'disc'), weight: R(0.24, 0.32), bow: R(1.1, 1.6), bowl: R(0.74, 1), symmetry: of('two', 'four', 'four'), bands: R(1, 3), centre: of('bands', 'diamond', 'square', 'none'), ground: of('ink', '
|
|
74
|
-
ribbon: { path: of('step', 'stairs', 'flight', 'wave'), weight: R(0.23, 0.31), bend: R(0.8, 1.2), slot: R(0.45, 0.65), width: R(0.78, 0.92), reach: R(0.32, 0.68), slots: of('one', 'one', 'two', 'none'), ends: of('box', 'round'), turns: of('round', 'crease'), slant: rare(0.35, -22, 22) },
|
|
73
|
+
mirror: { body: of('hexagon', 'square', 'octagon', 'disc'), weight: R(0.24, 0.32), bow: R(1.1, 1.6), bowl: R(0.74, 1), symmetry: of('two', 'four', 'four'), bands: R(1, 3), centre: of('bands', 'diamond', 'square', 'none', 'none'), ground: of('ink', 'cut') },
|
|
74
|
+
ribbon: { path: of('step', 'stairs', 'flight', 'wave'), lanes: of('one', 'two'), weight: R(0.23, 0.31), bend: R(0.8, 1.2), slot: R(0.45, 0.65), width: R(0.78, 0.92), reach: R(0.32, 0.68), slots: of('one', 'one', 'two', 'none'), ends: of('box', 'round'), turns: of('round', 'crease'), slant: rare(0.35, -22, 22) },
|
|
75
75
|
field: { bars: R(6, 9), weight: R(0.58, 0.72), depth: R(0.3, 0.55), slide: R(0.15, 0.35), drop: R(0.4, 1.4) },
|
|
76
76
|
zigzag: { stripes: R(4, 6), weight: R(0.55, 0.7), teeth: R(1, 2), swing: R(0.14, 0.24), at: R(0.4, 0.6), slide: R(0.4, 0.6) },
|
|
77
|
+
// two clouds stacked could be a weather icon (cloudy): one move in five
|
|
78
|
+
cloud: { puffs: R(2, 5), move: of('bands', 'split', 'slot', 'outline', 'stack'), height: R(0.58, 0.76), bands: R(2, 2), at: R(0.4, 0.6), angle: R(-32, 32), weight: R(0.11, 0.15), spacing: R(1.1, 1.5) },
|
|
79
|
+
// a stack of rhombus plates outlines a hexagon, and two or three of them crowd two tech brands' marks: shuffles step the
|
|
80
|
+
// plates aside or taper them, three or four
|
|
81
|
+
layers: { plate: of('rhombus', 'rounded', 'chevron', 'slab', 'slab'), count: R(3, 4), lay: of('offset', 'offset', 'taper'), flat: R(0.42, 0.56), pitch: R(0.2, 0.3), shift: R(0.12, 0.19), top: { rare: 0.25 }, thick: R(0.12, 0.18), spacing: R(1.05, 1.4) },
|
|
82
|
+
// a plain bubble is the chat icon itself, a slot across it a message icon: by hand only. A wide gap: tight, a solid
|
|
83
|
+
// bubble sits too close to tech brands' solid marks (the owner's audit references)
|
|
84
|
+
bubble: { body: of('disc', 'rounded', 'rounded', 'soft'), move: of('tail', 'pair', 'bands', 'glyph'), glyph: of('bar', 'quarter'), tailSize: R(0.18, 0.27), bands: R(2, 3), weight: R(0.14, 0.19), back: R(0.58, 0.74), spacing: R(1.4, 1.7) },
|
|
85
|
+
// the slab cut-out is a checkbox: by hand only
|
|
86
|
+
check: { move: of('heel', 'heel', 'double', 'triple', 'half'), weight: R(0.17, 0.24), angle: R(44, 58), short: R(0.38, 0.52), ends: of('square', 'level', 'round'), spacing: R(1.1, 1.5) },
|
|
87
|
+
// a plain peak is a bare A, and one company's: by hand only
|
|
88
|
+
peak: { move: of('part', 'slot', 'feet', 'seat', 'nest'), apex: of('point', 'flat'), feet: of('level', 'level', 'square'), width: R(0.62, 0.71), weight: R(0.2, 0.27), contrast: rare(0.3, 0.62, 0.85), at: R(0.24, 0.4), spacing: R(1.1, 1.5) },
|
|
77
89
|
halfstripe: { bars: R(3, 5), solid: R(0.44, 0.58), step: R(0.05, 0.14), weight: R(0.5, 0.7) },
|
|
78
90
|
};
|
|
79
91
|
|
|
@@ -96,6 +108,7 @@ export const MAIN = {
|
|
|
96
108
|
mosaic: ['char', 'tiles', 'parted'], weave: ['strands', 'swells', 'height', 'ring'], notch: ['body', 'depth', 'seat', 'split'], nodes: ['nodes', 'size', 'hole', 'neck'],
|
|
97
109
|
xband: ['angle', 'weight', 'bend', 'double'], mirror: ['symmetry', 'bands', 'centre', 'body'], ribbon: ['path', 'turns', 'ends', 'slots'], field: ['bars', 'profile', 'slide', 'widths'],
|
|
98
110
|
zigzag: ['shape', 'stripes', 'teeth', 'slide'], halfstripe: ['shape', 'bars', 'step'],
|
|
111
|
+
cloud: ['puffs', 'move', 'rise', 'base'], layers: ['plate', 'count', 'lay', 'top'], bubble: ['body', 'move', 'tail', 'glyph'], check: ['move', 'weight', 'angle', 'ends'], peak: ['move', 'apex', 'width', 'weight'],
|
|
99
112
|
};
|
|
100
113
|
|
|
101
114
|
/**
|
|
@@ -107,7 +120,8 @@ export const MAIN = {
|
|
|
107
120
|
* - turned they point, an arrow, a play button or a skip icon: chevrons, notch;
|
|
108
121
|
* - iso keeps its light from one side: iso;
|
|
109
122
|
* - turned they are another sign: bars or slanted bars on their side (a menu icon), arcs upside down (a magnet);
|
|
110
|
-
* - already the same every quarter turn, a turn adds nothing: rings, burst, bloom, loops, nodes, turns
|
|
123
|
+
* - already the same every quarter turn, a turn adds nothing: rings, burst, bloom, loops, nodes, turns;
|
|
124
|
+
* - a tick backwards or on its side is no tick: check.
|
|
111
125
|
* Stack, Bars, Shear, Leaf Tiles and Trine take the mirror only (a stack turned is a figure the other way up; shear on
|
|
112
126
|
* its side is a menu icon; the others are symmetric under quarter turns). Steps and Ribbon take a half turn only (steps on their
|
|
113
127
|
* side are signal bars; a ribbon's wave on its side is an S), Flare no half turn (from a foot, turned over, a rising sun).
|
|
@@ -129,6 +143,16 @@ export const TURNS = {
|
|
|
129
143
|
stack: MIRROR, bars: MIRROR, leaves: MIRROR, trine: MIRROR, shear: MIRROR,
|
|
130
144
|
letter: NONE, mosaic: NONE, horizon: NONE, chevrons: NONE, notch: NONE, iso: NONE, arcs: NONE,
|
|
131
145
|
rings: NONE, burst: NONE, bloom: NONE, loops: NONE, nodes: NONE, turns: NONE,
|
|
146
|
+
// the tech-brand styles (2026-11-28): a cloud and a bubble keep level (a mirror moves the tail or the tallest puff);
|
|
147
|
+
// an A stays upright, its mirror the thin leg on the other side; a tick never turns or mirrors (a backwards tick is no
|
|
148
|
+
// tick); layers on their side read as a back or rewind arrow (judged from a sheet of turned shuffles): mirror only
|
|
149
|
+
cloud: MIRROR, bubble: MIRROR, peak: MIRROR, check: NONE, layers: MIRROR,
|
|
132
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* Keys a shuffle draws once and holds across its tries (`shuffled()` keeps the best of a few draws by quality; where a
|
|
153
|
+
* recipe's forms score unalike, the best-of would always pick one form). Mirror's symmetry: the two-way emblem outscores
|
|
154
|
+
* the four-way one, so without this two-way won nearly every shuffle.
|
|
155
|
+
*/
|
|
156
|
+
export const HOLD = { mirror: ['symmetry'], ribbon: ['path'], cloud: ['move'], bubble: ['move', 'body'], check: ['move'], peak: ['move'] };
|
|
133
157
|
/** How often a shuffle turns or mirrors a mark (of the turns its recipe allows). */
|
|
134
158
|
export const TURN_SHARE = 1 / 3;
|