feat: Enhance camera control and user experience with improved key handling and speed adjustments

This commit is contained in:
2025-04-29 13:42:24 +05:30
parent 617d29f2e3
commit ab5ade7bee
5 changed files with 160 additions and 93 deletions

View File

@@ -69,7 +69,9 @@ const ZoneGroup: React.FC = () => {
},
transparent: true,
depthWrite: false,
}), []);
}),
[]
);
useEffect(() => {
const fetchZones = async () => {
@@ -148,6 +150,7 @@ const ZoneGroup: React.FC = () => {
}
}, [toolMode, toggleView]);
// eslint-disable-next-line react-hooks/exhaustive-deps
const addZoneToBackend = async (zone: {
zoneId: string;
zoneName: string;
@@ -503,6 +506,15 @@ const ZoneGroup: React.FC = () => {
draggedSphere,
movePoint,
activeLayer,
raycaster,
pointer,
controls,
plane,
setZones,
setZonePoints,
addZoneToBackend,
handleDeleteZone,
updateZoneToBackend,
]);
useFrame(() => {
@@ -551,6 +563,7 @@ const ZoneGroup: React.FC = () => {
key={index}
position={midpoint}
rotation={[0, -angle, 0]}
// visible={false}
>
<planeGeometry args={[planeWidth, planeHeight]} />
<primitive