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

Function getPointSprite

graph-ui/src/galaxy/NodeCloud.tsx:72–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70/* Round, soft-edged sprite for point mode (module-level lazy singleton). */
71let pointSprite: THREE.CanvasTexture | null = null;
72function getPointSprite(): THREE.CanvasTexture {
73 if (pointSprite) return pointSprite;
74 const size = 64;
75 const canvas = document.createElement('canvas');
76 canvas.width = size;
77 canvas.height = size;
78 const ctx = canvas.getContext('2d')!;
79 const gradient = ctx.createRadialGradient(
80 size / 2, size / 2, 0,
81 size / 2, size / 2, size / 2,
82 );
83 gradient.addColorStop(0, 'rgba(255,255,255,1)');
84 gradient.addColorStop(0.5, 'rgba(255,255,255,0.9)');
85 gradient.addColorStop(1, 'rgba(255,255,255,0)');
86 ctx.fillStyle = gradient;
87 ctx.fillRect(0, 0, size, size);
88 pointSprite = new THREE.CanvasTexture(canvas);
89 return pointSprite;
90}
91
92/* Point-sprite mode for very large clouds */
93

Callers 1

NodePointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected