Refactor MoveControls and TransformControls for improved asset manipulation
- Cleaned up MoveControls component by removing unused variables and optimizing event handling. - Enhanced asset movement logic with better key event detection and state management. - Removed deprecated transform mode state from store. - Updated worldTypes to remove unnecessary positionY property. - Introduced TransformControls component for handling object transformations (translate/rotate) with proper state management and backend updates. - Implemented event handling for mouse actions and keyboard shortcuts to toggle transformation modes.
This commit is contained in:
@@ -144,11 +144,6 @@ export const useMovePoint = create<any>((set: any) => ({
|
||||
setMovePoint: (x: any) => set(() => ({ movePoint: x })),
|
||||
}));
|
||||
|
||||
export const useTransformMode = create<any>((set: any) => ({
|
||||
transformMode: null,
|
||||
setTransformMode: (x: any) => set(() => ({ transformMode: x })),
|
||||
}));
|
||||
|
||||
export const useDeletePointOrLine = create<any>((set: any) => ({
|
||||
deletePointOrLine: false,
|
||||
setDeletePointOrLine: (x: any) => set(() => ({ deletePointOrLine: x })),
|
||||
|
||||
Reference in New Issue
Block a user