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

Function useRigNode

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

Source from the content-addressed store, hash-verified

3import type { RigNode } from '../types';
4
5export function useRigNode(): RigNode {
6 const showRig = useRigStore((s) => s.showRig);
7 const rigDisplayMode = useRigStore((s) => s.rigDisplayMode);
8 const rigColorMode = useRigStore((s) => s.rigColorMode);
9 const rigLineColor = useRigStore((s) => s.rigLineColor);
10 const rigLineOpacity = useRigStore((s) => s.rigLineOpacity);
11 const rigLineWidth = useRigStore((s) => s.rigLineWidth);
12
13 return useMemo<RigNode>(
14 () => ({
15 nodeType: 'rig',
16 visible: showRig,
17 displayMode: rigDisplayMode,
18 colorMode: rigColorMode,
19 color: rigLineColor,
20 opacity: rigLineOpacity,
21 lineWidth: rigLineWidth,
22 }),
23 [showRig, rigDisplayMode, rigColorMode, rigLineColor, rigLineOpacity, rigLineWidth]
24 );
25}

Callers 3

RigConnectionsFunction · 0.90
nodes.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected