Refactor event handling and state management for StaticMachine and ArmBot types

- Updated `loadInitialFloorItems.ts` to streamline event data processing for StaticMachine and ArmBot types.
- Enhanced `copyPasteControls.tsx` and `duplicationControls.tsx` to support StaticMachine and ArmBot event data creation with proper UUID generation.
- Modified `moveControls.tsx`, `rotateControls.tsx`, and `transformControls.tsx` to include event data in the state.
- Improved `pathConnector.tsx` to handle connections for StaticMachine and ArmBot types, including deletion functionality.
- Updated store management to rename `useDeleteModels` to `useDeleteTool` for clarity.
- Adjusted type definitions in `worldTypes.d.ts` to include StaticMachine and ArmBot event schemas.
This commit is contained in:
2025-04-08 14:56:45 +05:30
parent daa507e464
commit b5ba3a0ce1
22 changed files with 789 additions and 158 deletions

View File

@@ -106,9 +106,9 @@ export const useMenuVisible = create<any>((set: any) => ({
setMenuVisible: (x: any) => set(() => ({ menuVisible: x })),
}));
export const useDeleteModels = create<any>((set: any) => ({
deleteModels: false,
setDeleteModels: (x: any) => set(() => ({ deleteModels: x })),
export const useDeleteTool = create<any>((set: any) => ({
deleteTool: false,
setDeleteTool: (x: any) => set(() => ({ deleteTool: x })),
}));
export const useToolMode = create<any>((set: any) => ({
@@ -164,9 +164,9 @@ export const useSelectedWallItem = create<any>((set: any) => ({
setSelectedWallItem: (x: any) => set(() => ({ selectedWallItem: x })),
}));
export const useselectedFloorItem = create<any>((set: any) => ({
export const useSelectedFloorItem = create<any>((set: any) => ({
selectedFloorItem: null,
setselectedFloorItem: (x: any) => set(() => ({ selectedFloorItem: x })),
setSelectedFloorItem: (x: any) => set(() => ({ selectedFloorItem: x })),
}));
export const useDeletableFloorItem = create<any>((set: any) => ({