(hex: string, alpha: number)
| 592 | }; |
| 593 | |
| 594 | const getRGBA = (hex: string, alpha: number) => { |
| 595 | const r = parseInt(hex.slice(1, 3), 16); |
| 596 | const g = parseInt(hex.slice(3, 5), 16); |
| 597 | const b = parseInt(hex.slice(5, 7), 16); |
| 598 | return `rgba(${r}, ${g}, ${b}, ${alpha})`; |
| 599 | }; |
| 600 | |
| 601 | const filteredData = useMemo(() => { |
| 602 | const visibleNodes = data.nodes.filter((n: any) => visibleNodeTypes.has(n.type)); |