@sequent-org/moodboard 1.2.45 → 1.2.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequent-org/moodboard",
3
- "version": "1.2.45",
3
+ "version": "1.2.46",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -24,19 +24,28 @@ export class CrossGrid extends BaseGrid {
24
24
  */
25
25
  createVisual() {
26
26
  const g = this.graphics;
27
- // Прозрачность задаем через graphics.alpha из BaseGrid; штрих рисуем с полным альфа
28
- g.lineStyle(this.crossLineWidth, this.color, 1);
27
+ // Прозрачность через alpha графики (как у линейной сетки)
28
+ g.alpha = this.opacity;
29
+ // Тонкие чёткие линии как у линейной сетки: alignment = 0.5
30
+ try {
31
+ g.lineStyle({ width: Math.max(0.5, this.crossLineWidth), color: this.color, alpha: 1, alignment: 0.5 });
32
+ } catch (_) {
33
+ g.lineStyle(Math.max(0.5, this.crossLineWidth), this.color, 1);
34
+ }
29
35
 
30
36
  const hs = this.crossHalfSize;
31
37
 
32
38
  for (let x = 0; x <= this.width; x += this.size) {
33
39
  for (let y = 0; y <= this.height; y += this.size) {
40
+ // Выравниваем к полу-пикселю для чётких 1px линий
41
+ const px = Math.round(x) + 0.5;
42
+ const py = Math.round(y) + 0.5;
34
43
  // Горизонтальная часть креста
35
- g.moveTo(x - hs, y);
36
- g.lineTo(x + hs, y);
44
+ g.moveTo(px - hs, py);
45
+ g.lineTo(px + hs, py);
37
46
  // Вертикальная часть креста
38
- g.moveTo(x, y - hs);
39
- g.lineTo(x, y + hs);
47
+ g.moveTo(px, py - hs);
48
+ g.lineTo(px, py + hs);
40
49
  }
41
50
  }
42
51
  }
@@ -76,19 +76,19 @@ export class GridFactory {
76
76
  },
77
77
  dot: {
78
78
  enabled: true,
79
- size: 20,
79
+ size: 30,
80
80
  color: 0x6a6aff,
81
- opacity: 0.5,
82
- dotSize: 2,
81
+ opacity: 0.7,
82
+ dotSize: 1,
83
83
  dotStyle: 'circle',
84
84
  highlightIntersections: true
85
85
  },
86
86
  cross: {
87
87
  enabled: true,
88
- size: 40,
88
+ size: 90,
89
89
  color: 0x6a6aff,
90
- opacity: 0.5,
91
- crossHalfSize: 4,
90
+ opacity: 0.3,
91
+ crossHalfSize: 30,
92
92
  crossLineWidth: 1
93
93
  }
94
94
  };