- Add cluster boundary visualization with color-coded type grouping - Implement new MemoryGraphVisualization component for Cognee integration - Add TypeScript types for Cognee API integration (CogneeAPI, NodeSet) - Enhance node swarm materials with better color hierarchy - Improve edge materials with opacity controls - Add metaball density rendering for visual clustering - Update demo and dataset visualization pages with new features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
27 lines
814 B
TypeScript
27 lines
814 B
TypeScript
import * as three from "three";
|
|
import createClusterBoundaryMaterial from "../materials/createClusterBoundaryMaterial";
|
|
|
|
export interface ClusterInfo {
|
|
center: { x: number; y: number };
|
|
radius: number;
|
|
color: three.Color;
|
|
}
|
|
|
|
export default function createClusterBoundaryMesh(
|
|
cluster: ClusterInfo
|
|
): three.Mesh {
|
|
// Create a circle geometry for the cluster boundary
|
|
const geometry = new three.PlaneGeometry(
|
|
cluster.radius * 2.5, // Make it larger to encompass the cluster
|
|
cluster.radius * 2.5
|
|
);
|
|
|
|
const material = createClusterBoundaryMaterial(cluster.color);
|
|
const mesh = new three.Mesh(geometry, material);
|
|
|
|
// Position the mesh at the cluster center
|
|
mesh.position.set(cluster.center.x, cluster.center.y, -100); // Behind everything else
|
|
mesh.renderOrder = -1;
|
|
|
|
return mesh;
|
|
}
|