microboard-temp 0.13.18 → 0.13.20
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/dist/cjs/browser.js +9 -6
- package/dist/cjs/index.js +9 -6
- package/dist/cjs/node.js +9 -6
- package/dist/esm/browser.js +9 -6
- package/dist/esm/index.js +9 -6
- package/dist/esm/node.js +9 -6
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -4678,8 +4678,8 @@ var conf = {
|
|
|
4678
4678
|
FG_SPRING_K: 3,
|
|
4679
4679
|
FG_TARGET_GAP: 20,
|
|
4680
4680
|
FG_REPULSION: 400000,
|
|
4681
|
-
FG_DAMPING: 0.
|
|
4682
|
-
FG_SLEEP_THRESHOLD:
|
|
4681
|
+
FG_DAMPING: 0.9,
|
|
4682
|
+
FG_SLEEP_THRESHOLD: 10,
|
|
4683
4683
|
GRAVITY_G: 80,
|
|
4684
4684
|
GRAVITY_G_CENTER: 120,
|
|
4685
4685
|
GRAVITY_DAMPING: 0.96,
|
|
@@ -54705,10 +54705,13 @@ class ForceGraphEngine {
|
|
|
54705
54705
|
continue;
|
|
54706
54706
|
const dx = s2.cx - s1.cx;
|
|
54707
54707
|
const dy = s2.cy - s1.cy;
|
|
54708
|
-
const
|
|
54709
|
-
const
|
|
54710
|
-
const
|
|
54711
|
-
const
|
|
54708
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54709
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54710
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54711
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54712
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54713
|
+
const fx = dx / centerDist * repMag;
|
|
54714
|
+
const fy = dy / centerDist * repMag;
|
|
54712
54715
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54713
54716
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54714
54717
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/cjs/index.js
CHANGED
|
@@ -4678,8 +4678,8 @@ var conf = {
|
|
|
4678
4678
|
FG_SPRING_K: 3,
|
|
4679
4679
|
FG_TARGET_GAP: 20,
|
|
4680
4680
|
FG_REPULSION: 400000,
|
|
4681
|
-
FG_DAMPING: 0.
|
|
4682
|
-
FG_SLEEP_THRESHOLD:
|
|
4681
|
+
FG_DAMPING: 0.9,
|
|
4682
|
+
FG_SLEEP_THRESHOLD: 10,
|
|
4683
4683
|
GRAVITY_G: 80,
|
|
4684
4684
|
GRAVITY_G_CENTER: 120,
|
|
4685
4685
|
GRAVITY_DAMPING: 0.96,
|
|
@@ -54705,10 +54705,13 @@ class ForceGraphEngine {
|
|
|
54705
54705
|
continue;
|
|
54706
54706
|
const dx = s2.cx - s1.cx;
|
|
54707
54707
|
const dy = s2.cy - s1.cy;
|
|
54708
|
-
const
|
|
54709
|
-
const
|
|
54710
|
-
const
|
|
54711
|
-
const
|
|
54708
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54709
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54710
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54711
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54712
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54713
|
+
const fx = dx / centerDist * repMag;
|
|
54714
|
+
const fy = dy / centerDist * repMag;
|
|
54712
54715
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54713
54716
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54714
54717
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/cjs/node.js
CHANGED
|
@@ -5715,8 +5715,8 @@ var conf = {
|
|
|
5715
5715
|
FG_SPRING_K: 3,
|
|
5716
5716
|
FG_TARGET_GAP: 20,
|
|
5717
5717
|
FG_REPULSION: 400000,
|
|
5718
|
-
FG_DAMPING: 0.
|
|
5719
|
-
FG_SLEEP_THRESHOLD:
|
|
5718
|
+
FG_DAMPING: 0.9,
|
|
5719
|
+
FG_SLEEP_THRESHOLD: 10,
|
|
5720
5720
|
GRAVITY_G: 80,
|
|
5721
5721
|
GRAVITY_G_CENTER: 120,
|
|
5722
5722
|
GRAVITY_DAMPING: 0.96,
|
|
@@ -57178,10 +57178,13 @@ class ForceGraphEngine {
|
|
|
57178
57178
|
continue;
|
|
57179
57179
|
const dx = s2.cx - s1.cx;
|
|
57180
57180
|
const dy = s2.cy - s1.cy;
|
|
57181
|
-
const
|
|
57182
|
-
const
|
|
57183
|
-
const
|
|
57184
|
-
const
|
|
57181
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
57182
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
57183
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
57184
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
57185
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
57186
|
+
const fx = dx / centerDist * repMag;
|
|
57187
|
+
const fy = dy / centerDist * repMag;
|
|
57185
57188
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
57186
57189
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
57187
57190
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/esm/browser.js
CHANGED
|
@@ -4498,8 +4498,8 @@ var conf = {
|
|
|
4498
4498
|
FG_SPRING_K: 3,
|
|
4499
4499
|
FG_TARGET_GAP: 20,
|
|
4500
4500
|
FG_REPULSION: 400000,
|
|
4501
|
-
FG_DAMPING: 0.
|
|
4502
|
-
FG_SLEEP_THRESHOLD:
|
|
4501
|
+
FG_DAMPING: 0.9,
|
|
4502
|
+
FG_SLEEP_THRESHOLD: 10,
|
|
4503
4503
|
GRAVITY_G: 80,
|
|
4504
4504
|
GRAVITY_G_CENTER: 120,
|
|
4505
4505
|
GRAVITY_DAMPING: 0.96,
|
|
@@ -54534,10 +54534,13 @@ class ForceGraphEngine {
|
|
|
54534
54534
|
continue;
|
|
54535
54535
|
const dx = s2.cx - s1.cx;
|
|
54536
54536
|
const dy = s2.cy - s1.cy;
|
|
54537
|
-
const
|
|
54538
|
-
const
|
|
54539
|
-
const
|
|
54540
|
-
const
|
|
54537
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54538
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54539
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54540
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54541
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54542
|
+
const fx = dx / centerDist * repMag;
|
|
54543
|
+
const fy = dy / centerDist * repMag;
|
|
54541
54544
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54542
54545
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54543
54546
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/esm/index.js
CHANGED
|
@@ -4491,8 +4491,8 @@ var conf = {
|
|
|
4491
4491
|
FG_SPRING_K: 3,
|
|
4492
4492
|
FG_TARGET_GAP: 20,
|
|
4493
4493
|
FG_REPULSION: 400000,
|
|
4494
|
-
FG_DAMPING: 0.
|
|
4495
|
-
FG_SLEEP_THRESHOLD:
|
|
4494
|
+
FG_DAMPING: 0.9,
|
|
4495
|
+
FG_SLEEP_THRESHOLD: 10,
|
|
4496
4496
|
GRAVITY_G: 80,
|
|
4497
4497
|
GRAVITY_G_CENTER: 120,
|
|
4498
4498
|
GRAVITY_DAMPING: 0.96,
|
|
@@ -54527,10 +54527,13 @@ class ForceGraphEngine {
|
|
|
54527
54527
|
continue;
|
|
54528
54528
|
const dx = s2.cx - s1.cx;
|
|
54529
54529
|
const dy = s2.cy - s1.cy;
|
|
54530
|
-
const
|
|
54531
|
-
const
|
|
54532
|
-
const
|
|
54533
|
-
const
|
|
54530
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54531
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54532
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54533
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54534
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54535
|
+
const fx = dx / centerDist * repMag;
|
|
54536
|
+
const fy = dy / centerDist * repMag;
|
|
54534
54537
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54535
54538
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54536
54539
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/esm/node.js
CHANGED
|
@@ -5275,8 +5275,8 @@ var conf = {
|
|
|
5275
5275
|
FG_SPRING_K: 3,
|
|
5276
5276
|
FG_TARGET_GAP: 20,
|
|
5277
5277
|
FG_REPULSION: 400000,
|
|
5278
|
-
FG_DAMPING: 0.
|
|
5279
|
-
FG_SLEEP_THRESHOLD:
|
|
5278
|
+
FG_DAMPING: 0.9,
|
|
5279
|
+
FG_SLEEP_THRESHOLD: 10,
|
|
5280
5280
|
GRAVITY_G: 80,
|
|
5281
5281
|
GRAVITY_G_CENTER: 120,
|
|
5282
5282
|
GRAVITY_DAMPING: 0.96,
|
|
@@ -56995,10 +56995,13 @@ class ForceGraphEngine {
|
|
|
56995
56995
|
continue;
|
|
56996
56996
|
const dx = s2.cx - s1.cx;
|
|
56997
56997
|
const dy = s2.cy - s1.cy;
|
|
56998
|
-
const
|
|
56999
|
-
const
|
|
57000
|
-
const
|
|
57001
|
-
const
|
|
56998
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
56999
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
57000
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
57001
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
57002
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
57003
|
+
const fx = dx / centerDist * repMag;
|
|
57004
|
+
const fy = dy / centerDist * repMag;
|
|
57002
57005
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
57003
57006
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
57004
57007
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|