Skip to content

Commit

Permalink
Merge pull request #2395 from stakwork/feature/colors-fix
Browse files Browse the repository at this point in the history
feat: update colors for nodes
  • Loading branch information
Rassl authored Oct 28, 2024
2 parents e0231d0 + 22d3e64 commit ac16a88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Universe/Graph/Cubes/NodePoints/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const _NodePoints = () => {
range={1000}
visible={!selectedNode}
>
<meshStandardMaterial />
<meshBasicMaterial />
{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)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Universe/Graph/Cubes/Text/index.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 })
}
})
}}
Expand Down

0 comments on commit ac16a88

Please sign in to comment.