File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,11 +23,6 @@ interface NetworkGraph3DProps {
2323
2424const NetworkNode : React . FC < { node : Node ; isHovered : boolean ; onHover : ( id : string | null ) => void } > = ( { node, isHovered, onHover } ) => {
2525 const meshRef = useRef < THREE . Mesh > ( null ) ;
26- const group = useMemo ( ( ) => {
27- const g = new THREE . Group ( ) ;
28- g . position . set ( ...node . position ) ;
29- return g ;
30- } , [ node . position ] ) ;
3126
3227 useFrame ( ( ) => {
3328 if ( meshRef . current && isHovered ) {
@@ -47,7 +42,7 @@ const NetworkNode: React.FC<{ node: Node; isHovered: boolean; onHover: (id: stri
4742 const nodeSize = isHovered ? 0.3 : 0.2 ;
4843
4944 return (
50- < primitive object = { group } >
45+ < group position = { node . position } >
5146 < Sphere
5247 ref = { meshRef }
5348 args = { [ nodeSize , 32 , 32 ] }
@@ -73,7 +68,7 @@ const NetworkNode: React.FC<{ node: Node; isHovered: boolean; onHover: (id: stri
7368 { node . label }
7469 </ Text >
7570 ) }
76- </ primitive >
71+ </ group >
7772 ) ;
7873} ;
7974
You can’t perform that action at this time.
0 commit comments