feat: Enhance duplication and movement controls with axis constraints and snapping functionality

- Added axis constraint toggling for duplication and movement controls (X and Z axes).
- Implemented snapping functionality for asset positioning based on modifier keys (Ctrl, Shift).
- Created utility functions for handling asset position and rotation snapping.
- Refactored moveControls3D and rotateControls3D to utilize new snapping functions.
- Introduced state management for key events and axis constraints.
- Updated styles for new UI components related to asset filtering and transformation.
- Removed deprecated snapControls utility function.
This commit is contained in:
Nalvazhuthi
2025-08-21 09:57:48 +05:30
20 changed files with 1242 additions and 97 deletions

View File

@@ -638,7 +638,21 @@ export const useSelectedPath = create<any>((set: any) => ({
selectedPath: "auto",
setSelectedPath: (x: any) => set({ selectedPath: x }),
}));
export const useContextActionStore = create<any>((set: any) => ({
contextAction: null,
setContextAction: (x: any) => set({ contextAction: x }),
}));
// Define the store's state and actions type
interface DecalStore {
selectedSubCategory: string;
setSelectedSubCategory: (subCategory: string) => void;
}
// Create the Zustand store with types
export const useDecalStore = create<DecalStore>((set) => ({
selectedSubCategory: '',
setSelectedSubCategory: (subCategory: string) => set({ selectedSubCategory: subCategory }),
}));