diff --git a/src/components/Universe/Graph/Connections/index.tsx b/src/components/Universe/Graph/Connections/index.tsx index 4c4f47a3f..626308e72 100644 --- a/src/components/Universe/Graph/Connections/index.tsx +++ b/src/components/Universe/Graph/Connections/index.tsx @@ -16,7 +16,7 @@ export const Connections = memo(() => { {data?.links.map((l: Link) => { const isSelected = selectedNode?.ref_id === l.source || selectedNode?.ref_id === l.target - const lineWidth = selectedNode ? 0 : 0.5 + const lineWidth = selectedNode ? 0 : 1 return ( diff --git a/src/components/Universe/Graph/Cubes/NodePoints/Point/index.tsx b/src/components/Universe/Graph/Cubes/NodePoints/Point/index.tsx index b824f2c98..49e592427 100644 --- a/src/components/Universe/Graph/Cubes/NodePoints/Point/index.tsx +++ b/src/components/Universe/Graph/Cubes/NodePoints/Point/index.tsx @@ -2,12 +2,13 @@ import { Billboard, Instance } from '@react-three/drei' type Props = { color: string + scale: number } -export const Point = ({ color }: Props) => ( +export const Point = ({ color, scale }: Props) => ( <> - + ) diff --git a/src/components/Universe/Graph/Cubes/NodePoints/index.tsx b/src/components/Universe/Graph/Cubes/NodePoints/index.tsx index aa02e94a5..2a2fac254 100644 --- a/src/components/Universe/Graph/Cubes/NodePoints/index.tsx +++ b/src/components/Universe/Graph/Cubes/NodePoints/index.tsx @@ -59,7 +59,7 @@ const _NodePoints = () => { const primaryColor = normalizedSchemasByType[node.node_type]?.primary_color const color = primaryColor ?? (COLORS_MAP[nodeTypes.indexOf(node.node_type)] || colors.white) - return + return })} diff --git a/src/components/Universe/Graph/Cubes/index.tsx b/src/components/Universe/Graph/Cubes/index.tsx index b547af67d..844ccff98 100644 --- a/src/components/Universe/Graph/Cubes/index.tsx +++ b/src/components/Universe/Graph/Cubes/index.tsx @@ -114,7 +114,7 @@ export const Cubes = memo(() => { const hide = !!selectedNode && (relativeIds.includes(node.ref_id) || selectedNode.ref_id === node.ref_id) return ( - + { material.color = new Color(lineColor) material.transparent = true - material.opacity = 0.2 + material.opacity = 1 } }) } diff --git a/src/stores/useGraphStore/index.ts b/src/stores/useGraphStore/index.ts index 378bff6ff..d2c062aa7 100644 --- a/src/stores/useGraphStore/index.ts +++ b/src/stores/useGraphStore/index.ts @@ -262,7 +262,12 @@ export const useGraphStore = create()((set, get) => ({ .force( 'y', forceY() - .y((node: NodeExtended) => nodeTypes.indexOf(node.node_type) * 400) + .y((node: NodeExtended) => { + const index = nodeTypes.indexOf(node.node_type) + const yOffset = Math.floor(index / 2) * 400 + + return index % 2 === 0 ? yOffset : -yOffset + }) .strength(10), ) },