@andespindola/brainlink 0.1.0-beta.110 → 0.1.0-beta.112
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.
|
@@ -13,8 +13,8 @@ const macroGalaxyZoomThreshold = 0.012
|
|
|
13
13
|
const macroGalaxyEnterHysteresis = 0.86
|
|
14
14
|
const macroGalaxyExitHysteresis = 1.24
|
|
15
15
|
const galaxyDiscoveryEnabled = false
|
|
16
|
-
const massiveAutoFitMacroScale = 0.
|
|
17
|
-
const defaultMacroScale = 0.
|
|
16
|
+
const massiveAutoFitMacroScale = 0.013
|
|
17
|
+
const defaultMacroScale = 0.013
|
|
18
18
|
const clusterCellPixelSize = 64
|
|
19
19
|
const minNodePixelRadius = 2.3
|
|
20
20
|
const viewportPaddingPx = 280
|
|
@@ -42,15 +42,18 @@ const ecosystemDepthOrbitalMaxOffset = 160
|
|
|
42
42
|
const ecosystemDepthMinScale = 0.24
|
|
43
43
|
const ecosystemDepthOpacityFloor = 0.2
|
|
44
44
|
const graphDepthNear = 40
|
|
45
|
-
const graphDepthFar =
|
|
46
|
-
const graphDepthPerspective =
|
|
47
|
-
const graphDepthYaw = 0.
|
|
48
|
-
const graphDepthPitch = 0.
|
|
49
|
-
const graphDepthRadialGain = 0.
|
|
50
|
-
const graphDepthMinScale = 0.
|
|
51
|
-
const graphDepthOpacityFloor = 0.
|
|
52
|
-
const graphDepthEdgeOpacityFloor = 0.
|
|
53
|
-
const graphDepthProjectionNodeThreshold =
|
|
45
|
+
const graphDepthFar = 1180
|
|
46
|
+
const graphDepthPerspective = 520
|
|
47
|
+
const graphDepthYaw = 0.34
|
|
48
|
+
const graphDepthPitch = 0.24
|
|
49
|
+
const graphDepthRadialGain = 0.18
|
|
50
|
+
const graphDepthMinScale = 0.42
|
|
51
|
+
const graphDepthOpacityFloor = 0.28
|
|
52
|
+
const graphDepthEdgeOpacityFloor = 0.16
|
|
53
|
+
const graphDepthProjectionNodeThreshold = 40
|
|
54
|
+
const graphDepthProjectionNodeCap = 1200
|
|
55
|
+
const graphDepthProjectionMinScale = 0.045
|
|
56
|
+
const graphDepthProjectionMaxScale = 1.45
|
|
54
57
|
const zoomRecoveryGuardMs = 4200
|
|
55
58
|
const zoomCapTargetViewportShare = 0.72
|
|
56
59
|
const meshEdgeScaleThreshold = 0.09
|
|
@@ -2459,8 +2462,8 @@ const currentZoomMax = () => {
|
|
|
2459
2462
|
}
|
|
2460
2463
|
|
|
2461
2464
|
const zoomFloorByNodeCount = (nodeCount) => {
|
|
2462
|
-
if (nodeCount > massiveGraphNodeThreshold) return 0.
|
|
2463
|
-
if (nodeCount > largeGraphNodeThreshold) return 0.
|
|
2465
|
+
if (nodeCount > massiveGraphNodeThreshold) return 0.0085
|
|
2466
|
+
if (nodeCount > largeGraphNodeThreshold) return 0.0032
|
|
2464
2467
|
if (nodeCount > ecosystemActivationNodeThreshold) return 0.001
|
|
2465
2468
|
return zoomRange.min
|
|
2466
2469
|
}
|
|
@@ -2512,8 +2515,8 @@ const fitScaleBiasByNodeCount = nodeCount => {
|
|
|
2512
2515
|
if (nodeCount <= 180) return 1
|
|
2513
2516
|
if (nodeCount <= 600) return 0.94
|
|
2514
2517
|
if (nodeCount <= 2000) return 0.82
|
|
2515
|
-
if (nodeCount <= 6000) return 0.
|
|
2516
|
-
return 0.
|
|
2518
|
+
if (nodeCount <= 6000) return 0.74
|
|
2519
|
+
return 0.72
|
|
2517
2520
|
}
|
|
2518
2521
|
|
|
2519
2522
|
const autoFitScaleRangeByNodeCount = nodeCount => {
|
|
@@ -2523,8 +2526,8 @@ const autoFitScaleRangeByNodeCount = nodeCount => {
|
|
|
2523
2526
|
if (nodeCount <= 180) return { min: 0.18, max: 0.92 }
|
|
2524
2527
|
if (nodeCount <= 600) return { min: 0.12, max: 0.72 }
|
|
2525
2528
|
if (nodeCount <= 2000) return { min: 0.08, max: 0.52 }
|
|
2526
|
-
if (nodeCount <= 6000) return { min: 0.
|
|
2527
|
-
return { min: 0.
|
|
2529
|
+
if (nodeCount <= 6000) return { min: 0.08, max: 0.38 }
|
|
2530
|
+
return { min: 0.0085, max: 0.36 }
|
|
2528
2531
|
}
|
|
2529
2532
|
|
|
2530
2533
|
const macroFaceToFaceScale = (nodeCount, hubDistance) => {
|
|
@@ -2534,7 +2537,7 @@ const macroFaceToFaceScale = (nodeCount, hubDistance) => {
|
|
|
2534
2537
|
|
|
2535
2538
|
const rect = canvas.getBoundingClientRect()
|
|
2536
2539
|
const viewportReference = Math.max(320, Math.min(rect.width, rect.height))
|
|
2537
|
-
const share = nodeCount > massiveGraphNodeThreshold ? 0.
|
|
2540
|
+
const share = nodeCount > massiveGraphNodeThreshold ? 0.14 : 0.12
|
|
2538
2541
|
const targetPx = Math.max(24, viewportReference * share)
|
|
2539
2542
|
return targetPx / hubDistance
|
|
2540
2543
|
}
|
|
@@ -2573,7 +2576,7 @@ const macroEcosystemFaceScale = (nodeCount) => {
|
|
|
2573
2576
|
|
|
2574
2577
|
const rect = canvas.getBoundingClientRect()
|
|
2575
2578
|
const viewportReference = Math.max(320, Math.min(rect.width, rect.height))
|
|
2576
|
-
const targetShare = nodeCount > massiveGraphNodeThreshold ? 0.
|
|
2579
|
+
const targetShare = nodeCount > massiveGraphNodeThreshold ? 0.2 : 0.16
|
|
2577
2580
|
const targetPx = Math.max(30, viewportReference * targetShare)
|
|
2578
2581
|
return targetPx / nearestDistance
|
|
2579
2582
|
}
|
|
@@ -3067,7 +3070,11 @@ const clusterDepthScale = cluster => Number.isFinite(cluster.depthScale) ? clust
|
|
|
3067
3070
|
|
|
3068
3071
|
const shouldProjectRenderNodesInDepth = () =>
|
|
3069
3072
|
state.renderClusters.length === 0 &&
|
|
3070
|
-
state.renderNodes.length >= graphDepthProjectionNodeThreshold
|
|
3073
|
+
state.renderNodes.length >= graphDepthProjectionNodeThreshold &&
|
|
3074
|
+
state.renderNodes.length <= graphDepthProjectionNodeCap &&
|
|
3075
|
+
state.transform.scale >= graphDepthProjectionMinScale &&
|
|
3076
|
+
state.transform.scale <= graphDepthProjectionMaxScale &&
|
|
3077
|
+
!state.pointer.down
|
|
3071
3078
|
|
|
3072
3079
|
const nodeProjectionAnchor = () => {
|
|
3073
3080
|
const hub = state.primaryHub
|
|
@@ -3779,8 +3786,13 @@ const wheelZoomFactor = event => {
|
|
|
3779
3786
|
state.transform.scale <= massiveEcosystemClusterScaleThreshold
|
|
3780
3787
|
const sensitivityMultiplier = isMassiveEcosystemZoom ? 0.48 : 1
|
|
3781
3788
|
const capMultiplier = isMassiveEcosystemZoom ? 0.34 : 1
|
|
3782
|
-
const
|
|
3783
|
-
const
|
|
3789
|
+
const isZoomOut = normalizedDelta > 0
|
|
3790
|
+
const currentScale = state.transform.scale
|
|
3791
|
+
const zoomOutDamping = isZoomOut
|
|
3792
|
+
? (currentScale <= 0.03 ? 0.38 : currentScale <= 0.08 ? 0.52 : 0.68)
|
|
3793
|
+
: 1
|
|
3794
|
+
const sensitivity = wheelZoomExponent * (isModifierZoom ? wheelZoomModifierBoost : 1) * sensitivityMultiplier * zoomOutDamping
|
|
3795
|
+
const exponentCap = wheelZoomExponentCap * capMultiplier * (isZoomOut ? 0.74 : 1)
|
|
3784
3796
|
const exponent = Math.max(
|
|
3785
3797
|
-exponentCap,
|
|
3786
3798
|
Math.min(exponentCap, -normalizedDelta * sensitivity)
|
package/package.json
CHANGED