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

Function FlatTarget

graph-ui/src/galaxy/GraphScene.tsx:663–679  ·  view source on GitHub ↗

* Der Drehpunkt der Steuerung, auf die Ebene z=0 gelegt. * * Ohne das bliebe er am Ursprung stehen, und OrbitControls zwingt die Kamera, * auf ihn zu sehen: eine Kamera bei (cx, cy, d), die auf (0, 0, 0) blickt, * steht schief. Das Ergebnis waere eine "Ansicht von oben", die schraeg ist, * und

({
    box,
    controlsRef,
}: {
    box: FrameBox;
    controlsRef: RefObject<OrbitControlsImpl | null>;
})

Source from the content-addressed store, hash-verified

661 * ein Effekt ausserhalb liefe gegen ein Ref, das darin noch nicht gesetzt ist.
662 */
663function FlatTarget({
664 box,
665 controlsRef,
666}: {
667 box: FrameBox;
668 controlsRef: RefObject<OrbitControlsImpl | null>;
669}): null {
670 useEffect(() => {
671 const controls = controlsRef.current;
672 if (controls === null) {
673 return;
674 }
675 controls.target.set(box.centerX, box.centerY, 0);
676 controls.update();
677 }, [box, controlsRef]);
678 return null;
679}
680
681function FlatCamera({ box, radius }: { box: FrameBox; radius: number }): JSX.Element {
682 const size = useThree((state) => state.size);

Callers

nothing calls this directly

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected