From 22d3e64151930c92264ebf55968989621ceedfdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Mon, 28 Oct 2024 14:20:46 +0300 Subject: [PATCH] feat: update colors for nodes --- src/components/Universe/Graph/Cubes/NodePoints/index.tsx | 2 +- src/components/Universe/Graph/Cubes/Text/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Universe/Graph/Cubes/NodePoints/index.tsx b/src/components/Universe/Graph/Cubes/NodePoints/index.tsx index 134a89d51..aa02e94a5 100644 --- a/src/components/Universe/Graph/Cubes/NodePoints/index.tsx +++ b/src/components/Universe/Graph/Cubes/NodePoints/index.tsx @@ -54,7 +54,7 @@ const _NodePoints = () => { range={1000} visible={!selectedNode} > - + {data?.nodes.map((node: NodeExtended) => { const primaryColor = normalizedSchemasByType[node.node_type]?.primary_color const color = primaryColor ?? (COLORS_MAP[nodeTypes.indexOf(node.node_type)] || colors.white) diff --git a/src/components/Universe/Graph/Cubes/Text/index.tsx b/src/components/Universe/Graph/Cubes/Text/index.tsx index 1d6e2eedb..8b1e6c005 100644 --- a/src/components/Universe/Graph/Cubes/Text/index.tsx +++ b/src/components/Universe/Graph/Cubes/Text/index.tsx @@ -1,7 +1,7 @@ import { Billboard, Svg, Text } from '@react-three/drei' import { useFrame } from '@react-three/fiber' import { memo, useMemo, useRef } from 'react' -import { Mesh, MeshStandardMaterial, Vector3 } from 'three' +import { Mesh, MeshBasicMaterial, Vector3 } from 'three' import { Icons } from '~/components/Icons' import { useNodeTypes } from '~/stores/useDataStore' import { useGraphStore, useSelectedNode, useSelectedNodeRelativeIds } from '~/stores/useGraphStore' @@ -145,7 +145,7 @@ export const TextNode = memo(({ node, hide, isHovered }: Props) => { if (child instanceof Mesh) { // Apply dynamic color to meshes // eslint-disable-next-line no-param-reassign - child.material = new MeshStandardMaterial({ color }) + child.material = new MeshBasicMaterial({ color }) } }) }}