MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / useMatchesNode

Function useMatchesNode

src/nodes/hooks/useMatchesNode.ts:5–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import type { MatchesNode } from '../types';
4
5export function useMatchesNode(): MatchesNode {
6 const showMatches = useUIStore((s) => s.showMatches);
7 const matchesDisplayMode = useUIStore((s) => s.matchesDisplayMode);
8 const matchesOpacity = useUIStore((s) => s.matchesOpacity);
9 const matchesColor = useUIStore((s) => s.matchesColor);
10 const matchesLineWidth = useUIStore((s) => s.matchesLineWidth);
11
12 return useMemo<MatchesNode>(
13 () => ({
14 nodeType: 'matches',
15 visible: showMatches,
16 displayMode: matchesDisplayMode,
17 opacity: matchesOpacity,
18 color: matchesColor,
19 lineWidth: matchesLineWidth,
20 }),
21 [showMatches, matchesDisplayMode, matchesOpacity, matchesColor, matchesLineWidth]
22 );
23}

Callers 5

CameraMatchesFunction · 0.90
nodes.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected