@liquidcars/atlas-geometry-processes 0.2.0 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +19 -0
  2. package/index.js +75 -1
  3. package/package.json +8 -4
package/README.md CHANGED
@@ -37,6 +37,10 @@ not depend on Three.js.
37
37
  | process.annotation | Note attached to a symbol |
38
38
  | process.control-transfer | Control-flow transfer |
39
39
  | process.condition | Condition/rule gate |
40
+ | process.rocket | Project / startup rocket |
41
+ | process.laurel-wreath | Epic / laurel wreath |
42
+ | process.rabbit | Sprint / running rabbit |
43
+ | process.wrench | Task / open-ended wrench |
40
44
 
41
45
  The symbols are intentionally process-oriented rather than generic primitives:
42
46
  they preserve the visual vocabulary of flowcharts while remaining volumetric,
@@ -122,3 +126,18 @@ import processGeometryPack from "@liquidcars/atlas-geometry-processes";
122
126
 
123
127
  console.log(processGeometryPack.geometries.map(geometry => geometry.id));
124
128
  ~~~
129
+
130
+ ## Work management (0.3.0)
131
+
132
+ The four work-management symbols appear under **Processes · Work management**.
133
+ Their ids describe reusable shapes, independently of the host application’s entity types.
134
+ The suggested mapping is project → `process.rocket`, epic → `process.laurel-wreath`,
135
+ sprint → `process.rabbit`, task → `process.wrench`. Existing geometry ids are unchanged.
136
+
137
+ The silhouettes use solid SVG extrusions with real thickness and local palette colors.
138
+ Atlas derives 2D diagrams and thumbnails from the same geometry used in 3D; no emoji,
139
+ font, remote image or Three.js dependency is required by the pack. Atlas >= 0.1.40
140
+ is required for SVG extrusion support. Colors use `workPrimary`, `workPaper`,
141
+ `workWindow`, `workGold`, `workGreen`, `workMetal` and `workFlame`.
142
+
143
+ Run `npm test` to check the pack contract and backwards-compatible symbol ids.
package/index.js CHANGED
@@ -56,7 +56,7 @@ const processPalette = {
56
56
  export const processGeometryPack = {
57
57
  namespace: "process",
58
58
  name: "Process Symbols",
59
- version: "0.2.0",
59
+ version: "0.3.0",
60
60
  category: "Processes",
61
61
  palette: processPalette,
62
62
  geometries: [
@@ -467,6 +467,80 @@ export const processGeometryPack = {
467
467
  ]
468
468
  };
469
469
 
470
+ // Work-management vocabulary. Every silhouette is a solid SVG extrusion, so
471
+ // Atlas uses the same outline for its 2D diagrams and its volumetric 3D view.
472
+ const workSvg = (paths, size, position = [0, 0, 0], color = "workPrimary") => ({
473
+ shape: "svg-extrude",
474
+ svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">${paths}</svg>`,
475
+ size, position, color, edges: false, bevel: .018, curveSegments: 10,
476
+ metalness: .16, roughness: .48
477
+ });
478
+ const workEye = (position, diameter, color = "workPaper") => ({
479
+ shape: "cylinder", size: [diameter, .055, diameter],
480
+ rotation: [Math.PI / 2, 0, 0], position, color, edges: false
481
+ });
482
+ const rocketOutline = '<path d="M50 3C31 16 27 35 28 57L13 72V88L35 79H65L87 88V72L72 57C73 35 69 16 50 3Z"/>';
483
+ const rocketFlame = '<path d="M24 4Q50 25 76 4Q84 55 50 97Q16 55 24 4Z"/>';
484
+ const rabbitOutline = '<path d="M14 62C6 65 2 57 6 51C9 47 14 49 18 52C24 39 37 37 49 43L59 36L55 18Q54 8 60 13L70 32L74 11Q78 3 82 10L81 34Q90 36 94 44L97 49Q99 54 92 57L81 58L75 64L91 76Q95 83 87 83L70 72L62 70L52 79L32 89Q24 91 26 84L39 75L46 65Q35 60 27 66L18 79L7 83Q0 84 4 77L14 68Z"/>';
485
+ // Opposite contour winding keeps the handle hole without discarding the body caps in Atlas.
486
+ const wrenchOutline = '<path fill-rule="evenodd" d="M63 8L57 10C45 14 38 28 44 40L8 68C0 74 -2 84 5 91C12 98 22 97 29 89L59 55C73 63 87 59 94 45L77 45L70 32L79 20L95 20C90 8 76 2 63 8ZM20 81A5 5 0 1 1 10 81A5 5 0 1 1 20 81Z"/>';
487
+ const laurelOutline = (() => {
488
+ const point = (x, y) => `${x.toFixed(2)} ${y.toFixed(2)}`;
489
+ const leaf = (x, y, tx, ty, width) => {
490
+ const dx = tx - x, dy = ty - y, length = Math.hypot(dx, dy), nx = -dy / length * width, ny = dx / length * width;
491
+ return `<path d="M${point(x,y)}C${point(x+dx*.25+nx,y+dy*.25+ny)} ${point(x+dx*.75+nx,y+dy*.75+ny)} ${point(tx,ty)}C${point(x+dx*.75-nx,y+dy*.75-ny)} ${point(x+dx*.25-nx,y+dy*.25-ny)} ${point(x,y)}Z"/>`;
492
+ };
493
+ let paths = '<path d="M49 94C16 78 9 46 34 10L37 12C16 47 23 75 51 90ZM51 94C84 78 91 46 66 10L63 12C84 47 77 75 49 90Z"/>';
494
+ for (const side of [-1, 1]) for (let i = 0; i < 7; i++) {
495
+ const angle = (90 + side * (20 + i * 22)) * Math.PI / 180;
496
+ const rx = Math.cos(angle), ry = Math.sin(angle), dx = -ry * side, dy = rx * side;
497
+ const x = 50 + rx * 34, y = 50 + ry * 34;
498
+ paths += leaf(x, y, x + rx * 13 + dx * 7, y + ry * 13 + dy * 7, 3.8);
499
+ paths += leaf(x, y, x - rx * 11 + dx * 9, y - ry * 11 + dy * 9, 3.2);
500
+ }
501
+ return paths;
502
+ })();
503
+ Object.assign(processPalette, {
504
+ workPrimary: "#7961c9", workPaper: "#fff9ef", workWindow: "#81d6ec",
505
+ workGold: "#d6a739", workGreen: "#43856b", workMetal: "#55788d", workFlame: "#efa34b"
506
+ });
507
+ processGeometryPack.geometries.push(
508
+ {
509
+ id: "rocket", name: "Project · Rocket", description: "Startup rocket: a project taking off.",
510
+ category: "Processes · Work management", canonicalSize: [1.8, 2.5, .6],
511
+ anchors: { input: [-.9, 0, 0], output: [.9, 0, 0], detail: [0, 0, .3] },
512
+ create() { return { parts: [
513
+ workSvg(rocketFlame, [.48, .65, .22], [0, -.93, -.015], "workFlame"),
514
+ workSvg(rocketOutline, [1.45, 1.85, .32], [0, .18, 0]),
515
+ workEye([0, .49, .18], .46), workEye([0, .49, .215], .30, "workWindow"),
516
+ frontLine([0, -.43, .185], [.48, .07, .05], "workPaper")
517
+ ] }; }
518
+ },
519
+ {
520
+ id: "laurel-wreath", name: "Epic · Laurel wreath", description: "A laurel wreath framing a significant achievement.",
521
+ category: "Processes · Work management", canonicalSize: [2.3, 2.3, .5],
522
+ anchors: { input: [-1.15, 0, 0], output: [1.15, 0, 0], detail: [0, 0, .25] },
523
+ create() { return { parts: [workSvg(laurelOutline, [2, 2.05, .3], [0, 0, 0], "workGold")] }; }
524
+ },
525
+ {
526
+ id: "rabbit", name: "Sprint · Running rabbit", description: "A running hare, with long ears and extended legs, for a short delivery iteration.",
527
+ category: "Processes · Work management", canonicalSize: [2.7, 2.15, .6],
528
+ anchors: { input: [-1.35, 0, 0], output: [1.35, 0, 0], detail: [0, 0, .3] },
529
+ create() { return { parts: [
530
+ workSvg(rabbitOutline, [2.15, 1.95, .3], [.1, .04, 0], "workGreen"),
531
+ workEye([.9, .20, .185], .095),
532
+ { ...frontLine([-.99, -.08, 0], [.54, .075, .12], "workGreen"), radius: .035 },
533
+ { ...frontLine([-1.03, -.35, 0], [.4, .065, .12], "workGreen"), radius: .03 }
534
+ ] }; }
535
+ },
536
+ {
537
+ id: "wrench", name: "Task · Wrench", description: "An open-ended wrench with a pierced handle for concrete work on an asset.",
538
+ category: "Processes · Work management", canonicalSize: [2.3, 2.3, .55],
539
+ anchors: { input: [-1.15, 0, 0], output: [1.15, 0, 0], detail: [0, 0, .275] },
540
+ create() { return { parts: [workSvg(wrenchOutline, [2.05, 2.05, .32], [0, 0, 0], "workMetal")] }; }
541
+ }
542
+ );
543
+
470
544
  registerGeometryPack(processGeometryPack);
471
545
 
472
546
  export default processGeometryPack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liquidcars/atlas-geometry-processes",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Standard process and flowchart geometry pack for LiquidCars Atlas",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "sideEffects": true,
16
16
  "peerDependencies": {
17
- "@liquidcars/atlas": ">=0.1.25"
17
+ "@liquidcars/atlas": ">=0.1.40"
18
18
  },
19
19
  "keywords": [
20
20
  "liquidcars",
@@ -23,7 +23,11 @@
23
23
  "geometry-pack",
24
24
  "process",
25
25
  "flowchart",
26
- "bpmn"
26
+ "bpmn",
27
+ "work-management"
27
28
  ],
28
- "license": "MIT"
29
+ "license": "MIT",
30
+ "scripts": {
31
+ "test": "node --test test/*.test.mjs"
32
+ }
29
33
  }