MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cloudPoint

Function cloudPoint

graph-ui/src/galaxy/organic-clusters.ts:101–108  ·  view source on GitHub ↗

Bell-shaped seeded noise avoids shells, grids and concentric rings.

(key: string, scale: number)

Source from the content-addressed store, hash-verified

99
100/** Bell-shaped seeded noise avoids shells, grids and concentric rings. */
101function cloudPoint(key: string, scale: number): Point {
102 const coordinate = (axis: string) => {
103 let sum = 0;
104 for (let i = 0; i < 6; i++) sum += hash(`${key}:${axis}:${i}`) / 0x100000000;
105 return (sum - 3) * scale;
106 };
107 return { x: coordinate('x'), y: coordinate('y'), z: coordinate('z') };
108}
109
110const finitePoint = (point: Point) => [point.x, point.y, point.z].every(Number.isFinite);
111

Callers 2

relaxFunction · 0.85
layoutOrganicClustersFunction · 0.85

Calls 1

coordinateFunction · 0.85

Tested by

no test coverage detected