({ box, radius }: { box: FrameBox; radius: number })
| 679 | } |
| 680 | |
| 681 | function FlatCamera({ box, radius }: { box: FrameBox; radius: number }): JSX.Element { |
| 682 | const size = useThree((state) => state.size); |
| 683 | const zoom = useMemo( |
| 684 | () => orthographicZoom(box, size.width, size.height), |
| 685 | [box, size.width, size.height], |
| 686 | ); |
| 687 | const distance = radius * 2 + 1000; |
| 688 | return ( |
| 689 | <OrthographicCamera |
| 690 | makeDefault |
| 691 | position={[box.centerX, box.centerY, distance]} |
| 692 | up={[0, 1, 0]} |
| 693 | zoom={zoom} |
| 694 | near={0.1} |
| 695 | far={distance + radius * 4 + 1000} |
| 696 | /> |
| 697 | ); |
| 698 | } |
| 699 | |
| 700 | /* Die Naht der Einpassung (W10b, AC5) */ |
| 701 |
nothing calls this directly
no test coverage detected