git-hash-art 0.8.0 → 0.10.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/ALGORITHM.md +425 -274
- package/CHANGELOG.md +18 -0
- package/bin/cli.js +17 -14
- package/bin/generateVersionComparison.js +353 -0
- package/dist/browser.js +1563 -123
- package/dist/browser.js.map +1 -1
- package/dist/main.js +1563 -123
- package/dist/main.js.map +1 -1
- package/dist/module.js +1563 -123
- package/dist/module.js.map +1 -1
- package/package.json +2 -1
- package/src/lib/archetypes.ts +115 -3
- package/src/lib/canvas/colors.ts +25 -0
- package/src/lib/canvas/draw.ts +348 -1
- package/src/lib/canvas/shapes/affinity.ts +149 -4
- package/src/lib/canvas/shapes/procedural.ts +395 -32
- package/src/lib/render.ts +426 -19
|
@@ -39,7 +39,7 @@ export const SHAPE_PROFILES: Record<string, ShapeProfile> = {
|
|
|
39
39
|
affinities: ["circle", "blob", "hexagon", "flowerOfLife", "seedOfLife"],
|
|
40
40
|
category: "basic",
|
|
41
41
|
heroCandidate: false,
|
|
42
|
-
bestStyles: ["fill-only", "watercolor", "fill-and-stroke"],
|
|
42
|
+
bestStyles: ["fill-only", "watercolor", "fill-and-stroke", "hand-drawn"],
|
|
43
43
|
},
|
|
44
44
|
square: {
|
|
45
45
|
tier: 2,
|
|
@@ -57,7 +57,7 @@ export const SHAPE_PROFILES: Record<string, ShapeProfile> = {
|
|
|
57
57
|
affinities: ["triangle", "diamond", "hexagon", "merkaba", "sriYantra"],
|
|
58
58
|
category: "basic",
|
|
59
59
|
heroCandidate: false,
|
|
60
|
-
bestStyles: ["fill-and-stroke", "fill-only", "watercolor"],
|
|
60
|
+
bestStyles: ["fill-and-stroke", "fill-only", "watercolor", "hand-drawn"],
|
|
61
61
|
},
|
|
62
62
|
hexagon: {
|
|
63
63
|
tier: 1,
|
|
@@ -261,7 +261,7 @@ export const SHAPE_PROFILES: Record<string, ShapeProfile> = {
|
|
|
261
261
|
affinities: ["blob", "circle", "superellipse", "waveRing"],
|
|
262
262
|
category: "procedural",
|
|
263
263
|
heroCandidate: false,
|
|
264
|
-
bestStyles: ["fill-only", "watercolor", "fill-and-stroke"],
|
|
264
|
+
bestStyles: ["fill-only", "watercolor", "fill-and-stroke", "hand-drawn"],
|
|
265
265
|
},
|
|
266
266
|
ngon: {
|
|
267
267
|
tier: 2,
|
|
@@ -288,7 +288,7 @@ export const SHAPE_PROFILES: Record<string, ShapeProfile> = {
|
|
|
288
288
|
affinities: ["circle", "square", "blob", "hexagon"],
|
|
289
289
|
category: "procedural",
|
|
290
290
|
heroCandidate: false,
|
|
291
|
-
bestStyles: ["fill-only", "watercolor", "fill-and-stroke"],
|
|
291
|
+
bestStyles: ["fill-only", "watercolor", "fill-and-stroke", "wood-grain"],
|
|
292
292
|
},
|
|
293
293
|
spirograph: {
|
|
294
294
|
tier: 1,
|
|
@@ -317,6 +317,107 @@ export const SHAPE_PROFILES: Record<string, ShapeProfile> = {
|
|
|
317
317
|
heroCandidate: true,
|
|
318
318
|
bestStyles: ["stroke-only", "fill-only", "watercolor"],
|
|
319
319
|
},
|
|
320
|
+
|
|
321
|
+
// ── New procedural shapes ─────────────────────────────────────
|
|
322
|
+
shardField: {
|
|
323
|
+
tier: 2,
|
|
324
|
+
minSizeFraction: 0.1,
|
|
325
|
+
maxSizeFraction: 0.7,
|
|
326
|
+
affinities: ["voronoiCell", "diamond", "triangle", "penroseTile"],
|
|
327
|
+
category: "procedural",
|
|
328
|
+
heroCandidate: false,
|
|
329
|
+
bestStyles: ["fill-and-stroke", "stroke-only", "fill-only"],
|
|
330
|
+
},
|
|
331
|
+
voronoiCell: {
|
|
332
|
+
tier: 1,
|
|
333
|
+
minSizeFraction: 0.08,
|
|
334
|
+
maxSizeFraction: 0.9,
|
|
335
|
+
affinities: ["shardField", "ngon", "superellipse", "blob"],
|
|
336
|
+
category: "procedural",
|
|
337
|
+
heroCandidate: false,
|
|
338
|
+
bestStyles: ["fill-and-stroke", "fill-only", "watercolor", "marble-vein"],
|
|
339
|
+
},
|
|
340
|
+
crescent: {
|
|
341
|
+
tier: 1,
|
|
342
|
+
minSizeFraction: 0.1,
|
|
343
|
+
maxSizeFraction: 1.0,
|
|
344
|
+
affinities: ["circle", "blob", "cloudForm", "vesicaPiscis"],
|
|
345
|
+
category: "procedural",
|
|
346
|
+
heroCandidate: true,
|
|
347
|
+
bestStyles: ["fill-only", "watercolor", "fill-and-stroke"],
|
|
348
|
+
},
|
|
349
|
+
tendril: {
|
|
350
|
+
tier: 2,
|
|
351
|
+
minSizeFraction: 0.1,
|
|
352
|
+
maxSizeFraction: 0.8,
|
|
353
|
+
affinities: ["blob", "inkSplat", "lissajous", "fibonacciSpiral"],
|
|
354
|
+
category: "procedural",
|
|
355
|
+
heroCandidate: false,
|
|
356
|
+
bestStyles: ["fill-only", "watercolor", "fill-and-stroke"],
|
|
357
|
+
},
|
|
358
|
+
cloudForm: {
|
|
359
|
+
tier: 1,
|
|
360
|
+
minSizeFraction: 0.15,
|
|
361
|
+
maxSizeFraction: 1.0,
|
|
362
|
+
affinities: ["blob", "circle", "crescent", "superellipse"],
|
|
363
|
+
category: "procedural",
|
|
364
|
+
heroCandidate: false,
|
|
365
|
+
bestStyles: ["fill-only", "watercolor"],
|
|
366
|
+
},
|
|
367
|
+
inkSplat: {
|
|
368
|
+
tier: 2,
|
|
369
|
+
minSizeFraction: 0.1,
|
|
370
|
+
maxSizeFraction: 0.8,
|
|
371
|
+
affinities: ["blob", "tendril", "shardField", "star"],
|
|
372
|
+
category: "procedural",
|
|
373
|
+
heroCandidate: false,
|
|
374
|
+
bestStyles: ["fill-only", "watercolor", "fill-and-stroke"],
|
|
375
|
+
},
|
|
376
|
+
geodesicDome: {
|
|
377
|
+
tier: 2,
|
|
378
|
+
minSizeFraction: 0.2,
|
|
379
|
+
maxSizeFraction: 0.9,
|
|
380
|
+
affinities: ["metatronsCube", "platonicSolid", "hexagon", "triangle"],
|
|
381
|
+
category: "procedural",
|
|
382
|
+
heroCandidate: true,
|
|
383
|
+
bestStyles: ["stroke-only", "dashed", "double-stroke"],
|
|
384
|
+
},
|
|
385
|
+
penroseTile: {
|
|
386
|
+
tier: 2,
|
|
387
|
+
minSizeFraction: 0.06,
|
|
388
|
+
maxSizeFraction: 0.6,
|
|
389
|
+
affinities: ["diamond", "triangle", "shardField", "voronoiCell"],
|
|
390
|
+
category: "procedural",
|
|
391
|
+
heroCandidate: false,
|
|
392
|
+
bestStyles: ["fill-and-stroke", "fill-only", "double-stroke"],
|
|
393
|
+
},
|
|
394
|
+
reuleauxTriangle: {
|
|
395
|
+
tier: 1,
|
|
396
|
+
minSizeFraction: 0.08,
|
|
397
|
+
maxSizeFraction: 1.0,
|
|
398
|
+
affinities: ["triangle", "circle", "superellipse", "vesicaPiscis"],
|
|
399
|
+
category: "procedural",
|
|
400
|
+
heroCandidate: true,
|
|
401
|
+
bestStyles: ["fill-and-stroke", "fill-only", "watercolor"],
|
|
402
|
+
},
|
|
403
|
+
dotCluster: {
|
|
404
|
+
tier: 3,
|
|
405
|
+
minSizeFraction: 0.05,
|
|
406
|
+
maxSizeFraction: 0.5,
|
|
407
|
+
affinities: ["cloudForm", "inkSplat", "blob"],
|
|
408
|
+
category: "procedural",
|
|
409
|
+
heroCandidate: false,
|
|
410
|
+
bestStyles: ["fill-only", "stipple"],
|
|
411
|
+
},
|
|
412
|
+
crosshatchPatch: {
|
|
413
|
+
tier: 3,
|
|
414
|
+
minSizeFraction: 0.1,
|
|
415
|
+
maxSizeFraction: 0.6,
|
|
416
|
+
affinities: ["voronoiCell", "ngon", "superellipse"],
|
|
417
|
+
category: "procedural",
|
|
418
|
+
heroCandidate: false,
|
|
419
|
+
bestStyles: ["stroke-only", "hatched", "fabric-weave"],
|
|
420
|
+
},
|
|
320
421
|
};
|
|
321
422
|
|
|
322
423
|
// ── Shape palette: curated sets of shapes that work well together ────
|
|
@@ -418,6 +519,50 @@ export function buildShapePalette(
|
|
|
418
519
|
accents,
|
|
419
520
|
};
|
|
420
521
|
}
|
|
522
|
+
if (archetypeName === "shattered-glass") {
|
|
523
|
+
// Favor angular, fragmented shapes
|
|
524
|
+
const shardBoost = available.filter(
|
|
525
|
+
(s) => ["shardField", "voronoiCell", "penroseTile", "diamond", "triangle", "ngon"].includes(s) && !primary.includes(s),
|
|
526
|
+
);
|
|
527
|
+
return {
|
|
528
|
+
primary: [...primary.filter((s) => s !== "blob" && s !== "cloudForm"), ...shardBoost.slice(0, 3)],
|
|
529
|
+
supporting: supporting.filter((s) => s !== "blob" && s !== "cloudForm"),
|
|
530
|
+
accents,
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
if (archetypeName === "botanical") {
|
|
534
|
+
// Favor organic, flowing shapes
|
|
535
|
+
const botanicalBoost = available.filter(
|
|
536
|
+
(s) => ["tendril", "cloudForm", "blob", "crescent", "rose", "inkSplat"].includes(s) && !primary.includes(s),
|
|
537
|
+
);
|
|
538
|
+
return {
|
|
539
|
+
primary: [...primary, ...botanicalBoost.slice(0, 3)],
|
|
540
|
+
supporting,
|
|
541
|
+
accents,
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
if (archetypeName === "stipple-portrait") {
|
|
545
|
+
// Favor small, dot-friendly shapes
|
|
546
|
+
const stippleBoost = available.filter(
|
|
547
|
+
(s) => ["dotCluster", "circle", "crosshatchPatch", "voronoiCell", "blob"].includes(s) && !primary.includes(s),
|
|
548
|
+
);
|
|
549
|
+
return {
|
|
550
|
+
primary: [...primary, ...stippleBoost.slice(0, 3)],
|
|
551
|
+
supporting,
|
|
552
|
+
accents,
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
if (archetypeName === "celestial") {
|
|
556
|
+
// Favor sacred geometry and cosmic shapes
|
|
557
|
+
const celestialBoost = available.filter(
|
|
558
|
+
(s) => ["crescent", "geodesicDome", "mandala", "flowerOfLife", "spirograph", "fibonacciSpiral"].includes(s) && !primary.includes(s),
|
|
559
|
+
);
|
|
560
|
+
return {
|
|
561
|
+
primary: [...primary, ...celestialBoost.slice(0, 3)],
|
|
562
|
+
supporting,
|
|
563
|
+
accents,
|
|
564
|
+
};
|
|
565
|
+
}
|
|
421
566
|
|
|
422
567
|
return { primary, supporting, accents };
|
|
423
568
|
}
|