@andespindola/brainlink 0.1.0-beta.92 → 0.1.0-beta.93
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/README.md +1 -1
- package/dist/application/frontend/client-js.js +21 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -602,7 +602,7 @@ The graph UI shows:
|
|
|
602
602
|
- WebGL node and edge acceleration when supported, falling back to Canvas 2D without changing graph behavior
|
|
603
603
|
- compact macro-to-micro density progression so reset keeps the graph mass oriented and zoom-in separates local neighborhoods progressively
|
|
604
604
|
- graph camera treats hub-centered navigation as structural only when the hub is dominant; diffuse stress graphs reset and zoom around the full graph mass
|
|
605
|
-
- graph LOD progression: graphs up to 1000 notes render directly; larger graphs use a compact memory-hub-centered mesh of
|
|
605
|
+
- graph LOD progression: graphs up to 1000 notes render directly; larger graphs use a compact memory-hub-centered mesh of alpha-particle 1000-note points, zoom-in keeps focused child clusters latent at the parent position before fading them in and only then separating them through 500-note, 250-note, 125-note and 60-note subgraphs with aggregated real links plus local sibling mesh links, keeps parent points during expansion to avoid visual jumps, then progressively raises the focused node budget so local areas keep nearby notes and links visible
|
|
606
606
|
|
|
607
607
|
The server indexes before starting by default. Use `--no-index` to skip that step:
|
|
608
608
|
|
|
@@ -32,10 +32,10 @@ const ecosystemSubgraphScaleThreshold = 0.18
|
|
|
32
32
|
const ecosystemMicroScaleThreshold = 0.08
|
|
33
33
|
const ecosystemFocusedParentLimit = 2
|
|
34
34
|
const ecosystemExpansionLevels = [
|
|
35
|
-
{ parentSize: 1000, childSize: 500, start: 0.
|
|
36
|
-
{ parentSize: 500, childSize: 250, start: 0.
|
|
37
|
-
{ parentSize: 250, childSize: 125, start: 0.
|
|
38
|
-
{ parentSize: 125, childSize: 60, start: 0.
|
|
35
|
+
{ parentSize: 1000, childSize: 500, start: 0.04, end: 0.62 },
|
|
36
|
+
{ parentSize: 500, childSize: 250, start: 0.16, end: 0.72 },
|
|
37
|
+
{ parentSize: 250, childSize: 125, start: 0.3, end: 0.78 },
|
|
38
|
+
{ parentSize: 125, childSize: 60, start: 0.46, end: 0.86 }
|
|
39
39
|
]
|
|
40
40
|
const zoomRecoveryGuardMs = 4200
|
|
41
41
|
const zoomCapTargetViewportShare = 0.72
|
|
@@ -894,11 +894,11 @@ const smoothStep = value => {
|
|
|
894
894
|
const zoomProgress = (scale, start, end) =>
|
|
895
895
|
smoothStep((scale - start) / Math.max(end - start, 0.0001))
|
|
896
896
|
|
|
897
|
-
const semanticZoomSpread = progress => Math.pow(progress, 2
|
|
897
|
+
const semanticZoomSpread = progress => Math.pow(progress, 4.2)
|
|
898
898
|
|
|
899
|
-
const
|
|
899
|
+
const opacityForProgress = progress => Math.pow(progress, 2.1)
|
|
900
900
|
|
|
901
|
-
const expandFocusedClusters = (parentClusters, childSize, spread, viewport) => {
|
|
901
|
+
const expandFocusedClusters = (parentClusters, childSize, progress, spread, viewport) => {
|
|
902
902
|
const focusPoint = ecosystemFocusPoint()
|
|
903
903
|
const expandedParentIds = new Set(nearestEcosystemParentIds(
|
|
904
904
|
parentClusters,
|
|
@@ -908,7 +908,7 @@ const expandFocusedClusters = (parentClusters, childSize, spread, viewport) => {
|
|
|
908
908
|
const childClusters = state.ecosystemClustersBySize.get(childSize) ?? []
|
|
909
909
|
const visibleChildClusters = childClusters
|
|
910
910
|
.filter(cluster => expandedParentIds.has(cluster.parentId))
|
|
911
|
-
.map(cluster => spreadChildClusterFromParent(cluster, spread))
|
|
911
|
+
.map(cluster => spreadChildClusterFromParent(cluster, progress, spread))
|
|
912
912
|
.filter(cluster => isClusterInViewport(cluster, viewport))
|
|
913
913
|
|
|
914
914
|
return {
|
|
@@ -917,11 +917,11 @@ const expandFocusedClusters = (parentClusters, childSize, spread, viewport) => {
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
|
|
920
|
-
const spreadChildClusterFromParent = (cluster, spread) => {
|
|
920
|
+
const spreadChildClusterFromParent = (cluster, progress, spread) => {
|
|
921
921
|
if (!Number.isFinite(cluster.parentX) || !Number.isFinite(cluster.parentY)) {
|
|
922
922
|
return {
|
|
923
923
|
...cluster,
|
|
924
|
-
lodOpacity:
|
|
924
|
+
lodOpacity: opacityForProgress(progress)
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
|
|
@@ -929,7 +929,7 @@ const spreadChildClusterFromParent = (cluster, spread) => {
|
|
|
929
929
|
...cluster,
|
|
930
930
|
x: cluster.parentX + (cluster.x - cluster.parentX) * spread,
|
|
931
931
|
y: cluster.parentY + (cluster.y - cluster.parentY) * spread,
|
|
932
|
-
lodOpacity:
|
|
932
|
+
lodOpacity: opacityForProgress(progress)
|
|
933
933
|
}
|
|
934
934
|
}
|
|
935
935
|
|
|
@@ -946,11 +946,8 @@ const selectHierarchicalEcosystemClusters = viewport => {
|
|
|
946
946
|
continue
|
|
947
947
|
}
|
|
948
948
|
const progress = zoomProgress(state.transform.scale, level.start, level.end)
|
|
949
|
-
if (progress <= 0.025) {
|
|
950
|
-
continue
|
|
951
|
-
}
|
|
952
949
|
const spread = semanticZoomSpread(progress)
|
|
953
|
-
const expansion = expandFocusedClusters(parentClusters, level.childSize, spread, viewport)
|
|
950
|
+
const expansion = expandFocusedClusters(parentClusters, level.childSize, progress, spread, viewport)
|
|
954
951
|
visibleClusters.push(...expansion.childClusters)
|
|
955
952
|
}
|
|
956
953
|
|
|
@@ -1005,11 +1002,12 @@ const ecosystemSiblingEdgesForClusters = (clusters, existingEdges) => {
|
|
|
1005
1002
|
}
|
|
1006
1003
|
|
|
1007
1004
|
const ecosystemEdgesForClusters = clusters => {
|
|
1008
|
-
const
|
|
1005
|
+
const edgeClusters = clusters.filter(cluster => cluster.isHub || clusterOpacity(cluster) > 0.018)
|
|
1006
|
+
const clusterById = new Map(edgeClusters.map(cluster => [cluster.id, cluster]))
|
|
1009
1007
|
const clusterIds = new Set(clusterById.keys())
|
|
1010
1008
|
const levelsBySize = []
|
|
1011
|
-
for (let index = 0; index <
|
|
1012
|
-
const cluster =
|
|
1009
|
+
for (let index = 0; index < edgeClusters.length; index += 1) {
|
|
1010
|
+
const cluster = edgeClusters[index]
|
|
1013
1011
|
if (!cluster.size || cluster.isHub) continue
|
|
1014
1012
|
if (!levelsBySize.some(level => level.size === cluster.size)) {
|
|
1015
1013
|
levelsBySize.push({
|
|
@@ -1060,7 +1058,7 @@ const ecosystemEdgesForClusters = clusters => {
|
|
|
1060
1058
|
})
|
|
1061
1059
|
}
|
|
1062
1060
|
|
|
1063
|
-
ecosystemSiblingEdgesForClusters(
|
|
1061
|
+
ecosystemSiblingEdgesForClusters(edgeClusters, edgeByClusterPair)
|
|
1064
1062
|
const edges = Array.from(edgeByClusterPair.values())
|
|
1065
1063
|
.sort((left, right) => right.weight - left.weight)
|
|
1066
1064
|
.slice(0, ecosystemClusterEdgeLimit)
|
|
@@ -1078,7 +1076,7 @@ const ecosystemEdgesForClusters = clusters => {
|
|
|
1078
1076
|
? [edge.sourceCluster.id]
|
|
1079
1077
|
: []
|
|
1080
1078
|
))
|
|
1081
|
-
const syntheticHubEdges =
|
|
1079
|
+
const syntheticHubEdges = edgeClusters
|
|
1082
1080
|
.filter(cluster => cluster.id !== hubCluster.id && !existingHubTargets.has(cluster.id))
|
|
1083
1081
|
.slice(0, ecosystemHubEdgeLimit)
|
|
1084
1082
|
.map(cluster => ({
|
|
@@ -2530,11 +2528,11 @@ const clusterRadiusPx = cluster => {
|
|
|
2530
2528
|
return 10
|
|
2531
2529
|
}
|
|
2532
2530
|
if (cluster.isHub) {
|
|
2533
|
-
return
|
|
2531
|
+
return 3.2
|
|
2534
2532
|
}
|
|
2535
2533
|
if (String(cluster.id).startsWith('ecosystem-')) {
|
|
2536
|
-
const base = cluster.size >= 1000 ?
|
|
2537
|
-
return Math.max(0.
|
|
2534
|
+
const base = cluster.size >= 1000 ? 0.68 : cluster.size >= 500 ? 0.64 : cluster.size >= 250 ? 0.6 : cluster.size >= 125 ? 0.56 : 0.52
|
|
2535
|
+
return Math.max(0.5, Math.min(1.55, base + Math.log10(cluster.count + 1) * 0.12))
|
|
2538
2536
|
}
|
|
2539
2537
|
return Math.max(8, Math.min(28, 8 + Math.log2(cluster.count + 1) * 3))
|
|
2540
2538
|
}
|
package/package.json
CHANGED